Exam4Training

SAS Institute A00-420 SAS Viya Intermediate Programming Online Training

Question #1

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.

Reveal Solution Hide Solution

Correct Answer: D
Question #2

Which CAS action is used to execute SQL queries in SAS CAS?

  • A . SQL
  • B . RUN
  • C . SUBMIT
  • D . EXECUTE

Reveal Solution Hide Solution

Correct Answer: A
Question #3

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

Reveal Solution Hide Solution

Correct Answer: A
Question #4

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

Reveal Solution Hide Solution

Correct Answer: B
Question #5

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.

Reveal Solution Hide Solution

Correct Answer: C
Question #6

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

Reveal Solution Hide Solution

Correct Answer: D
Question #7

Which SAS Viya procedure is used for data summarization and descriptive statistics?

  • A . PROC GLM
  • B . PROC MEANS
  • C . PROC FREQ
  • D . PROC SQL

Reveal Solution Hide Solution

Correct Answer: B
Question #8

Which function is used to calculate the mean of a variable in SAS Viya?

  • A . AVG
  • B . MEAN
  • C . SUM
  • D . MEDIAN

Reveal Solution Hide Solution

Correct Answer: B
Question #9

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

Reveal Solution Hide Solution

Correct Answer: B
Question #10

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

Reveal Solution Hide Solution

Correct Answer: A

Question #11

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;

Reveal Solution Hide Solution

Correct Answer: D
Question #12

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

Reveal Solution Hide Solution

Correct Answer: A
Question #13

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

Reveal Solution Hide Solution

Correct Answer: D
Question #14

Which CAS action is used to create a new CAS table based on specified conditions?

  • A . FILTER
  • B . SELECT
  • C . WHERE
  • D . SUBSET

Reveal Solution Hide Solution

Correct Answer: C
Question #15

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;

Reveal Solution Hide Solution

Correct Answer: A
Question #16

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

Reveal Solution Hide Solution

Correct Answer: A
Question #17

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

Reveal Solution Hide Solution

Correct Answer: A
Question #18

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

Reveal Solution Hide Solution

Correct Answer: A
Question #19

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%’)

Reveal Solution Hide Solution

Correct Answer: A
Question #20

Which CAS-enabled procedure is used to import data into a CAS table?

  • A . CASLIB
  • B . CASIMPORT
  • C . CASDATA
  • D . CASTABLE

Reveal Solution Hide Solution

Correct Answer: B

Question #21

Which CAS-enabled procedure is used for regression analysis and modeling?

  • A . PROC MEANS
  • B . PROC SQL
  • C . PROC FREQ
  • D . PROC GLM

Reveal Solution Hide Solution

Correct Answer: D
Question #22

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;

Reveal Solution Hide Solution

Correct Answer: B
Question #23

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.’)

Reveal Solution Hide Solution

Correct Answer: B
Question #24

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

Reveal Solution Hide Solution

Correct Answer: C
Question #25

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;

Reveal Solution Hide Solution

Correct Answer: A
Question #26

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

Reveal Solution Hide Solution

Correct Answer: A
Question #27

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.

Reveal Solution Hide Solution

Correct Answer: C
Question #28

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

Reveal Solution Hide Solution

Correct Answer: B
Question #29

Which Compute Server system option prevents inadvertently moving large in-memory tables to the Compute Server?

  • A . MAXDATA=
  • B . CASDATALIMIT=
  • C . NOCOMPUTE
  • D . MAXOBS=

Reveal Solution Hide Solution

Correct Answer: B
Question #30

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

Reveal Solution Hide Solution

Correct Answer: C

Question #31

Which CAS-enabled procedure is used to apply user-defined formats to variables?

  • A . CASUTIL
  • B . CASTABULATE
  • C . CASFORMAT
  • D . CASPROC

Reveal Solution Hide Solution

Correct Answer: B
Question #32

Which SAS Viya procedure is used for statistical modeling and regression analysis?

  • A . PROC GLM
  • B . PROC MEANS
  • C . PROC FREQ
  • D . PROC SQL

Reveal Solution Hide Solution

Correct Answer: A
Question #33

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.

Reveal Solution Hide Solution

Correct Answer: A
Question #34

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;

Reveal Solution Hide Solution

Correct Answer: A
Question #35

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

Reveal Solution Hide Solution

Correct Answer: A
Question #36

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

Reveal Solution Hide Solution

Correct Answer: B
Question #37

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

Reveal Solution Hide Solution

Correct Answer: D
Question #38

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;

Reveal Solution Hide Solution

Correct Answer: casuser.cost_cont
Question #39

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

Reveal Solution Hide Solution

Correct Answer: A
Question #40

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.

Reveal Solution Hide Solution

Correct Answer: D

Question #41

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

Reveal Solution Hide Solution

Correct Answer: C
Question #42

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

Reveal Solution Hide Solution

Correct Answer: A
Question #43

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

Reveal Solution Hide Solution

Correct Answer: C
Question #44

Which operator is used for assignment in SAS Viya?

  • A . =
  • B . ==
  • C . :=
  • D . EQ

Reveal Solution Hide Solution

Correct Answer: C
Question #45

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

Reveal Solution Hide Solution

Correct Answer: D
Question #46

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.

Reveal Solution Hide Solution

Correct Answer: A
Question #47

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

Reveal Solution Hide Solution

Correct Answer: A
Question #48

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

Reveal Solution Hide Solution

Correct Answer: A
Question #49

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

Reveal Solution Hide Solution

Correct Answer: A
Question #50

Which CAS statement is used to select specific columns from a CAS table?

  • A . CASTABLE
  • B . CASSELECT
  • C . CASCOLUMN
  • D . CASWHERE

Reveal Solution Hide Solution

Correct Answer: A

Question #51

Which CAS-enabled procedure is used for descriptive statistics and data summarization?

  • A . PROC MEANS
  • B . PROC SQL
  • C . PROC FREQ
  • D . PROC GLM

Reveal Solution Hide Solution

Correct Answer: A
Question #52

Which statement will show all available caslibs in the log?

  • A . caslib listall;
  • B . caslib all list;
  • C . caslib list;
  • D . caslib _all_ list;

Reveal Solution Hide Solution

Correct Answer: D
Question #53

Which CAS action is used to perform aggregations and summary statistics?

  • A . SUMMARY
  • B . AGGREGATE
  • C . DESCRIBE
  • D . SUMMARIZE

Reveal Solution Hide Solution

Correct Answer: A
Question #54

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

Reveal Solution Hide Solution

Correct Answer: D
Question #55

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;

Reveal Solution Hide Solution

Correct Answer: A
Question #56

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

Reveal Solution Hide Solution

Correct Answer: A
Question #57

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
    ;

Reveal Solution Hide Solution

Correct Answer: D
Question #58

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.

Reveal Solution Hide Solution

Correct Answer: C
Question #59

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

Reveal Solution Hide Solution

Correct Answer: B
Question #60

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

Reveal Solution Hide Solution

Correct Answer: A

Question #61

Which SAS function is used to concatenate character variables?

  • A . LENGTH
  • B . CAT
  • C . CONCAT
  • D . CATS

Reveal Solution Hide Solution

Correct Answer: D
Question #62

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

Reveal Solution Hide Solution

Correct Answer: C
Question #63

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

Reveal Solution Hide Solution

Correct Answer: A
Question #64

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;

Reveal Solution Hide Solution

Correct Answer: C
Question #65

What is the file extension used for SAS Viya programs?

  • A . sas
  • B . py
  • C . sql
  • D . viya

Reveal Solution Hide Solution

Correct Answer: A
Question #66

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

Reveal Solution Hide Solution

Correct Answer: C
Question #67

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

Reveal Solution Hide Solution

Correct Answer: C
Question #68

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

Reveal Solution Hide Solution

Correct Answer: A
Question #69

Which CAS-enabled procedure is used to perform data partitioning?

  • A . CASPARTITION
  • B . CASDATA
  • C . CASTABULATE
  • D . CASPROC

Reveal Solution Hide Solution

Correct Answer: A
Question #70

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;

Reveal Solution Hide Solution

Correct Answer: D

Question #71

Which CAS-enabled procedure is used to perform text analytics?

  • A . CASTEXT
  • B . CASPROC
  • C . CASTAT
  • D . CASSENT

Reveal Solution Hide Solution

Correct Answer: A
Question #72

What CASL data type is created from the following assignment statement?

half = 1/2;

  • A . INT32
  • B . INT64
  • C . DOUBLE
  • D . DECIMAL

Reveal Solution Hide Solution

Correct Answer: C
Question #73

Which programming language is used for SQL programming in SAS CAS?

  • A . SAS
  • B . SQL
  • C . R
  • D . Python

Reveal Solution Hide Solution

Correct Answer: B
Question #74

Which programming language is used in the DATA step of SAS CAS?

  • A . SAS
  • B . SQL
  • C . R
  • D . Python

Reveal Solution Hide Solution

Correct Answer: A
Question #75

Which statement is used to sort a SAS dataset in ascending order?

  • A . SORT DESCENDING
  • B . PROC SORT
  • C . ORDER BY
  • D . SORT DSN

Reveal Solution Hide Solution

Correct Answer: B
Question #76

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

Reveal Solution Hide Solution

Correct Answer: A
Question #77

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

Reveal Solution Hide Solution

Correct Answer: D
Question #78

Which CAS-enabled procedure is used for data exploration and visualization?

  • A . PROC MEANS
  • B . PROC SQL
  • C . PROC FREQ
  • D . PROC SGPLOT

Reveal Solution Hide Solution

Correct Answer: D
Question #78

Which CAS-enabled procedure is used for data exploration and visualization?

  • A . PROC MEANS
  • B . PROC SQL
  • C . PROC FREQ
  • D . PROC SGPLOT

Reveal Solution Hide Solution

Correct Answer: D
Question #80

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;

Reveal Solution Hide Solution

Correct Answer: A

Question #81

Which DATA step feature is NOT supported in CAS?

  • A . DO Loops
  • B . GIT functions
  • C . Arrays
  • D . IF-THEN/ELSE statements

Reveal Solution Hide Solution

Correct Answer: B
Question #82

Which CAS action is used to import data into CAS?

  • A . CASLIB
  • B . LOAD
  • C . EXPORT
  • D . ALTER TABLE

Reveal Solution Hide Solution

Correct Answer: B
Question #83

Which CAS action is used to delete a CASLIB?

  • A . CASLIB
  • B . DROP TABLE
  • C . EXPORT
  • D . ALTER TABLE

Reveal Solution Hide Solution

Correct Answer: A
Question #84

In the space below, add 1 character to complete the syntax.

proc cas;

table.tableDetails Answer

aslib="casuser", name=employees";

quit;

Reveal Solution Hide Solution

Correct Answer: /
Question #85

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

Reveal Solution Hide Solution

Correct Answer: C
Question #86

Which SQL clause is used to calculate summary statistics for variables in a CAS table?

  • A . SELECT
  • B . FROM
  • C . GROUP BY
  • D . HAVING

Reveal Solution Hide Solution

Correct Answer: C
Question #87

Which CAS-enabled procedure is used for frequency analysis and cross-tabulations?

  • A . PROC MEANS
  • B . PROC SQL
  • C . PROC FREQ
  • D . PROC GLM

Reveal Solution Hide Solution

Correct Answer: C
Question #88

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

Reveal Solution Hide Solution

Correct Answer: A
Question #89

Which CAS-enabled procedure is used to perform data exploration and summarization?

  • A . CASUTIL
  • B . CASDATA
  • C . CASSTAT
  • D . CASPROC

Reveal Solution Hide Solution

Correct Answer: C
Question #90

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

Reveal Solution Hide Solution

Correct Answer: A

Question #91

Which table.update parameter specifies the column to update?

  • A . Assign
  • B . Update
  • C . Set
  • D . ComputedVars

Reveal Solution Hide Solution

Correct Answer: C
Question #92

Which CAS statement is used to load data from an external file into a CAS table?

  • A . CASLIB
  • B . CASTABLE
  • C . CASIMPORT
  • D . CASDATA

Reveal Solution Hide Solution

Correct Answer: C
Question #93

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;

Reveal Solution Hide Solution

Correct Answer: D
Question #94

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"};

Reveal Solution Hide Solution

Correct Answer: A
Question #95

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;

Reveal Solution Hide Solution

Correct Answer: A
Question #96

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

Reveal Solution Hide Solution

Correct Answer: D
Question #97

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.

Reveal Solution Hide Solution

Correct Answer: B
Question #98

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

Reveal Solution Hide Solution

Correct Answer: A
Question #99

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

Reveal Solution Hide Solution

Correct Answer: C
Question #100

Which DATA step function is supported in CAS?

  • A . SYMGET
  • B . CATX
  • C . FILEREF
  • D . RANUNI

Reveal Solution Hide Solution

Correct Answer: B
Exit mobile version