Previous Topic: RDSCRROW Return CodesNext Topic: Keyboard Mnemonics for Special Function Keys


EPI SESSCMD—Issue Command to VTAM Session

Use the SESSCMD command to issue a command to a VTAM application session. For SESSCMD to function, CA OPS/MVS must be monitoring the VTAM session.

This command has the following format:

ADDRESS EPI "SESSCMD keywords"
  {'cmdtext'}
  {SESSION(sessid)}
  [CMDRESP(dest)]
  [CMDWAIT(maxwait)]
  [ID(screenid)]
  [MAXCMDOUT(maxlines)]
  [PREFIX(prefix)]
  [STOPMSG(text,text)]
  [SUBSYS(ssid)]
  [TRUNCATE(YES|NO)]
cmdtext

Specifies the text of the command to be issued to the VTAM session. It can be up to 1,000 bytes long. If the cmdtext contains quotes, you can specify the command in one of the following ways:

SESSION

Specifies the session ID of the VTAM application session.

CMDRESP

(Optional) Specifies the kind of variables to store the fetched screen image.

The dest value can be either CLIST or REXX.

Default: CLIST

CMDWAIT

(Optional) Specifies the maximum amount of time that SESSCMD waits before it times out. SESSCMD normally waits for the terminal keyboard unlock condition before it returns to the current screen image (unless it is used with the STOPMSG keyword).

When used with the STOPMSG keyword, SESSCMD tries to satisfy the STOPMSG request until the CMDWAIT value expires.

Default: 1 second, and the maximum value is 900 seconds.

ID

(Optional) Assigns a one- to eight-character ID to the screen image generated by the command. In screen rules, this ID identifies the command that produced the screen.

CA OPS/MVS assigns this ID to all responses from the application while the SESSCMD command processor is executing, regardless of whether those responses are responses to the command or to some other application action.

Default: No screen ID.

MAXCMDOUT

(Optional) Specifies the maximum number of lines that SESSCMD returns.

PREFIX

(Optional) Specifies the one- to six-character prefix to be used when creating the CLIST or REXX variables. For more details on these variables, see Using SESSCMD in a CLIST or REXX EXEC in this chapter.

STOPMSG

(Optional) Specifies a text string that CA OPS/MVS searches for as it receives the response from a command issued to a VTAM application session (through SESSCMD). If text matches any text in the response screen returned by the VTAM session, CA OPS/MVS terminates the SESSCMD. If no text in the response screen matches text, SESSCMD times out, producing an error message and return code.

You can specify up to ten text elements with the STOPMSG keyword. Each text element can use as many as 32 characters. If you specify more than one text element, you must separate those elements with commas as shown in the following example:

STOPMSG(text,text,text, . . .)

Also, text can contain non-alphabetic characters. For example, many application screens terminate with three asterisks (***). So if you want SESSCMD to terminate when CA OPS/MVS detects the end of the response screen from the VTAM session, specify STOPMSG(***).

Notes:

SUBSYS

(Optional) Addresses the command to a copy of CA OPS/MVS with a subsystem ID other than the default subsystem ID, which is OPSS.

TRUNCATE

(Optional) Specifies whether CA OPS/MVS truncates the screen image display when you enter SESSCMD from a TSO terminal. Possible TRUNCATE values are YES, which tells CA OPS/MVS to truncate this display to make it more readable; and NO, which tells CA OPS/MVS not to truncate this display. The default is YES.

Examples: SESSCMD Command