Previous Topic: Keyboard Mnemonics for Special Function KeysNext Topic: EPI SESSCMD Return Codes


Use SESSCMD in a CLIST or REXX EXEC

When you use the SESSCMD command in a CLIST or a REXX EXEC, you can capture the response to the issued command in CLIST or REXX variables. A CLIST or REXX EXEC can then analyze the response and take the appropriate action. SESSCMD creates the output CLIST or REXX variables shown in the following table:

Variable Contents

Variable Name If CMDRESP(CLIST)

Variable Name If CMDRESP(REXX)

The column in which the cursor appears. The leftmost column of the screen is column 1.

CSRCOL

CSRCOL

The location of the cursor as a single number.

CSRPOS

CSRPOS

The row or line on which the cursor appears. The first line on the screen is line 1.

CSRROW

CSRROW

The number of lines up to the last non-blank line on the screen.

LINENO

LINENO

The number of lines in the returned screen image. LINE is the default prefix.

prefix

prefix.0

The text of line m in the returned screen image.

prefixm

prefix.m

The number of words in line m of the screen image.

prefixmW

prefix.m.0

The nth word in line m of the screen image. The value of n can be any integer from 1 to 4.

prefixmWn

prefix.m.n

The entire screen contents. This variable contains a string consisting of all of the lines from the screen laid end-to-end, starting from the left.

SCREEN

SCREEN

The total number of rows or lines (blank and non-blank) on the screen.

SCRLEN

SCRLEN

The total size of the screen. CA OPS/MVS generates this value by multiplying &SCREEN by &SCRWDTH.

SCRSIZE

SCRSIZE

The current state of the keyboard (LOCKED or UNLOCKED).

SCRSTAT

SCRSTAT

The total number of columns on the screen. An 80-byte screen has 80 columns.

SCRWDTH

SCRWDTH