The SASEHAVR Interface Engine

Example 42.11 Using the OUTSELECT=ON Option to View the Key Selection Variables in a Haver Database

Suppose you want to select your time series based on geography codes or source codes. To construct your wildcard for selection, first run with the OUTSELECT=ON option to see the possible values for each selection key.


Libname lib1 sasehavr "%sysget(HAVER_DATA)"
        outselect=on ;

data validD1;
   set lib1.haverd;
run;

title1 'OUTSELECT=ON, Print the OUT= Data Set';
title2 'Shows the Values for Key Selection Variables:';
title3 'Name, Source, Geog1, Geog2, Shortsrc, Longsrc';
title4 'OUTSELECT=ON, the CONTENTS Procedure with Variable Names and Labels';
proc print data=validD1;
run;

proc contents data=validD1;
run;

Output 42.11.1 shows the output values for each key selection variable.

Output 42.11.1: OUTSELECT=ON Option Shows the Values for Key Selection Variables

OUTSELECT=ON, Print the OUT= Data Set
Shows the Values for Key Selection Variables:
Name, Source, Geog1, Geog2, Shortsrc, Longsrc
OUTSELECT=ON, the CONTENTS Procedure with Variable Names and Labels

Obs NAME SOURCE GEOG1 GEOG2 SHORTSRC LONGSRC FCM10 FCM1M FFED FFP1D FXAUS TCC
1 NAME SOURCE GEOG1 GEOG2 SHORTSRC LONGSRC            
2 FCM10 FRB 0000000   FRB Federal Reserve Board            
3 FCM1M UST 0000000   FRB Federal Reserve Board            
4 FFED FRB 0000000   FRB Federal Reserve Board            
5 FFP1D FRB 0000000   FRB Federal Reserve Board            
6 FXAUS FRB 0000000   FRBNY Federal Reserve Bank of New York            
7 TCC UST 0000000   TREASURY U.S. Treasury            



If you also want to see a list of all the variables and their corresponding labels for this OUTSELECT=ON data set, you can run the CONTENTS Procedure.

Output 42.11.2 shows the contents of the output data set.

Output 42.11.2: OUTSELECT=ON Option Shows the Contents of HAVERD.DAT

Alphabetic List of Variables and Attributes
# Variable Type Len Label
7 FCM10 Char 8 10-Year Treasury Note Yield at Constant Maturity (Avg, % p.a.)
8 FCM1M Char 8 1-Month Treasury Bill Market Bid Yield at Constant Maturity (%)
9 FFED Char 8 Federal Funds [Effective] Rate (% p.a.)
10 FFP1D Char 8 1-Day AA Financial Commercial Paper (% per annum)
11 FXAUS Char 8 Foreign Exchange Rate: Australia (US$/Australian$)
3 GEOG1 Char 8 DLXRECORD.Geography1
4 GEOG2 Char 8 DLXRECORD.Geography2
6 LONGSRC Char 70 DLXRECORD.LongSource
1 NAME Char 10 DLXRECORD.VarName
5 SHORTSRC Char 10 DLXRECORD.ShortSourc
2 SOURCE Char 6 DLXRECORD.Source
12 TCC Char 8 Treasury: Closing Operating Cash Balance (Today, Mil.$)