Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
Balaji Canabady,
1. What is the LRECL and RECFM of the input file?
2. Does the count on header include the header record or is it just the count of detail records.
3. Is there a way to identify the last detail record?
Just curious to know, how the same can be achieved using ICETOOL features.
Also the detail records in my case starts with 1.
Is it possible to use TOTAL option(TOTAL+1) to check the header count with the total number of records by adding all the first column values ?
Also the detail records in my case starts with 1.
Is it possible to use TOTAL option(TOTAL+1) to check the header count with the total number of records by adding all the first column values ?
Ok you can total up the value at 1 , but how you are going to compare with the count on the header? TOTAL is the Reporting feature which is processed at the very end. So your first record is long gone by that time.
If you insist then here is another way to get the desired results in 1 pass but your performance will take a hit as we are SORTING and SUMMING to get the results.
Why I insisted for ICETOOL is that in some cases I have 2 or 3 input files instead of one. Using a single step we can achieve this using the COUNT feature in ICETOOL.
We can set three different RC(8/12/16) for 3 files and immediately identify the error file based on the error code.
(Unfortunately the below PTFs are not installed in our place to check the above JCL completely
www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242 )
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
Balaji Canabady wrote:
Why I insisted for ICETOOL is that in some cases I have 2 or 3 input files instead of one. Using a single step we can achieve this using the COUNT feature in ICETOOL.
Balaji Canabady,
The obsession of a single step. Did you test your Job thoroughly ? Why did you have to change the requirement from abending to setting a return code?
Simple scenario to break your code.
What happens when INP1 have a mismatch in counts and INP2 ALSO having a mismatch in counts? According to your job and based on the defaults (MODE=SCAN) , your second COUNT operator wouldn't even execute. It will be just scanned for syntax. Assuming you have MODE CONTINUE as default , you would end up 1 return code which is 12.
If you got a return code of 12 , how can you be sure that INP1 did not have a mismatch in counts ? If you have MODE=SCAN and got a return code of 8 , how can you be sure that INP2 have the right counts?
Remember that a single step can only return 1 return code. There is a reason as to why I showed you 2 different steps instead of 1.