Previous Topic: MSG CommandNext Topic: SETVAR Command


SESSCNTL Command

The SESSCNTL command establishes or closes a connection, or pauses or restarts automation for a single specified session. This command can also control the frequency of background window updates and change the host to which an automated Telnet session is connected. This command cannot be used to control the Windows command prompt (VIO) or Event Traffic Controller (ETC) sessions.

This command has the following format:

"SESSCNTL {AUTOMATE(PAUSE|RESTART|STATUS) SESSION(sessname) | 
           CONNECTION(OPEN|CLOSE|STATUS) SESSION(sessname) | 
           BWUPDATE(numsecs) | 
           TELNETHOST(hostname) SESSION(sessname)}"
AUTOMATE

Specifies an automation pause or restart for the specified session. This operand has the following options:

PAUSE

Resumes automation for the specified session. This option has no effect if automation is already paused.

RESTART

Causes automation of the specified session. This option has no effect if:

  • CA Automation Point is already automating the session
  • CA Automation Point is globally paused
  • CA Automation Point does not automate the session directly (that is, the session is non-automated because the session was not defined as automated in the session definition set)
STATUS

Returns the specified session's automation state. (The returned value is stored in the AXCRESULT variable.)

  • YES: indicates that automation is active
  • NO: indicates that the session is not automated
  • PAUSED: indicates that the session is automated and that automation is paused
CONNECTION

Issues a connect or disconnect for the specified session or query current connection status. This operation has the following options:

OPEN

Attempts to establish the connection to host for the specified session. Initiation of the connection is indicated by message AXC0556I. Connection behavior is dependent on the session type. Results of the connection for TN3270 or TN5250 sessions are reported by message AXC1800I. For other session types, you can query the status immediately by issuing SESSCNTL CONNECTION(STATUS).

CLOSE

Closes connection to the host for the specified session. Initiation of the disconnection is indicated by message AXC0557I. Disconnection behavior is dependent on the session type. Results of the disconnection for TN3270 or TN5250 sessions are reported by message AXC1804W. For other session types, you can query the status immediately by issuing SESSCNTL CONNECTION(STATUS).

STATUS

Returns the specified session's connection state. (The returned value is stored in the AXCRESULT variable.)

YES: Indicates that session is connected

NO: Indicates that session is not connected

Default: There is no default.

BWUPDATE

Specifies the window update frequency of background windows. The value (numsecs), which is an integer between 1 and 9, specifies the number of seconds between background window updates.

A lower value increases the apparent speed of the background windows and uses more machine cycles.

For unattended workstations, set BWUPDATE to 9 for greater throughput.

For an operator workstation, you may want to add menu items to allow the operator to easily control the BWUPDATE file. The DEBUG.mnu file contains sample statements to add these items to the Cmdarea menu.

Default: 5

TELNETHOST

Specifies the name of the host for the Telnet connection in the specified session. For example:

ADDRESS AXC "SESSCNTL TELNETHOST(mf.ca.com) SESSION(TELNETA)"
SESSION

Used with the AUTOMATE operand, defines a session for which you want to pause or restart automation. Used with the TELNETHOST operand, defines a session that is to monitor the Telnet connection. This operand is not valid with the BWUPDATE operand.

Usage Notes:

Example:

The following REXX statements determine the current automation state of session ASYNCH_1 and pause automation for that session if it is active:

'SESSCNTL AUTOMATE(STATUS) SESSION(ASYNCH_1)'
IF AXCRESULT = "YES" THEN
  'SESSCNTL AUTOMATE(PAUSE) SESSION(ASYNCH_1)'