Page 1 of 2

How to convert the Hexa decilmal file into txt formet

Posted: Wed Mar 16, 2011 11:09 am
by maheshkumar.bm
Hi all,

How to extract the hexa decimal file through data stage px and
How to convert that hexa decimal file into txt format.

Posted: Wed Mar 16, 2011 11:29 am
by chulett
First you'll need to clarify for us what exactly it is you mean by a "hexa decimal" file. :?

how to Conrvet this hexa format to text

Posted: Wed Mar 16, 2011 12:25 pm
by maheshkumar.bm
chulett wrote:First you'll need to clarify for us what exactly it is you mean by a "hexa decimal" file. :?

I have data like this in hexa decimal file.
i that which is i mentiond under line that should be skipped and which is in bold that will be as a single row and which is represent as italic that should be second.

Posted: Wed Mar 16, 2011 1:00 pm
by jwiles
You have been given an EBCDIC file, sourced from a mainframe. Have you been provided with any sort of layout information, perhaps a COBOL copybook? How about any business rules/job requirements/etc.?

It appears to me that these are variable-length records, this one being 80-bytes in length although you have 81 bytes in bold. This record contains a mixture of character and packed-decimal data. A quick guess at the layout for this record only:

Bytes 1-4: "Record Descriptor Word" The length in bytes 1-2 SmallInt (big-endian), zeros in bytes 3-4. The value here is 80 (bytes), which includes these 4 bytes
Bytes 5-32: Character (EBCDIC). Value is "HDR A01PACK 11069338094B17 N"
Bytes 33-36: Packed Decimal 7 digits Value 0111069
Bytes 37-40: Packed Decimal 7 digits Value 1338094
Bytes 41-80: Filler

I expect that other records in the file have different layouts. You really need additional information from the source provider/project manager before you can properly process the file.

Regards,

Posted: Wed Mar 16, 2011 1:19 pm
by jwiles
The second record (in italics) should start with the 5th byte on the line:

000120 00 00 00 00 00 2a 00 00 80 45 00 00 00 1c 29 00
0000140 00 1c 01 11 00 06 9f 00 00 00 00 00 00 00 00 00

The length is 42 bytes (002a = 42), but you only show 28 bytes of the record.

Bytes 1-4: RDW (as above) Length is 42 bytes including the RDW
Bytes 5-10: Packed Decimal 11 Digits Value +80450000001
OR could be more than one column
Bytes 11-14: Packed Decimal 7 Digits Value +2900001
Bytes 15-19: Packed Decimal 9 Digits Value 011100069

The remainder looks to be filler. Again, an actual layout from the provider would be very helpful as all I've done here is to identify as best as I could what's there.

Regards,

Posted: Wed Mar 16, 2011 3:15 pm
by chulett
Looks to me more like the output of a hex dump of a file rather than any actual source file itself. :?

Posted: Wed Mar 16, 2011 3:41 pm
by jwiles
Well, yeah...16 bytes per line and so on. I've seen enough of those I tend to ignore that point tho...parts is parts, data is data

Posted: Wed Mar 16, 2011 4:55 pm
by chulett
True... not sure why I felt like pointing that out. Guess just wanted to be clear that's not the actual source file that was posted but rather a dump of it, what with it being all hexy and such.

Posted: Wed Mar 16, 2011 6:56 pm
by jwiles
Good info for those who aren't used to digging around in the dumps, tho :)

please Provide me the liknks

Posted: Thu Mar 17, 2011 1:53 am
by maheshkumar.bm
Hi ALL , tnx for u r Valuable replays

I am very new to this type of hexa decimal files.

Can any one please provide me some links to get more knowledge on extracting of hexadecimal files through CFF.

Posted: Thu Mar 17, 2011 1:58 am
by ray.wurlod
No, because there aren't any. You're probably better off using a Sequential File stage (possibly with a fixed record size).

Posted: Thu Mar 17, 2011 2:09 am
by maheshkumar.bm
ray.wurlod wrote:No, because there aren't any. You're probably better off using a Sequential File stage (possibly with a fixed record size). ...
Sequential file ..is it have capability to extract that type of file ,
if will i use as fixed record and the how to split that data into rows.

Re: how to Conrvet this hexa format to text

Posted: Thu Mar 17, 2011 3:30 am
by maheshkumar.bm
How to convert the hexadecimal file which is comming from mainframe side into in ascii format

Posted: Thu Mar 17, 2011 4:03 am
by dsx999
You need to get and understand the copybook layout first as suggested above.

Re: how to Conrvet this hexa format to text

Posted: Thu Mar 17, 2011 6:49 am
by chulett
maheshkumar.bm wrote:This is my actual input data....
OK... this statement worries me and makes me harken back to my first statement. Are you saying that if you open your file in Windows using Notepad, what you posted is exactly what you see? :?