Before an application can use this service, it must invoke the __map_init callable service to create a mapped megabyte area to hold its data blocks. See __map_init (BPX1MMI, BPX4MMI) — Create a mapped megabyte area.
Operation | Environment |
---|---|
Authorization: | Problem program or supervisor state, PSW key 8 |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1MMS): | 31-bit |
AMODE (BPX4MMS): | 64-bit |
ASC mode: | Primary address space control (ASC) 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 BPX4MMS with the same parameters. ParmListPtr is a doubleword pointer field.
Constant | Description |
---|---|
MMG_SERVICE | Perform one or more operations on map blocks:
|
The name of a fullword (doubleword) field that contains the address of the parameter list for the specified function. See BPXYMMG — Map interface for _map_init and _map_service for the mapping of the parameter lists.
The name of a fullword that contains the number of entries in the array that is contained in the parameter list provided by ParmListPtr. The value specified in the ArrayCount parameter must be greater than or equal to 1 and less than or equal to 1000.
The name of a fullword in which the __map_service callable service stores the return code. The __map_service callable service stores a return code only if the return value is -1. See z/OS UNIX System Services Messages and Codes for a complete list of possible return code values. The __map_service callable service may return one of the following values in the Return_code parameter:
Return code | Explanation |
---|---|
EEXIST | A request was made to perform a service on a block, but either a map area is not currently active for the process, or the map area is in the process of being shut down (JRMapNotActive). |
ENOMEM | A request to create a new block or connect to an existing block was made with a zero block address, specifying that the __map service is to locate the address of a free map block, but there are no unused blocks in the map area to satisfy the request (JRMapOutOfBlocks). |
EINVAL | One of the following errors occurred:
|
EFAULT | An argument of this service contained an address that was not accessible to the caller (JRMapBadStorage). |
EMVSERR | One of the following occurred:
|
The name of a fullword in which the __map_service callable service stores the reason code. The __map_service callable service stores a reason code only when the return value is -1. The reason code further qualifies the return code value. See z/OS UNIX System Services Messages and Codes for the reason codes.
Later, when a disconnected data block needs to be processed, the application can call __map_service with a connect request, specifying the token for the data block and the address of the map block it is to be attached to for processing. The __map_service callable service attaches the specified data block to the appropriate map block for use by the application. The block is read-only or read/write based on its state as of the last control operation.
See the description of the __map_init callable service, Usage notes, for more information about using these two related services.
Users of __map_service can create and manage a tremendous amount of data, causing the kernel to consume a large amount of system resources. To prevent abuse of such power, the __map_init service requires that the user be permitted to the BPX.MAP resource in the FACILITY class. (The __map_service callable service does not check for authority to BPX.MAP, because it does not perform any functions without first completing a __map_init request.).
For an example using this callable service, see BPX1MMS (__map_service) example.