DATA Step, Macro, Functions and more

What is an in-line macro?

Reply
SAS Employee
Posts: 73

What is an in-line macro?

1. What is an in-line macro?
2. How to swap 2 macro variables without creating 3rd macro variable?
3. Suggest a way to enlist tables that have a column containing string - ‘asset’?
Valued Guide
Posts: 632

Re: What is an in-line macro?

hmmmmm interesting questions.
> 1. What is an in-line macro?
Are you perhaps referring to either a statement style or command line macro?

> 2. How to swap 2 macro variables without creating 3rd
> macro variable?
I have never needed to do this is there a specific motivation? The use of a third temporary variable seems like a small cost.

> 3. Suggest a way to enlist tables that have a column
> containing string - ‘asset’?
Sorry I am not sure what you mean. Any data set with a variable with the name ASSET or any data set with any variable which contains a value of 'asset'. I am guessing the second and that you do not want to actually read the potential data sets.
Super Contributor
Super Contributor
Posts: 3,174

Re: What is an in-line macro?

Is the OP asking the forum subscribers do their homework here?

Scott Barry
SBBWorks, Inc.
SAS Employee
Posts: 73

Re: What is an in-line macro?

.
SAS Employee
Posts: 73

Re: What is an in-line macro?

.
SAS Employee
Posts: 73

Re: What is an in-line macro?

.
SAS Employee
Posts: 73

Re: What is an in-line macro?

.
SAS Employee
Posts: 73

Re: What is an in-line macro?

.
Respected Advisor
Posts: 3,887

Re: What is an in-line macro?

Pavan

Yes, this is a technical discussion forum - which expects users to first do their own bit of work and then ask questions when they've got stuck.

For example the following search terms in Google - SAS "in-line macro" - and the very first hit links already to a white paper explaining what an in-line macro is.

Thanks
Patrick
SAS Super FREQ
Posts: 8,740

Re: What is an in-line macro?

Hi:
Generally, when people refer to "in-line" macros, they are referring to "session compiled" macro programs that are compiled and used within the same program. Usually, they reside in the WORK library, as described here, in the documentation (as opposed to autocall macro programs or Stored compiled macro programs):
http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#/documentation/cd...

And these 2 papers are very good resources for the beginner (in addition to the most excellent books written by Art Carpenter):
http://www2.sas.com/proceedings/sugi29/243-29.pdf
http://www2.sas.com/proceedings/sugi28/056-28.pdf

I'm not sure what you mean by #2 and #3 -- this is an instance where a concrete example or more explanation would be useful. Especially, what you mean by the phrase "enlist tables" in the sentence "Suggest a way to enlist tables that have a column containing string - ‘asset’" If you want to find tables that have a column which contains "asset" as part of a column name, then you will want to search for previous forum postings on the use of the SAS Dictionary tables or the SASHELP "V" tables.

And, if this is a homework assignment, then your best resource is your professor or teaching assistant for the class.

cynthia
Ask a Question
Discussion stats
  • 9 replies
  • 347 views
  • 0 likes
  • 5 in conversation