Previous Topic: &ZNCLNEST

Next Topic: &ZNETID


&ZNCLTYPE

Returns the type of the current procedure.

NCL processes is one of several different types. Most NCL processes are standard types, that is, they can use all the standard NCL statements, built-in functions, and system variables.

Some NCL processes, however, are running as a special type of process, and are thus authorized to use NCL statements, built-in functions, and system variables that are only available to that type of process.

As an example, the LOGPROC NCL process can use the &LOGREAD, &LOGDEL, and &LOGREPL NCL statements. No other NCL process can use these statements.

When writing generic NCL procedures, it might be necessary to determine the exact type of NCL process that the procedure is executing as. The &ZNCLTYPE system variable provides this.

The &ZNCLTYPE system variable provides the following values when referenced:

STD

The NCL process is a standard process. No special facilities are available. This type includes both non-full-screen and full-screen mode procedures.

AOMP

The NCL process is executing as the primary AOMPROC. The &AOMxxx NCL verbs are used. This value can only be returned if the AOM feature is installed.

AOMS

The NCL process is executing as a secondary AOMPROC. The &AOMxxx NCL verbs are used. This value can only be returned if the AOM feature is installed.

CNMP

The NCL process is executing a CNMPROC. The &CNMxxx NCL verbs are used. This value can only be returned if the NEWS feature is installed.

LOGP

The NCL process is executing as LOGPROC. The &LOGxxx NCL verbs are used.

MAIS

The NCL process is executing as an MAI script process. The &MAIxxx NCL verbs are used. This value can only be returned if the MAI/EF feature is installed.

MSGP

The NCL process is executing as a MSGPROC. The &MSGxxx NCL verbs are used.

PPOP

The NCL process is executing as PPOPROC. The &PPOxxx NCL verbs are used.

LOCK

The NCL process is running to handle a LOCKed session.

Example: &ZNCLTYPE

&IF &ZNCLTYPE NE MSGP &THEN +
    &ENDAFTER &WRITE DATA=ABORTING - NOT A MSGPROC

Note: The &ZLUTYPE system variable provides an indication of the region in which an NCL process is executing.

More information:

&ZLUTYPE