You can use the PRINT procedure to print SYSTEM 2000 data that is described by
view descriptors in the same way that you use PROC PRINT with SAS data files. See the
output, which shows the first page of output produced by the following program:
proc print data=vlib.emppos(s2kpw=demo);
title2 'Subset of EMPLOYEE Database Information';
run;
Results of PROC PRINT for SYSTEM 2000 Data
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 PROC PRINT, you might 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 a sample of the output.
The following program uses the OBS= option to print the first five rows described
by the view descriptor Vlib.EmpPos. The results follow the program.
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 in PROC PRINT
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
The FIRSTOBS= option can also be used with view descriptors. However, the FIRSTOBS=
option does not improve performance significantly
because each record must be read and its position calculated.
For more information
about the PRINT procedure, see the Base SAS Procedures Guide. For more
information about the OBS= and FIRSTOBS= options, see SAS Data Set Options: Reference.