Hi,
I need to convert .csv file data to COBOL copybook format. I designed different jobs for header, detail and the trailer, and one other job to combine all these.
But, I have a scenario where there is an OCCURS clause (occurs 70 times). How to pass data in such scenario?
For example: Name, ID, Add1, Add2,Add3, Add4
Input file: venkat, 10, India, USA, Mexico, spain.
My output should be:
Venkat10IndiaVenkat10USAVenkat10MexicoVenkat10Spain
Could you please help me achieve this?
Thank you
Venkat
How to create COBOL file with OCCURS clause?
Moderators: chulett, rschirm, roy
I suppose a transformer loop would be a good approach. You need to do several things here.
You have to know how many instances of the OCCURS you need to use for each input row. Will it always be the same number?
Is there a direct link between the number of address columns in the .csv file and the output copybook? For example, are there 70 columns for addresses, with the ones not containing a valid address spaces, empty or null?
In general, the first requirement of a COBOL format record is that all fields contain valid values, whether usable data or defaults or just something to fill the space.
You have to know how many instances of the OCCURS you need to use for each input row. Will it always be the same number?
Is there a direct link between the number of address columns in the .csv file and the output copybook? For example, are there 70 columns for addresses, with the ones not containing a valid address spaces, empty or null?
In general, the first requirement of a COBOL format record is that all fields contain valid values, whether usable data or defaults or just something to fill the space.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Oooo... interesting. Choose your own adventure!
The path forks ahead, where you can see a newly painted sign. To the right, the well-trodden path you've been following continues. To the left, a smaller trail branches off into the wilderness. You pause to read the sign, which asks you to consider taking the path less travelled to seek new adventures.
Which path do you chose?
:D
The path forks ahead, where you can see a newly painted sign. To the right, the well-trodden path you've been following continues. To the left, a smaller trail branches off into the wilderness. You pause to read the sign, which asks you to consider taking the path less travelled to seek new adventures.
Which path do you chose?
:D
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers