UXEEX2 - UEDIT Command/Termination Exit

Note:
A familiarity with the functional design of the UEDIT utility program is necessary for a full understanding of this section.

UXEEX2 is a user-written routine loaded during full-screen edit initialization by the module UEPDMN, and is given control whenever the terminal user enters a UEDIT command or requests edit termination by pressing CLEAR. When a UEDIT command is entered, the exit is called after UEPDMN has determined that a command has been entered but before the command is identified and processed.

The primary function of this routine is to define security restrictions on the use of the various UEDIT commands and to logically intercept control at UEDIT termination. UXEEX2 can be used to:

  • Check a user ID for authorization to issue certain UEDIT commands;

  • Extend the UEDIT command language with commands written by the user;

  • Pass control to another program or routine upon UEDIT termination.

Because the UXEEX2 module is loaded once per entry to UEPDMN, internal switches cannot be set and subsequently referred to.

A dummy UXEEX2 module is distributed with the Com-plete system as a member of the distribution source library and the distribution load library.

Note:
No security exists for UEDIT functions unless it is established by you.

This document covers the following topics:


How to Use UXEEX2

UXEEX2 receives control before UEPDMN identifies or validates the command. Upon entry to UXEEX2, a set of parameters is received in the form of fullword addresses pointed to by register 1. Word 1 of the parameter list contains the address of a return code area in which the status of the request is to be indicated. Word 2 of the parameter list contains the address of the UEPDCOM data area.

Word 3 of the parameter list contains the address of the "call-type" byte being passed to UXEEX2: if a command has been entered, this field contains a C; otherwise, this field contains an E. When a command is entered, additional fullword parameters (words 4 through 7) give further details about the type of command and its arguments. Word 7 of the parameter list contains an X'80' in the high-order byte of the address, indicating that this is the last parameter in the list.

To define security, test for the existence of the desired command, establish the desired level of authorization, and set the return code to indicate either acceptance or rejection. If the command is acceptable, a return code of 0 will enable execution of the command. Setting the return code to 4 causes the command to be ignored. A return code of 8 invokes the error message "COMMAND NOT PERMITTED".

UXEEX2 Conventions

The following table summarizes the UXEEX2 linkage conventions.

Feature Convention
Attributes Reentrant if in a resident area.
Type Thread.
Size Restricted to the UEPDMN thread region.
Registers at Entry
Register 1 Address of the parameter list
Register 13 Address of an 18-fullword save area
Register 14 Return address in the calling module
Register 15 Entry address of UXEEX2
Registers at Return All registers must be unchanged.
Parameters
Word 1 Address of a return code halfword
Word 2 Address of the UEPDCOM data area
Word 3 Address of a flag byte indicating the type of call: C command E termination
Word 4 Address of the command verb (valid with command calls only)
Word 5 Address of a halfword containing the length of the command verb
Word 6 Address of the command operands
Word 7 Address of a halfword containing the length of the command operands (0 = no operands)
Return Codes
0 Execute the command.
4 Ignore the command.
8 Issue 'command not permitted' diagnostic.
Considerations
a Is given control for every UEDIT command.
b Will be loaded dynamically.