SASEBEA Interface Engine
Example 22.11 Retrieving Exports and Imports of Advertising Services from the IntlServTrade Data Set
In this example, the BEA data set name is IntlServTrade, as specified in the SETNAME= option. The TYPEOFSERVICE= option specifies that the request is for advertising services. The TRADEDIRECTION= option specifies that both imports and exports data are selected. The AFFILIATION= option specifies that all affiliations are selected. The YEAR= option specifies that the selected data are for all years. Because these data are available starting in 1999 and ending in 2019, only the data for those years are retrieved. The output is shown in Output 22.11.1. Because DESCRIPTION=SHORT is the default, when the PROC PRINT statement uses the LABEL option, each column heading in the output lists the BEA time series indicator using the prefix 'TSI_Ist' for each indicator. If the PROC PRINT statement did not use the LABEL option, then the column headings in the output would have been ISTVAR1, ISTVAR2, ISTVAR3, and ISTVAR4, which are the actual variable names used by the engine. To see a list of all of the variables and their corresponding labels, use the PROC CONTENTS statement.
options;
title 'Advertising Services, All Affiliations and All Years';
LIBNAME beaISL sasebea "physical path to your folder for storing the BEA data"
setname=IntlServTrade
typeOfService='Advertising'
TradeDirection=All
affiliation=All
areaOrCountry='Canada,Germany'
user='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
outjson=ISLADS
year=All
format=json;
data myISLADS;
set beaISL.ISLADS;
run;
proc print label data=myISLADS; run;
Output 22.11.1: Advertising Services: From the IntlServTrade Data Set, for All Years
| Advertising Services, All Affiliations and All Years |
| Obs | Date of observation | TSI_IstAdvertisingExpCanadaAllAff_A | TSI_IstAdvertisingExpGermanyAllAff_A | TSI_IstAdvertisingImpCanadaAllAff_A | TSI_IstAdvertisingImpGermanyAllAff_A |
|---|---|---|---|---|---|
| 1 | 1999 | ||||
| 2 | 2000 | ||||
| 3 | 2001 | ||||
| 4 | 2002 | ||||
| 5 | 2003 | ||||
| 6 | 2004 | ||||
| 7 | 2005 | ||||
| 8 | 2006 | 184 | 61 | 207 | 156 |
| 9 | 2007 | 196 | 51 | 284 | 182 |
| 10 | 2008 | 282 | 358 | 163 | |
| 11 | 2009 | 738 | 75 | 427 | 131 |
| 12 | 2010 | 1002 | 85 | 431 | 149 |
| 13 | 2011 | 1189 | 141 | 404 | 243 |
| 14 | 2012 | 1426 | 210 | 407 | 251 |
| 15 | 2013 | 1833 | 191 | 326 | 189 |
| 16 | 2014 | 2279 | 414 | 418 | 151 |
| 17 | 2015 | 2721 | 845 | 359 | 194 |
| 18 | 2016 | 3520 | 610 | 350 | 170 |
| 19 | 2017 | 4574 | 387 | 357 | 186 |
| 20 | 2018 | 5697 | 517 | 314 | 178 |
| 21 | 2019 | 6615 | 856 | 406 | 149 |
| 22 | 2020 | 6942 | 340 | 126 |