PIPE ENVDATA

Syntax

ENVDATA
Read syntax diagramSkip visual syntax diagramENVDATA

Synonyms

Stage Name Synonym
ENVDATA ENV

Command Description

The ENVDATA stage outputs environment data, which consists of a multiline message in the following format:
  • SCREEN DEPTH nnn
  • SCREEN WIDTH nnn
  • COLOR COUNT n
  • GENEALOGY command/name ...

The data following the keyword GENEALOGY consists of blank delimited entries representing the REXX, PL/I, and C procedures in the calling sequence or procedure group which was active when ENVDATA was invoked.

Each entry consists of two names separated by a slash (/). The command is the command verb or synonym used to invoke the procedure. The name is one of the following items:
  • The module name if the procedure is PL/I or C
  • The member name in DSICLD if the procedure is REXX.

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

Currently, only four lines are produced. Additional data can be added in the future.

Streams

Stream Type Number Supported
Input 0
Output 1

Termination Conditions

ENVDATA terminates when it finishes processing its output or when the output stream disconnects.

Usage Notes

  • ENVDATA must be the first stage.
  • The numbers in output do not include leading zeros.

Example: Capturing Environment Data

The following example captures environment data in variables inside a REXX procedure.
 Coded as a REXX example:

     'PIPE ENVDATA',
     ' | NOT CHOP 13',
     ' | VAR ROWS COLS'
     SAY ROWS
     SAY COLS

 ---> 32
 ---> 80

Example: Capturing Genealogy Data

The following ENVDATA output shows the genealogy of a user-written command NDO:
SCREEN DEPTH 32
SCREEN WIDTH 80
COLOR COUNT  7
GENEALOGY    HLLCMD/PLCMDMOD NDO/CNME9999

In this example, the NDO command was entered from an operator console. NDO is a CMDSYN of CNME9999, which is a REXX procedure. CNME9999 called HLLCMD as a command. HLLCMD resolves to the PL/I procedure PLCMDMOD. PLCCMDMOD was the invoker of PIPE ENVDATA.