GXL1TRM example

The following code releases all resources obtained (including storage) by the z/OS XML parser and resets the PIMA so that it can be re-initialized. For the callable service, see GXL1TRM (GXL4TRM) — terminate a parse instance. AMODE 64 callers use GXL4TRM example.
********************************************************** 
* Setup parameter list to call GXL1TRM.                  * 
*    Then call GXL1TRM.                                  * 
********************************************************** 
* Call GXL1TRM(PIMA,        (00) 
*              Return_Code, (04) 
*              Reason_Code) (08) 
* 
       LA    R10,SAMPLE_PIMA_PTR 
       L     R10,0(R10) 
       ST    R10,Parser_Parm 
       LA    R10,SAMPLE_TERM_RC 
       ST    R10,Parser_Parm+4 
       LA    R10,SAMPLE_TERM_RSN 
       ST    R10,Parser_Parm+8 
********************************************************* 
       LLGT  R15,CVTPTR 
       L     R15,CVTCSRT-CVT(R15)       
       L     R15,72(R15) 
       L     R15,24(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   1F 
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   8A