List Signed-On Users (QEZLSGNU) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: No

The List Signed-On Users (QEZLSGNU) API generates a list of signed-on users and places the list in the specified user space. The generated list replaces any existing lists in the user space.

When you specify a generic user name or a generic display station name, you can generate a subset of the signed-on user list. If both a user name and a display station name are specified, only entries that match both the user name and the display station name are included in the list of signed-on users.

You can use the QEZLSGNU API to get a list of users similar to that seen by using the Work with User Jobs (WRKUSRJOB) command with options STATUS (*ACTIVE) and JOBTYPE (*INTERACT).


Authorities and Locks

User Space Authority
*CHANGE
Library Authority
*EXECUTE
User Space Lock
*EXCLRD

Required Parameter Group

Qualified user space name
INPUT; CHAR(20)

The user space that is to receive the created list. The first 10 characters contain the user space name, and the second 10 characters contain the name of the library where the user space is located. You can use these special values for the library name:


Format name
INPUT; CHAR(8)

The content and format of the information returned for each member. The possible format names are:

For more information, see SGNU0100 Format or SGNU0200 Format.

User name
INPUT; CHAR(10)

A specific user name, a generic user name, or the following special value:


Display station name
INPUT; CHAR(10)

A specific display station name, a generic display station name, or the following special value:


Include disconnected jobs and suspended group jobs
INPUT; CHAR(10)

An indicator for whether or not to include disconnected jobs and suspended group jobs. You must use one of the following special values:


Include signed-off users with output waiting to print
INPUT; CHAR(10)

An indicator for whether or not to include signed-off users with output waiting to print. This would include all interactive signed-off users with output waiting to print and all batch graphical user interface jobs that have ended with output waiting to print.

You must use one of the following special values:


Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Format of the Generated Lists

The signed-on user list consists of:

For details about the user area and generic header, see User spaces. For details about the remaining items, see the following sections. For detailed descriptions of the fields in the list returned, see Field Descriptions.

When you retrieve list entry information from a user space, you must use the entry size returned in the generic header. The size of each entry may be padded at the end. If you do not use the entry size, the result might not be valid. For examples of how to process lists, see Examples: APIs and exit programs.


Input Parameter Section



SGNU0100 Format



SGNU0200 Format



Field Descriptions

Activity. Information about what is happening with the interactive job. Common values for an interactive job are:

Activity name. The name of the program, menu, command, user function, System/36 procedure, or file being used; or the group name of a suspended group job. The field is used only when the activity field is *BLDIDX, *CMD, *GRP, *MNU, *PGM, *S36PRC, or *USR. This field is blank for other activities.

Disconnect job allowed indicator. An indicator as to whether the job is allowed to be disconnected or not using the Disconnect Job (DSCJOB) command. The valid values that will be returned are:

Display station description. The text that describes the device description of the display station to which the user is signed on.

Display station name. The name of the display station to which the user is currently signed on. This field is used as part of the job name by the system.

Display station specified. The display station or special value specified in the call to this API.

Format name. The name of the format that determines the content of the information returned for each signed-on user. This is specified on the call to this API.

Include disconnected jobs and suspended group jobs indicator specified. The include disconnected jobs and suspended group jobs indicator specified in the call to this API.

Include signed-off users with output waiting to print indicator specified. The include signed-off users with output waiting to print indicator specified in the call to this API.

Job number. The system-assigned job number.

Reserved. An ignored field.

User description. The text of the user profile description for the user currently signed on the system.

User name. The user profile name of the user currently signed on the system.

User name specified. The user name or special value specified in the call to this API.

User space library name. The library in which the user space is located.

User space name. The name of the user space that is to receive the generated list and the name of the library that contains this user space. This is specified in the call to this API.


Error Messages



API introduced: V2R3

[ Back to top | Operational Assistant APIs | APIs by category ]