>>The point is to have the job  be scheduled weekly,  after our last SMF
dump at midnight and
> subsequent accumulation of SMF records so today's date minus 7 gives

Tim,

The SMFDATE format is NOT your typical Date format. A 4-byte SMF date value
in the form P'cyyddd' (X'0cyydddF')  where c= century and YY current year
and DDD = Day of the year.

If C=0 then century=19
if C=1 then century=20
If C=2 then century=21

You need to generate the constant as C=1  YY=21 and DDD = current year day
of the year - 7 = 165 - 7 =158

So the INCLUDE COND would be INCLUDE COND=(11,4,PD,GE,121158)

You can generate the constant dynamically.  Use the following JCL


// EXPORT SYMLIST=*
// SET DAYOFSET=7
/*
//***************************************************************
//* Generate a symbol in SMF date format subtract the day offset*
//***************************************************************
//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD DSN=&&S,DISP=(,PASS),SPACE=(TRK,(1,0),RLSE)
//SYSIN    DD *,SYMBOLS=JCLONLY
  OPTION COPY
  INREC BUILD=(DATE3-&DAYOFSET)
  OUTREC OVERLAY=(01,02,ZD,SUB,+19,EDIT=(TT))
  OUTFIL REMOVECC,NODETAIL,BUILD=(80X),
  HEADER1=(C'PICKDATE,',1,7)
/*
//***************************************************************
//* Use the symbol to pick the desired smf records              *
//***************************************************************
//STEP0200 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SYMNAMES DD DISP=(OLD,PASS),DSN=&&S
//SYMNOUT  DD SYSOUT=*
//SORTIN   DD DISP=SHR,DSN=Your SMF dataset
//SORTOUT  DD DSN=Your output dataset,
//            DISP=(NEW,CATLG,DELETE),
//            SPACE=(CYL,(X,Y),RLSE)
//SYSIN    DD *
  OPTION COPY
  INCLUDE COND=(11,4,PD,GE,PICKDATE)
/*


Check the SYMNOUT dataset to see the value of PICKDATE

Further if you have any questions please let me know

Thanks,
Kolusu
DFSORT Development
IBM Corporation



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to