I'm trying to write a JCL that check if the input file record is sorted and if not it should abend with a specific message.
This is the job that I have; but I don't want it to sort anymore. I want it to abend if company number in column 3 not in Sequence;
//TOOL1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=T
//DFSMSG DD SYSOUT=T
//TOOLIN DD *
DATASORT FROM(INPUT1) TO(OUTPUT) HEADER TRAILER USING(CTL1)
/*
//INPUT1 DD DSN=FCGL.BPYP667.CNTL(GLGLJ010),
// DISP=SHR
//OUTPUT DD DSN=FCGL.BPYP667.CNTL(GLGLJ010),
// DISP=SHR,
// DCB=*.INPUT1
//CTL1CNTL DD *
SORT FIELDS=(3,4,CH,A)
/*