The getlogin callable services gets the user login name that is associated with the current process.
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. |
|
AMODE 64 callers use BPX4GLG. The address returned is a fullword (below the bar).
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:
If this service fails, the process ends abnormally.
There are no restrictions on the use of the getlogin service.
For an example using this callable service, see BPX1GLG (getlogin) example.