Read COBOL file with occure and redefine clauses

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Mandar_Deshpande
Participant
Posts: 12
Joined: Wed Mar 02, 2005 1:59 am

Read COBOL file with occure and redefine clauses

Post 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
smrutiranjannayak
Participant
Posts: 22
Joined: Mon Apr 02, 2007 4:02 am
Location: MUMBAI
Contact:

Please use sequential file approach

Post 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:
Smrutiranjan Nayak
Post Reply