Combining and extracting GTF output

Use the IPCS COPYTRC subcommand to do one or more of the following:

If you have GTF set up to write data for one system to multiple data sets, you can use the IPCS COPYTRC subcommand to consolidate the data into one data set. You should do this before you consolidate GTF data from multiple systems with the MERGE or COPYTRC subcommands.

Figure 1 shows an example of a GTF cataloged procedure with 3 data sets defined for GTF data from system SYS01.
Figure 1. Example: Consolidating GTF output from multiple data sets
//GTFABC    PROC   MEMBER=GTFPARM
//IEFPROC   EXEC   PGM=AHLGTF,REGION=2880K,TIME=1440,
//                 PARM=('MODE=EXT,DEBUG=NO')
//IEFRDER   DD     DSNAME=SYS1.GTFTRC,UNIT=SYSDA,
//                 SPACE=(4096,20),DISP=(NEW,KEEP)
//SYSLIB    DD     DSN=SYS1.PARMLIB(&MEMBER),DISP=SHR
//GTFOUT1   DD     DSNAME=SYS01.DSN1,UNIT=&DEVICE,DISP=&DSPS;
//GTFOUT2   DD     DSNAME=SYS01.DSN2,UNIT=&DEVICE,DISP=&DSPS;
//GTFOUT3   DD     DSNAME=SYS01.DSN3,UNIT=&DEVICE,DISP=&DSPS;
From IPCS, issue the following command to consolidate the data from the data sets defined in the cataloged procedure into one data set, GTF.SYS01:
COPYTRC TYPE(GTF)
        INDATASET(SYS01.DSN1,SYS01.DSN2,SYS01.DSN3)
        OUTDATASET(GTF.SYS01)
In Figure 2, the COPYTRC subcommand is used to consolidate data from 3 systems, in data sets GTF.SYS01, GTF.SYS02, and GTF.SYS03, into one output data set, GTF.ALLSYS.
Figure 2. Example: Consolidating GTF output from multiple systems
COPYTRC TYPE(GTF)
        INDATASET(GTF.SYS01,GTF.SYS02,GTF.SYS03)
        OUTDATASET(GTF.ALLSYS)

Note that just one data set per system was used on the COPYTRC command. For best results, if you have more than one data set for a system, you should first consolidate those using a separate instance of the COPYTRC command.

To format the output data set for GTF data, issue the following IPCS subcommand:
GTFTRACE DSNAME(ALLSYS)