How to get Session or Application status within an ACL program?
search cancel

How to get Session or Application status within an ACL program?

book

Article ID: 54886

calendar_today

Updated On:

Products

TPX - Session Management

Issue/Introduction

 When you need information on Session or Application Status in an ACL, you can use two predefined variables.
This document describes their usage in an ACL program.

 

 

Environment

Release:  5.2

 TPX-Session Management-Access Management package
 

Resolution

To get information about the status of a session the function &SESS_INF(SessionID) can be used.
This function returns one of the following values:

ACTIVE   APPL=appl  Indicates that the session is currently   active. The name of the VTAM-application is also returned. 
ACL=program This indicates that the specified ACL/E program is running in the active session. CURRENT Indicates that the session is the user's current session. INACT Indicates that the session is not currently active, although it has been active
during the user's current session with CA-TPX. NEVACT Indicates that the session has never been active during the user's current session with CA-TPX. UNDEFINED The specified session is not a valid session name.

To get information about the status of an application the function &APPL_INF(ApplicationID) can be used.
This function returns one of the following values:

ACTIVE            Indicates that the application is defined and is accepting logons. If the   application is an internal
application like TPXADMIN or TPXOPER, then the string TYPE=TPX is appended.
INACT Indicates that the application is defined but is inactive.
QUIESCED Indicates that an operator quiesced the application in TPX. New sessions will not be started.
UNDEFINED Indicates that the application is not defined to CA-TPX.

Usage of these variables is normally in a SCAN-Statement where the value is compared against a string. Depending on the result, which is
stored in a Condition Code, processing continues.

Examples:

  1. This piece of code checks if session CICSA is inactive. If this is the case, the condition code set by the SCAN is 'EQ'. Then the
    ACL branches to label START where session CICSA is started:

    SCAN &SESS_INF(CICSA),'INACT'
    BRANCH EQ,START
    ...
    ...
    START COMMAND 'A CICSA'


  2. Referencing e.g. &SESS_INF(TPXOPER) in ACL DISPLAY running in session TPXOPER will
    result in: ACTIVE CURRENT ACL=DISPLAY APPL=TPXOPER

  3. Referencing e.g. &SESS_INF(TPXADMIN) in ACL DISPLAY running in session TPXOPER
    will result in: ACTIVE APPL=TPXADMIN if session TPXADMIN is active or either in INACT or NEVACT if not active.