The Global SAS certification exam is administered by SAS and Pearson VUE together. There are 60-65 multiple choice questions in Base SAS certification exam and candidate must achieve 70% score to pass multiple choice questions in 110 minutes.
We are starting a series of articles to help you prepare for this examination. Covering a few questions in first article of the series along with their explanation.
Data work.staff;
JobCategory = 'FA';
JobLevel = '1';
Jobcategory = Jobcategory || JobLevel ;
run;
Which one of the following is the value of the variable Jobcategory in the output data set?
A. FA
B. FA1
C. FA 1
D. ' ' (missing character value)
Answer of the question is highlighted.
Explanation:
In PDV(Program Data Vector) first the variables Jobcategory will be created with the length of (2 bytes / 2 characters) executing first statement (JobCategory = ‘FA’).
So, the length of variable Jobcategory will remain the same within this data step. So even when the third statement is concatenating the "FA" and "1" values, the variable Jobcategory can't accommodate string of length 3, hence remains FA.
For better explanation try following code.
Data work.staff;
JobCategory = 'FA';
JobLevel = '1';
Jobcategory = JobLevel || Jobcategory;
run;
Jobcategory now becomes "1F" .... I hope you have got the crux.
The SAS data set WORK.SALARY, currently ordered by DEPARTMENT, contains 100 observations for each of 5 departments. Which one of the following represents how many observations the WORK.TOTAL data set contains?
A. 5
B. 20
C. 100
D. 500
Answer of the question is highlighted.
Explanation:
Sometimes in examinations, questions are intentionally made lengthy and hence confusing. Classical example of the same is the above question.
Try to identify the key statement in such cases. Here If Last.department statement is the key.
If Last.department and By department combo gets the last occurrence of each of the 5 departments. Hence only 5 observations would be left.
Enjoy reading our other articles and stay tuned with ...
Kindly do provide your feedback in the 'Comments' Section and share as much as possible.
We are starting a series of articles to help you prepare for this examination. Covering a few questions in first article of the series along with their explanation.
Q1. The following SAS program is submitted:
Data work.staff;
JobCategory = 'FA';
JobLevel = '1';
Jobcategory = Jobcategory || JobLevel ;
run;
Which one of the following is the value of the variable Jobcategory in the output data set?
A. FA
B. FA1
C. FA 1
D. ' ' (missing character value)
Answer of the question is highlighted.
Explanation:
In PDV(Program Data Vector) first the variables Jobcategory will be created with the length of (2 bytes / 2 characters) executing first statement (JobCategory = ‘FA’).
So, the length of variable Jobcategory will remain the same within this data step. So even when the third statement is concatenating the "FA" and "1" values, the variable Jobcategory can't accommodate string of length 3, hence remains FA.
For better explanation try following code.
Data work.staff;
JobCategory = 'FA';
JobLevel = '1';
Jobcategory = JobLevel || Jobcategory;
run;
Jobcategory now becomes "1F" .... I hope you have got the crux.
Q2. The following SAS program is submitted:
Data work.total;
Set work.salary(keep = department wagerate);
By department;
If first.department then payroll = 0;
Payroll + wagerate;
If last.department;
run;
The SAS data set WORK.SALARY, currently ordered by DEPARTMENT, contains 100 observations for each of 5 departments. Which one of the following represents how many observations the WORK.TOTAL data set contains?
A. 5
B. 20
C. 100
D. 500
Answer of the question is highlighted.
Explanation:
Sometimes in examinations, questions are intentionally made lengthy and hence confusing. Classical example of the same is the above question.
Try to identify the key statement in such cases. Here If Last.department statement is the key.
If Last.department and By department combo gets the last occurrence of each of the 5 departments. Hence only 5 observations would be left.
Enjoy reading our other articles and stay tuned with ...
Kindly do provide your feedback in the 'Comments' Section and share as much as possible.
Your new valuable key points imply much a person like me and extremely more to my office workers. With thanks; from every one of us.advisory firms in dubai
ReplyDeleteI read your post and trust me its really helpful for us.
ReplyDeletesas advance training in delhi
sas advance training in noida
I read Your Post and really it’s really one of the Knowledgeable Post for everyone
ReplyDeleteSAS Training Institute in Delhi
SAS Training Institute in Noida
A really appreciable post thanks for sharing this content by the way If anyone look for Ms Office training institute in Delhi Contact Here-+91-9311002620 Or Visit our website https://www.htsindia.com/Courses/microsoft-courses/ms-office-course
ReplyDeleteVery nice post thank you for sharing this post its very knowledgeable and very helpful i hope that you will continue to post these kinds of contents in future apart from that if anyone looking for C/C++ institute in delhi so Contact Here-+91-9311002620 Or Visit Website- https://htsindia.com/Courses/embedded-systems-and-robotics/cplusplustraininginstituteinsouthdelh
ReplyDeleteBig thank you for sharing this post its very knowledgeable and very helpful i hope that you will continue to post these kinds of contents in future apart from that if anyone looking for e accounting institute in delhi so Contact Here-+91-9311002620 Or Visit Website- https://www.htsindia.com/Courses/Tally/e-accounting-training-course
ReplyDeleteA big thank you for sharing this post and if anyone looking for best c++ institute in delhi Contact Here-+91-9311002620 Or Visit Website-https://www.htsindia.com/Courses/modular-courses/c-plus-plus-training-course
ReplyDeleteYour post is really good thanks for sharing these kind of post but if anyone looking for Best Consulting Firm for Fake Experience Certificate Providers in Noida, India with Complete Documents So Dreamsoft Consultancy is the Best Place.Further Details Here- 9599119376 or VisitWebsite-https://experiencecertificates.com/experience-certificate-provider-in-Noida.html
ReplyDeleteYour post is really good thanks for sharing these kind of post but if anyone looking for Best Consulting Firm for Fake Experience Certificate Providers in delhi, India with Complete Documents So Dreamsoft Consultancy is the Best Place.Further Details Here- 9599119376 or Visitwebsite-https://experiencecertificates.com/experience-certificate-provider-in-delhi.html
ReplyDeleteThanks for sharing this content its really a great post and very helpful thanks for sharing this knowledgeable content and if anyone looking for best java institute in delhi so contact here +91-9311002620 visit https://www.htsindia.com/java-training-courses
ReplyDeleteThanks for sharing this kind of post its very helpful for me, hey if anyone looking for best ms office or advance excel training institute in delhi so join with us for further more details Contact Here-+91-9311002620 Or Visit Website- https://htsindia.com/Courses/business-analytics/adv-excel-training-course
ReplyDeletebig thank you for sharing this content If anyone looking for best Sas training institute in Delhi Contact Here-+91-9311002620 Or Visit our website https://www.htsindia.com/Courses/business-analytics/sas-training-institute-in-delhi
ReplyDeleteThanks for sharing this valuable post its very informative and very helpful apart from that if anyone looking for e accounting institute in delhi so Contact Here-+91-9311002620 Or Visit Website- https://www.htsindia.com/Courses/Tally/e-accounting-training-course
ReplyDeleteThanks for sharing this amazing post this is the content i really looking for, it's very helpful i hope you will continue your blogging anyway if anyone looking for e accounting training institute in delhi contact us +91-9311002620 visit-https://www.htsindia.com/Courses/Tally/e-accounting-training-course
ReplyDelete