BookmarkSubscribeRSS Feed
piavar
Calcite | Level 5


Hi All,

Does anybody know if there is a statement or option to keep keywords colours whithin a macro?

Regards

Paolo

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

I don't think so.  The reason being is that macro code isn't actually code until it has been parsed by the pre-processor.  Simplest way is to write your code, then copy over to a macro and change for parameters.

NickS1
Calcite | Level 5

I recently inherited some code when I changed jobs.

There was a large macro as the main process. It had a rather annoying %macro _; %mend _; at the end of the %macro line.

It wasn't until I deleted them that I realised that all of the code within the macro had the keywords colour coded.

Reinstating them made the colours return!

 

e.g

%macro stuff(); %macro _; %mend _;

data thing2;

set thing1;

run;

%mend;

 

%macro stuff();

data thing2;

set thing1;

run;

%mend;

 

Does this help?

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