CA SMF Director

Detect empty SMFD extract file accurately - aside from COND CODE 0004

  • 1.  Detect empty SMFD extract file accurately - aside from COND CODE 0004

    Posted 09-10-2015 03:38 PM

    CA SMF DIRECTOR sites that are challenged with how a subtle COND CODE 0004 step-termination is shared by multiple symptom conditions within the product (e.g., NO DATA EXTRACTED, also INDEX FILE OVERLAP condition)  -- here is an inexpensive technique using DFSORT / ICETOOL (I expect SYNCSORT has an equivalent technique) you can use to accurately detect when SMF DIRECTOR creates a uninteresting empty-file from an EXTRACT while not needing to worry about the PGM=SMFD batch-step percolating a COND CODE 0004.

     

    //SMFEXTR  EXEC CASFXSMF  <- your SMFD PROC here

    //*   PERFORM SMF DATA EXTRACT, WITH WHEN CRITERIA (EXAMPLE) */

    //EXTRACT  DD  UNIT=SYSDA,DISP=(NEW,PASS),DSN=&&EXTRACT

    //SYSIN    DD  *

    EXTRACT SID(SYST) SELECT(30) WHEN(JOB,EQ,MYJOB) YESTERDAY .

    //* */

    //EMPTYCHK EXEC PGM=ICETOOL

     

    //*   DETECT EMPTY FILE AND GENERATE COND CODE 0012, IF SO */

    //TOOLMSG  DD SYSOUT=*

    //DFSMSG   DD SYSOUT=*

    //IN       DD DISP=(OLD,PASS),DSN=&&EXTRACT

    //TOOLIN   DD *

    COUNT FROM(IN) EMPTY RC12

    //* */

    //       IF EMPTYCHK.RC = 12 THEN

    //ABORTCHK EXEC PGM=BOGUS

    //*    GENERATE STEP-ABEND S806 IF FILE EMPTY (EXAMPLE) */

    //      ENDIF

    //*

    //* REMAINDER OF YOUR JOBSTREAM GOES HERE - FILE NOT EMPTY */

    //*

     

     

    Scott Barry

    SBBWorks, Inc.