Hi,
I need to concatenate two files LRECL = 360 and RECFM = FB
HHHHHHHHHH<control date>
xxx0000000120...
yyy0000000370...
zzz0000000100...
TTTTTTTTTT00000005900000000003<other details>
Trailer
position 11 to 21 for total value in records (starting from 4 till 14) ie 590 in this case
position 22 to 42 for count of records ie. 3 in this case
So, I have two files like this, I need to concatenate, using the header and trailer of any one of the file and modifying the total and the count in the final file.
I have read all the similar posts in this forum and I tried to prepare a JCL for this
The problem is using this JCL I am able to get a count but I can not copy the header and trailer from the existing file I have to create my own trailer. What I need is to copy the header and trailer from any one file and then modify it with the new count and total. [The total part is not in the above JCL but can be done, I have not used temp datasets as I was debugging the values]
Can somebody help me prepare a JCL which would do the task.
Thanks
Nimesh
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
position 11 to 21 for total value in records (starting from 4 till 14) ie 590 in this case
position 22 to 42 for count of records ie. 3 in this case
In your example input, the total is in positions 11-20, the value for the total is in positions 4-13 and the count is in positions 22-30, so that's what I used.
Here's a DFSORT/ICETOOL job that will do what you asked for: