BookmarkSubscribeRSS Feed
Guru_MG
Fluorite | Level 6

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

4 REPLIES 4
FreelanceReinh
Jade | Level 19

Hi @Guru_MG,

 

Writing and testing small programs is very useful when learning SAS. So, why not observe what happens in practice (maxim 4)?

Spoiler
/* 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;
Tom
Super User Tom
Super User

This is an example of a question you can answer without really knowing the material but based on the form of the question.

https://muppet.fandom.com/wiki/One_of_These_Things 

Ksharp
Super User
C

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 715 views
  • 0 likes
  • 5 in conversation