The
following code initializes the PIMA and records the addresses of the
caller’s system service routines (if any). For the callable service,
see
GXL1INI (GXL4INI) — initialize a parse instance. AMODE 31 callers use
GXL1INI example.
**********************************************************
* Setup parameter list to call GXL4INI. *
* Then call GXL4INI. *
**********************************************************
* Call GXL4INI(PIMA, (00)
* PIMA_LEN, (08)
* CCSID, (16)
* Feature_Flags, (24)
* Sys_SVC_Vector, (32) Will be set to NULL
* Sys_SVC_parm, (40) Will be set to NULL
* Return_Code, (48)
* Reason_Code) (56)
*
LA R9,SAMPLE_PIMA_PTR
LG R9,0(R9)
STG R9,Parser_Parm
LA R10,SAMPLE_PIMA_LEN
STG R10,Parser_Parm+8
SLGR R4,R4
LA R10,XEC_ENC_IBM_037(R4)
ST R10,CCSID
LA R10,CCSID
STG R10,Parser_Parm+16
LA R10,SAMPLE_INIT_FEAT
STG R10,Parser_Parm+24
LA R10,NULL_Value
STG R10,Parser_Parm+32
STG R10,Parser_Parm+40
LA R10,SAMPLE_INIT_RC
STG R10,Parser_Parm+48
LA R10,SAMPLE_INIT_RSN
STG R10,Parser_Parm+56
*********************************************************
LLGT R15,CVTPTR
L R15,CVTCSRT-CVT(R15)
L R15,72(R15)
LG R15,40(R15)
LA R1,Parser_Parm
BALR R14,R15
:
********************************************************************
* Description of the SAMPLE Structure:
* ********************************************************************
SAMPLE DSECT Memory storage area
SAMPLE_HEADER DS 0D
SAMPLE_EYE_CATCHER DS CL8 eye-catcher string
SAMPLE_RETCODE DS 1F
SAMPLE_RSNCODE DS 1F
SAMPLE_PIMA_PTR DS 1D
SAMPLE_PIMA_LEN DS 1F
SAMPLE_INIT_FEAT DS 1F
SAMPLE_INIT_RC DS 1F
SAMPLE_INIT_RSN DS 1F
SAMPLE_CTL_OPTION DS 1F
SAMPLE_CTL_DATA DS 1F
SAMPLE_CTL_RC DS 1F
SAMPLE_CTL_RSN DS 1F
SAMPLE_TERM_RC DS 1F
SAMPLE_TERM_RSN DS 1F
SAMPLE_FLAGS1 DS 1F
SAMPLE_FLAGS2 DS 1F
SAMPLE_END DS 0X
********************************************************************
NULL_Value DC 1D’0’
CCSID DS 1F
PARSER_PARM DS 16A