ISPF Utilities — Compare and Search

Category: JCL and z/OS Utilities

Compare Utility

The compare utility performs line-by-line file comparison in batch mode using ISRSUPC with selective column comparison.

//COMPARE   EXEC PGM=ISRSUPC,
//          PARM='DELTAL,LINECMP'
//NEWDD   DD  DISP=SHR,DSN=one.file
//OLDDD   DD  DISP=SHR,DSN=another.file
//OUTDD  DD SYSOUT=*
//SYSIN   DD *
 CMPCOLM 1:14,35:80

The CMPCOLM control card specifies which column ranges to compare. In this example, columns 1-14 and 35-80 are compared, while columns 15-34 are ignored.

Return Codes

Search-For Utility

Batch utility for searching partitioned datasets for specified character strings.

//SEARCH  EXEC PGM=ISRSUPC,
//            PARM='SRCHCMP,ANYC'
//NEWDD  DD DISP=SHR,DSN=input.pds
//OUTDD  DD SYSOUT=*
//SYSIN  DD *
CMPCOLM 5:72
SRCHFOR  'DD DUMMY'

Return Codes

Both utilities use the same program (ISRSUPC) with the PARM field controlling which function executes.