Previous Topic: SELMEMIF, AND, ORNext Topic: Parameters


Syntax

SELMEMIF({field-name|position[,scan-length]},operator,data[,…])
	   ({field-name|position,scan-length},data-type[,…])
SELMEMIF({field-name|position,scan-length},operator,{field-name|position})

AND({field-name|position[,scan-length]},operator,data[,…])
   ({field-name|position,scan-length},data-type[,…])
AND({field-name|position,scan-length},operator,{field-name|position})

OR({field-name|position[,scan-length]},operator,data[,…])
  ({field-name|position,scan-length},data-type[,…])
OR({field-name|position,scan-length},operator,{field-name|position})

You can repeat the parameter sequence for each of these commands: this is noted by the [,…]. Each repetition is an implied OR. For example, the following SELMEMIF keyword looks for the characters 'MY.TEST.FILE' or 'MY.PROD.FILE' anywhere within the record.

SELMEMIF(1,0,EQ,C'MY.TEST.FILE',1,0,EQ,C'MY.PROD.FILE')

You can also use the data definition to imply an OR condition. If data and position are the same, but the values different, you can change the data. This example is a different way of writing the example.

SLEMEMIF(1,0,EQ,C'MY.TEST.FILE,MY.PROD.FILE')

When the data is different, but the position is the same, you can still use an implied OR by listing the different data values.

SELMEMIF(1,0,EQ,C'++INCLUDE COPYBOOK',T'copybook')