I have two files need to be combined which has header and trailer.The merged file should have one header and trailer having the Count of number of Records.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
You can use a DFSORT job like the following to do what you asked for. I assumed your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
It doesn't do a sort - it does a copy since your example shows the file1 records followed by the file2 records with no sorting involved.
Are you asking what the control statements do? If not, then please be more clear about what you want to know.
By the way, if you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
i need to add trailer count
Are you talking about the second count in the trailer record?
What is it? I assumed the first count was the number of records in the output file. What is the second count? Is it related to the number of records in the file in some way, or is it just the total of the original second counts in the two input trailer records?