z/OS MVS Programming: Writing Transaction Programs for APPC/MVS
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Invoking the ATBTRACE Exec from an HLL Program

z/OS MVS Programming: Writing Transaction Programs for APPC/MVS
SA23-1397-00

To invoke the ATBTRACE exec from a high-level language (HLL) program, code the program to load and call the IRXJCL program, passing a parameter list that contains ATBTRACE and its parameters.

ATB6xxxxI status and error messages, and information resulting from an ATBTRACE request, are written to the output device specified through the SYSTSPRT DD statement (either the invoker's job log, or a data set). API trace data entries are written to the data set specified through the DATASET parameter on ATBTRACE.

For example, the following PL/I program, JCLXMP1, uses IRXJCL to invoke the ATBTRACE exec to start tracing the LU/TP combination LUX and TPX:
JCLXMP1 : Procedure Options (Main);
/* Function: Call a REXX exec from a PL/I program using IRXJCL        */
/* Note: This example is for PL/I Version 2.                          */

  DCL IRXJCL EXTERNAL OPTIONS(RETCODE, ASSEMBLER);
  DCL 1 PARM_STRUCT,               /* Parm to pass to IRXJCL          */
        5 PARM_LNG BIN FIXED (15), /* Length of the parameter         */
        5 PARM_STR CHAR (53);      /* String passed to IRXJCL         */
  DCL PLIRETV BUILTIN;             /* Defines the return code built-in*/
  PARM_LNG = LENGTH(PARM_STR);     /* Set the length of string        */
/*                                                                    */
  PARM_STR = 'ATBTRACE START DATASET(A.B) LU(LUX) TP(TPX) USERID(*)';/*
                                      Set string value to the exec to
                                      be invoked followed by the exec's
                                      arguments                       */
  FETCH IRXJCL;                    /* Load the address of entry point */
  CALL IRXJCL (PARM_STRUCT);       /* Call IRXJCL to execute the REXX
                                      exec and pass the argument      */
  PUT SKIP EDIT ('Return code from IRXJCL was:',PLIRETV) (a, f(4));
                                   /* Print out the return code from
                                      the exec ATBTRACE               */
  END ;                            /* End of program                  */
The following JCL runs program JCLXMP1:
//USERID  JOB MSGLEVEL=(1,1)
//*
//* EXAMPLE OF INVOKING ATBTRACE USING A HIGH
//* LEVEL PROGRAM SUCH AS PL/I.
//*
//* MESSAGES FROM THE REXX EXEC WILL BE WRITTEN
//* EITHER TO JOBLOG
//*    SYSTSPRT DD SYSOUT=A
//* OR TO USER SPECIFIED DATA SET
//*    SYSTSPRT DD DSN=XX.YY
//*
//*
//TRACE   EXEC PGM=JCLXMP1
//SYSTSPRT DD   DSN=USERID.MESSAGE.DATASET,DISP=OLD
//SYSEXEC  DD   DSN=SYS1.SBLSCLI0,DISP=SHR
/*

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014