BookmarkSubscribeRSS Feed
problems99
Calcite | Level 5

Hello,

I've a problem when I want to pass some chosen elements from scl to a sas macro.

Here is my macro.

%macro test(number=, text=);

...

%mend test

when I call that from my scl code, this works :

%test(number=2, text='Hello');

but this does not work :

%test(number=list_num.selecteditem, text=list_text.selecteditem);

I read something that variables have to be known before the compilation but I thought that macro solved that problem. Have I done something wrong ?

Thanks

2 REPLIES 2
LinusH
Tourmaline | Level 20

It was very long time age i used SCL. Why are you using it?

I assume that you are using your macro call in a submit block.

I can be mistaken, but I think you can't refer to a list in a submit block. You need to resolve it to something that the macro understands, and that are plain text parameters.

Data never sleeps
problems99
Calcite | Level 5

I want to merge two applications: one in scl with frames and one in sas without gui. Both use the same database. I added a frame in the scl application requesting for parameters needed by the sas application. I transformed the sas application in a macro program and I call that from my new scl frame.

Yes, I use a submit block.

So what can I do ? Write parameters in a file in scl and read them in sas (if it is possible ?) ?

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