The gxlpInit callable service initializes the PIMA and records the addresses of the caller's system service routines (if any). The PIMA storage is divided into the areas that will be used by the z/OS XML parser to process the input buffer and produce the parsed data stream.
The initialization of structures used by the z/OS XML parser in the PIMA is only done once per parse and is therefore unlikely to affect performance. The caller may choose to reuse the PIMA after each parse to eliminate the overhead of storage allocation and the page faults that occur when referencing new storage. In this case, a control operation is required to reset the necessary fields in the PIMA before parsing can continue. For more information on the control operation, see gxlpControl — perform a parser control function.
|
The Coded Character Set IDentifier (CCSID) that identifies the document’s character set. The CCSID value in this parameter will override any character set or encoding information contained in the XML declaration of the document. A set of CCSID constants for supported encodings has been declared in GXLYXEC. See Supported encodings for a full list of supported encodings.
The name of a structure containing a count of entries that follow and then a list of 31 (64) bit pointers to system service routines. The GXLHXSV member XSV_COUNT must have a value of 0 if no services are provided. For more details on usage, see Usage notes. For more information on exit routines, see the z/OS XML System Services exit interface chapter.
The name of the area which is passed to all system service exits. This provides for communication between the z/OS XML parser caller and its exit routines. Specify the name of a location containing 0 if no parameter is required for communication.
The name of the area where the service stores the return code.
The name of the area where the service stores the reason code. The reason code is only relevant if the return code is not XRC_SUCCESS.
All parameters in the parameter list are required.
Return and Reason Codes:
On return from a call to this service, register 15 will contain the return code. The return and reason code are both also set as output parameters. The value of the reason code is undefined when the return code has no associated reasons. Return and reason codes are defined in the header file gxlhxr.h (see gxlhxr.h (GXLYXR) - defines the return codes and reason codes). For reason code descriptions, also see Reason codes listed by value.
#include <stdlib.h>
#include <gxlhxec.h>
void * pima_p;
long pima_l;
GXLHXSV sysServiceVec;
int rc, rsn;
if (pima_p = malloc(GXLHXEC_MIN_PIMA_SIZE))
{ /* pima malloc succeeded */
pima_l = GXLHXEC_MIN_PIMA_SIZE;
sysServiceVec.XSV_COUNT = 0;
gxlpInit(pima_p, pima_l,
GXLHXEC_ENC_UTF_8,
GXLHXEC_FEAT_STRIP_COMMENTS,
sysServiceVec,
NULL,
&rc, &rsn);
} /* pima malloc succeeded */
System service exit routines cannot get control in the C/C++ environment. Instead, they must be coded to the assembler interface.
Addresses passed in the system_service_vec parameter must point to the entry point of the exit being supplied. To obtain the entry point address of a function in 31-bit NOXPLINK DLL compiled module, refer to the FDCB structure in z/OS® Language Environment® Vendor Interfaces, SA22-7568. Otherwise, taking the address of the function will return the entry point address.
This callable service is a direct map to the callable service GXL1INI (GXL4INI). Refer to Usage notes of GXL1INI (GXL4INI) for additional usage information.