Example of using CSV output


CSV data format is the one that can be easily imported into various spreadsheet applications including Microsoft Excel and Open Office Calc.

In this example we are going to extract JALCOMP difference data in the CSV format, transfer it to a PC and analyze the data using MS Excel.

First, let's run the utility to extract SMF data and format them as CSV file. See sample JCXCSV in the TM install data set. The following JCL was used for this purpose (the example uses SMF record type 222):

//SMFJCRUN  JOB (RSI),Compuware Corporation’,MSGCLASS=X
//*
//STEP1     EXEC PGM=IFASMFDP,REGION=0M
//DUMPIN    DD    DISP=SHR,DSN=SYS1.MANG
//DUMPOUT   DD    DSN=&&SMF,DISP=(,PASS),UNIT=SYSDA,
//                               SPACE=(CYL,(10,10),RLSE)
//SYSPRINT  DD    SYSOUT=*
INDD(DUMPIN,OPTIONS(DUMP))
OUTDD(DUMPOUT,TYPE(222))
//*
//STEP2     EXEC  PGM=DTMFSMJ7,REGION=0M,TIME=1440,
//                               COND=(4,LE,STEP1),
//                               PARM=(F=CSV,
//                               SMF=222,
//                               CSV.HEADER=YES)
//SYSPRINT  DD  SYSOUT=*
//TMSMFIN   DD  DISP=(OLD,DELETE),DSN=&&SMF
//TMSMFCSV  DD  DISP=(NEW,CATLG),DSN=EXAMPLE.CSV,UNIT=SYSDA,
//              SPACE=(CYL,(5,5),RLSE),
//              DCB=(DSORG=PS,RECFM=VB,LRECL=512,BLKSIZE=27998)

This job runs the DTMFSMJ7 utility with the following parameters:

FORMAT=CSV

defines output format as CSV

SMF=222

defines SMF record type number

CSV.HEADER=YES

requests generation of CSV header

The job completed with return code zero and the SYSPRINT data set for the STEP2 contained the following messages:

JAL_COMP SMF Record Formatter, DTMFSMJC 10.23    20170510 #V071509

Running on May 10,2017 at 10:24:20.

The following parameters were specified:
   F=CSV
   SMF=222
   CSV.HEADER=YES

Total number of SMF records processed:            1617
Number of no sub-type records:                       2
Number of SMF record of type 222:                 1615
... including SUB-type JAL_COMP records:            5
Total number of written records:                    79
Processing has been successfully completed.

The SMF file had only 5 records of the type and sub-type we are interested in. It means that the JAL descriptor differences were reported for 5 jobs only. The size of the output CSV file was 79 records.

The CSV file was transferred to a PC and imported into an Excel spreadsheet.

A pivot table was created to regroup the data in such a way that they show how many jobs have a certain JAL descriptor mentioned in the JALCOMP data. The pivot table was sorted in the descending order by the number of jobs and the result was used to create the following diagram:

Jobs_with_certain_JAL_Descriptor.jpg








 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*