Ebcdic to Ascii

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
kamesh
Participant
Posts: 72
Joined: Tue May 27, 2003 1:47 am

Ebcdic to Ascii

Post by kamesh »

Hi,
In my project, my extract team is going send source data in Ascii format fixed length flat file.But as of now i have only cobal copy book for the ebcdic format file for file definition to start development.Will it be ok if i load copybook ( contains packed fields) using DS manager and load metadata to see actual dataypes and fields lenghts for ascill file???
Please let me know if anyone knows this.
Thanks
kamesh
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Your problem isn't directly with the metadata. Converting from EBCDIC to ASCII will have changed the packed binary field values; you will need to manualyl convert back to EBCDIC and then unpack them before these columns are useable.
landaghaar
Participant
Posts: 38
Joined: Wed Sep 19, 2007 10:11 am
Location: Canada

Post by landaghaar »

I had similar problem, unfortunately no one could help me here. I had to find the answer with try and error thingy.

Do the following steps:
1. import the copy book
2. double click on the definition
3. select the "parallel" and delete the following properties:
Record type= implicit
characterset=epcidic
data format=binary
allow all zeros=yes
4. add the following properties:
Under record level: Final delimiter=end
Under Field Defaults: Delimiter=<whatever your delimiter is>
Quote=<if your data is in quotes yes, else none>

5. Then click on "Columns" tab and right click on the first row and select the option Edit row. for character columns you just click on move to next column, once you reach integer or decimal fields, remove the properties of packed=yes, data format=binary and Byte order=big/small endian
after removing them, click apply for each column and move to the next one, make sure you removed these properties for each and every one of the integer and decimal fields. then click ok and thats it.

now you can open the flat file with this definition, if you dont do it, you will have hard time reading numbers.

hope it helps.
Post Reply