BookmarkSubscribeRSS Feed
robertrao
Quartz | Level 8

Hi,

I have this MAcro and I have two datasets passed to it as a trial

4 REPLIES 4
LinusH
Tourmaline | Level 20

Looks like you are doing things a bit more complicated than needed.

Instead of passing a list of tables to the macro, just call the macro for each table. That will reduce the amount of logic within the macro, and therefore easier to maintain (and troubleshoot).

Data never sleeps
Astounding
PROC Star

Linus,

I'm familiar with this application, and can promise you that this is just a test run.  There are actually more like 80 data sets to be processed.

K,

You will have to attach the log if you want any help from the forum.  That's what tells us what went wrong.  If you didn't have the MPRINT option in place, you may need to re-run with it before posting the log:

options MPRINT;

LinusH
Tourmaline | Level 20

2 or 80, does that matter?

The effort to write the call is about the same, just repeating the macro name...?

Even better, having all contributing tables in a lookup table, or reading the names from sashelp.vmember, you could use call execute.

Data never sleeps
Ron_MacroMaven
Lapis Lazuli | Level 10

This page has code to create a list of data sets.

http://www.sascommunity.org/wiki/Making_Lists

This macro can be used to call a macro for each row in a data set

http://www.sascommunity.org/wiki/Macro_CallMacr

Ron Fehd  list processing maven

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 4 replies
  • 742 views
  • 2 likes
  • 4 in conversation