Using parameters
This section describes which parameter you must use to perform certain functions with IMFEXEC SCAN.
Searching for string and positioning the cursor
The following additional parameters must be used with IMFEXEC SCAN when you want to either search for a string or position the cursor:
TEXT indicates a request to find a text string.
The parameters VARIABLE, LENGTH, and TRIM do not apply when searching for text (and can, in some cases, cause syntax errors). Do not specify any of these parameters when you use TEXT.
- CASE indicates whether to perform a case-sensitive search for TEXT keyword.
POSITION indicates whether or not to position the cursor.
If POSITION is not specified, the position will not change.
Retrieving data into variables
The following additional parameters must be used with IMFEXEC SCAN when you want to retrieve data into variables:
- VARIABLE
indicates a request to retrieve data
The parameters TEXT, CASE, and POSITION do not apply when retrieving data (and can, in some cases, cause syntax errors). Do not specify any of these parameters when you use VARIABLE.
- LENGTH
required to retrieve data
- TRIM
indicates whether or not to remove trailing blanks, nulls, and control characters from the returned variable
Condition codes are listed in the following table:
Value | Description |
|---|---|
0 | Command was executed successfully; text was found. |
4 | Text was not found. |
8 | One of the following situations occurred:
|