how to read packed decimal xyz.vmf file

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

Post Reply
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Never heard of the "vmf" file extension and searches only turn up game or media related usage. :?

So... since you mentioned EBCDIC and packed decimal, I assume this is from a mainframe, yes? And if so that typically means COBOL and you should have an "FD" or File Description for this which lists the fields, types and sizes. Do you have that and can post it? You would import that metadata and leverage it using the Complex Flat File stage which is specifically built for reading these kind of files.

Also spend some time getting to know Franklin's excellent FAQ entry on the subject.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sreewin7
Participant
Posts: 41
Joined: Tue Sep 14, 2010 8:48 pm

Re: how to read packed decimal xyz.vmf file

Post by sreewin7 »

Thanks so much for the response.

1) Yes this file is coming from Mainframe.
2) I got the file description and i used the same metadata using CFF stage and
in the file description i have characters and decimal datatypes,Where as all characters are showing some wied characters and decimals are coming as expected, i need your help to read all datatypes.

Thanks and Regards,
Sree
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Is there anyone you work with that is familiar with handling EBCDIC files and all they bring to the table in an ASCII world and can help you? They don't need to know DataStage, that's the part you bring.

So... the packed decimals are fine but the character fields have issues? I still think you should post the FD and then perhaps a sample of your output as well. Then see if anyone here who has expertise using the stage can help. Hint - that's not me. I'm just trying to get specifics about your issue.
-craig

"You can never have too many knives" -- Logan Nine Fingers
UCDI
Premium Member
Premium Member
Posts: 383
Joined: Mon Mar 21, 2016 2:00 pm

Post by UCDI »

really, really old systems may store 7 bits to the character. this can garble the output if you assumed 8 bits to the character. Its a way of packing the data for systems that do not use extended ascii. I havent seen this in a very, very long time, so my memory is a little fuzzy...
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

Craig, thanks for the praise.

Sree,

I suggest starting from the beginning. My FAQ assumes some understanding of mainframe systems, so I'll get very basic.

The Cobol FD is not always 100% imported to DataStage. There are a couple of issues with it from v8.x that may be true in v9.x, and are still true in v11.x. Your best test is to use the view data function in the Output tab, and it will help you identify those issues. The most common error is that the data you are reading is not exactly what your FD defines. Column lengths can be a problem, especially with signed numeric fields.

How is your file being read? Is it being transferred or copied to your local server first? You might be seeing the ASCII version of it instead of EBCDIC. Your sample records do not look like EBCDIC.

If you can, please post the actual FD with an EBCDIC sample of your data.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
Post Reply