BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have two questions:
1. How is it possible to define macro variables inside implus language? Why &macro_var_name is not referenced in implus language if %let is put inside submit/endsubmit statements?

submit;
%let pippo={1 2, 3 4};
endsubmit;
x=&pippo; <--error

2. Is it possible to include a proc of SAS STAT inside a module?For example I need to insert proc corr inside a module for defining objective function of a genetic algorithm.

Thanks in advance,
Angela
1 REPLY 1
Simon_sas
SAS Employee
In answer to your questions:

(1) IMLPlus does not support SAS macro variables except inside submit blocks. However, you can use the Base SAS functions symgetn and symgetc. For example:

submit;
%let xyz = 123;
endsubmit;

x = symgetn( "xyz" );
print x;

(2) Yes, you can call any SAS procedure (except PROC IML) from inside a submit block that is itself inside an IML module.

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!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 1 reply
  • 816 views
  • 0 likes
  • 2 in conversation