Page 1 of 1

Posted: Sun Jan 15, 2017 9:14 am
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.

Re: how to read packed decimal xyz.vmf file

Posted: Mon Jan 16, 2017 4:51 pm
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

Posted: Tue Jan 17, 2017 8:17 am
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.

Posted: Tue Jan 17, 2017 10:30 am
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...

Posted: Tue Jan 17, 2017 10:55 am
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.