SCAN
This command performs any of the following actions on the VTAM buffer image of an OSPI session:
- Finds a specific character string
- Positions the cursor in the first input field following a specified character string
- Retrieves data from the buffer image into user-defined variables
To perform all three functions, you must use the parameters SESSION, ROW, and COLUMN. The default for ROW and COLUMN is 1. There is no default for SESSION.
For more information about performing these functions and which additional parameters you must use, see Using-parameters.
See Interacting-with-VTAM-applications-with-OSPI for more information about using this command and OSPI.
Command | Parameters |
---|---|
SCAN | [ROW(Starting row)] [COL(Starting column)] [TEXT(Target text)] VARIABLE(Variable name)|[POSITION] [LENGTH(n)] SESSION(Session identifier) [CASE|NOCASE] [TRIM|NOTRIM] |
The following table describes the parameters:
Parameter | Function | Notes |
---|---|---|
ROW | Row in which to begin the scan | Numeric value is in the range of one through the maximum number of rows supported by the emulated terminal. Default is 1. |
COL | Column in which to begin the scan | Numeric value is in the range of 1-80. Default is 1. |
TEXT | Text to scan for | Maximum length is 255 characters TEXT and VARIABLE cannot be coded together on the same statement. |
VARIABLE | Name of the variable to receive the data | Do not specify a leading ampersand (&). Either VAR or POSITION or both must be specified. TEXT and VARIABLE cannot be coded together on the same statement. |
LENGTH | Number of characters to place into the target variable | This parameter is required with VAR. Numeric value is in the range of 1-255. |
SESSION | Session identifier of the OSPI session that should be accessed | This parameter is provided by the LOGON command. |
CASE | Performs a case-sensitive scan for TEXT | Default is NOCASE. |
NOCASE | Performs a non-case-sensitive scan for TEXT | n/a |
TRIM | All leading and trailing blanks, nulls, and control characters are to be removed from the returned variable | Default is NOTRIM. |
NOTRIM | Data is placed into the target variable exactly as found | n/a |
POSITION | Positions the cursor automatically in the next input field following the indicated character string | Either VAR or POSITION or both must be specified. |
This section contains the following topics:
Related topic