How function tracing works
The example in the following figure shows how function tracing works.
In the example, the job EMPCRMX is defined in SMFUNCxx as the job to be traced. This particular job allocates a new data set that is named EMPCRM.SPACLIMI.TEST.
Tracing example
//STEP10 EXEC PGM=IEFBR14
//DD2 DD DSN=EMPCRM.SPACLIMI.TEST,
// DISP=(NEW,DELETE,DELETE),
// SPACE=(TRK,(100,100)),UNIT=BABDA,
// DCB=(LRECL=80,BLKSIZE=3120,RECFM=FB,DSORG=PO)
One hundred tracks are requested for the new data set; the limit in the rule list is 1 kilobyte. The filter list and rule lists are shown in Tracing a function. The numbers in the following explanation correspond to the numbers in the figure:
- The trace is activated for the SPACLIMI function when job name EMPCRMX is found to match the job name selection parameter on the INC statement.
The first SET statement in the filter list is checked (?SET FLST).
The first selection statement fails (SMS0042I TRACE - JOB ...message is issued) because the resource job name EMPCRMX does not match the name mask EMPDJE/.
The second selection statement is checked because it has an OR relationship with the first statement. The selection fails (- DSN ...), because the resource data set name EMPCRM.SPACLIMI.TEST does not match the name mask EMPDJE./.
The second filter list SET statement is checked (?SET FLST).
The first selection statement fails (SMS0042I TRACE - JOB ...) because the resource job name EMPCRMX does not match the name mask EMPEJD/.
The second selection statement fails (SMS0042I TRACE - JOB ...) because the resource job name EMPCRMX does not match the name mask EMPJBS/. The second selection parameter in the INC statement is not checked, because it has an AND relationship with the first parameter, which failed.
The third selection statement succeeds (SMS0042I TRACE + JOB ...) because the resource job name EMPCRMX matches the name mask EMPCRM/.
Because the XMODE parameter is on the same line as the JOB parameter, the two conditions have an AND relationship; therefore, the XMODE parameter is also checked. The selection succeeds because the resource-job execution mode (batch) matches the XMODE parameter value of JOB.
The filter list check is complete because the resource has been selected. The last SET statement in the filter list is not checked.
The trace shows a successful filter list selection (SMS0042I TRACE +INC FLST) and a successful filter list execution (SMS0042I TRACE +SET FLST).
The rule list for the SPACLIMI function is now checked (SMS0042I TRACE ?SET RLST).
The selection statement succeeds (SMS0042I TRACE + DSN ...) because the resource data set name EMPCRM.SPACLIMI.TEST matches the name mask EMPCRM.*.TEST.
The rule list checking is complete because the resource has been selected. The final SET statement in the rule list is not processed.
The limit of 1 KB is enforced for this resource.
The trace shows a successful rule list selection (SMS0042I TRACE +INC RLST) and a successful rule list execution (SMS0042I TRACE +SET RLST).
- The SPACLIMI function causes the data set allocation to fail because the requested space for the data set (100 tracks) exceeds the limit of 1 KB in the rule list.
Tracing a function