Page 1 of 1

Ebcdic to Ascii

Posted: Sun Oct 28, 2007 4:57 am
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

Posted: Sun Oct 28, 2007 2:10 pm
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.

Posted: Mon Oct 29, 2007 9:33 am
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.