Session Information Functions

You can use the following session information functions in REXX command lists and Data REXX files for NetView®.
Table 1. Session Information Functions
Function or Variable Description
APPLID()

&APPLID

Returns the application program identifier for the task under which the command list is running. APPLID is the NetView domain ID appended with a 3-character hexadecimal suffix assigned by the NetView program. For example, if your domain ID is PARIS, APPLID might be PARIS001. The NetView program attempts to use an APPLID that is both defined and available. If successful in this attempt, each APPLID is unique. If no defined APPLID is available, an APPLID of notInit! is used until a defined APPLID is available. In this case, the notInit! APPLID is not guaranteed to be unique as multiple tasks might be in this situation.
ASID()

&ASID

Returns the current NetView address space identifier. The value of ASID is a 1 - 5 digit decimal number.
ATTENDED()

&ATTENDED

Returns a single-character value of either 1 or 0. The following values are defined:
1
Indicates that the task is one of the following types:
  • An OST with a display
  • An NNT with a corresponding OST
  • An autotask with an associated MVS™ console assigned using the AUTOTASK command
  • A distributed autotask
0
Indicates that the task is one of the following types:
  • An autotask without an associated MVS console assigned using the AUTOTASK command
  • Another type of task, such as a DST or an OPT task
Note:
  1. If the associated operator is an AUTOTASK, the presentation data is not eligible for display unless the AUTOTASK is associated with an active MVS console.
  2. ATTENDED can be used with DISTAUTO and AUTOTASK variables to further determine the characteristics of the task. For example, if ATTENDED is 1, DISTAUTO is 0, and AUTOTASK is 1, the task is an AUTOTASK with an associated MVS console.
AUTCONID()

&AUTCONID

Returns the MVS console identifier associated with this autotask. This association was made using the AUTOTASK command with the CONSOLE keyword. The value of AUTCONID is the console name of the MVS console where NetView commands can be entered to run under this autotask.
AUTOTASK()

&AUTOTASK

Returns a single-character value of either 1 or 0 indicating whether the task is an autotask. The following values are valid:
1
An autotask
0
Not an autotask
CGI() Returns a single-character value of either 1 or 0. The following values are valid:
1
The procedure was called by the NetView web server.
0
The procedure was not called by the NetView web server.
CLOSING() Returns a value of 1 during post CLOSE command processing; otherwise a value of 0 is returned.

Use this function to identify commands that are scheduled to run using the ENDCMD option for a pipe KEEP stage with the GLOBAL option.

CURCONID()

&CURCONID

Returns the MVS console identifier obtained by a NetView task. This console was obtained with the GETCONID command or by issuing an MVS command. The value of CURCONID is the console name of the MVS console that this task uses to enter MVS commands.
CURSYS()

&CURSYS

Returns the 1 - 8 character current system name.
DISC() Returns a single-character value of either 1 or 0 that indicates whether the task is disconnected. The following values can be returned
1
Autotask is disconnected.
0
Autotask is not disconnected.
DISTAUTO()

&DISTAUTO

Returns a single-character value of either 1 or 0 that indicates whether a task is a distributed autotask started with the RMTCMD command. The following values are valid:
1
A distributed autotask
0
Not a distributed autotask
Note: This corresponds to the value of TVBDAUT.
DOMAIN()

&DOMAIN

Returns the 1 - 5 character name of the current NetView domain.
DOMAIN('x') Returns the 1 - 5 character name of a NetView domain, where x is the following value
R
Returns the domain name of a remote task controlling the distributed autotask. If the task is not a distributed autotask, it returns a null.
ECVTPSEQ() Is the z/OS® product sequence number found in the MVS IHAECVT data area. For example, if you are running on z/OS v1.12, ECVTPSEQ returns a value of 01011200.
ENVDATA('x') Returns a numeric value or character string, where x is one of the following values
C
Returns the screen color count.
D
Returns the screen depth (number of rows on the screen).
W
Returns the screen width (number of columns on the screen).
G
Returns a list of blank delimited entries representing the REXX, PL/I, and C procedures in the calling sequence or procedure group that was active when ENVDATA was called.
Each entry consists of two names separated by a slash (/), in the format command/name. command is the command verb or synonym used to call the procedure. name is one of the following names:
  • The module name if the procedure is PL/I or C.
  • The member name in DSICLD if the procedure is REXX.

Multiple entries show the calling sequence in reverse order. The command the operator entered is the last entry listed.

JOBNAME(*) Returns the 1 - 8 character name of the name of the job under which the NetView program is running. An asterisk (*) is the only parameter value allowed.
MVSLEVEL()

&MVSLEVEL

Returns the version of MVS currently running. For example, if you are running z/OS 01.13.00, the function returns SP7.1.3.
NETID()

&NETID

Returns the VTAM® network identifier. This field has a maximum length of 8 characters. If VTAM has never been active when the NetView program is active, the value is assigned from the NETID statement in the CNMSTYLE member.
NETVIEW()

&NETVIEW

Returns the version and release of the currently running NetView program. The value of NETVIEW is a 4-character string in the form of NVvr, where:
v
Indicates the version number of the NetView program
r
Indicates the release number of the NetView program
NETVIEW('x') Returns a text string, where x has the following value:
T
Returns the text string containing the official NetView name.
A
Returns a text string with one of the following values:
1
The NetView Monitoring for GDPS® product is installed.
0
The NetView Monitoring for GDPS product is not installed.
M
Returns a text string with the modification level of the NetView program.
OPSYSTEM()

&OPSYSTEM

Returns the type of operating system for which the NetView program was compiled.
PANEL() Returns a single-character value of either 1 or 0. The following values are valid:
1
Panel commands can be issued.
0
Panel commands are not allowed.
PARTID()

&PARTID

Returns the first two characters of the six-character prefix for VSE messages. The two returned characters are the message partition ID only if the sending system uses those characters to designate a partition ID for a message.
STCKGMT()

&STCKGMT

Returns the current UTC mean time in store-clock format. This field is returned as an 8-byte hexadecimal value.
SUPPCHAR()

&SUPPCHAR

Returns the suppression character for your installation. (The suppression character prevents the NetView program from writing the command out to the terminal, hardcopy log, and network log.)

SUPPCHAR is a single character that you define in the CNMSTUSR or CxxSTGEN member that is included in the CNMSTYLE member. The default suppression character that is defined in these members is the question mark (X'6F').

If you do not define a suppression character in the CNMSTUSR or CxxSTGEN member that is included in the CNMSTYLE member, SUPPCHAR defaults to X'3F'.

Note: The SUPPCHAR default character of X'3F' cannot be typed at the operator console. Therefore, if you do not define a suppression character, the operator is prevented from using one.
SYSPLEX()

&SYSPLEX

Returns the sysplex name found in the extended CVT field (ECVTSPLX).
TASK()

&TASK

Returns the 3-character string indicating the type of task under which the command list is running. The following values are possible:
PPT
Primary POI task
OST
Operator station task
NNT
NetView-to-NetView task
For Data REXX, in addition to PPT, OST, and NNT, any of these values can be returned:
DST
Data services task
HCT
Hardcopy task
MNT
Main task
OPT
Optional task
UNK
Unknown task
Note: This value indicates that an error has occurred. Contact IBM® Software Support for more information.

TASK enables the same command list to run under any of these tasks because the command list can test for the task type and process accordingly. For example, some restrictions apply to command lists running under the PPT. See Primary POI Task Restrictions.

TOWER(string) Returns either a binary value that indicates whether a tower or subtower is enabled, or the name of the towers and subtowers that are enabled.
If a string does not end with an asterisk (*), a single-character of either 1 or 0 is returned. The following values are valid:
1
The tower or subtower is enabled.
0
The tower or subtower is not enabled.
For example, assume that the AON tower and the SNA subtower are enabled, but the TCP subtower is not, SAY TOWER(AON.SNA) returns 1 and SAY TOWER('aon.TCP') returns 0.

Strings that end with an asterisk (*) return the names of the enabled towers or subtowers that are one level subordinate to the specified name. Note that asterisks can be either used alone or used together with a tower name (followed by a period) to determine the subtowers that are enabled. For example, if the AON, NPDA and NLDM towers are enabled, SAY TOWER('*') returns AON NPDA NLDM; if the SNA and TCP subtowers of the AON tower are enabled, TOWER('aon.*') returns SNA TCP.

Input strings are not case-sensitive and mixed case strings can be returned. Tower and subtower combinations must be concatenated with a period (.). Towers and subtowers are enabled in the CNMSTUSR or CxxSTGEN member that is included in the CNMSTYLE member. Refer to the IBM Tivoli® NetView for z/OS Administration Reference for more information.

TRAP() Returns a binary value that indicates whether a TRAP command will fail because of a conflicting correlation environment. Values are:
1
TRAP command is acceptable.
0
TRAP command will fail with message DWO373E.
TYPE() Returns a 3-character string that indicates the level of the NetView program that is installed. The following values are possible:
ENT
Enterprise option
SYS
NetView System Services
VTAM()

&VTAM

Returns the version and release of VTAM as a 4-character string in the form of either VTvr or Vvrm, where:
v
Is the version number
r
Is the release number
m
Is the modification number
Note: The value of VTAM is null if the VTAM program is not active.
VTCOMPID()

&VTCOMPID

Returns the 14-character VTAM component identifier, in the following format:
5695-11701-xxx
where xxx is the release number.

Additional VTAM component identifiers might be added in future updates to VTAM. The value of VTCOMPID is null if VTAM is not active.

WEEKDAYN()

&WEEKDAYN

Returns a numeric value in the range of 1 -7 indicating the day of week (from Monday through Sunday), as shown here:
1
Monday
2
Tuesday
3
Wednesday
4
Thursday
5
Friday
6
Saturday
7
Sunday