Previous Topic: &LOGDEL

Next Topic: &LOGREAD


&LOGON

Passes control of this terminal to another application.

&LOGON [ LOGMODE=logmode ]
       [ APPL= { applname | * } ]
       { panelname | * }
       [ string ]

An NCL procedure operating under EASINET control can request that control of a terminal be passed to another application. The &LOGON statement initiates passing the terminal to another application.

Operands:

LOGMODE=logmode

This operand is optional but must be coded as the first operand if used. It is the name of an VTAM logmode entry used when processing this request. If not specified, the logmode used is the default from either the APPL definition specified by the APPL= operand, or from the nominated DEFLOGON entry. If logmode is specified and the target application is this product region, the terminal is disconnected and reacquired using the specified logmode table entry.

APPL={ applname | * }

The name for the required application. This operand is optional, and (if used) designates a specific target application. When this operand is coded, it must be coded after the LOGMODE operand (if present), and before any other operands. If APPL= is used to designate a specific application, the string operand is optional. If APPL=* is coded it indicates that the target application is this product region, in which case the terminal is disconnected and immediately reacquired.

panelname | *

(Mandatory) The name for a panel for display before passing control to the target application. This panel normally informs the terminal operator that the logon request has been accepted and is being processed.

This operand is ignored for LU1 terminals, but must still be supplied. For LU1 terminals, any text assigned to the &SYSMSG variable before the &LOGON is executed is written to the terminal if the logon request is accepted.

If you specify *, no panel is displayed before passing the terminal to the target application.

string

The meaning of this operand depends on the presence of the APPL operand.

If APPL is coded on the &LOGON statement, the string operand is optional and treated as user data text (maximum length 168 bytes) to be passed to the target application specified by the APPL= operand within the logon data. If user data is supplied in variables, the contents of the variables could be hexadecimal data, which is passed without change to the target application.

If APPL is not coded, string is mandatory and represents text that is compared against the logon paths defined in the DEFLOGON command. This lets the &LOGON statement select target applications indirectly, through the DEFLOGON mechanism, rather than explicitly by the APPL= definition.

Examples: &LOGON

&LOGON REQACCEPT IMS 
&LOGON LOGONOK  &INKEY USERID1/PASSWORD 
&LOGON APPL=&SELECTION OKPANEL &USERDATA 
&LOGON LOGMODE=MODEL4 OKPANEL TSO

Notes:

After issuing an &LOGON statement, the NCL procedure will not regain control unless the terminal cannot be passed to the target application. In this case, processing resumes with the next statement after the &LOGON statement. The &SYSMSG variable will contain an error message describing the reason for the failure.

Any attempt to use the &LOGON statement from other than an EASINET procedure results in an error.

Note: See also the $EASINET procedure in the distribution library.