COBOL File Issues

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
anudeepdasari001
Participant
Posts: 58
Joined: Mon Dec 14, 2015 3:16 pm
Location: Arizona

COBOL File Issues

Post 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.
anudpETL
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post 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.
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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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...
-craig

"You can never have too many knives" -- Logan Nine Fingers
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post 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:
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