Given the following SAS program:
data casuser.national;
set casuser.baseball(where=(league=’National’));
r=ranuni(625);
drop league;
run;
Why is the above program processed by the Compute Server rather than the CAS server?
- A . The WHERE option is not supported in the SET statement.
- B . The SESSREF= option is not specified in the DATA statement.
- C . The DROP statement is not supported.
- D . The RANUNI function is not supported.
Which CAS action is used to execute SQL queries in SAS CAS?
- A . SQL
- B . RUN
- C . SUBMIT
- D . EXECUTE
Which CAS statement is used to join two or more CAS tables based on a common key variable?
- A . CASMERGE
- B . CASTABLE
- C . CASJOIN
- D . CASCOMBINE
Which CAS action is used to perform data profiling to analyze the distribution of values in a CAS table?
- A . cas.summarize
- B . cas.profile
- C . cas.statistics
- D . cas.inspect
The following code is executed multiple times:
data casuser.eurorders;
set casuser.orders end=eof;
if Continent="Europe" then EurOrders+1;
if eof=1 then output;
keep EurOrders;
run;
proc print data=casuser.eurorders;
run;
Will the rows in the output table be sorted the same way for each execution and why?
- A . Yes, because only one row will be printed.
- B . Yes, because by default CAS sorts the output table.
- C . No, because each thread inserts a row into the casuser.eurorders table when it ends.
- D . No, because the CAS Controller randomly reads the casuser.eurorders table when processing the proc print.
Which SAS Viya component allows users to create and manage machine learning models?
- A . SAS Data Preparation
- B . SAS Studio
- C . SAS Visual Analytics
- D . SAS Model Studio
Which SAS Viya procedure is used for data summarization and descriptive statistics?
- A . PROC GLM
- B . PROC MEANS
- C . PROC FREQ
- D . PROC SQL
Which function is used to calculate the mean of a variable in SAS Viya?
- A . AVG
- B . MEAN
- C . SUM
- D . MEDIAN
Which DATA step statement is used to read data from an external file in CAS programming?
- A . PROC SQL
- B . SET statement
- C . MERGE statement
- D . OUTPUT statement
Which CAS action is used to calculate the correlation matrix for numeric variables in a CAS table?
- A . cas.correlation
- B . cas.covariance
- C . cas.relationship
- D . cas.association
The regnm format has been created and stored in an CAS format library.
Which program associates the format regnm with the region column in the orders table?
- A . proc casutil;
load data=work.orders casout="orders" outcaslib="public";
format region regnm.;
quit; - B . proc casutil;
load data=work.orders casout="orders" outcaslib="public"
format=yes;
format region regnm.;
quit; - C . proc casutil;
format region regnm.;
load data=work.orders casout="orders" outcaslib="public"
format=yes;
quit; - D . proc casutil;
format region regnm.;
load data=work.orders casout="orders" outcaslib="public";
quit;
Which CAS-enabled procedure is used to combine multiple CAS tables based on a common key variable?
- A . CASMERGE
- B . CASCOMBINE
- C . CASTABLE
- D . CASEJOIN
Which variables must be included in the CAS table that stores DATA step code to be executed by the dataStep.runCodeTable action?
- A . PgmName
CASEngine - B . Code
TableName - C . Source
Name - D . DataStepSrc
ModelName - E . DataStepSrc
ModelName
Which CAS action is used to create a new CAS table based on specified conditions?
- A . FILTER
- B . SELECT
- C . WHERE
- D . SUBSET
Which DATA step will NOT run in CAS?
- A . data casuser.class;
input x;
datalines;
1
2
3
;
run; - B . data casuser.new;
x=1;
run; - C . data casuser.new;
set casuser.class;
x=((height*weight)+10)/(age**2)+round(100.9999);
run; - D . data casuser.new;
array test(*) weight height age (1 2 3);
do i=1 to dim(test);
put test(i)=;
end;
run;
What is the purpose of the LIBNAME statement in SAS Viya?
- A . Defining a library or a location for SAS datasets
- B . Declaring and initializing variables
- C . Executing SQL queries
- D . Controlling the flow of the program
Which PROC CASUTIL step suppresses error messages if the table is not found in-memory?
- A . Option A
- B . Option B
- C . Option C
- D . Option D
Which data format should be used when saving a CAS table so that it will later load into CAS memory the fastest?
- A . sashdat
- B . sas7bdat
- C . csv
- D . txt
In the following code, complete the PRINT statement to print only rows where column begins with MPG:
proc cas;
simple.summary result=res /
table={name="cars"};
resultTable = res.summary;
print <insert code segment
here>;
run;
- A . resultTable.where(column like ‘MPG%’)
- B . resultTable.where("column like ‘MPG%’")
- C . resultTable / where("column like ‘MPG%’")
- D . resultTable / where(column like ‘MPG%’)
Which CAS-enabled procedure is used to import data into a CAS table?
- A . CASLIB
- B . CASIMPORT
- C . CASDATA
- D . CASTABLE
Which CAS-enabled procedure is used for regression analysis and modeling?
- A . PROC MEANS
- B . PROC SQL
- C . PROC FREQ
- D . PROC GLM
Which PROC CASUTIL step correctly saves a CSV file in the casuser caslib and overwrites any files with the same name?
- A . proc casutil;
save casdata="employees" incaslib="casuser"
outcaslib="casuser" casout="out_employees.csv" replace;
quit; - B . proc casutil;
save casdata="employees" incaslib="casuser"
outcaslib="casuser" casout="out_employees.csv";
quit; - C . proc casutil;
save type="csv" casdata="employees" incaslib="casuser"
outcaslib="casuser" casout="out_employees";
quit; - D . proc casutil;
save type="csv" casdata="employees" incaslib="casuser"
outcaslib="casuser" casout="out_employees" replace;
quit;
Complete the following FedSQL code to convert the character variable markup to a numeric variable.
proc cas;
session mysess;
fedSql.execDirect /
query="create table casuser.cars_fedsql {options replace=true} as
select make, model, mpg_city, mpg_highway, <insert code segment here> as
markup_N
from casuser.cars";
run;
- A . put(markup,’best12.’)
- B . inputn(markup,’best12.’)
- C . cast(markup,’best12.’)
- D . input(markup,’best12.’)
In SAS Viya, what is the purpose of the LIBNAME statement?
- A . To create a new library
- B . To import external data
- C . To assign a library reference
- D . To delete a library
Which statement correctly creates a global caslib called mycas that is connected to the /workshop/data location?
- A . caslib mycas path="/workshop/data" global;
- B . caslib path="/workshop/data" mycas global;
- C . caslib path="/workshop/data" mycas promote;
- D . caslib mycas path="/workshop/data" promote;
The dataPreprocess.impute action preforms data matrix (variable) imputation.
Which imputation methods can be used?
- A . MIDRANGE, MODE, RANDOM, VALUE
- B . MIDRANGE, MODE, RANDOM, CUSTOM
- C . MODE, RANDOM, VALUE, CUSTOM
- D . MIDRANGE, RANDOM, VALUE, CUSTOM
Which statement is true about SAS Viya?
- A . It contains the SAS launcher server, which is the primary server for processing big data.
- B . It supports only single-threaded DATA step processing.
- C . It can employ multiple servers to execute programs.
- D . Its primary interface for submitting programs is the SAS Windowing Environment.
Which CAS action is used to create a new CAS table by concatenating two or more existing CAS tables?
- A . cas.join
- B . cas.concat
- C . cas.combine
- D . cas.merge
Which Compute Server system option prevents inadvertently moving large in-memory tables to the Compute Server?
- A . MAXDATA=
- B . CASDATALIMIT=
- C . NOCOMPUTE
- D . MAXOBS=
Which SQL clause is used to filter rows in a CAS table based on specified conditions?
- A . SELECT
- B . FROM
- C . WHERE
- D . GROUP BY
Which CAS-enabled procedure is used to apply user-defined formats to variables?
- A . CASUTIL
- B . CASTABULATE
- C . CASFORMAT
- D . CASPROC
Which SAS Viya procedure is used for statistical modeling and regression analysis?
- A . PROC GLM
- B . PROC MEANS
- C . PROC FREQ
- D . PROC SQL
Which statement about the CASL language is true?
- A . All CAS-enabled procedures are converted to CASL behind the scenes to run in CAS.
- B . CASL runs actions on both the SAS Compute Server and in CAS.
- C . Actions in CASL are grouped into PROCs, and optional information is provided with parameters.
- D . CASL code is submitted to the CAS server using PROC CASUTIL.
Which PROC MDSUMMARY step produces results?
- A . proc mdsummary data=casuser.orders;
var profit;
output out=casuser.sumorders;
run; - B . proc mdsummary data=casuser.orders;
var profit;
out casuser.sumorders;
run; - C . proc mdsummary data=casuser.orders;
var profit /
out=casuser.sumorders;
run; - D . proc mdsummary data=casuser.orders;
var profit;
run;
Which CAS action is used to calculate the total count, distinct count, and missing count for variables in a CAS table?
- A . cas.count
- B . cas.unique
- C . cas.missing
- D . cas.summary
Which CAS action is used to validate the integrity of relationships between variables in a CAS table?
- A . cas.integrity
- B . cas.relationship
- C . cas.validate
- D . cas.link
How can you view the contents of a CAS table?
- A . Using the CASLIB action
- B . Using the LOAD action
- C . Using the FETCH action
- D . Using the TABLE action
Complete the SAS program below to generate a table named cost_cont in the casuser caslib that contains the statistics for each value of continent.
proc mdsummary data=casuser.orders;
var cost;
groupby continent /_______;
run;
What is the purpose of the SAS Explorer in SAS Studio?
- A . To manage and organize SAS files and folders
- B . To visualize data in graphical format
- C . To write and execute SAS programs
- D . To perform data cleaning and transformation
Which statement is true about the Compute Server?
- A . It processes programs written in SAS, Python, Java, and other open source client languages.
- B . It generally outperforms the CAS server for data sources that are larger than 50 Gigabytes.
- C . It processes distributed data in multiple threads.
- D . It supports the creation and execution of Macro programs.
Which CAS action is used to compute descriptive statistics for numeric variables in a CAS table?
- A . cas.summarize
- B . cas.statistics
- C . cas.describe
- D . cas.profile
Which SAS Viya component provides self-service data preparation capabilities?
- A . SAS Data Preparation
- B . SAS Cloud Analytic Services (CAS)
- C . SAS Studio
- D . SAS Visual Analytics
Which CAS action is used to calculate the sum, minimum, maximum, and mean for numeric variables in a CAS table?
- A . cas.aggregate
- B . cas.statistics
- C . cas.summarize
- D . cas.describe
Which operator is used for assignment in SAS Viya?
- A . =
- B . ==
- C . :=
- D . EQ
Which CAS action is used to calculate the frequency distribution of a categorical variable in a CAS table?
- A . cas.frequency
- B . cas.distribution
- C . cas.histogram
- D . cas.tabulate
Which statement is FALSE regarding loading data into CAS?
- A . JSON files can be loaded directly into CAS.
- B . Excel files can be loaded directly into CAS.
- C . Data Connectors are required to load DBMS data directly into CAS.
- D . Both DATA step and PROC COPY can be used to load data into CAS.
Which CAS action is used to calculate the mode(s) of a categorical variable in a CAS table?
- A . cas.modes
- B . cas.frequencies
- C . cas.distribution
- D . cas.tabulate
What is the purpose of the BY statement in the DATA step?
- A . To sort the data
- B . To subset the data
- C . To rename variables
- D . To merge datasets
Which CAS action is used to generate a summary report of missing values in a CAS table?
- A . cas.missing
- B . cas.validate
- C . cas.summary
- D . cas.check
Which CAS statement is used to select specific columns from a CAS table?
- A . CASTABLE
- B . CASSELECT
- C . CASCOLUMN
- D . CASWHERE
Which CAS-enabled procedure is used for descriptive statistics and data summarization?
- A . PROC MEANS
- B . PROC SQL
- C . PROC FREQ
- D . PROC GLM
Which statement will show all available caslibs in the log?
- A . caslib listall;
- B . caslib all list;
- C . caslib list;
- D . caslib _all_ list;
Which CAS action is used to perform aggregations and summary statistics?
- A . SUMMARY
- B . AGGREGATE
- C . DESCRIBE
- D . SUMMARIZE
The set parameter of the table.update CAS action requires a specific type of value.
Which type is correct?
- A . an array of arrays
- B . a dictionary of arrays
- C . a dictionary of dictionaries
- D . an array of dictionaries
Which CASL program correctly adds the Sales caslib to access data in the /data/sales folder?
- A . proc cas;
table.addCaslib /
name="sales",
path="/data/sales";
run; - B . proc cas;
table.addCaslib /
name="sales",
dataSource={srctype="path"},
path="sales";
run; - C . proc cas;
table.addCaslib /
name="/data/sales",
dataSource={srctype="path"};
run; - D . proc cas;
table.addCaslib,
name="/data/sales",
path="/data/sales";
run;
What is the purpose of the SET statement in the DATA step?
- A . To define the input data source
- B . To create a new variable
- C . To specify conditional logic
- D . To apply formatting to variables
Which statement can execute successfully using PROC FEDSQL?
- A . create table work.age12 as
select Name, Height, Weight
from casuser.class
where age=12
; - B . select Species, SepalWidth, SepalLength
from casuser.iris
where Species ^= "Setosa"
; - C . select HouseID, Brand, exp(logPrice) as Price
from casuser.margarin
where calculated Price > 5
; - D . create table casuser.incomplete as
select AgeAtStart, Height, cholesterol, Chol_Status
from casuser.heart
where cholesterol is null
;
In PROC CASUTIL, what does the LOAD FILE= statement do?
- A . It loads files from a file path on the CAS server to a CAS table.
- B . It loads a file from a file location on the Compute Server to the CAS controller file system.
- C . It loads a file from a file path on the Compute Server to a CAS table.
- D . It loads the data from a CAS table to a file on the Compute Server.
The table casuser.employees is partitioned onto 3 CAS worker nodes.
Which SAS program will correctly accumulate a total of the salary variable and store it in the variable totalSalary?
A)
B)
C)
D)
- A . Option A
- B . Option B
- C . Option C
- D . Option D
What is the purpose of the WHERE clause in CAS language programming?
- A . To filter rows based on specified conditions
- B . To define the input data source
- C . To specify the output variables
- D . To join multiple tables together
Which SAS function is used to concatenate character variables?
- A . LENGTH
- B . CAT
- C . CONCAT
- D . CATS
In SAS Viya, what is the purpose of the SAS Studio application?
- A . To create interactive reports
- B . To perform data visualization
- C . To write and execute SAS programs
- D . To build machine learning models
Which SAS Viya component is responsible for executing CAS-enabled procedures?
- A . CAS server
- B . SAS Studio
- C . SAS Metadata Server
- D . SAS Data Connector
Which CASL program segment correctly defines a source block to be run from a subsequent action?
- A . source myCode;
"data OutData;
set
casuser.cars;
where
""make = ‘Honda’"";
run;"
endsource; - B . source myCode;
"data OutData;
set
casuser.cars;
where make =
‘Honda’;
run;"
endsource; - C . source myCode;
data OutData;
set casuser.cars;
where make = ‘Honda’;
run;
endsource; - D . source myCode;
"data OutData;" ||
"set
casuser.cars;" ||
"where
make = ‘Honda’;" ||
"run;"
endsource;
What is the file extension used for SAS Viya programs?
- A . sas
- B . py
- C . sql
- D . viya
Which CAS action is used to perform outlier detection on numeric variables in a CAS table?
- A . cas.detect
- B . cas.identify
- C . cas.outlier
- D . cas.anomaly
Which SAS Viya component is responsible for storing and managing user-defined formats?
- A . CAS server
- B . SAS Studio
- C . SAS Metadata Server
- D . SAS Data Connector
What is the primary advantage of using CAS language programming in SAS?
- A . Faster data processing
- B . Improved visualization capabilities
- C . Easier data exploration
- D . Advanced statistical modeling techniques
Which CAS-enabled procedure is used to perform data partitioning?
- A . CASPARTITION
- B . CASDATA
- C . CASTABULATE
- D . CASPROC
Which SAS program will list tables contained in caslib public?
- A . proc casutil;
list tables caslib="public";
quit; - B . proc casutil;
list caslib="public";
quit; - C . proc casutil caslib="public";
contents;
quit; - D . proc casutil incaslib="public";
list tables;
quit;
Which CAS-enabled procedure is used to perform text analytics?
- A . CASTEXT
- B . CASPROC
- C . CASTAT
- D . CASSENT
What CASL data type is created from the following assignment statement?
half = 1/2;
- A . INT32
- B . INT64
- C . DOUBLE
- D . DECIMAL
Which programming language is used for SQL programming in SAS CAS?
- A . SAS
- B . SQL
- C . R
- D . Python
Which programming language is used in the DATA step of SAS CAS?
- A . SAS
- B . SQL
- C . R
- D . Python
Which statement is used to sort a SAS dataset in ascending order?
- A . SORT DESCENDING
- B . PROC SORT
- C . ORDER BY
- D . SORT DSN
Which CAS action is used to retrieve a subset of rows and columns from a CAS table?
- A . cas.fetch
- B . cas.sample
- C . cas.filter
- D . cas.select
Which CAS action is used to compute the frequency distribution of a categorical variable in a CAS table?
- A . cas.frequency
- B . cas.distribution
- C . cas.histogram
- D . cas.tabulate
Which CAS-enabled procedure is used for data exploration and visualization?
- A . PROC MEANS
- B . PROC SQL
- C . PROC FREQ
- D . PROC SGPLOT
Which CAS-enabled procedure is used for data exploration and visualization?
- A . PROC MEANS
- B . PROC SQL
- C . PROC FREQ
- D . PROC SGPLOT
Which CASL program will create the sample2 table in the casuser caslib?
- A . proc cas;
datastep.runCode result=r/
code="
data casuser.sample2;
set casuser.class;
by age;
if first.age then y=age;
run;
";
quit; - B . proc cas;
datastep.runCode result=r/
code="
data casuser.sample2;
set casuser.class(firstobs=3);
run;
";
quit; - C . proc cas;
datastep.runCode result=r/
code="
data casuser.sample1;
set casuser.class;
y=1;
run;
data casuser.sample2;
set casuser.class;
y=2;
run;
";
quit; - D . proc cas;
datastep.runCode result=r/
code="
data casuser.sample2;
set casuser.class;
y=ranuni(123)*100;
run;
";
run;
Which DATA step feature is NOT supported in CAS?
- A . DO Loops
- B . GIT functions
- C . Arrays
- D . IF-THEN/ELSE statements
Which CAS action is used to import data into CAS?
- A . CASLIB
- B . LOAD
- C . EXPORT
- D . ALTER TABLE
Which CAS action is used to delete a CASLIB?
- A . CASLIB
- B . DROP TABLE
- C . EXPORT
- D . ALTER TABLE
In the space below, add 1 character to complete the syntax.
proc cas;
table.tableDetails Answer
aslib="casuser", name=employees";
quit;
Which SQL clause is used to join multiple CAS tables based on a common key variable?
- A . SELECT
- B . FROM
- C . JOIN
- D . GROUP BY
Which SQL clause is used to calculate summary statistics for variables in a CAS table?
- A . SELECT
- B . FROM
- C . GROUP BY
- D . HAVING
Which CAS-enabled procedure is used for frequency analysis and cross-tabulations?
- A . PROC MEANS
- B . PROC SQL
- C . PROC FREQ
- D . PROC GLM
In the DATA step, which statement is used to conditionally execute code?
- A . IF-THEN statement
- B . MERGE statement
- C . SELECT statement
- D . PROC statement
Which CAS-enabled procedure is used to perform data exploration and summarization?
- A . CASUTIL
- B . CASDATA
- C . CASSTAT
- D . CASPROC
Which CAS action is used to calculate the mean, median, and quartiles for numeric variables in a CAS table?
- A . cas.summary
- B . cas.describe
- C . cas.quantiles
- D . cas.statistics
Which table.update parameter specifies the column to update?
- A . Assign
- B . Update
- C . Set
- D . ComputedVars
Which CAS statement is used to load data from an external file into a CAS table?
- A . CASLIB
- B . CASTABLE
- C . CASIMPORT
- D . CASDATA
If a dictionary named res contains a table named fetch, which statement will print the table?
- A . if res="fetch" then print res.fetch;
- B . if res contains "fetch" then print res.fetch;
- C . if dim(res, "fetch") > 0 then print res.fetch;
- D . if exists(res, "fetch") then print res.fetch;
Which action loads the cars.csv file from the casuser caslib into memory?
- A . table.loadTable / caslib="casuser" , path="cars.csv";
- B . table.loadTable / table={caslib="casuser", path="cars.csv"};
- C . table.upload / caslib="casuser" , path="cars.csv";
- D . table.upload / table={caslib="casuser", path="cars.csv"};
Assume all caslib names follow libref naming conventions.
Which code assigns librefs of the same name to each caslib?
- A . caslib _all_ assign;
- B . caslib assign _all_;
- C . caslib libref assign;
- D . caslib assign libref;
What is the purpose of the CASLIB statement in SAS Viya?
- A . To create a new CASLIB
- B . To import external data into CAS
- C . To delete a CASLIB
- D . To assign a CASLIB reference
You want to generate totals and averages by year for a very large Teradata table using SAS Viya programming methods.
What is the most efficient way to achieve this?
- A . Load the table into CAS memory and use a CAS procedure to summarize it.
- B . Summarize the data using a SAS in-database procedure.
- C . Create a SAS dataset copy of the table, load it into CAS memory and summarize with a CAS procedure.
- D . Read the table directly with a SAS summary procedure that executes on the Compute Server.
Which CAS action is used to create a new variable in a CAS table based on a conditional expression?
- A . cas.derive
- B . cas.calculate
- C . cas.transform
- D . cas.generate
When specified on the PROC SUMMARY statement, which statistic causes processing to occur on the Compute Server?
- A . MIN
- B . MEAN
- C . SKEW
- D . STD
Which DATA step function is supported in CAS?
- A . SYMGET
- B . CATX
- C . FILEREF
- D . RANUNI