The msgget function returns a message queue ID that it created or that the user is allowed to access.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1QGT): | 31-bit |
AMODE (BPX4QGT): | 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 BPX4QGT with the same parameters.
Identification for this message queue. This can be a user-defined value that serves as a lookup value to determine if this message queue already exists, or the reserved value Ipc_PRIVATE.
The values that begin with an "Ipc_" prefix are defined in BPXYIPCP, and are mapped onto S_TYPE, which is in BPXYMODE.
The values that begin with an "S_I" prefix are defined in BPXYMODE, and are a subset of the access permissions that apply to files.
The name of a fullword in which the msgget service returns -1 or the message queue identifier.
Return_code | Explanation |
---|---|
EACCES | A message queue identifier exists for the Key parameter, but operation permission, as specified by the low-order 9– bits of the Message_Flag parameter, is not granted (the "S_" items). The following reason code can accompany the return code: JRIpcDenied. |
EEXIST | A message queue identifier exists for the Key parameter, and both Ipc_CREAT and Ipc_EXCL are specified. The following reason code can accompany the return code: JRIpcExists. |
EINVAL | The Message_Flag operand included bits that are not supported by this function. The following reason code can accompany the return code: JRIpcBadFlags. |
ENOENT | A message queue identifier does not exist for the Key parameter, and Ipc_CREAT was not set. The following reason code can accompany the return code: JRIpcNoExist. |
ENOSPC | The system limit on the number of message queue IDs has been reached. The following reason code can accompany the return code: JRIpcMaxIDs. |
The name of a fullword in which the msgget service stores the reason code. The msgget service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. See z/OS UNIX System Services Messages and Codes for the reason codes.
For an example using this callable service, see BPX1QGT (msgget) example.