In this file we will have only two records which starts from 9.
I need to splice this records as one with overriding 5th to 10th field with 2nd record on one condition i.e, 2nd row 5th to 10th value should be greater than 1st row 5th to 10th row value. If it is not then I need to write bad record output into another output file. If it is then I need to write spliced one record into my output file.
And If bad record output file is written then I need to abend the job.
Please show examples of the records in each input file (relevant fields only) and what you expect for output for each variation. Explain the "rules" for getting from input to output in terms of the examples.
Give the RECFM and LRECL of the input files.
Give the starting position, length and format of all relevant fields.[/img]
That's the 5th to 9th position, not the 5th to 10th position.
Here's a DFSORT/ICETOOL job that will give you a RC=16 if the first record 5th position to 9th position > second record 5th position to 9th position; otherwise if it will give you a RC=0. If you really want an ABEND rather than RC=16, uncomment the DEBUG ABEND statement and you'll get a U0209 ABEND instead of RC=16.
Note: You need z/OS DFSORT V1R5 to use NULLOFL=RC16 - it won't work with DFSORT R14 (COUNT would).
But In both conditions my JCL splicing the record. It is not giving an abend when first record 5th position to 9th position > 2nd record 5th position to 9th position. As you said I may not have the vesrion you mentioned.
As I dont have an option to use the JCL provided by you (NULLOFL), I am trying to do as below:
1) Overlay 2nd record 5th to 9th position at the last of first record
2) write an empty out put file using include cond when first record 5th position to 9th position > 1st record last 5 bytes.
3) If output file is empty then ICETOOL will give return code other than zero.(RC=12)
4) if return code is zero then my splice step will execute.
But I am not able to overlay 2nd record 5th to 9th position at the last of first record.
Frank, is this solution is fine or do you have any other solution? Can you please suggest me.