Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

SAS ADVANCED PROGRAMMING CERTIFICATION EXAM QUESTIONS WITH VERIFIED SOLUTIONS

Rating
-
Sold
-
Pages
20
Grade
A+
Uploaded on
19-11-2025
Written in
2025/2026

SAS ADVANCED PROGRAMMING CERTIFICATION EXAM QUESTIONS WITH VERIFIED SOLUTIONS True or false: the LAG function can retrieve the previous value of a numeric or character column. - Answers True Which data step calculates the difference in Tavg between consecutive rows to generate the following output table? a) data TempDiff; set er_sydney_daily2017 (keep=Date Tavg); if _N_1 then do; TempDiff=Tavg-lag(Tavg); end; run; b) data TempDiff(drop=Day1); set er_sydney_daily2017 (keep=Date Tavg); Day1=lag(Tavg); if _N_1 then do; TempDiff=Tavg-Day1; end; run; - Answers b The LAG function stores previous values in a queue when the LAG function is executed. If the LAG function is not executed due to a false condition, the previous value is not stored. By using the LAG function outside of a conditional statement, the previous value is stored. Given the following DATA step, what is the value of USNum and WordNum? data TextCount; Text='AUSTRALIA, ITALY, AUSTRIA, US'; USNum=count(Text,'US'); WordNum=countw(Text); run; - Answers USNum = 3 WordNum = 4

Show more Read less
Institution
SAS ADVANCED PROGRAMMING CERTIFICATION
Course
SAS ADVANCED PROGRAMMING CERTIFICATION

Content preview

SAS ADVANCED PROGRAMMING CERTIFICATION EXAM QUESTIONS WITH VERIFIED
SOLUTIONS

True or false: the LAG function can retrieve the previous value of a numeric or character column.
- Answers True

Which data step calculates the difference in Tavg between consecutive rows to generate the
following output table?



a) data TempDiff;

set pg3.weather_sydney_daily2017

(keep=Date Tavg);

if _N_>1 then do;

TempDiff=Tavg-lag(Tavg);

end;

run;



b) data TempDiff(drop=Day1);

set pg3.weather_sydney_daily2017

(keep=Date Tavg);

Day1=lag(Tavg);

if _N_>1 then do;

TempDiff=Tavg-Day1;

end;

run; - Answers b



The LAG function stores previous values in a queue when the LAG function is executed. If the
LAG function is not executed due to a false condition, the previous value is not stored. By using
the LAG function outside of a conditional statement, the previous value is stored.

,Given the following DATA step, what is the value of USNum and WordNum?



data TextCount;

Text='AUSTRALIA, ITALY, AUSTRIA, US';

USNum=count(Text,'US');

WordNum=countw(Text);

run; - Answers USNum = 3 WordNum = 4



The COUNT function counts the number of times that a specified substring appears within a
character string. The COUNTW function counts the number of words in a character string. A
default list of delimiters is used.

Which IF statement subsets ProductName for values containing the standalone word shirt?



a) if find(ProductName, 'Shirt') >0;

b) if findw (ProductName, 'Shirt') = 0;

c) if find(ProductName, ' Shirt ') = 0;

d) if findw(ProductName, 'Shirt', ' ') >0; - Answers d



Choice A returns four rows (rows 2, 3, 4, and 5). Choice B returns one row (row 1). Choice c
returns four rows (rows 1, 3, 4, 5) Choice D returns one row (row 2).

Which statement is false regarding Perl regular expressions?



a) Perl regular expressions are limited to 32 bytes

b) Perl regular expressions consist of metacharacters

c) Perl regular expressions are used in SAS within the PRX functions

d) Perl regular expressions are sequences of strings that define patterns - Answers a

, SAS does not impose a byte size limitation for Perl regular expressions.

True or False: Perl regular expressions in the PRXMATCH function must start and end with a
delimiter. - Answers True



A Perl regular expression within the PRXMATCH function must start and end with a delimiter
such as the forward slash.

What is the value of the column Position?



Position = prxmatch('/Dutch/', 'Sawyer Dutch Kenai'); - Answers 8



PRXMATCH searches for a pattern match and returns the position at which the pattern is found.
The string Dutch is found starting in the eighth position.

True or False: the PRXPARSE function returns a character string that is used by other PRX
functions and call routines. - Answers False



The PRXPARSE function returns a pattern identifier number that is used by other PRX functions
and call routines

Which Perl regular expression replaces the string PG3 with the string PG3M6?



a) 'r/PG3/PG3M6/'

b) 's/PG3/PG3M6/'

c) 's/PG3M6/PG3/'

d) 'r/PG3M6/PG3/' - Answers b



s (specifies a substitution regular expression)

/ (beginning delimiter for regular expression)

PG3 (matches the letters PG3)

Written for

Institution
SAS ADVANCED PROGRAMMING CERTIFICATION
Course
SAS ADVANCED PROGRAMMING CERTIFICATION

Document information

Uploaded on
November 19, 2025
Number of pages
20
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$11.39
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF


Also available in package deal

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
TutorJosh Chamberlain College Of Nursing
Follow You need to be logged in order to follow users or courses
Sold
433
Member since
1 year
Number of followers
17
Documents
31644
Last sold
1 day ago
Tutor Joshua

Here You will find all Documents and Package Deals Offered By Tutor Joshua.

3.5

73 reviews

5
26
4
16
3
14
2
1
1
16

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions