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?
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.
@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.
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.
The questions are multiple choice so leading/trailing blanks will have no impact on anything either.
Thanks.had doubt when options are not given and we need to write answer.
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 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.
@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
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.)
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!
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.
Ready to level-up your skills? Choose your own adventure.