Previous Topic: RENAMENext Topic: SCRATCH


SCAN

This command searches one or more IMODs for the presence or absence of text strings.

Syntax

SCAN IMOD imodname IN ddname [FLDC char] [VLDC char]
 
  ON {MATCH|NOMATCH} {ADD &LISTn}    PATTERN / patt / [AND|OR / patt /]
                     {DELETE &LISTn}
                     {LIST_LINE}

    [ON {MATCH|NOMATCH} {ADD &LISTn}    PATTERN / patt / [AND|OR / patt/]
                        {DELETE &LISTn}
                        {LIST_LINE}

Parameters

&LISTn

Name of the list containing the IMODs to be scanned.

ddname

DDname of the file containing the IMOD (or IMODs if &LISTn is specified).

FLDC

Specifies the Fixed-Length Do not Care character used in patterns that follow, until it encounters another FLDC parameter or reaches the end of SCAN. If FLDC is not specified, uses the value in effect from the execution of a previous FLDC command. FLDC character matches exactly one character, including blank.

char

Any single character, except blank, to be used as a placeholder.

VLDC

Specifies the Variable-Length Do not Care character to be used in the patterns that follow, until another VLDC parameter is encountered or the end of the SCAN command is reached. If VLDC is not specified, the value in effect from the execution of a previous VLDC command is used. The VLDC character matches any character string of any length (including a null string).

ON

Signifies the start of a scan operation. You may perform multiple scan operations simultaneously by providing additional specifications.

MATCH

Action is taken if the patterns are matched.

NOMATCH

Action is taken if the patterns are not matched.

ADD

IMOD name is to be added to the specified &LISTn.

DELETE

IMOD name is to be deleted from the specified &LISTn.

LIST_LINE

REXX source code line is to be listed if the specified criteria is met.

PATTERN

String that follows is the first pattern to be applied.

patt

Comparison string to be applied to each physical line of the IMOD. This string may contain characters and placeholders. Each pattern must be enclosed by a pair of delimiter characters (shown as slashes (/) in the format). Any character that does not appear in the pattern except blank, VLDC, and FLDC may be used as the delimiter.

AND

Pattern that follows must match the same physical IMOD line as all the other patterns specified in this SCAN command for the match condition to be met. The AND parameter and its accompanying pattern may be specified as many times as needed.

OR

If the pattern that follows is matched, the match condition is met whether the first pattern was matched or not. Specify the OR parameter and its accompanying pattern as many times as needed.

Notes:

And

Match

No Match

Flag ON

ON

OFF

Flag OFF

OFF

OFF

OR

Match

No Match

Flag ON

ON

ON

Flag OFF

ON

OFF