Chapter Contents

Previous

Next
SAS/ACCESS Interface to SYSTEM 2000 Data Management Software: Reference

Printing Data

Printing SYSTEM 2000 data described by a view descriptor is exactly like printing a SAS data file, as shown in the following example:

    proc print data=vlib.emppos(s2kpw=demo);
       title2 'Subset of EMPLOYEE Database 
           Information';
    run;

Results of PROC PRINT shows the first page of output for this example.

Results of PROC PRINT
                 Subset of EMPLOYEE Database Information                 1
 
 OBS  LASTNAME    FIRSTNME      POSITION          DEPARTME        MANAGER
 
   1                            PROGRAMMER        INFORMATION SY    MYJ
   2  AMEER       DAVID         SR SALES REPRESE  MARKETING         VPB
   3  AMEER       DAVID         JR SALES REPRESE  MARKETING         VPB
   4  BOWMAN      HUGH E.       EXECUTIVE VICE-P  CORPORATION       CPW
   5  BROOKS      RUBEN R.      JR SALES REPRESE  MARKETING         MAS
   6  BROWN       VIRGINA P.    MANAGER WESTERN   MARKETING         OMG
   7  CAHILL      JACOB         MANAGER SYSTEMS   INFORMATION SY    JBM
   8  CANADY      FRANK A.      MANAGER PERSONNE  ADMINISTRATION    PRK
   9  CHAN        TAI           SR SALES REPRESE  MARKETING         TZR
  10  COLLINS     LILLIAN       MAIL CLERK        ADMINISTRATION    SQT
  11  FAULKNER    CARRIE ANN    SECRETARY         CORPORATION       JBM
  12  FERNANDEZ   SOPHIA        STANDARDS & PROC  INFORMATION SY    JLH
  13  FREEMAN     LEOPOLD       SR SYSTEMS PROGR  INFORMATION SY    JLH

When you use the PRINT procedure, you may want to use the OBS= option, which enables you to specify the last observation to be processed. This is especially useful when the view descriptor describes large amounts of data or when you just want to see an example of the output. The following example uses the OBS= option to print the first five rows described by the view descriptor VLIB.EMPPOS:

    proc print data=vlib.emppos(s2kpw=demo obs=5);
       title2 'First Five Data Rows Described by 
          VLIB.EMPPOS';
    run; 

Results of Using the OBS= Option shows the result of this example.

Results of Using the OBS= Option
               First Five Data Rows Described by VLIB.EMPPOS             1
 
 OBS  LASTNAME    FIRSTNME      POSITION          DEPARTME        MANAGER
 
   1                            PROGRAMMER        INFORMATION SY    MYJ
   2  AMEER       DAVID         SR SALES REPRESE  MARKETING         VPB
   3  AMEER       DAVID         JR SALES REPRESE  MARKETING         VPB
   4  BOWMAN      HUGH E.       EXECUTIVE VICE-P  CORPORATION       CPW
   5  BROOKS      RUBEN R.      JR SALES REPRESE  MARKETING         MAS

In addition to the OBS= option, the FIRSTOBS= option also works with view descriptors, but the FIRSTOBS= option does not improve performance significantly because each record must still be read and its position calculated.

For more information on the PRINT procedure, see the SAS Procedures Guide. For more information on the OBS= and FIRSTOBS= options, see SAS Language Reference: Dictionary.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.