The dataset orion.counsellor contains the following variables: Counsel_ID, DateOfBirth, Yrs_Exp, Salary.
Given the following code:
Data counsel_new;
Set orion.counsellor;
Study = Yrs_Exp + 3;
Bonus = Salary * 1.05;
Run;
Which of the following variables will be re-initialized at the start of each iteration of DATA Step?
(a) Yrs_Exp
(b) Counsel_ID
(c) Bonus
(d) DateOfBirth
Hi @Guru_MG,
Writing and testing small programs is very useful when learning SAS. So, why not observe what happens in practice (maxim 4)?
/* Create test data (if orion.counsellor does not yet exist) */
libname orion (work);
data orion.counsellor;
input Counsel_ID $ DateOfBirth Yrs_Exp Salary;
cards;
0 1 2 3
4 5 6 7
;
/* Run the DATA step in question with diagnostic PUT statements added */
data counsel_new;
put 'Start of iteration ' _n_ ': ' _all_;
set orion.counsellor;
Study = Yrs_Exp + 3;
Bonus = Salary * 1.05;
put 'End of iteration ' _n_ ': ' _all_;
run;
This is an example of a question you can answer without really knowing the material but based on the form of the question.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.