This example shows how to use the vintage date to retrieve data for exports of goods and services as they existed on that specific date in history. OUTPUT=3 retrieves the new and revised observations only, by the vintage date (VINTAGE=2012-06-14). If OUTPUT=3, then you must specify UNITS=‘lin’. In this example, the UNITS= option is not specified, so it assumes its default value, which is ‘lin’. Specifying a different argument for the UNITS= option (such as ‘chg’) is invalid for OUTPUT= 3, so ’chg’ is replaced by the default value (‘lin’).
title 'Retrieve Data for the Exports of Goods and Service by Using Vintage Date'; libname _all_ clear; libname fred sasefred "%sysget(FRED)" OUTXML=fredex02 AUTOMAP=replace MAPREF=MyMap XMLMAP="%sysget(FRED)fredex02.map" APIKEY='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' IDLIST='bopxgsa' VINTAGE='2012-06-14' OUTPUT=3 FORMAT=xml; data export_vin; set fred.fredex02 ; run;
proc contents data=export_vin; run; proc print data=export_vin; run;