![]() Chapter Contents |
![]() Previous |
![]() Next |
SAS/ACCESS Software for Relational Databases: Reference |
In this example, you use the PRINT procedure to print data that is described by the VLIB.CUSORDR view descriptor; VLIB.CUSORDR gets its data from the table SASDEMO.ORDERS.
Note: The
OBS= data set option limits the output to five observations.
proc access dbms=db2; /* create access descriptor */ create adlib.order.access; table=sasdemo.orders; ssid=db2; assign=no; list all; /* create vlib.cusordr view */ create vlib.cusordr.view; select ordernum stocknum shipto; rename ordernum ordnum; format ordernum 5.0 stocknum 4.0; run; /* example */ proc print data=vlib.cusordr(obs=5); title 'Five Observations Described by VLIB.CUSORDR'; run;
Results of Using the OBS= Option shows the results of this example.
Results of Using the OBS= Option
Five Observations Described by VLIB.CUSORDR OBS ORDERNUM STOCKNUM SHIPTO 1 11269 9870 19876078 2 11270 1279 39045213 3 11271 8934 18543489 4 11272 3478 29834248 5 11273 2567 19783482 |
In addition to the OBS= option, the SAS system option FIRSTOBS= also works with view descriptors. However, because of the way data is stored in a relational DBMS table, there is no true first observation, and the FIRSTOBS= option might not consistently retrieve the same observation. In addition, the FIRSTOBS= option might not improve performance significantly because each row might still be read and its position must be calculated.
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.