The DATASOURCE Procedure |
This example uses a PC format CITIBASE database (FILETYPE=CITIDISK) to extract annual population estimates for females and males with respect to various age groups.
Population estimate series for all ages of females including those in the armed forces overseas are given by PANF, while PANM gives the population estimate for all ages of males including those in armed forces overseas. More population estimate time series are described in Output 11.6.1 and are output in Output 11.6.2.
The following statements extract the required population estimates series:
filename keyfile "basekey.dat" RECFM=V LRECL=22; filename indfile "baseind.dat" RECFM=F LRECL=84; filename dbfile "basedb.dat" RECFM=F LRECL=4; proc datasource filetype=citidisk infile=( keyfile indfile dbfile ) out=popest outall=popinfo; run; proc print data=popinfo; run; proc print data=popest; run;
Daily Series Available in FXRATES_.DDS File, KEEP RX: |
Obs | NAME | SELECTED | TYPE | LENGTH | VARNUM | BLKNUM | LABEL | FORMAT | FORMATL | FORMATD | ST_DATE | END_DATE | NTIME | NOBS | DISKNUM | ATTRIBUT | NDEC | AGGREGAT |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | PAN | 1 | 1 | 5 | 2 | 1 | POPULATION EST.: ALL AGES, INC.ARMED F. OVERSEAS(THOUS.,ANNUAL) | 0 | 0 | 1980 | 1989 | 10 | 10 | 1 | 1 | 0 | 0 | |
2 | PAN17 | 1 | 1 | 5 | 3 | 2 | POPULATION EST.: 16 YRS AND OVER,INC ARMED F.OVERSEAS(THOUS,ANNUAL) | 0 | 0 | 1980 | 1989 | 10 | 10 | 1 | 1 | 0 | 0 | |
3 | PAN18 | 1 | 1 | 5 | 4 | 3 | POPULATION EST.: 18-64 YRS,INC.ARMED F.OVERSEAS(THOUS,ANNUAL) | 0 | 0 | 1980 | 1989 | 10 | 10 | 1 | 1 | 0 | 0 | |
4 | PANF | 1 | 1 | 5 | 5 | 4 | POPULATION EST.: FEMALES,ALL AGES,INC.ARMED F.O'SEAS(THOUS.,ANN) | 0 | 0 | 1980 | 1989 | 10 | 10 | 1 | 1 | 0 | 0 | |
5 | PANM | 1 | 1 | 5 | 6 | 5 | POPULATION EST.: MALES, ALL AGES, INC.ARMED F.O'SEAS(THOUS.,ANN) | 0 | 0 | 1980 | 1989 | 10 | 10 | 1 | 1 | 0 | 0 |
Daily Series Available in FXRATES_.DDS File, KEEP RX: |
Obs | DATE | PAN | PAN17 | PAN18 | PANF | PANM |
---|---|---|---|---|---|---|
1 | 1980 | 227757 | 172456 | 138358 | 116869 | 110888 |
2 | 1981 | 230138 | 175017 | 140618 | 118074 | 112064 |
3 | 1982 | 232520 | 177346 | 142740 | 119275 | 113245 |
4 | 1983 | 234799 | 179480 | 144591 | 120414 | 114385 |
5 | 1984 | 237001 | 181514 | 146257 | 121507 | 115494 |
6 | 1985 | 239279 | 183583 | 147759 | 122631 | 116648 |
7 | 1986 | 241625 | 185766 | 149149 | 123795 | 117830 |
8 | 1987 | 243942 | 187988 | 150542 | 124945 | 118997 |
9 | 1988 | 246307 | 189867 | 152113 | 126118 | 120189 |
10 | 1989 | 248762 | 191570 | 153695 | 127317 | 121445 |
This example demonstrates the following:
The INFILE= options lists the filerefs of the key, index, and database files, in that order.
The INTERVAL= option is omitted since the default interval for CITIDISK type files is YEAR.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.