Stop after 1st string search using ISRSUPC
Posted: Mon Jul 06, 2015 10:25 pm
I needed a jcl to search 2 strings in a PDS and go for 2nd string if it has found the first occurrence of 1st string,
and after finding 1st occurrence of 2nd string It should simply stop, then display the string for which it didn't found match, hence I used ISRSUPC for first half, but it is not stopping after 1st match instead its searching all mems for both strings, hence please tell where I am wrong...
Manual:
FMSTOP Immediately a difference is found between files, stops the compare with a return code of 1. This option provides a quicker way of telling if two files are different.
and after finding 1st occurrence of 2nd string It should simply stop, then display the string for which it didn't found match, hence I used ISRSUPC for first half, but it is not stopping after 1st match instead its searching all mems for both strings, hence please tell where I am wrong...
//SEARCH EXEC PGM=ISRSUPC,
// PARM=(SRCHCMP,'FMSTOP,NOSUMS')
//NEWDD DD DSN=MY.PDS.NAME,DISP=SHR
//OUTDD DD SYSOUT=*
//SYSIN DD *
SRCHFOR 'ABC'
SRCHFOR 'DEF'
/*
// PARM=(SRCHCMP,'FMSTOP,NOSUMS')
//NEWDD DD DSN=MY.PDS.NAME,DISP=SHR
//OUTDD DD SYSOUT=*
//SYSIN DD *
SRCHFOR 'ABC'
SRCHFOR 'DEF'
/*
Manual:
FMSTOP Immediately a difference is found between files, stops the compare with a return code of 1. This option provides a quicker way of telling if two files are different.