Now the problem is that the header is around 400 characters long but within c'...' the maximum allowed is only 256 characters.
Kindly let me know whether we have any possibility to give multiple texts within the same trailer?
I also tried keeping the header in separate file and include that after every 30 records, but atleast my code is not successful and thats the reason i switched to this simple hardcoded method.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
OK, the most important question you missed.
Have a look at SEQNUM with RESTART. This will be more efficient than the WHEN=GROUP.
In the OUTFIL, don't use the reporting functions if you've come to a limit, but you can use the slash operator on BUILD, which will allow you to output two records from one input record.
If you can source from a file, you could set up a number of symbols/SYMANES in a separate small step.