Certification Exam review with
certified solutions 2025.
True or false: the LAG True
function can retrieve the
previous value of a
numeric or character
column.
Terms in this set (132)
,Which data step calculates b
the difference in Tavg
between consecutive rows to The LAG function stores previous values in a queue when
generate the following the LAG function is executed. If the LAG function is not
executed due to a false condition, the previous value is not
output table?
stored. By using the LAG function outside of a conditional
statement, the previous value is stored.
a) data TempDiff;set
pg3.weather_sydney_daily
2017
(keep=Date Tavg); if
_N_>1 then do;
TempDiff=Tavg-lag(Tavg);
end; run;
b) data
TempDiff(drop=Day1); set
pg3.weather_sydney_daily
2017
(keep=Date Tavg);
Day1=lag(Tavg); if
_N_>1 then do;
TempDiff=Tavg-Day1;
end; run;
,Given the following DATA USNum = 3 WordNum = 4
step, what is the value of
USNum and WordNum? 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
data TextCount;
character string. A default list of delimiters is used.
Text='AUSTRALIA, ITALY,
AUSTRIA, US';
USNum=count(Text,'US');
WordNum=countw(Text);
run;
Which IF statement subsets d
ProductName for values
containing the standalone 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,
word shirt?
3, 4, 5) Choice D returns one row (row 2).
a) if find(ProductName,
'Shirt') >0;
b) if findw (ProductName,
'Shirt') = 0;
c) if find(ProductName, '
Shirt ') = 0;
d) if findw(ProductName,
'Shirt', ' ') >0;
, Which statement is false a
regarding Perl regular
expressions? SAS does not impose a byte size limitation for Perl regular
expressions.
a) Perl regular
expressionsare limited to 32
bytes
b) Perl regular
expressionsconsist of
metacharacters
c) Perl regular
expressionsare used in SAS
within the
PRX functions
d) Perl regular
expressionsare sequences of
strings that define patterns
True or False: Perl regular True
expressions in the
PRXMATCH function must A Perl regular expression within the PRXMATCH function
start and end with a must start and end with a delimiter such as the forward
delimiter. slash.
What is the value of the 8
column Position?
PRXMATCH searches for a pattern match and returns the
Position = position at which the pattern is found. The string Dutch is
prxmatch('/Dutch/', 'Sawyer found starting in the eighth position.
Dutch Kenai');
True or False: the False
PRXPARSE function returns a
character string that is used The PRXPARSE function returns a pattern identifier
by other PRX functions and number that is used by other PRX functions and call
call routines. routines