The following partial output was produced from the SAS Dictionary Tables.
Which SQL statement produced this output?
- A . proc sql;
select * from dictionary.macros
where scope = ‘global’;
quit; - B . proc sql;
select * from dictionary.macros
where scope = ‘GLOBAL’;
quit; - C . proc sql;
select scope, name from dictionary.macros
where scope = ‘global’;
quit; - D . proc sql;
select scope, name from dictionary.macros
where scope = ‘GLOBAL’;
quit;
The following question will ask you to provide a line of missing code. The following program is submitted to output observations from data set ONE that have more than one record per patient.
Please enter the line of code that will correctly complete the program. Note: Case is ignored. Do not add leading or trailing spaces to your answer.
- A . BYSUBJID;
- B . id;
PTON run; - C . BYSUBJID;
BYSUBJID; - D . BYSUBJID;
run;
What information can be found in the SAS Dictionary tables? There are two correct answer, Please select two correct answer.
- A . datasets contained within a specified library
- B . values contained within a specified format
- C . variables contained within a specified dataset
- D . values contained within a specified variable
Given the following data set WORK.DM:
Which subjects will appear in the LOG file?
- A . 001 and 004
- B . 001 and 006
- C . 003 and 004
- D . 004 and 006
Given the following data set:
Which program was used to prepare the data for this PROC PRINT output?
- A . proc sort data=one out=two; by subjid; run;
- B . proc sort data=one out=two nodupkey; by subjid; run;
- C . proc sort data=one out=two nodup; by subjid; run;
- D . proc sort data=one out=two nodupkey; by subjid trt;
What is the primary purpose for specifying identifier variables across SDTM domains?
- A . To uniquely reference each record
- B . To satisfy regulatory conditions
- C . To include the appropriate subject information
- D . To include the appropriate study information
When writing a validation program using independent programming, which two actions conform to good programming practices?
(Choose two.)
- A . Ensure the production program has been run prior to compare.
- B . Delete subjects from the production side that are causing differences with the validation data set.
- C . Copy statistical code directly from the SAP.
- D . Copy statistical code directly from the production program.
Which code segment would you use to derive the numeric variable AVAL from AVALC by stripping off non-numeric characters?
- A . aval = put(compress(avalc, ‘<>=’), best12.);
- B . aval = input(compress(avalc, ‘<>=’), best12.);
- C . aval = input(substr(avalc, 2,2), best12.);
- D . aval = put(substr(avalc, 2,2), best12.);
Given the following SCORE data set:
Based on the concept of Last Observation Carried Forward, what will be the value for SCORE for the Week 12 –
- A . 157
- B . 152
- C . missing
- D . 153
The following SAS program is submitted:
Which alternative program creates an equivalent BASE_BP data set?
- A . proc sort data=VS (keep=usubjid vsstresn vstestcd)
out=BASE_BP (drop=vstestcd);
where vstestcd in(‘DIABP’,’SYSBP’);
by usubjid;
run; - B . data BASE_BP;
set VS (keep=usubjid vsstresn);
if vstestcd in(‘DIABP’,’SYSBP’);
run; - C . proc sort data=VS (keep=usubjid vsstresn vstestcd)
out=BASE_BP (drop=vstestcd);
by usubjid;
if vstestcd in(‘DIABP’,’SYSBP’);
run; - D . data BASE_BP (keep=usubjid vsstresn vstestcd);
set VS (drop=vstestcd);
if vstestcd in(‘DIABP’,’SYSBP’);
run;
Given the data set WORK.BP with the following variable list:
Which output will be created by the program?
- A . Option A
- B . Option B
- C . Option C
- D . Option D
This question will ask you to provide a section of missing code.
Given the input SAS data set LABRAW:
Which DO LOOP will create the output SAS data set WORK.LAB_NEW?
- A . do i=1 to 2; visit=i; date=dat{i}; result=num{i}; output; end;
- B . do i=1 to 2; visit=i; date=dat{i}; result=num{i}; end; output;
- C . do i=1 to 2; do j=1 to 2; visit=i; date=dat{j}; result=num{j}; output; end;
- D . do i=1 to 2; do j=1 to 2; visit=i; date=dat{j}; result=num{j}; end; output; end;
Given the following partial output data set:
Which code was used to create AGECAT?
- A . if age <18 then AGECAT=1; if 18<=AGE<=40 then AGECAT=2; else AGECAT=3;
- B . if age <=18 then do AGECAT=1; else if 18<AGE<=40 then do AGECAT=2; else do AGECAT=3;
- C . if age <18 then AGECAT=1; else if 18<=AGE<=40 then AGECAT=2; else AGECAT=3;
- D . if age <=18 then AGECAT=1; else if 18<AGE<=40 then AGECAT=2; else AGECAT=3;
The following SAS program is submitted:
proc sort data=SASUSER.VISIT out=PSORT; by code descending date cost; run;
Which statement is true regarding the submitted program?
- A . The descending option applies to the variable CODE.
- B . The variable CODE is sorted by ascending order.
- C . The PSORT data set is stored in the SASUSER library.
- D . The descending option applies to the DATE and COST variables.
In CDISC, which of the following describes the usage of controlled terms, code lists, or formats?
- A . Establishes consistent variable names.
- B . Establishes consistent variable types.
- C . Establishes consistent variable labels
- D . Establishes consistent variable values
Given an existing work data set (DM), the following code is submitted:
- A . MPRINT
- B . SYMBOLGEN
- C . MLOGIC
- D . MRECALL
You have been asked to import an Excel spreadsheet.
What will lead to substantial differences between the original Excel spreadsheet and the resulting SAS data set?
- A . the number of rows to be read from the Excel file
- B . the number of columns to be read from the Excel file
- C . multiple value types within a single column
- D . multiple value types within a single row
A statistical analysis plan asks you to create a table with the following counts of adverse events:
– the number adverse events in each system organ class (AESOC)
– within each level of system organ class, the number of adverse events with each preferred term (AEPT).
Which code produces the counts requested?
- A . proc freq data=AE;
tables AESOC AEPT;
run; - B . proc freq data=AE;
tables AESOC*AEPT;
run; - C . proc freq data=AE;
tables AESOC (AEPT);
run; - D . proc freq data=AE:
tables AESOC, AEPT;
run;
Given the data set WORK.BP with the following variable list:
The following SAS program is submitted:
ods select ExtremeObs;
proc univariate data=WORK.BP;
var DIABP;
id PTNO;
run;
Which type of output will be created by the program?
- A . a table of the highest and lowest values of DIABP over all observations
- B . a table of the highest five and lowest five values of DIABP over all observations
- C . a table of the highest and lowest values of DIABP for each level of PTNO
- D . a table of the highest five and lowest five values of DIABP for each level of PTNO
The first six (6) records from the LABS data set are shown below:
The following SAS program is written to reshape this data set and place it in a new data set named LBTR.
proc transpose data=labs out=lbtr(rename = (col1 = value));
by subjid sampldat;
var Calcium Glucose Hemoglobin;
run;
Which of the following DATA steps produces a data set that is equivalent to the LBTR data set created by the PROC TRANSPOSE step above?
- A . data lbtr2(drop = i calcium glucose hemoglobin);
set labs;
array orig[3] calcium glucose hemoglobin;
array testcds[3] $ 10 _temporary_ ("CALCIUM" "GLUCOSE" "HEMOGLOBIN");
do i = 1 to 3;
value = orig[i];
_name_ = testcds[i];
output;
end;
run; - B . data lbtr2(drop = i calcium glucose hemoglobin);
set labs;
array orig[3] calcium glucose hemoglobin;
array testcds[3] $ 10 _temporary_ ("CALCIUM" "GLUCOSE" "HEMOGLOBIN");
do i = 1 to 3;
value = orig[i];
_name_ = testcds[i];
end;
output;
run; - C . data lbtr2(drop = i calcium glucose hemoglobin);
set labs;
array orig[3] calcium glucose hemoglobin;
array testcds[3] $ 10 ("CALCIUM" "GLUCOSE" "HEMOGLOBIN");
do i = 1 to 3;
value = orig[i];
_name_ = testcds[i];
end;
output;
run; - D . data lbtr2(drop = i calcium glucose hemoglobin);
set labs;
array orig[3] calcium glucose hemoglobin;
array testcds[3] $ 10 ("CALCIUM" "GLUCOSE" "HEMOGLOBIN");
do i = 1 to 3;
value = orig[i];
_name_ = testcds[i];
output;
end;
run;
Which function would be used to determine the number of elements in an existing array?
- A . dim ()
- B . n ()
- C . sum ()
- D . count ()
Identify the data structure with the following characteristics:
– Contains one or more records per subject, per analysis parameter, and per analysis timepoint.
– May be derived from findings, events, interventions and special-purpose SDTM domains, or other ADaM datasets.
– A record can represent an observed, derived, or imputed value required for analysis.
- A . General Data Structure (GDS)
- B . Basic Data Structure (BDS)
- C . Subject Level Analysis Data Set (ADSL)
- D . Event Level Analysis Data Set (ADAE)
Which code segment includes a statement that would reset the graphics counter and ensure a 6in by 4in image is produced?
- A . ods graphics / counter = 1 width = 6in height = 4in;
- B . ods graphics / width = 6in height = 4in reset;
- C . ods graphics / reset width = 6in height = 4in;
- D . ods graphics / width = 6in height = 4in counter = 1;
Given the following data set (AE):
Data will be reported by onset week. Day 1?
7 is Week 1, Day 8 ?14 is Week 2. Events beyond Day 14 are assigned Week 3 and will be reported as Follow-up events.
Which statements properly assign WEEK to each event?
- A . if day > 14 then week = 3; else if day > 7 then week = 2; else if day > 0 then week = 1;
- B . if day > 0 then week = 1; else if day > 7 then week = 2; else if day > 14 then week = 3;
- C . select; when (day > 0) week = 1; when (day > 7) week = 2; otherwise week = 3; end;
- D . select; when (day > 14) week = 3; when (day > 7) week = 2; otherwise week = 1; end;
Given the SAS data set WORK.VS1:
Which value will be assigned to variable TOTAL?
- A . missing
- B . 112
- C . 140
- D . 560
Which percentage in the table is calculated incorrectly, assuming the cell counts are correct? Percentages are rounded to the nearest whole percent.
- A . 40
- B . 44
- C . 54
- D . 52
The following SAS program is submitted:
If the value for the variable Subjcode is "WGT2", what is the value of the variable Description?
- A . missing character value
- B . Unknown
- C . Over
- D . Wgt2
The following output is displayed:
Which SAS program created this output?
- A . proc freq data=WORK.TESTDATA; tables gender * answer / nocol norow nopercent; run;
- B . proc freq data=WORK.TESTDATA; tables answer * gender / nocol norow nopercent; run;
- C . proc freq data=WORK.TESTDATA; tables gender * answer / nocol norow nopercent missing; run;
- D . proc freq data=WORK.TESTDATA; tables answer * gender / nocol norow nopercent missing;
Given the following code executed with system date and time of April 29, 2020 at 10:33 AM:
data _null_;
daytim=put("&sysdate"d,date9.)||" "||put("&systime"t,time8.);
call symputx("nowdate", daytim);
run;
%put &nowdate;
The output of the macro variable "nowdate" in the log will be:
- A . &nowdate
- B . 29APR2020 10:33 AM
- C . daytim
- D . 29APR2020 10:33:00
Which statement correctly adds a label to the data set?
- A . DATA two Label="Subjects having duplicate observations"; set one; run;
- B . DATA two; Label="Subjects having duplicate observations"; set one; run;
- C . DATA two; set one; Label dataset="Subjects having duplicate observations"; run;
- D . DATA two (Label="Subjects having duplicate observations"); set one;
Given the SAS data set WORK.BP
What is the result?
- A . WORK.HIGHBP has 1 observation
WORK.NORMBP has 1 observation
WORK.INVESTBP has 3 observations - B . WORK.HIGHBP has 1 observation
WORK.NORMBP has 1 observation
WORK.INVESTBP has 4 observations - C . WORK.HIGHBP has 1 observation
WORK.NORMBP has 1 observation
WORK.INVESTBP has 2 observations - D . WORK.HIGHBP has 2 observations
WORK.NORMBP has 2 observations
WORK.INVESTBP has 3 observations
This question will ask you to provide a line of missing code. The following SAS program is submitted:
Which statement is required to produce this output?
- A . TABLES site*group /nocol;
- B . TABLES site*group /norow;
- C . TABLES site*group;
- D . TABLES site*group /nocol norow;
Which option for PROC COMPARE will list all observations and variables found in only one of the two data sets being compared?
- A . LISTALL
- B . OUTALL
- C . ALLOBS
- D . OUTDIFF
Given the following vital signs data: Baseline is defined as the last non-missing value prior to Day 1.
What is the value for the change from baseline for Week 1 for Subject 2?
- A . -23
- B . 11
- C . -11
- D . 23
This question will ask you to provide a line of missing code.
Given the following log entry:
Which line of code would produce the merge issue notes in the log?
- A . if indm ne indisp then output ‘MERGE ISSUE: ‘ subjid= indm= indisp=;
- B . if indm ne indisp then put ‘MERGE ISSUE: ‘ subjid= indm= indisp=;
- C . %if indm ne indisp %then %put ‘MERGE ISSUE: ‘ subjid= indm= indisp=;
- D . if indm ne indisp then put ‘MERGE ISSUE: ‘ _all_;
The following SAS program is submitted:
Which types of variables are DayofMonth, MonthofYear, and Year?
- A . DayofMonth, Year, and MonthofYear are character.
- B . DayofMonth, Year, and MonthofYear are numeric.
- C . DayofMonth and Year are numeric. MonthofYear is character
- D . DayofMonth, Year, and MonthofYear are date values
Study day is defined as DCMDATE minus RFSTDTC +1
Which statement will compute the study day correctly without producing notes for missing values in the log?
- A . STUDYDAY=DCMDATE-RFSTDTC+1;
- B . STUDYDAY=input(DCMDATE,yymmdd8.)-input(RFSTDTC,date9.)+1;
- C . If RFSTDTC^=” and length(DCMDATE)=8 then STUDYDAY=input(DCMDATE,yymmdd8.)-input(RFSTDTC,date9.)+1;
- D . If RFSTDTC^=” and length(DCMDATE)=8 then STUDYDAY=input(DCMDATE,date9.)- input(RFSTDTC,yymmdd8.)+1;
Which OPTION displays all SAS language statements generated during macro execution?
- A . MPRINT
- B . MLOGIC
- C . MSTORED
- D . MRECALL
You are working with the VS data set that contains the variable Pulse.
Which PROC SGPLOT step will produce the graph shown below?
- A . proc sgplot data = Work.VS noautolegend;
density pulse;
vbarbasic pulse;
run; - B . proc sgplot data = Work.VS noautolegend;
density pulse;
histogram pulse;
run; - C . proc sgplot data = Work.VS noautolegend;
histogram pulse;
density pulse;
run; - D . proc sgplot data = Work.VS noautolegend;
vbarbasic pulse;
density pulse;
run;
In PROC REPORT, which usage creates a column in the report for each distinct formatted value of the variable listed in the DEFINE statement?
- A . ACROSS
- B . ANALYSIS
- C . DISPLAY
- D . GROUP
A subject reports a medication started in March of 2007 but cannot recall the day number.
What is the value stored in the SDTM domain CM.CMSTDTC variable?
- A . 00MAR2007
- B . 2007 03
- C . MAR2007
- D . 2007-03
Given the following data set:
Which type of clinical trials data is this?
- A . Demographics
- B . Laboratory
- C . Medical History
- D . Vital Signs
Which statement will produce report output that can be opened in Microsoft Word?
- A . ods rtf file=’report.rtf’;
- B . ods doc file=’report.doc’;
- C . ods type=’word’ file=’report.doc’;
- D . ods rtf=’report.rtf’;
This item will ask you to determine the missing code.
In the data shown below, each record represents a single treatment period and contains a character SUBJID and non-missing numeric dates EXSTDT and EXENDT.
The Duration of Treatment (in days) for a single period is defined as Treatment End Date – Treatment Start Date + 1. For each subject, the Total Duration (in days) is defined as the sum of durations of treatment across all treatment periods.
Which code segment generates the new data set, EX2, which contains a single record per subject and includes the Duration of Treatment?
data EX2
set EX;
by subjid exstdt exendt;
<insert code here>
run;
- A . duration = exendt – exstdt + 1;
TotalDur = TotalDur + duration;
if first.subjid then TotalDur = duration;
if last.subjid; - B . retain TotalDur;
duration = exendt – exstdt + 1;
TotalDur = TotalDur + duration;
if first.subjid then Totaldur = duration;
if last.subjid; - C . retain TotalDur;
duration = exendt – exstdt + 1;
TotalDur = TotalDur + duration;
if first.exstdt then TotalDur = duration;
if last.exstdt; - D . duration = exendt – exstdt + 1;
TotalDur = TotalDur + duration;
if first.exstdt then TotalDur = duration;
if last.exstdt;
Which statement will create a report footnote that identifies the date and time that the SAS program was executed?
- A . footnote1 "Created on &sysdate9 &systime";
- B . footnote1 = "Created on &sysdate9 &systime";
- C . footnote1 ‘Created on &sysdate9 &systime’;
- D . footnote1 = ‘Created on &sysdate9 &systime’;
The following SAS program is submitted, but fails due to syntax errors.
What is the cause of the syntax errors?
- A . The keep= data set option should be (keep=MonthExp*).
- B . An array can only be referenced in a KEEP statement and not within a keep= data set option.
- C . An array cannot be referenced on a keep= data set option.
- D . The keep= data set option should be (keep=MonthExp).
A report that you are working on will require the following header lines:
Which code adds the second line of the header "Adverse Events"?
- A . header2 ‘Adverse Events’;
- B . header2 = ‘Adverse Events’;
- C . title2 = ‘Adverse Events’;
- D . title2 ‘Adverse Events’;
This question will ask you to provide a line of missing code.
Which statement must be added to the following program to create a page break in the report after each RACE grouping?
- A . break page / race;
- B . break race / page;
- C . break after race / page;
- D . break after race;
Review the following procedure format:
PROC TTEST date=date;
class group-variable;
var variable;
run;
What is the required type of data for the variable in this procedure?
- A . Character
- B . Continuous
- C . Categorical
- D . Treatment
A SAS program is submitted and the following log is written.
What is the cause of this error message?
- A . The ARRAY declaration is syntactically incorrect.
- B . The IF statement is syntactically incorrect.
- C . The DO loop tries to get a value from a variable which does not exist.
- D . The IF statement tries to get ARRAY elements which are not declared.