getlogin (BPX1GLG, BPX4GLG) — Get the user login name

Function

The getlogin callable services gets the user login name that is associated with the current process.

Requirements

Operation Environment
Authorization: Supervisor state or problem state, any PSW key
Dispatchable unit mode: Task
Cross memory mode: PASN = HASN
AMODE (BPX1GLG): 31-bit
AMODE (BPX4GLG): 64-bit
ASC mode: Primary mode
Interrupt status: Enabled for interrupts
Locks: Unlocked
Control parameters: All parameters must be addressable by the caller and in the primary address space.

Format

CALL BPX1GLG,(Return_value)

AMODE 64 callers use BPX4GLG. The address returned is a fullword (below the bar).

Parameters

Return_value
Returned parameter
Type:
Address
Length:
Fullword

The name of a fullword to which the getlogin service returns a pointer to a login name field, or 0. If a login name is not found, Return_value is set to 0. If a login name is found, Return_value is set to the address of a field that contains the length of the login name and the login name. The address returned is 31 bits for both AMODE 31 and AMODE 64 callers. The login name length is a fullword. Batch processing has a user name that is associated with a process; this user name is used as the login name. For example: The login name is MCBRIDE and the return value is 0007.

Usage notes

If this service fails, the process ends abnormally.

Related services

Characteristics and restrictions

There are no restrictions on the use of the getlogin service.

Examples

For an example using this callable service, see BPX1GLG (getlogin) example.