In all my six years, I never saw a code this simple. basically, what the ICETOOL routine is doing here is to check if there is any data in the input file. The statement

COUNT FROM(IN) HIGHER(1) RC4

means count the number of records from the input file IN. If the number of records is greater than or equal to 1, give a return code of 4.

//PROC0020 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=PAX.ABC.FILE,DISP=SHR
//TOOLIN DD *
* SET RC=4 IF FILE CONTAINS DATA, ELSE SET RC=0
COUNT FROM(IN) HIGHER(1) RC4
/*
//*
// IF (PROC0020.RC EQ 4) THEN
//Action
// END

Advertisements