BookmarkSubscribeRSS Feed
TimurShangareev
Calcite | Level 5

Is there are some alias for %sysfunc() key word? Somethin like %s? Sysfunc to long to write and read.

2 REPLIES 2
quickbluefish
Barite | Level 11

Well, you could make one, e.g.,

%macro s;
	%sysfunc
%mend;

** testing... ;
%let chk=one two three four;

%let nc=%s(countW(&chk,' '));

%put &=nc;

...but if you're using %sysfunc so much that you need a shortcut for it, there might be better ways to do things.  

PaigeMiller
Diamond | Level 26

In most (all?) SAS interfaces that I know of you can create an abbreviation, so if you type the abbreviation and press ENTER, whatever text you designated to go with that abbreviation will be inserted. So for example, I have the abbreviation ohc (just those three letters) and when I type ohc and press ENTER the text ods html close; appears in my code.

 

So you could create the abbreviation %sf, for example.

 

You can create abbreviation/alias for any code you want.

--
Paige Miller

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1927 views
  • 3 likes
  • 3 in conversation