SASEBEA Interface Engine

Example 22.13 Using the GOCAS= Option

To use the GOCAS= option, add the options shown in Table 65 to your SASEBEA LIBNAME statement.

Table 65: Additional Options for SASEBEA Engine When CAS Is Used

Option Specification Description of Option
CASLIB= Names the CAS library reference for storing the in-memory tables created by the SASEBEA engine
CASOUT= Names the in-memory table where the BEA data are stored
GOCAS=ON Specifies that the CAS server is being used


The following code shows how to use CAS with Example 22.12:

   options validvarname=any;
   title 'Request Per Capita Personal Income, for Every State';

   LIBNAME bear sasebea "physical path to your folder for storing the BEA data"
      gocas=on
      caslib=casuserhdfs
      casout=M2MSAIS
      setname=Regional
      TableName="SAINC1"      /* state annual income */                                                                                                                              
      linecode=3
      geofips=STATE                                           
      user='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'                                                                                                                                                                  
      outjson=MSAIS                                                                                                                           
      year='2013,2014,2015,2016,2017'                                                                                                                           
      format=json;    

   data myMSAIS;
      set bear.MSAIS;
   run;

   proc print data=myMSAIS; run;

In the preceding code, you can reference the in-memory CAS table, M2MSAIS, later in the same CAS session to save the data in a SASHDAT file, but do not specify the SASHDAT extension in the file name:

   proc casutil;
      save casdata="M2MSAIS" casout="<physical path and filename>" replace;
   quit;

To list the tables in the active caslib, specify the following statements:

   proc casutil; list; quit;
Last updated: July 09, 2026