ACS routine tracing can also be enabled by setting variables during
SMS/Debug rule processing. This eliminates the need to specify the
SMSDEBUG operand in the JCL or TSOALLOCATE statement,
or on the SMSDEBUG DD statement for IDCAMS DEFINEs. This may
be useful if JCL changes cannot be made easily or if ACS routine tracing is
needed for a dataset that will be allocated by a started task such as DB2 or
DFSMShsm. However, the preferred method is to code an //SMSDEBUG DD
DUMMY statement in the appropriate step and use the SMSDBSEL=
selection filters on the JOB or EXEC statement.
To enable dynamic ACS routine tracing, both the
SMSACS_TRACE and the PRE_SMSACS environments must be
active. That is, there must be DEFENV statements present in the rules such
as:
DEFENV PRE_SMSACS MODE(ACTIVE) RULES(ALWAYS)
DEFENV SMSACS_TRACE MODE(ACTIVE)
In addition, the rules must set the value of the &SD_ACSTRACE variable
to YES.
- If the contents of the ACS read-only variables are to be displayed prior to ACS routine
tracing, set the value of the
&SD_ACSTRACE_Bvariable toYES. - If the ACS read-write variables (the data class, storage class, management class, and
storage group) are to be displayed following the trace, set the value of the
&SD_ACSTRACE_Avariable toYES.
In the following example, the DYNTRACE rule displays the ACS read-only and
read-write variables and the ACS routine trace. The second IF statement
prevents any further processing in the PRE_SMSACS environment. Although the
&SD_ACSTRACE variables are set to YES in the
PRE_SMSACS environment, the actual trace output is produced at a later
point in time, during the SMSACS_TRACE environment.
DEFRULE DYNTRACE
IF &ENV = PRE_SMSACS
&DSNAME = MY.INTER.ESTING.DATA.SET
THEN SET &SD_ACSTRACE = YES /* TURN ON ACS ROUTINE TRACING */
SET &SD_ACSTRACE_B = YES /* DUMP ACS R/O VARIABLES BEFORE */
SET &SD_ACSTRACE_A = YES /* DUMP ACS R/W VARIABLES AFTER */
IF &ENV = PRE_SMSACS THEN EXIT /* NO MORE SMSACS_TRACE PROCESSING */
Using the DEFLIST SELDSN statement
SMS/Debug also examines the SMSDEBUG rules language for a special
DEFLIST entry named SELDSN that contains a list of
datasets that will be traced by the product. For example, the following list requests
tracing for TOM.DSNAME and all TOM.X37* datasets.
DEFLIST SELDSN (TOM.DSNAME,TOM.X37*) TYPE(SMSDEBUG)
If the current dataset name matches an entry in the list, then SMSDEBUG
will be activated as if the SMSDEBUG=YES parameter was specified on the
DD statement. This facility is especially useful for tracing
DD statements in started tasks that would not normally allow JCL
modification (e.g. DB2).