Complex Flat File - Read COBOL file

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
celso.pupio
Participant
Posts: 4
Joined: Mon Aug 20, 2018 10:41 am
Location: Brasília/Brazil

Complex Flat File - Read COBOL file

Post by celso.pupio »

Hi, guys.

I have a CFF stage to read a 400 bytes fixed block COBOL file.

The records have some end filler bytes. Example: 230 data bytes and 170 filler bytes, according to the book/file definitions.

When I set the fields on the Records tab, if I define 170 bytes for the filler, the second record "goes into" the first one. But if I define just 1 byte, the reading works correctly.

Anyone knows why it happens?


Other question: in certainly position of the record, a column has 8 character bytes - PIC X(8), but some records seems to have an non display data.

On TSO, the fields is like this ("hex on"):

Code: Select all

........
00000000
00000000
The cobol guy said that it's because of non initialized variables or initialized with LOW-VALUES when generating the file.

I could read these records when I set the field as DECIMAL-15 on CFF (layout PIC 9(15) COMP-3), but it will not work with the records that has characters.


Is there some way to handle this cases on DataStage?

Thanks.
Post Reply