If you want to know the unique set of values BY variables assume for each cross section in the data file, use the OUTBY= option. For example, the following statements list some of the cross sections available for an IFS file, and are shown in Figure 13.3.
filename ifsfile "%sysget(DATASRC_DATA)imfifs1.dat" RECFM=F LRECL=88; proc datasource filetype=imfifsp infile=ifsfile outselect=on ebcdic interval=month outby=xsection; run; title1 'Some Cross Sections Available in IFSFILE'; proc print data=xsection; run;
Figure 13.3: Listing of the OUTBY= Data Set
Some Cross Sections Available in IFSFILE |
Obs | COUNTRY | CSC | PARTNER | VERSION | ST_DATE | END_DATE | NTIME | NOBS | NSERIES | NSELECT | CNTYNAME |
---|---|---|---|---|---|---|---|---|---|---|---|
1 | 111 | F | Z | JAN1957 | SEP1986 | 357 | 357 | 6 | 3 | UNITED STATES | |
2 | 112 | F | Z | JAN1957 | SEP1986 | 357 | 357 | 6 | 3 | UNITED KINGDOM | |
3 | 146 | F | Z | JAN1957 | SEP1986 | 357 | 357 | 6 | 3 | SWITZERLAND | |
4 | 158 | F | Z | JAN1957 | SEP1986 | 357 | 357 | 6 | 3 | JAPAN | |
5 | 186 | F | Z | JAN1957 | SEP1986 | 357 | 357 | 6 | 3 | TURKEY |
The OUTBY= data set reports the total number of series, NSERIES, defined in each cross section, NSELECT of which represent the selected variables. If you want to see the descriptive information on each of these NSELECT variables for each cross section, specify the OUTALL= option. For example, the following statements print descriptive information on all monthly series defined for all cross sections (COUNTRY=’111’, COUNTRY=’112’, COUNTRY=’146’, COUNTRY=’158’, and COUNTRY=’186’) which are shown in Figure 13.4.
filename datafile "%sysget(DATASRC_DATA)imfifs1.dat" RECFM=F LRECL=88; title3 'Time Series Defined in Cross Section'; proc datasource filetype=imfifsp outselect=on ebcdic interval=month outall=ifsall; run; title4 'Cross Sections Available in OUTALL=IFSALL Data Set'; proc print data=ifsall; run;
Figure 13.4: Listing of the OUTALL= Data Set
Some Cross Sections Available in IFSFILE |
Time Series Defined in Cross Section |
Cross Sections Available in OUTALL=IFSALL Data Set |
Obs | COUNTRY | CSC | PARTNER | VERSION | NAME | KEPT | SELECTED | TYPE | LENGTH | VARNUM | BLKNUM | LABEL | FORMAT | FORMATL | FORMATD | ST_DATE | END_DATE | NTIME | NOBS | CNTYNAME | SUBJECT | SCDATA | DATATYPE | DU_CODE | DU_NAME | NDEC | BASEYEAR | SOURCE |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 111 | F | Z | F___AA | 1 | 1 | 1 | 5 | . | 1 | MARKET RATE CONVERSION FACTOR | 0 | 0 | JAN1957 | SEP1986 | 357 | 357 | UNITED STATES | S | E | U U | 5 | ||||||
2 | 111 | F | Z | F___AC | 1 | 1 | 1 | 5 | . | 2 | MARKET RATE CONVERSION FACTOR | 0 | 0 | JAN1957 | SEP1986 | 357 | 357 | UNITED STATES | S | F | U U | 5 | ||||||
3 | 111 | F | Z | F___AE | 1 | 1 | 1 | 5 | . | 3 | MARKET RATE CONVERSION FACTOR | 0 | 0 | JAN1957 | SEP1986 | 357 | 357 | UNITED STATES | S | A | U U | 5 | ||||||
4 | 112 | F | Z | F___AA | 1 | 1 | 1 | 5 | . | 4 | MARKET RATE CONVERSION FACTOR | 0 | 0 | JAN1957 | SEP1986 | 357 | 357 | UNITED KINGDOM | S | E | U U | 6 | ||||||
5 | 112 | F | Z | F___AC | 1 | 1 | 1 | 5 | . | 5 | MARKET RATE CONVERSION FACTOR | 0 | 0 | JAN1957 | SEP1986 | 357 | 357 | UNITED KINGDOM | S | F | U U | 5 | ||||||
6 | 112 | F | Z | F___AE | 1 | 1 | 1 | 5 | . | 6 | MARKET RATE CONVERSION FACTOR | 0 | 0 | JAN1957 | SEP1986 | 357 | 357 | UNITED KINGDOM | S | A | U U | 6 | ||||||
7 | 146 | F | Z | F___AA | 1 | 1 | 1 | 5 | . | 7 | MARKET RATE CONVERSION FACTOR | 0 | 0 | JAN1957 | SEP1986 | 357 | 357 | SWITZERLAND | S | E | U | 4 | ||||||
8 | 146 | F | Z | F___AC | 1 | 1 | 1 | 5 | . | 8 | MARKET RATE CONVERSION FACTOR | 0 | 0 | JAN1957 | SEP1986 | 357 | 357 | SWITZERLAND | S | F | U | 6 | ||||||
9 | 146 | F | Z | F___AE | 1 | 1 | 1 | 5 | . | 9 | MARKET RATE CONVERSION FACTOR | 0 | 0 | JAN1957 | SEP1986 | 357 | 357 | SWITZERLAND | S | A | U | 4 | ||||||
10 | 158 | F | Z | F___AA | 1 | 1 | 1 | 5 | . | 10 | MARKET RATE CONVERSION FACTOR | 0 | 0 | JAN1957 | SEP1986 | 357 | 357 | JAPAN | S | E | U | 3 | ||||||
11 | 158 | F | Z | F___AC | 1 | 1 | 1 | 5 | . | 11 | MARKET RATE CONVERSION FACTOR | 0 | 0 | JAN1957 | SEP1986 | 357 | 357 | JAPAN | S | F | U | 6 | ||||||
12 | 158 | F | Z | F___AE | 1 | 1 | 1 | 5 | . | 12 | MARKET RATE CONVERSION FACTOR | 0 | 0 | JAN1957 | SEP1986 | 357 | 357 | JAPAN | S | A | U | 3 | ||||||
13 | 186 | F | Z | F___AA | 1 | 1 | 1 | 5 | . | 13 | MARKET RATE CONVERSION FACTOR | 0 | 0 | JAN1957 | SEP1986 | 357 | 357 | TURKEY | S | E | U | 3 | ||||||
14 | 186 | F | Z | F___AC | 1 | 1 | 1 | 5 | . | 14 | MARKET RATE CONVERSION FACTOR | 0 | 0 | JAN1957 | SEP1986 | 357 | 357 | TURKEY | S | F | U | 5 | ||||||
15 | 186 | F | Z | F___AE | 1 | 1 | 1 | 5 | . | 15 | MARKET RATE CONVERSION FACTOR | 0 | 0 | JAN1957 | SEP1986 | 357 | 357 | TURKEY | S | A | U | 3 |
The OUTCONT= data set contains one observation for each time series variable with the descriptive information summarized over BY groups. When the data file contains no cross sections, the OUTCONT= and OUTALL= data sets are equivalent, except that the OUTALL= data set also reports time ranges of available data. The OUTBY= data set in this case contains a single observation reporting the number of series and time ranges for the whole data file.