FETCH directive
Purpose
This directive lets you include lines, fetched from a partitioned data set member or supplied by an exit, in your job.
Syntax
>>-//*%OPC FETCH------------------------------------------------> .-.,-----------------------------------------------. V | >----+---MEMBER=--member name-----------------------+-+-------->< | .-.,--------------------------. | | V | | '-COMP=--(----(--comparison expression--)-+--)-'
Parameters
- MEMBER=(member name)
- Specifies the member name of a partitioned data set allocated to ddname EELJBLIB. The lines in this member are included immediately after the FETCH directive.
- COMP=((comparison expression), (comparison expression),...)
- Specifies comparison expressions used to decide whether the FETCH directive should be acted on. If the comparison expression is true, the FETCH directive is honored. For details on defining comparison expressions, see The COMP keyword on BEGIN and FETCH directives.
Usage Notes
The FETCH directive is used to include lines from other partitioned data sets or as supplied by an exit. Lines included by a FETCH directive cannot contain another FETCH directive. BEGIN and END directives with action INCLUDE or EXCLUDE cannot be included in lines inserted by a FETCH directive.
Predefined variables can be used to represent the values of any keywords, but not the keywords themselves. A FETCH directive cannot lie between a BEGIN/END directive pair that specifies ACTION=INCLUDE or ACTION=EXCLUDE.
Example
//*%OPC SCAN
//*%OPC FETCH,
//*%OPC MEMBER=JCL1,
//*%OPC COMP=(&DAY..EQ.1)