BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello

I have created a series of sas macros that I wrapped inside of a macro called: %process.

%extract(card=&card);
%merge(card=&card);

The macro %merge generates a sas dataset No 001. that creates a series of macro array variables using call symput. The macro variables are used in the next data step no 002. that is being generated. The array variables are used to generate sas statements.

If I remote submit all of the macro defintions and call %process directly it works perfectly.

If I call macro %process from a data step using call execute, then the call symput statements do not generate the macro variables and the 2nd data step does not get the generated sas statements.
3 REPLIES 3
deleted_user
Not applicable
But if the macros are creating datasteps themselves then surely calling the macro from within another datstep will not work. I'm not quite sure what you are trying to do here. Could you maybe post a bit more code?
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Also, consider the presence or lack of a RUN; statement within each macro will have an impact on whether your SYMPUT SAS macro variables are GLOBAL or LOCAL.

Check the SAS MACRO documentation link below on this topic, as well as other SAS support website http://support.sas.com/ technical reference material on the topic.

Special Cases of Scope with the CALL SYMPUT Routine
http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/tw3514-symput.htm

Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
I found the doc... You can not use call execute to call a sas macro that has call symput statements in the generated data step code.

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
  • 3 replies
  • 803 views
  • 0 likes
  • 2 in conversation