Page 1 of 1

COBOL File Issues

Posted: Wed Apr 11, 2018 7:40 am
by anudeepdasari001
I am trying to read a COBOL file, But i am experiencing '{','}' signs in the data. My options are EBCDIC and Binary. But still seeing these values when i am trying to view the data in output tab.

I looked at many post here on DSXCHANGE, but i could'nt figure out the exact answer, Appreciate if someone can help in this.

Posted: Wed Apr 11, 2018 9:20 am
by FranklinE
Many issues you'll face with Cobol data is covered in the FAQ linked at the bottom of my post.

I believe you are looking at a signed numeric field. The data is alphanumeric, but the digit with the "odd" character has been changed to contain the sign.

"0" = xF0 and in many numeric formats the half-byte value xF means unsigned.
explicit "+0" = xC0 or "{"
explicit "-0" = xD0 or "}"

The pattern repeats for digit characters 1-9. Have an EBCDIC character set chart handy.

In the table definition, the column derived from PIC S9(#) should be listed in CFF as DISPLAY NUMERIC, and have the signed attribute.

Posted: Wed Apr 11, 2018 9:26 am
by chulett
First off, see if anything helps in the awesome FAQ that Franklin Evans put together on this subject... or at least what I assume is the same subject. Verify for us what stage you are using to read the COBOL file - the Complex Flat File stage? It also seems like posting some of your sample data would help as well and/or the CFD.

... and he sneaks in here behind me while I'm typing. Le sigh. Not going to waste all this digital ink so...

Posted: Wed Apr 11, 2018 9:30 am
by FranklinE
Craig, the server is not happy. My post took a couple of minutes to be saved and displayed. Indeed, I expect this post to be visible sometime in the year 2022. :lol: