terminalID

For COBOL environments, sysVar.terminalID contains the terminal identifier, if one exists in the environment where the program is running.

For Java™ environments, sysVar.terminalID (like sysVar.sessionID) is initialized from the user.name Java Virtual Machine system property. If EGL cannot retrieve the property, sysVar.terminalID is blank. Once the variable is initialized in Java environments, it does not change.

You can use sysVar.terminalID in these ways:

Characteristics

sysVar.terminalID has the following characteristics:
Primitive type
CHAR
Data length
10 for iSeries® COBOL, otherwise 8, and padded with blanks if the value has less than the maximum number of characters
Value saved across segmented converse?
Yes

Example

  myVar10 = sysVar.terminalID;

Compatibility

Table 1. Compatibility considerations for sysVar.terminalID
Platform Issue
IMS™ BMP sysVar.terminalID is initialized to blanks. If the program runs as an IMS transaction-oriented BMP, sysVar.terminalID is reset to the logical terminal identifier from the first 8 bytes of the I/O PCB each time there is a succesful get next to read a serial file associated with the I/O PCB.
IMS/VS sysVar.terminalID contains the logical terminal identifier from the first 8 bytes of the I/O PCB. sysVar.terminalID 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, or the retrieval of the inputForm when the program starts. sysVar.terminalID 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).
iSeries COBOL sysVar.terminalID is initialized to blanks. If the program is run in an iSeries interactive job, sysVar.terminalID is reset to the terminal device name received from a query of the active job's attributes. sysVar.terminalID is 10 characters in length, padded with blanks.
Debug sysVar.terminalID is initialized based on the terminalID 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.terminalID in the same way that Java generation does.