BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
1) IML code.
2) Write a macro and CALL EXECUTE:

%macro xx(dsn=);
  proc print data=&dsn;
   var variables-list ;
 run;
%mend;

data _null_;
 set sashelp.members(where=(libname='WORK'));
call execute('%xx(dsn=work.'||memname||')');
run;

View solution in original post

11 REPLIES 11
Reeza
Super User

 

 

What are are you trying to do? What do you have for starter, text files, sas datasets, SQL DB? What do you mean by read variables? What do you need as output? 

 

Here are some guidelines on asking good questions

 

http://stackoverflow.com/help/how-to-ask

 

https://communities.sas.com/t5/SAS-Communities-Library/How-to-ask-a-question-in-SAS-Analytics-U-Comm...

mssh2712
Calcite | Level 5
Sorry , i don't know about this.. this is an interview question people have asked me. Im struggling as well like you.
Reeza
Super User

That was the question? Word for word? 

 

How familiar are you with SAS? 

mssh2712
Calcite | Level 5
as in SAS datasets... it can be any type of variables.
Patrick
Opal | Level 21

That's a too generic and unspecified question to just give a straight answer.

 

Such a question in an interview situation provides you with the opportunity to demonstrate your analytical approach to requirement analysis and to showcase your understanding of SAS by asking back the right questions to get to the necessary level of detail for an answer.

 

It's in this regard a really good interview question as you need actual experience and knowledge to deal with it.

Reeza
Super User

Last set of interviews I did, they received a technical take home exam, and I asked a question I thought was totally clear. 

Of the 6 candidates - one candidate realized it was ambiguous and asked clarifying questions. That's the one I hired. 

3 others interpreted it one way and 2 the other way. 

 

 

LinusH
Tourmaline | Level 20
Interview questions? Sigh...
C'mon, learn SAS the proper way, and then you can attend interviews with confidence. Just learning by answering some random question will not get you to understand SAS and be pruductive. Also, can you predict what question that will be asked?
Data never sleeps
Ksharp
Super User
1) IML code.
2) Write a macro and CALL EXECUTE:

%macro xx(dsn=);
  proc print data=&dsn;
   var variables-list ;
 run;
%mend;

data _null_;
 set sashelp.members(where=(libname='WORK'));
call execute('%xx(dsn=work.'||memname||')');
run;

Ksharp
Super User
1) IML code.
2) Write a macro and CALL EXECUTE:

%macro xx(dsn=);
  proc print data=&dsn;
   var variables-list ;
 run;
%mend;

data _null_;
 set sashelp.members(where=(libname='WORK'));
call execute('%xx(dsn=work.'||memname||')');
run;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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
  • 11 replies
  • 1472 views
  • 2 likes
  • 5 in conversation