Open Systems and Windows NT Appendix 3: Printing Graphs

Table Of ContentsIT Service Vision Help


Introduction

This appendix steps you through the task of customizing the printing of graphs interactively and in background.

If the monitors and/or printer/plotters at your site differ from those in the examples in this appendix, you may need to refer to the SAS Companion for UNIX Environments: Language documentation for your current release of SAS for information about your equipment. Pages 89-90 (in the Version 6 First Edition) are especially relevant to this topic.

If you prefer to use a method other than the ones described in this appendix, you can see other methods in the SAS Companion for UNIX Environments and in SAS Technical Support document TS 246, "PRODUCING HARDCOPY GRAPHICS UNDER UNIX." (In TS 246, the information for SAS Release 6.09 applies to Releases 6.09, 6.11, and 6.12.)

If you have questions, ask your SAS Software Representative, or ask your SAS Software Representative to call SAS Technical Support.

Printing Graphs from a Batch Job

Prerequisites

  1. You know the characteristics of your printer/plotter.

  2. You know the name of the SAS device driver that can handle your printer/plotter.

    1. In your PROGRAM EDITOR window, type the following starting at the first line in the body of the window:
         proc gdevice;
         run;
      
    2. Submit this program fragment.

    3. The GDEVICE window lists all of the SAS graphics device drivers. Find one that matches the characteristics of your printer/plotter and make a note of its name.

      If the brief descriptions in the Description field are not sufficient for you to decide on a driver, type B over the underscore that is to the left of the driver's name and press ENTER or RETURN. More information displays. To return to the list of device drivers, select File and End.

      Note: If you are in still in doubt about the appropriate device driver to use, from the list of device drivers, follow this button path

         Help -> Extended Help
      

      If you need more help selecting a driver, ask your SAS Software Representative to call SAS Technical Support.

    4. To close the GDEVICE window, select File and End.

Actions

  1. Ensure that you have a GOPTIONS statement that includes a DEVICE= parameter, and set the DEVICE= parameter to the same device driver that you selected above. (You do not need to specify the TARGETDEVICE= parameter.) For example,
       goptions device=hplj4si ;
  2. Then specify settings by means of OUT xxxx parameters on the IT Service Vision reporting macros. For example, to route the graphs to a printer/plotter, you would use these parameters on each of the reporting macros:
       outmode=catalog
       outloc=work.repts

    where work.repts is a temporary catalog that is automatically deleted at the end of the batch job (because the SAS WORK library is automatically deleted at the end of the batch job).

    For instance, here is an example batch job that generates two graphics reports, one for mills and one for natural, and sends them to the catalog and to the printer (using a site-specific print command, which is nlp in this example):

       %cpstart(mode=batch,
                pdb=/nfs/ark/local/disk1/sasabc/pdb/unix,
                access=readonly);
    
       filename grafout pipe 'nlp';
       goptions cback=white
                device=ps
                gaccess=sasgastd
                gsflen=80
                gsfmode=replace
                gsfname=grafout ;
    
       GOPTIONS reset=title reset=footnote ;
       TITLE1 "CPU and Disk Utilization across Days-Mills";
       %CPPLOT2(PCSGLB,GLBCPTO,CPU Total,GLBDUT,Disk Utilization
                ,REDLVL=DAY
                ,PERIOD=ASIS
                ,BY= MACHINE
                ,WHERE=MACHINE = 'mills'
                ,outmode=catalog
                ,outloc=work.repts
                ,outname=plot);
    
       GOPTIONS reset=title reset=footnote ;
       TITLE1 "CPU and Disk Utilization across Days-Natural";
       %CPPLOT2(PCSGLB,GLBCPTO,CPU Total,GLBDUT,Disk Utilization
                ,REDLVL=DAY
                ,PERIOD=ASIS
                ,BY= MACHINE
                ,WHERE=MACHINE = 'natural'
                ,outmode=catalog
                ,outloc=work.repts
                ,outname=plot);