__cpl() — CPL interface service
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
Language Environment |
both | OS/390 V2R9 |
Format
#include <sys/__cpl.h>
int __cpl(int functioncode, int bufferlen, char *buffer);
General description
- functioncode
- A value that specifies what function BPX1CPL will perform. The
following function codes are defined.
- CPL_QUERY (equates to value of 1)
- CPL_CFSIZER (equates to a value of 2)
- CPL_CFSIZER_W_LVL (equates to a value of 3)
CFlevel8 or higher is required to use the computesize function. To provide a consistent result, the code must loop through all online CFs and find the one at the highest CF level. Issuing computesize against CFs at different levels gives different sizes back to the user resulting in inconsistent results when multiple requests are issued.
- bufferlen
- The length of the input/output storage area (buffer) for BPX1CPL
- buffer
- Storage area for input/output for BPX1CPL
__cpl() is an interface to the BPX1CPL Assembler Callable Service. For more information on parameters and behavior of BPX1CPL, please refer to z/OS UNIX System Services Programming: Assembler Callable Services Reference.
Returned value
If successful, __cpl() returns 0.
- Error Code
- Description
- EFAULT
- One of the parameters contained an address that was not accessible to the caller.
- EINVAL
- The functioncode parameter contains a value that is not correct.
- EMVSCPLERROR
- A __cpl() service failed.
- ENOSYS
- The __cpl() service failed because the system is not at the correct level.
- EPERM
- The calling thread's address space is not permitted.
Usage notes
- Access to __cpl() is controlled using a new RACF® class profile BPX.CF. For any of these
cases to run, a BPX.CF class profile must be created and access level
provided.
__cpl() is only valid on a Parallel Sysplex® enabled system with a CFlevel 8 or higher Coupling Facility. Most installations run with two or more Coupling Facilities for availability and recoverability reasons. As such, the code was designed to provide the flexibility of allowing the caller to specify a CF or if not specified, MVS™ will select the first CF at CFlevel 8 it finds.