How to convert the Hexa decilmal file into txt formet

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

maheshkumar.bm
Participant
Posts: 19
Joined: Tue Feb 22, 2011 10:02 pm
Location: mumbai

How to convert the Hexa decilmal file into txt formet

Post 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.
mahesh kumar B.M.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

First you'll need to clarify for us what exactly it is you mean by a "hexa decimal" file. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
maheshkumar.bm
Participant
Posts: 19
Joined: Tue Feb 22, 2011 10:02 pm
Location: mumbai

how to Conrvet this hexa format to text

Post 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.
Last edited by maheshkumar.bm on Thu Mar 17, 2011 7:47 am, edited 1 time in total.
mahesh kumar B.M.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post 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,
Last edited by jwiles on Wed Mar 16, 2011 1:19 pm, edited 1 time in total.
- james wiles


All generalizations are false, including this one - Mark Twain.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post 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,
- james wiles


All generalizations are false, including this one - Mark Twain.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Looks to me more like the output of a hex dump of a file rather than any actual source file itself. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post 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
- james wiles


All generalizations are false, including this one - Mark Twain.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

Good info for those who aren't used to digging around in the dumps, tho :)
- james wiles


All generalizations are false, including this one - Mark Twain.
maheshkumar.bm
Participant
Posts: 19
Joined: Tue Feb 22, 2011 10:02 pm
Location: mumbai

please Provide me the liknks

Post 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.
mahesh kumar B.M.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
maheshkumar.bm
Participant
Posts: 19
Joined: Tue Feb 22, 2011 10:02 pm
Location: mumbai

Post 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.
mahesh kumar B.M.
maheshkumar.bm
Participant
Posts: 19
Joined: Tue Feb 22, 2011 10:02 pm
Location: mumbai

Re: how to Conrvet this hexa format to text

Post by maheshkumar.bm »

How to convert the hexadecimal file which is comming from mainframe side into in ascii format
Last edited by maheshkumar.bm on Thu Mar 17, 2011 7:49 am, edited 1 time in total.
mahesh kumar B.M.
dsx999
Participant
Posts: 29
Joined: Mon Aug 11, 2008 3:40 am

Post by dsx999 »

You need to get and understand the copybook layout first as suggested above.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: how to Conrvet this hexa format to text

Post 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? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply