Joined: 28 Jan 2016
| 0 votes |
| 0 salutes ||
|Posted: Thu Jan 28, 2016 4:15 pm Post subject: Write data to array using SORT/SYNCSORT JCL
Can someone please help me regarding my below query?
My input FB file has data like below:
In this case, I have removed Header, trailer records,delimiters '~' by writing below SORT card and formatted the file having only detailed records i.e, record starting with D.
So by executing above sort card, output FB file is created with detailed as below:
2222 abc G443
I want to try the similar way of sort card of Case1 for the below input file
My input file has data like below:
But here the problem is Field3 occurs for two times. This is the sample layout I had given. In my copybook layout, few fields occurs 50 times like that. So it would be overhead to write below similar sort card line for 50 times to define each field occurrence in output file layout.
[01 EX-Field3 OCCURS 50 times
10 Field3 PIC X(04). ]
So could you please let me know if there is any simpler way to write data to above kind of array fields using SORT/SYNCSORT?
I would be grateful for your help.