BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
paddyb
Quartz | Level 8

I am planning to appear sas exam soon.I have doubt as looking some questions on google

if its mentioned while writting answer that dont put leading and trailing space what should we do

1]RETAIN AGENUM

2]RETAINAGENUM

WHICH OPTION IS CORRECT?

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Think about how a computer can interpret the text you write. 

 

If it's

 

RETAINAGENUM is that:

 

RETAIN AGENUM;  *one variable;

or

RETAIN AGE NUM; *two variables;

 

If there's likely ambiguity, it's likely incorrect. 

 

View solution in original post

10 REPLIES 10
Reeza
Super User

@paddyb wrote:

I am planning to appear sas exam soon.I have doubt as looking some questions on google

if its mentioned while writting answer that dont put leading and trailing space what should we do

1]RETAIN AGENUM

2]RETAINAGENUM

WHICH OPTION IS CORRECT?


1, but my guess is you're misinterpreting the comment about leading and trailing spaces.

paddyb
Quartz | Level 8
Thanks.yes Just wanted to conform that it means space before and after the answer.Not in between.Giving exam for first time so dont want to take any chance:)
Reeza
Super User

Think about how a computer can interpret the text you write. 

 

If it's

 

RETAINAGENUM is that:

 

RETAIN AGENUM;  *one variable;

or

RETAIN AGE NUM; *two variables;

 

If there's likely ambiguity, it's likely incorrect. 

 

Reeza
Super User

The questions are multiple choice so leading/trailing blanks will have no impact on anything either. 

paddyb
Quartz | Level 8

Thanks.had doubt when options are not given and we need to write answer.

novinosrin
Tourmaline | Level 20

I would suggest get a grasp of literal, keyword,  operand, operators,constants and tokens(tokenisation if you wish) without fail before you take any test in any programming language.

 

May i ask you a question:

 What do you think happens here and why:

 

data w;

retain retain retainn retainnn ' ';

run;

 

This will get you started.

 

paddyb
Quartz | Level 8
actually i know it means different retainn retainnn wht u want to say.but wanted to clear my doubt as leading and trailing before each word or complete answer
Reeza
Super User

@paddyb wrote:
actually i know it means different retainn retainnn wht u want to say.but wanted to clear my doubt as leading and trailing before each word or complete answer

I understand English may be a second language but please try and use proper punctuation and/or full words. There is no character limit like Twitter.

Reeza
Super User

@paddyb wrote:

Thanks.had doubt when options are not given and we need to write answer.


You don't need to write any answers on the SAS exams. They're multiple choice for Base and Advanced Certification

Mark2010
SAS Employee

Actually, there are more than just short answer questions on SAS exams. This includes numeric and short answer text (as well as some innovative types too, that simulate User Interface, but these aren't on Base). 

For short answer text answers, you are typically asked to provide a short segment of code to complete a program. The answer has some flexibility to evaluate the response, so any valid SAS syntax that would work would be marked correct. So in this examlple:

retain age num;
  retain age num ;
retain num age;
retain     num    age ;;

would all work, while

retainagenum;

certainly would not.

 

In short, write it like you would your code and you'll be fine.

 

(This is also a good example of why you should stay away from google/unauthorized test prep....it is going to steer you in the wrong direction.)

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 10 replies
  • 2609 views
  • 1 like
  • 4 in conversation