sessionID

The sysVar.sessionID system variable is available for compatibility with Cross System Product (CSP) releases prior to CSP 370AD Version 4 Release 1. In this case it contains a system-dependent user identifier or terminal identifier for your program. Use sysVar.userID or sysVar.terminalID for new code.

See the related reference at the end of the topic for considerations for other UI technologies that you might be using.

Characteristics

sysVar.sessionID has the following characteristics:
Primitive type
CHAR
Data length
8 (padded with blanks if the value has less than 8 characters)
Value saved across segmented converse?
Yes

Example

  myVar = sysVar.sessionID;

Compatibility

Table 1. Compatibility considerations for sysVar.sessionID
Platform Issue
Java™ generation sysVar.sessionID is initialized from the user.name Java Virtual Machine system property. If the property cannot be retrieved, sysVar.sessionID is blank.
CICS® sysVar.sessionID contains the CICS terminal identifier and is equivalent to sysVar.terminalID.
IMS™ BMP
  • If the program runs as an IMS batch-oriented BMP, sysVar.sessionID contains the job name from the JOB card.
  • If the program runs as an IMS transaction-oriented BMP, sysVar.sessionID is initialized to the name of the job from the JOB card of the JCL. It is updated with the user ID field from the I/O PCB each time there is a successful get next that reads a serial file associated with the I/O PCB. The user ID field is blank if sign-on security is not active on the system. sysVar.sessionID is equivalent to sysVar.userID.
IMS/VS sysVar.sessionID contains the user ID field from the I/O PCB. sysVar.sessionID is updated whenever there is a successful get unique (GU) call to the I/O PCB. This is caused by a get next for a serial file associated with the I/O PCB, a converse statement, or the retrieval of the inputForm when the program starts. sysVar.sessionID is set to blanks if a get next for a serial file associated with the I/O PCB results in an endOfFile (GC status code). The user ID field is blank if sign-on security is not active on the system. sysVar.sessionID is equivalent to sysVar.userID.
iSeries® COBOL sysVar.sessionID is the logon user ID and equivalent to the sysVar.userID
z/OS® batch sysVar.sessionID contains the job name from the JOB card and is equivalent to sysVar.userID.
Debug sysVar.sessionID is initialized based on the sessionID debug preference. For information on using the debugger, refer to the EGL Programmer's Guide. If this preference is not set, debug selects a default sysVar.sessionID in the same way that Java generation does.

Feedback