uname (BPX1UNA, BPX4UNA) — Obtain the name of the current operating system
Function
The uname callable service obtains information about the z/OS UNIX system the caller is running on.
Requirements
Operation | Environment |
---|---|
Authorization: | Supervisor or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1UNA): | 31-bit |
AMODE (BPX4UNA): | 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 BPX1UNA,(Data_area_length,
Data_area_address,
Return_value,
Return_code,
Reason_code)
AMODE 64 callers use BPX4UNA with the same parameters. The Data_area_address parameter is a doubleword.
Parameters
- Data_area_length
- Supplied parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword that contains the length of the data area that is pointed to by Data_area_address. The area must be at least the length of UTSN#LENGTH. For a mapping of this data area, refer to BPXYUTSN — Map the response structure for uname.
- Data_area_address
- Returned parameter
- Type:
- Address
- Length:
- Fullword (doubleword)
The name of a fullword (doubleword) that contains the address of the area in which the system information is to be returned. For a mapping of this data area, refer to BPXYUTSN — Map the response structure for uname.
- Return_value
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword in which the uname service returns a nonnegative value if the request is successful, or -
1
if it is not successful. - Return_code
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword in which the uname service stores the return code. The uname service returns Return_code only if Return_value is-1
. For a list of return code values, see Return codes (errnos) in z/OS UNIX System Services Messages and Codes. The uname service can return one of the following values in the Return_code parameter:Return_code Explanation EFAULT The pointer to the UTSN from the invoker is bad. The following reason code can accompany the return code: JRBadAddress. EINVAL The passed length of the invoker UTSN is not valid. The following reason code can accompany the return code: JROK. - Reason_code
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
The name of a fullword in which the uname service stores the reason code. The uname service returns Reason_code only if Return_value is
-1
. Reason_code further qualifies the Return_code value. For a list of reason codes, see Reason codes in z/OS UNIX System Services Messages and Codes.
Characteristics and restrictions
There are no restrictions on the use of the uname service.