Page 1 of 1

Just Learning - COBOL example of real issue

Posted: Fri Nov 03, 2006 9:32 am
by GoinBuggy
Jan,

This is a simpler example of what this file I'm working with is like. I wish I could send the actual file. I hope I am translating this right. Thanks for your help.

Copy Book:
01 TEST2-Record.
03 ITEM1-CNT PIC 9(2).
03 ITEM2-CNT PIC 9(2).
03 ITEM1-SECTION.
05 ITEM1-SECT OCCURS 10 TIMES.
10 ITEM1 PIC X(2).
03 ITEM2-SECTION REDEFINES ITEM1-SECTION.
05 ITEM2-SECT OCCURS 10 TIMES.
10 ITEM2 PIC X(1).
10 ITEM3 PIC 9(1).

Input Data w/<CR><LF>:

0202aabbA1B1 <CR><LF>
0505zzyyxxwwvvA9B8C7D6E5<CR><LF>

Posted: Fri Nov 03, 2006 9:51 am
by ray.wurlod
Welcome aboard. :D

Are you using DataStage TX, or DataStage server or parallel jobs?

I am unfamiliar with TX but in the other scenarios you can import the table definition from the COBOL FD and use a Complex Flat File stage to process it.

Posted: Fri Nov 03, 2006 10:04 am
by GoinBuggy
TX v8.1

Posted: Fri Nov 03, 2006 10:48 am
by janhess
I've fixed it.