Subprogram SECUSER: Terminal Operator User ID Utility

If you have any questions about the content of this page, please contact CICS Requests for  clarification

The SECUSER utility program is used to find out the user-ID of the terminal  operator that invoked a transaction. The length of the COMMAREA passed to  SECUSER determines how much data is passed back. If the COMMAREA length is at  least 16 bytes, the eight character user ID followed by the eight character  "security-group" code is returned, for a total of 16 bytes. Security group code  now contains the two byte Institution code and six spaces. If the COMMAREA  length is 8 to 15 bytes long, only the 8 character user-ID is returned. 

The need for this subprogram has diminished in the last few years.   The user-ID (or logon ID) of the terminal operator is best retrieved with the  command:

EXEC CICS ASSIGN USERID(user-id) 
END-EXEC

where "user-id" is an eight character field in working storage or the  linkage section.

The security group code is not an actual feature of ACF2. These days, it's  almost always the same as the first two characters of the user-ID. Provisions  have been made in our installation of ACF2/CICS that allow the two items to be  different.

This utility will be maintained for the indefinite future.

The SECUSERD COPY member defines the appropriate COMMAREA layout. The COBOL  names are as follows:

01  SECUSER-COMMAREA.
    05 NWSU-UID             PIC  X(08).
    05 NWSU-GROUP.
       10 NWSU-INSTITUTION  PIC X(02).
       10 FILLER            PIC X(06).

You code:

    COPY SECUSERD.

    EXEC CICS LINK  PROGRAM('SECUSER')
                    COMMAREA(SECUSER-COMMAREA)
                    LENGTH(LENGTH OF SECUSER-COMMAREA)
    END-EXEC.
    MOVE NWSU-UID TO  ......