Examples of the IMFEXEC SCAN command


This section contains examples that use the IMFEXEC SCAN command statement.

A brief discussion follows each example.

Example 1

/* REXX */
'IMFEXEC SCAN TEXT(USERID) VAR(MYUSER) LENGTH(25) TRIM NOCASE',
 'SESSION('TSOSESS')'

CLIST example:

IMFEXEC SCAN TEXT(USERID) VAR(MYUSER) LENGTH(25) TRIM NOCASE
 SESSION(&TSOSESS)

This example command scans the screen beginning at the upper lefthand corner for the character string, USERID. The scan is performed against the session designated by the TSOSESS variable.

The scan is not case-sensitive. The 25 characters following the string are placed into the variable MYUSER after trailing and leading blanks have been removed.

Example 2

/* REXX */
'IMFEXEC SCAN ROW(10) COL(10) POSITION TEXT(A) LENGTH(1)',
 'SESSION('OSISESS')'

CLIST example:

IMFEXEC SCAN ROW(10) COL(10) POSITION SESSION(&OSISESS)

This example places the cursor in the input field after row 10, column 10, for the virtual screen buffer with the logical unit specified by the variable OSISESS. This command is equivalent to placing the cursor on row 10, column 10, and pressing the Tab key.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

MainView AutoOPERATOR 8.2