Actions in this book require the input data to reside on a CAS server. To work with a SAS data set, you must first load the data set onto the CAS server. Data loaded on the CAS server are called data tables. This section lists three methods of loading a SAS data set onto a CAS server. In this section, mycas is the name of the caslib that is connected to the mysess CAS session.
You can use a single DATA step to create a data table on the CAS server as follows:
data mycas.Sample;
input y x @@;
datalines;
.46 1 .47 2 .57 3 .61 4 .62 5 .68 6 .69 7
;
Note that DATA step operations might not work as intended when you perform them on the CAS server instead of the SAS client.
You can create a SAS data set first, and when it contains exactly what you want, you can use another DATA step to load it onto the CAS server as follows:
data Sample;
input y x @@;
datalines;
.46 1 .47 2 .57 3 .61 4 .62 5 .68 6 .69 7 .78 8
;
data mycas.Sample;
set Sample;
run;
You can use the CASUTIL procedure as follows:
proc casutil sessref=mysess;
load data=Sample casout="Sample";
quit;
The CASUTIL procedure can load data onto a CAS server more efficiently than the DATA step. For more information about the CASUTIL procedure, see SAS Cloud Analytic Services: User’s Guide.
The mycas caslib stores the Sample data table, which can be distributed across many machine nodes. You must use a caslib reference in actions in this book to enable the SAS client machine to communicate with the CAS session. For example, the following regression.glm action commands use a data table that resides in the mycas caslib:
proc cas;
regression.glm
table='mycas.Sample',
...more parameters...;
run;
You can delete your data table by using the DELETE procedure as follows:
proc delete data = mycas.Sample;
run;
The Sample data table is accessible only in the mysess session. When you terminate the mysess session, the Sample data table is no longer accessible from the CAS server. If you want your Sample data table to be available to other CAS sessions, then you must promote your data table. For more information about data tables, see SAS Cloud Analytic Services: User’s Guide.