IBM®
Skip to main content
    Country/region [select]      Terms of use
 
 
    
     Home      Products      Services & solutions      Support & downloads      My account     
 
developerworks > My developerWorks >  Dashboard > z/OS Performance Instrumentation Management Techniques > ... > SMF > Using DFSORT to Copy Subsets of SMF Data Sets
developerWorks
Log In   View a printable version of the current page.
Overview Connect Spaces Forums Wikis
Using DFSORT to Copy Subsets of SMF Data Sets
Added by martinpacker, last edited by sbb on Mar 11, 2008  (view change) show comment
Labels: 
(None)

DFSORT provides much more flexibility in selecting records for copying, allows multiple output destinations, and can be used to sort records on e.g. timestamps.

An Example (from Scott Barry, SBBWorks, Inc.)

Sometimes SMF data is not cut off exactly at midnight and you may only want a subset of LPARs in the input file for all of yesterday's data.  Here is a DFSORT SMF data subset/sort example to filter only SMF type 70 through 79 records for the previous day (note: a generic date filter specification) and for a specific subset of LPAR systems using both a generic 3-character prefix value and a 4-character explicit SMF ID, for example.

//SMFFILT EXEC PGM=SORT,PARM=ABEND
//SYSOUT  DD SYSOUT=*
//SORTIN  DD DISP=SHR,DSN=your_smf_input
//SORTOUT DD DSN=your_smf_filtered_output,...
//SYSIN      DD *
 OPTION VLSHRT,VLSCMP
 INCLUDE COND=(12,3,Y2U,EQ,Y'DATE3'-1,AND,
    (15,3,SS,EQ,C'SYP SYD',OR,15,4,SS,EQ,C'SYS1 SYT2'),AND,
    (6,1,BI,GE,70,AND,6,1,BI,LE,79))
 SORT FIELDS=(11,4,PD,A,7,4,BI,A,15,4,CH,A),EQUALS
/*
  • In the first line of the INCLUDE statement date arithmetic is used.
  • In the second line of the INCLUDE statement substring searches and ORing are used.
  • In the final line of the INCLUDE statement a range of record types is selected.
  • The SORT statement is used to sort into timestamp order (and within that SMF ID order).

DFSORT Symbols

It can make maintenance of DFSORT jobs much easier if you use symbolic names for fields.

To do this code a SYMNOUT DD statement (for Symbol resolution output information)and a SYMNAMES DD name.

The SYMNAMES DD points to a data set (or SYSIN) where you define the fields. Here's an example

POSITION,6
RECTYPE,*,1,BI
SMFTIME,*,4,BI
SMFDATE,*,4,PD
SMFID,*,4,CH

You might use such symbols in e.g. an INCLUDE statement:

INCLUDE COND=(SMFID,EQ,C'SYS1',AND,RECTYPE,EQ,+70)

You can use Symbols anywhere the result of substitution is valid DFSORT SYSIN syntax. They can be used to both describe fields and define constants.


 
    About IBM Privacy Contact