NET/MASTER Network Control Language (NCL) Reference Manual

&SYS.NCL.TYPE
System Variables
5–62 106126 Tandem Computers Incorporated
&SYS.NCL.TYPE The &SYS.NCL.TYPE system variable contains the type of the current procedure.
NCL procedures may be one of several types. Most NCL procedures are standard
types; that is, they use all the standard NCL core statements, verbs, built-in functions,
and system variables.
Some NCL procedures run as a special type of NCL process. These special processes
are authorized to use NCL statements, built-in functions, and system variables that are
available only to that type of NCL process. For example, the LOGPROC procedure
may use the LOGCONT, LOGDEL, and LOGREAD verbs. No other NCL procedures
may use these verbs.
When writing NCL procedures, it may be necessary to determine (within the
procedure itself) the exact type of NCL procedure that is executing. The
&SYS.NCL.TYPE system variable provides this information.
In addition, the &SYS.TERM.TYPE system variable provides an indication of the
environment in which an NCL procedure is executing. A specific value—for example,
LOGP—does not necessarily indicate that the procedure is LOGPROC. It may indicate
that the procedure is executing in the LOGP environment.
&SYS.NCL.TYPE
Considerations
The &SYS.NCL.TYPE system variable provides one of the following values when
it is referred to:
Value Description
EMSP The NCL procedure is executing as EMSPROC. The verbs EMSALERT,
EMSCONT, EMSDEL, EMSREAD, and EMSSEND may be used.
LOGP The NCL procedure is executing as LOGPROC. The verbs LOGCONT, LOGDEL,
and LOGREAD may be used.
MSGP The NCL procedure is executing as a MSGPROC. The verbs MSGCONT,
MSGDEL, and MSGREAD may be used.
STDP The NCL procedure is a standard NCL process. No special facilities are available.
This includes both interactive and full-screen mode procedures.
See also &SYS.TERM.NAME and &SYS.TERM.TYPE.
Example
In the following example, the procedure NTYPE tests the contents of the
&SYS.NCL.TYPE system variable and issues a message if the type is not MSGP:
NTYPE: PROCEDURE
IF &SYS.NCL.TYPE \= MSGP THEN
WRITE DATA="ABORT-Not a Message Procedure"
END NTYPE