Accessing DBMS Data with the LIBNAME Statement |
This example uses the FREQ procedure to calculate statistics on the DB2 table Invoices.
libname mydblib db2 ssid=db2; proc freq data=mydblib.invoices(keep=invnum country); tables country; title 'Invoice Frequency by Country'; run;
The following output shows the one-way frequency table that this example generates.
Invoice Frequency by Country 1 The FREQ Procedure COUNTRY Cumulative Cumulative COUNTRY Frequency Percent Frequency Percent ------------------------------------------------------------------------- Argentina 2 11.76 2 11.76 Australia 1 5.88 3 17.65 Brazil 4 23.53 7 41.18 USA 10 58.82 17 100.00
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.