Previous Topic: Writing a ReportNext Topic: Types of Reporting Commands


How to Write Reports

Before you start writing reports, follow the general process for writing and submitting any history report or series of reports.

To write a report, do the following:

  1. Create a job stream. Use the following sample job stream to write reports:
    //JOBCARD  JOB  (0000),TODD,CLASS=A,MSGCLASS=a
    //REPORT   EXEC PGM=XPFRMAIN,REGION=4M
    //STEPLIB  DD   DSN=sysview.CNM4RLOD.LOADLIB,DISP=SHR
    //ERPTPRM  DD   DSN=sysview.CNM4RSAM.SAMPLIB,DISP=SHR
    //SYSUDUMP DD   SYSOUT=*
    //SYSPRINT DD   SYSOUT=*
    //TAPSMF   DD   DISP=SHR,DSN=SMF.inputfile
    //SYSIN    DD  *
    INPUT(TAPSMF)
     OPTION(RECSTAT=YES)
     TAB TRAN USE
    END
    RUN
    *
    
  2. Add parameters to your EXEC statement.

    The following is a sample EXEC statement:

    // EXEC PGM=XPFRMAIN,REGION=2048K,PARM=['CASE=UPPER']
                                    ['DATAONLY=[YES]']
                                    ['DATEFRMT=[MM/DD/YY|DD/MM/YY]']
                                    ['ECHO=[YES|NO]']
                                    ['COPYRIGHT=NO']
    

    This EXEC statement performs the following tasks:

  3. Write history reporting commands.

    The following example shows the minimum commands necessary to write one report:

    primarycommand [variable]
     END
    RUN
    
  4. Combine the history reporting commands with the job stream.
  5. If you plan to use input from a tape file, mount the tape containing the file.
  6. Run the job stream created in step 4.

Note: A command can begin anywhere, as long as it is the leftmost word on the line.