

Reference Guide › Command Reference › SCAN command
SCAN command
Returns information about records in the source directory. Information is returned to the issuer’s console. Each line of output consists of user ID and matching directory record.
SCAN token ... [("Options"]
Options:
[MSG | NOMSG]
[STACK [FIFO | LIFO]]
[FIFO]
[LIFO]
[FILE [filename]]
Note: Options can be specified in any order.
Authorizations
You must have SCAN authorization in the AUTHORIZ CONFIG file.
Definitions
- Token
-
Each record from the CP source directory is matched against the token(s) provided.
- [MSG | NOMSG]
-
- [STACK [FIFO | LIFO]]
-
- [FIFO]
-
- [LIFO]
-
- [FILE [filename]]
-
These options are explained in the Common API Command Options.
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.
Return Codes and Error Messages
The table, SCAN Command: Return Codes and Error Messages, lists return codes and error messages for the SCAN command.
The SCAN command may also generate CMS messages.
Note: For information about these messages, use the CMS help or see the IBM messages and codes documentation.
Copyright © 2014 CA.
All rights reserved.
 
|
|