Selection using more than one search parameter
To select records using more than one search parameter, you will need more than one OPTION statement.
About this task
Suppose you wanted to print all the file control records for
a particular task. This needs two OPTION statements. The COND=M parameter
performs the AND operation on the two statements.
//SYSIN DD *
OPTION PRINT OFFSET=16,FLDTYP=X,VALUE=00025C,FLDLEN=3,COND=M
OPTION PRINT OFFSET=6,FLDTYP=X,VALUE=11,FLDLEN=1,COND=E
END
/*
The example shows how to search for all records which belong to task number 25 and have a system type ID of X'11'.
If more than one type of record is to be found then the form of the following example could be used.
In this case, all the file control records for
task 48 are selected together with all the records generated by the TRN6 transaction.
The first two OPTION statements are ‘ANDed’ together, whereas the third statement
is a separate search because the second statement is terminated by COND=E.
//SYSIN DD *
OPTION COPY OFFSET=6,FLDTYP=X,VALUE=11,FLDLEN=1,COND=M
OPTION COPY OFFSET=16,FLDTYP=X,VALUE=00048C,FLDLEN=3,COND=M
OPTION COPY OFFSET=23,FLDTYP=C,VALUE=TRN6,FLDLEN=4,COND=E
END
/*