SASEUSCB Interface Engine

The LIBNAME libref SASEUSCB Statement

  • LIBNAME libref SASEUSCB 'physical-name' options;

The LIBNAME statement assigns a SAS library reference (libref) to the physical path of the directory where the SASEUSCB interface engine stores the USCB economic data. The required physical-name argument specifies the final location of the folder where your USCB data reside in a SAS data set that is named in the OUT= option. The physical-name should end with a backslash (for example, C:\physical_name\) when you are in a Windows environment or a forward slash (for example, /user/physical_name/) when you are in a UNIX environment.

You can specify the following options:

CASLIB=uscb_caslib_name

specifies the name of the CAS library (caslib) where the in-memory CAS table is stored when the JSON data from the USCB website are read into SAS. The default value is the name of the active caslib. When you specify this option, you must also specify the GOCAS=ON option.

CASOUT=libref.data-table

OUTCAS=libref.data-table

specifies the name of the in-memory CAS table that is created when the JSON data from USCB are read into SAS. The default value is the name that you specify in the OUT= option. The in-memory table is created only when you also specify the GOCAS=ON option. libref.data-table is a two-level name, where libref refers to the library, and data-table specifies the name of the output data table. For more information about this two-level name, see the section Using CAS Sessions and CAS Engine Librefs.

CATEGORY=uscb_category_code

specifies the category of time series variables to keep. All categories are kept when the CATEGORY= option is omitted. See Table 6 for more information about categories.

CONNECT=ON | OFF

specifies whether to use (ON) or not use (OFF) the connect method along with the PROXY= option. Note: To use the connect method, you must use the PROXY= option and specify your proxy server in addition to the CONNECT=ON option. For more information about a secure connection, see the PROXY= option.

DATATYPE=uscb_datatype_code

specifies the data type of time series variables to keep. All data types are kept when the DATATYPE= option is omitted. See Table 6 for more information about data types.

DEBUG=ON | OFF

specifies whether or not to include diagnostic message logging in the SAS log window. This information can be useful for troubleshooting. Specify DEBUG=ON to see all the log messages (including debugging information) in the SAS log. By default, DEBUG=OFF.

ENDDATE='uscb_enddate'

specifies the ending year of the time series in the format YYYY, the ending quarter and year for quarterly data in the format YYYY-Qx (where x = 1, 2, 3, or 4), or the ending month and year for monthly data in the format YYYY-nn (where nn = 01, 02, …, 10, 11, or 12).

FOR=uscb_for_param

specifies the demographic category that you want to retrieve data for. The Advanced Report on Durable Goods, Manufacturers’ Shipments, Inventories, and Orders (ADVM3) data set, which is the only data set supported in this release, requires this option. By

default, FOR=US (United States).

See the following web page for more information: https://www.census.gov/data/developers/guidance/api-user-guide/core-concepts.html .

FORMAT=uscb_jsonformat

specifies the format of the file to be retrieved from the USCB website. Although USCB can report data in many formats, the SASEUSCB engine supports only the JSON format (the default).

GEO='uscb_geo_level'

specifies the geographic region (or geo-level) that you want to retrieve data for. See Table 2 for a complete list of geo-level codes, which identify the regions. By default, GEO=US (United States Total). Note that geo-level codes for US states are usually the same as the standard two-letter postal codes, such as AL for Alabama.

GOCAS=ON | OFF

specifies whether to create (ON) or not create (OFF) an in-memory CAS table of the USCB data (in addition to the SAS data set that is created). When GOCAS=ON, the SASEUSCB engine assumes that there is an active CAS session running when it executes the LIBNAME statement. By default, GOCAS=OFF.

OUTJSON=uscb_json_file_name

specifies the name of the JSON file (which is downloaded to the SAS Work library) and the name of the SAS data set that is created when the JSON data are read into SAS. The SAS data set is stored in the folder that is specified by physical-name.

PROXY='uscb_proxyserver'

specifies which proxy server to use. This option is not required. The specified proxy server is used only when a connection-refused or connection-timed-out error occurs. For uscb_proxyserver, specify the server’s HTTP address, followed by a colon and the port number, and enclose that string in double quotation marks; for example, PROXY="http://inetgw.unx.sas.com:8118". (See also the CONNECT= option.)

SETNAME=uscb_setname
DATASETNAME=uscb_setname
DATASET=uscb_setname
SETID=uscb_setname

specifies the name of the USCB data set to retrieve data from. Table 3 shows the list of available USCB data sets. Note: This version of the SASEUSCB interface engine supports only the data set that is shown in the first row of Table 3 (EITS_ADVM3).

STARTDATE='uscb_startdate'

specifies the starting date of the time series in the format YYYY, the ending quarter and year for quarterly data in the format YYYY-Qx (where x = 1, 2, 3, or 4), or the ending month and year for monthly data in the format YYYY-nn (where nn = 01, 02, …, 10, 11, or 12).

USER='uscb_user'
APIKEY='uscb_user'
REGISTRATIONKEY='uscb_user'

specifies the unique user registration key, enclosed in quotation marks, that the USCB assigns to the user (subscriber) to allow access to the data on the USCB website. The USCB access key is a 40-character alphanumeric lowercase string that you can request. To obtain your own unique API key, visit the USCB website at the following URL: https://www.census.gov/data/developers.html . Then click on the Request a Key box at the lower left of that page. Alternatively, you can go directly to the following site: https://api.census.gov/data/key_signup.html .

Table 2: USCB Geo-level Region Codes

Geo-level Code Description Geo-level Code Description
US United States Total MO Missouri
NO Northeast MT Montana
MW Midwest MW Midwest
SO South NE Nebraska
WE West NV Nevada
AK Alaska NH New Hampshire
AL Alabama NJ New Jersey
AR Arkansas NM New Mexico
AZ Arizona NY New York
CA California NC North Carolina
CO Colorado ND North Dakota
CT Connecticut NE Northeast
DE Delaware OH Ohio
DC District of Columbia OK Oklahoma
FL Florida OR Oregon
GA Georgia PA Pennsylvania
HI Hawaii RI Rhode Island
ID Idaho SC South Carolina
IL Illinois SD South Dakota
IN Indiana SO South
IA Iowa TN Tennessee
KS Kansas TX Texas
KY Kentucky UT Utah
LA Louisiana VT Vermont
ME Maine VA Virginia
MD Maryland WA Washington
MA Massachusetts WE West
MI Michigan WV West Virginia
MN Minnesota WI Wisconsin
MS Mississippi WY Wyoming


Last updated: July 09, 2026