The SASEHAVR Interface Engine |
Example 37.12 Selecting Variables Based on Short Source Key Code
Using the information from Example 37.11, you can now select time series by using selection keys such as the SHORT= , GEOG1=, or GEOG2= options. Since the short source values are nontrivial in database haverd, it is best in this case to use the SHORT= option. For more about using geography codes for selection keys, see Output 37.13.1 for the GEOG1= option, and Output 37.13.2 for the GEOG2= option. Output 37.12.1 shows the output.
Libname lib1 sasehavr "%sysget(HAVER_DATA)"
short="GOLDMAN, FRB, CRB";
data validE2;
set lib1.haverd;
where date between '18jan2005'd and '29mar2005'd;
run;
title1 'SHORT= option list: GOLDMAN, FRB, CRB';
title2 'Should contain these time series:';
title3 'FCM10, FCM1M, FFED, FFP1D';
title4 'SHORT= option, Print the OUT= ValidE2 Data Set';
proc print data=validE2;
run;
title4 'SHORT= option, Print the Contents of OUT= ValidE2 Data Set';
proc contents data=validE2;
run;
Output 37.12.1
SHORT= Option Shows the Selected Variables
18JAN2005 |
4.21 |
2.05 |
2.31 |
2.30 |
19JAN2005 |
4.20 |
1.95 |
2.19 |
2.22 |
20JAN2005 |
4.17 |
1.89 |
2.25 |
2.22 |
21JAN2005 |
4.16 |
2.02 |
2.26 |
2.19 |
24JAN2005 |
4.14 |
2.05 |
2.26 |
2.22 |
25JAN2005 |
4.20 |
2.13 |
2.29 |
2.22 |
26JAN2005 |
4.21 |
2.16 |
2.33 |
2.26 |
27JAN2005 |
4.22 |
2.16 |
2.39 |
2.30 |
28JAN2005 |
4.16 |
2.12 |
2.48 |
2.37 |
31JAN2005 |
4.14 |
2.06 |
2.50 |
2.47 |
01FEB2005 |
4.15 |
2.23 |
2.40 |
2.47 |
02FEB2005 |
4.15 |
2.22 |
2.29 |
2.45 |
03FEB2005 |
4.18 |
2.18 |
2.49 |
2.46 |
04FEB2005 |
4.09 |
2.20 |
2.51 |
2.45 |
07FEB2005 |
4.07 |
2.27 |
2.50 |
2.47 |
08FEB2005 |
4.05 |
2.34 |
2.48 |
2.45 |
09FEB2005 |
4.00 |
2.34 |
2.50 |
2.45 |
10FEB2005 |
4.07 |
2.35 |
2.51 |
2.47 |
11FEB2005 |
4.10 |
2.36 |
2.50 |
2.48 |
14FEB2005 |
4.08 |
2.37 |
2.51 |
2.50 |
15FEB2005 |
4.10 |
2.40 |
2.53 |
2.54 |
16FEB2005 |
4.16 |
2.39 |
2.48 |
2.45 |
17FEB2005 |
4.19 |
2.40 |
2.50 |
2.47 |
18FEB2005 |
4.27 |
2.39 |
2.51 |
2.45 |
21FEB2005 |
. |
. |
2.51 |
. |
22FEB2005 |
4.29 |
2.43 |
2.57 |
2.49 |
23FEB2005 |
4.27 |
2.47 |
2.53 |
2.48 |
24FEB2005 |
4.29 |
2.48 |
2.55 |
2.52 |
25FEB2005 |
4.27 |
2.50 |
2.54 |
2.52 |
28FEB2005 |
4.36 |
2.51 |
2.52 |
2.58 |
01MAR2005 |
4.38 |
2.55 |
2.39 |
2.51 |
02MAR2005 |
4.38 |
2.54 |
2.48 |
2.44 |
03MAR2005 |
4.39 |
2.55 |
2.51 |
2.49 |
04MAR2005 |
4.32 |
2.56 |
2.50 |
2.46 |
07MAR2005 |
4.31 |
2.59 |
2.51 |
2.49 |
08MAR2005 |
4.38 |
2.61 |
2.49 |
2.47 |
09MAR2005 |
4.52 |
2.60 |
2.50 |
2.45 |
10MAR2005 |
4.48 |
2.60 |
2.52 |
2.49 |
11MAR2005 |
4.56 |
2.60 |
2.51 |
2.48 |
14MAR2005 |
4.52 |
2.62 |
2.59 |
2.53 |
15MAR2005 |
4.54 |
2.70 |
2.61 |
2.60 |
16MAR2005 |
4.52 |
2.68 |
2.57 |
2.50 |
17MAR2005 |
4.47 |
2.68 |
2.68 |
2.58 |
18MAR2005 |
4.51 |
2.70 |
2.70 |
2.68 |
21MAR2005 |
4.53 |
2.72 |
2.71 |
2.72 |
22MAR2005 |
4.63 |
2.77 |
2.72 |
2.68 |
23MAR2005 |
4.61 |
2.72 |
2.73 |
2.69 |
24MAR2005 |
4.60 |
2.70 |
2.75 |
2.62 |
25MAR2005 |
. |
. |
2.80 |
2.59 |
28MAR2005 |
4.64 |
2.69 |
2.79 |
2.79 |
29MAR2005 |
. |
. |
. |
2.76 |
If you also want to see a list of all the variables and their corresponding labels for this data set, you can run the CONTENTS Procedure.
Output 37.12.2 shows the output.
Output 37.12.2
SHORT= Option Shows the Contents of the ValidE2 Data Set
DATE |
Num |
8 |
DATE9. |
Date of Observation |
FCM10 |
Num |
8 |
|
10-Year Treasury Note Yield at Constant Maturity (Avg, % p.a.) |
FCM1M |
Num |
8 |
|
1-Month Treasury Bill Market Bid Yield at Constant Maturity (%) |
FFED |
Num |
8 |
|
Federal Funds [Effective] Rate (% p.a.) |
FFP1D |
Num |
8 |
|
1-Day AA Financial Commercial Paper (% per annum) |
Copyright © SAS Institute, Inc. All Rights Reserved.