Command Reference › SCAN command › Description
Description
The following points help to understand the way SCAN command obtains the record information from the source directory:
- Each record from the CP source directory is matched against a pattern string. The pattern string consists of up to 13 blank delimited tokens. The pattern string tokens are matched up against blank delimited tokens from each record of the CP source directory, and matching records are returned to the caller.
- If all tokens in the pattern match the corresponding tokens in the directory record, then the directory record is considered a match.
- An asterisk (*) may be used as a wildcard character in the pattern. Any number of asterisks may appear in a token of the pattern. An asterisk is considered to match any number of characters (including zero characters) in the corresponding token of the directory record. An asterisk can be used alone as a wild card indicating that all values found in that position in the record are matches.
- Any pattern token consisting only of wild card characters, for example, '*****', is treated the same as a token consisting of a single asterisk.
- A pattern consisting of a single asterisk returns all comment records (not all records).
- A scan pattern consisting of nothing but wild card designators in the form SCAN * * * * * * * * * * * * * is equivalent to the command SCAN *. Using this scan pattern would result in only comment records being returned (not all records). Special processing occurs when evaluating the first token of a directory record with the first token of the pattern. The first token is the directory statement type. The first token of a directory record may be an abbreviation of the directory statement type. If so, it is expanded out to the full, non-abbreviated statement type. For example, I is expanded to IPL, or IN is expanded to INCLUDE. Similarly, if the first token of the pattern does not contain asterisks, and is an abbreviation of a valid directory statement type, it is also expanded out to the full un-abbreviated statement type.
- Scan results may cause sensitive information (logon and minidisk passwords) to be sent to the requestor. Use caution in deciding who is authorize to use this command so that this sensitive information is not inadvertently given to users who should not have it.
- The search parameter list provided to SCAN is uppercased and compared to uppercased directory records. You must consider this when attempting to scan for directory statements that allow mixed case arguments such as POSIXGLIST, POSIXGROUP, and POSIXINFO statements.