Fax Appendix 6: Sample Daily Processing and Reduction Job

Table Of ContentsIT Service Vision Help


The following SAS statements are an example of what a daily production job might look like for the fax data collector. This code would typically be submitted nightly by an automated job submission facility (such as cron on Open Systems, System Agent on Windows NT, or OPC/ESA on MVS).

   
%CPSTART(...)      /* Start IT Service Vision. Parameter not shown */
%INCLUDE FAXES.SAS; /* Include staging source code macro definition */
%FAXES;            /* Stage the raw data into the WORK library */
%CPPROCES(UFAXES,GENLIB=WORK); /* Process staged data into DETAIL */
%CPREDUCE(UFAXES); /* Reduce DETAIL data into DAY, WEEK, MONTH,YEAR */
GOPTIONS reset=title reset=footnote DEVICE=IBM3179
         COLORS=(WHITE RED BLUE);
TITLE1 "Pages sent or received";
%CPPLOT1(UFAXES, PAGES, Pages sent/rec
         ,STAT=MEAN
         ,PERIOD=24HOUR
         ,BY=MACHINE
         ,WEIGHT=DURATION
         ,XVAR=DATETIME
         ,XLAB=Date
         ,TYPE=STACK
         ,REDLVL=DETAIL
         ,OUTMODE=GRAPHCAT
         ,OUTLOC=ADMIN.REPORTS            
         ,OUTDESC=FAX PAGING REPORT
         ,OUTNAME=FXPAGES);
  

Notes:

The %CPSTART macro is executed to start IT Service Vision. For information about %CPSTART, including parameter values, see the Macro Reference documentation for IT Service Vision.

The code for staging the fax data is invoked next. In this example, the code is available in the %FAXES macro. (See What to Do with the Staging Code in Generic Collector Appendix 4: Other Considerations for information on storing the staging code in a macro definition.)

The %CPPROCES macro executes to process the generic collector’s staged data into the detail level of the PDB. In this example, the macro processes data to the UFAXES table from the FAXES data set (named as the UFAXES table’s external name) in the WORK library. (By default, the COLLECTR= parameter is set to GENERIC in the %CPPROCES macro.)

The %CPREDUCE macro executes to reduce the detail-level data in table UFAXES into the day, week, month, and year levels of the table.

Last, you may want to add report macro invocations that create a standard set of reports each night, saving the output into SAS catalogs or external files.