Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Jan 10, 2005 11:18 am Post subject:
You need to explain what you want in more detail since what you've said does not really make any sense. Show an example of what your input looks like and what you want your output to look like. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
I have an input file with Binary Data, which is difficult to interpret. I want to read this data and converting to EBCDIC should help me understand the data.
The input binary data looks something like this:
n. _________________ Regards,
Programmer
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Mon Jan 10, 2005 12:31 pm Post subject:
Programmer1,
You can binary fields into readable format using editing masks. For ex if you have binary field at pos1 for 4 bytes , you can use the following JCL to convert the binary field to readable numeric field.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Jan 10, 2005 1:46 pm Post subject:
In order to "decode" the data as numerics in the way that Kolusu suggests, you would have to know what kind of numerics the data represents. For example, if you have these 4 hex bytes:
0123456C
they probably represent a PD field, not a BI field, so you'd need to use:
1,4,PD,edit
instead of:
1,4,BI,edit
But from what you've said, you don't have any idea what the binary data represents. So your first step would be to display the data as hex characters. Assuming your input file has RECFM=FB and LRECL=80, you can use the following DFSORT job to display the data as hex:
If your input file has other attributes, you can change the job accordingly.
By looking at the hex display of the binary data, you may be able to figure out what it represents, and then display it more appropriately. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
The Binary data that I am using would also be having some characters and special characters with the numerals.
I understand that your JCL would be helpful if all the data is surely numeric.
Is there a way to translate this data as single string ? Or will I always have to break the data into bytes to convert? _________________ Regards,
Programmer
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Jan 11, 2005 11:10 am Post subject:
Programmer1,
Yes, there are other ways to view the data in hex, including using HEX ON.
But viewing it in hex is only an intermediate step to show you what the data looks like so you can see how to interpret it more approrpriately.
Ideally, you would have a mapping of the data from whoever created it so you knew what it actually represented. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Jan 11, 2005 12:14 pm Post subject:
Are you talking about HEX ON under ISPF EDIT? If so, then it just shows you the hex representation of each character, just like DFSORT's p,m,HEX does. If the binary character is X'75', then the hex representation is 75 and that's what HEX ON will show you. For example:
[code:1:553e382585]
000013 _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You can see that you really need to know the format you're dealing with in order to interpret the value correctly. Once you know the format of the data, you can use DFSORT or DFSORT's ICETOOL to convert numeric types to displayable characters or to other numeric types. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum