Allocating Traces

How to:

You can activate all or any combination of traces during your session or in batch. You can display the results online or store them in a file or sequential data set.

Tip: The trace facilities are intended for use in query optimization and problem debugging. Application programs should not be written to depend on the format or content of any trace, as they may change in later releases.


Top of page

x
Syntax: How to Allocate a Trace Online

You can store trace information in a z/OS sequential data set, or you can display it online at the terminal. To capture trace data in a file, issue the appropriate allocation command for DDNAME FSTRACE from the command level. To display the trace on the terminal, no allocation is necessary.

For example, to allocate DDNAME FSTRACE, issue one of the following commands:

{MVS|TSO} ALLOC F(FSTRACE) DA('userid.FSTRACE.DATA') SHR REU 

or

DYNAM ALLOC DD FSTRACE DATASET userid.FSTRACE.DATA SHR REUSE 

Note: DCB attributes are LRECL=80 and RECFM=F.

To view the trace information, use the system editor or the FOCUS TED editor.


Top of page

x
Syntax: How to Allocate a Trace in Batch

You can write trace results to SYSOUT. BLKSIZE information is optional, but should be compatible with other FSTRACE formats. For example, to allocate DDNAME FSTRACE:

//FSTRACE   DD   SYSOUT=*,DCB=(LRECL=80,BLKSIZE=80,RECFM=F)
//ALLOC    EXEC PGM=IEFBR14
//FSTRACE  DD   DISP=(,CATLG),DSN=userid.FSTRACE,
//         UNIT=SYSDA,VOL=SER=USERM1,SPACE=(TRK,(5,5)),
//         DCB=(LRECL=80,BLKSIZE=80,RECFM=F)
                      .
                      .
                      .
                      .
                      .
                      .

Then, allocate the trace data set with DISP=MOD in the batch FOCUS JCL:

                      .
                      .
                      .
//FOCBATCH EXEC PGM=FOCUS
//FSTRACE  DD   DISP=(MOD,KEEP,KEEP),DSN=userid.FSTRACE

Top of page

x
Syntax: How to Free Trace Allocations

To disable an adapter trace, clear the associated allocation

{MVS|TSO} FREE F(FSTRACE)

or

DYNAM FREE FILE FSTRACE

Information Builders