z/VSE - Group home

How to perform a SDAID trace to buffer/VTAPE in z/VSE

By Jens Remus posted 15 days ago

  

This post demonstrates to perform a SDAID trace to a wraparound buffer, dump the buffer to a z/VSE VTAPE in VSAM, and print the trace. While the wraparound buffer is limited to up to 256K this does not require a physical printer or tape device. Therefore this is sometimes easier or even the only possibility to perform a SDAID trace. For example when z/VSE is running in a LPAR without physical tape attached.

Following is a sample job to take a SDAID trace to a wraparound buffer of the maximum size of 256K. It uses the SDAID batch utility to perform SDAID trace initialization in direct input mode in the partition, the DTRIATTN utility to issue AR commands, and the DOSVSDMP utility to print the trace. At a minimum you need to adapt the values of the symbolic parameters in the configuration section and the SDAID trace statements in step 1. You can use the job skeleton SKVTAPE in ICCF library 59 to define a VSAM ESDS data set to be used as virtual tape image.

* $$ JOB JNM=SDAID,DISP=D,CLASS=0
// JOB SDAID - TRACE IN BUFFER USING VTAPE AND DTRIATTN
// OPTION NODUMP,ACANCEL,JCANCEL,SCANCEL
* *** CONFIGURATION **************************************************
// SETPARM PAUSE=NO
/. COMMENT : CUU OF VSE VIRTUAL TAPE DEVICE
// SETPARM PWRJOB,UNIT=480
/. COMMENT : LABEL NAME OF VSAM ESDS DATA SET TO BE USED AS TAPE IMAGE
// SETPARM PWRJOB,FILE='VTAPE1'
// QUERY SETPARM,PWRJOB
// IF PAUSE='YES' THEN
// PAUSE - CHECK PARAMETERS. REPLY "ENTER" TO CONTINUE OR "CANCEL"
* *** STEP 1: INITIALIZE THE SDAID TRACE *****************************
/. COMMENT : ADAPT SDAID TRACE STATEMENTS TO YOUR NEEDS
// EXEC SDAID
OUTDEV BUFFER=256
TRACE INST=* PHASE=$IJBAR31
/*
// IF $RC > 0 THEN
// GOTO END
* *** STEP 2: START THE SDAID TRACE **********************************
// EXEC DTRIATTN,PARM='STARTSD'
/*
* *** STEP 3: PERFORM ACTION TO BE TRACED ****************************
/. COMMENT : OPTIONALLY REPLACE BY COMMAND/PROGRAM TO BE TRACED
// PAUSE - SDAID TRACE ACTIVE. REPLY 'ENTER' TO DEACTVATE TRACE
* *** STEP 4: STOP THE SDAID TRACE ***********************************
// EXEC DTRIATTN,PARM='STOPSD'
/*
* *** STEP 5: START VTAPE AND DUMP THE SDAID BUFFER TO VTAPE *********
// VTAPE START,UNIT=&UNIT,LOC=VSAM,FILE='&FILE',SCRATCH,SCOPE=JOB
// EXEC DTRIATTN,PARM='DUMP BUFFER,&UNIT'
/*
// PAUSE - WAIT FOR DUMP TO COMPLETE. REPLY 'ENTER' TO CONTINUE
* *** STEP 6: END THE SDAID TRACE ************************************
// EXEC DTRIATTN,PARM='ENDSD'
/*
* *** STEP 7: PRINT THE SDAID TRACE **********************************
// MTC REW,&UNIT
// EXEC DOSVSDMP,PARM='PRINT SDAID TAPE=&UNIT FILE=1'
/*
* *** STEP 8: STOP VTAPE *********************************************
// VTAPE STOP,UNIT=&UNIT
/. END
// EXEC LISTLOG
/*
/&
* $$ EOJ

Explanation of the above sample job steps:

  • Configuration: Specifies the the device number of the tape device (UNIT) to be used as VSE Virtual Tape (VTAPE) and the label of the VSAM ESDS data set (FILE) to be used as scratch tape image. You need to adapt all values to your environment. Please note that any contents of the VSAM ESDS data set will be overwritten.
  • Step 1: Initializes the SDAID trace in direct input mode in the partition using the SDAID batch utility. You need to adapt the SDAID trace statements to your needs.
  • Step 2: Starts the SDAID trace by giving the STARTSD AR command using the DTRIATTN utility.
  • Step 3: Placeholder to perform the action to be traced. In the sample a PAUSE JC statement is used to have the job wait for the manual initiation and completion of the action to be traced. It could easily be replaced by the invocation of a program (e.g. using the EXEC JC statement) or a command (e.g. using the DTRIATTN utility) that is to be traced.
  • Step 4: Stops the SDAID trace by giving the STOPSD AR command using the DTRIATTN utility.
  • Step 5: Starts the VSE Virtual Tape (VTAPE) using the VTAPE JCS statement and dumps the SDAID trace wraparound buffer to that VTAPE using the DUMP BUFFER AR command. Please note that a PAUSE JC statement is used to have the job wait for the manual confirmation that the dump completed.
  • Step 6: Ends the SDAID trace by giving the ENDSD AR command using the DTRIATTN utility. This releases all resources used by SDAID.
  • Step 7: Prints the recorded SDAID trace using the DOSVSDMP utility.
  • Step 8: Stops the VSE Virtual Tape (VTAPE) using the VTAPE STOP JC statement.

Note: If you are using z/VSE 5.2 or 6.1 you need the PTF for either APAR DY47694 or APAR DY47697 “DOSVSDMP PROGRAM CHECKS ON IJBXDM5 WHEN PRINTING SDAID BUFFER FROM REMOTE VTAPE WHICH WAS CREATED BY DUMP BUFFER,CUU” to support printing SDAID buffers of 256K.

I greatly appreciate your feedback via the z/VSE contact form.

Disclaimer: My posts and opinions are my own.