__csplist — Retrieve CSP parameters

Standards

Standards / Extensions C or C++ Dependencies
Language Environment C only  

Format

#include <csp.h>

__csplist;

General description

Restriction: This function is not supported in AMODE 64.

__csplist is a macro intended to be used to access the parameter list passed from Cross System Product (CSP) to your C Library program. The macro evaluates to the address of the first element of the parameter list. You can use array indexing to extract the subsequent parameters, casting each parameter to the expected type, as shown in the example below. If no parameters are passed, __csplist[0] equals NULL.

You must include the #pragma runopts(plist(ims)) directive if CSP is used to invoke a z/OS® XL C program.

argc will always be 1. See z/OS XL C/C++ User's Guide for information about the PLIST compiler option.

If you are expecting an integer and then a structure of type s_type, you should have the statements:
int_var = (int *) __csplist[0];
s_var   = (s_type *) __csplist[1];

Related information