BookmarkSubscribeRSS Feed
Pavan_SAS
SAS Employee
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’?
9 REPLIES 9
ArtC
Rhodochrosite | Level 12
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.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Is the OP asking the forum subscribers do their homework here?

Scott Barry
SBBWorks, Inc.
Pavan_SAS
SAS Employee
.
Pavan_SAS
SAS Employee
.
Pavan_SAS
SAS Employee
.
Pavan_SAS
SAS Employee
.
Pavan_SAS
SAS Employee
.
Patrick
Opal | Level 21
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
Cynthia_sas
Diamond | Level 26
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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 9 replies
  • 3799 views
  • 0 likes
  • 5 in conversation