How to write multiple records from 1 input record
Moderators: chulett, rschirm, roy
How to write multiple records from 1 input record
We are using DataStage XE 5.2 on HP Unix server. In one of my job I have to read a Sequential File and after performing some business rules write to a Sequential file. The input file has some amount fileds which are occuring multiple times (say OCCURS 5 times)and if those fileds are NOT 0 then I have to write multiple records in the output file. The output file can have 0 to 5 records for each input record (depends upon amount field being zero or not). I am not sure what is the best way in DataStage to handle this kind of situation (Read 1 record and write multiple records). As a workaround I created 5 output sequential files and wrote the records so that I can read one record and write one record to a file. Then I merged these 5 files into one and then did my processing. Is there a better way ?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: