Page 1 of 1

Read COBOL file with occure and redefine clauses

Posted: Wed Apr 04, 2007 11:44 pm
by Mandar_Deshpande
We are trying to read a COBOL file using Sequential and / or Complex Flat File using Datastage Server jobs. The structure of the file is comlex like there are eight occure clauses and 8 redefine clauses. we have tried to read this file using each and every approach.
I think the file has parallel Occures and in DS doesn't support two or more occure clauses in the same definition. and we need to process there parallel occure clauses down seperate output links
Now my question is how to read this file? either using parallel occures approach or is there any other method to read this file. If anybody has solution then please send me the answer. I request to send the sample code or reference document for the same.

Thanks and Regards
Mandar

Please use sequential file approach

Posted: Thu Apr 05, 2007 2:06 am
by smrutiranjannayak
Hi ,
I think for redefined columns you can go for sequential file approach .
Say for example you have 5 fields which have column position starting from 1-50 . They are

field datatype
a char(10)
b int(5)
c char(20)
d char(15)

Now let suppose the same field will again be used in some different columns but with different slicing means diff pattern . e.g,

x char(7)
y char(20)
z char(15)
w char(8 )

so here what you can do is group the data from 1-50 and slice it according to your requirement .

This is a approach through sequential file

If you want tu use CFF stage then i think in cff stage property there is a option where you can specify which columns have been redefined . So cff stage will slice it and take it accordingly .
I have not much knowledge on cff stage .

Cheers ...hope the informatiion will be useful.
:lol: