BookmarkSubscribeRSS Feed
ZRick
Obsidian | Level 7

I need some software that does refactoring job across sas sql/macro/ iml data steps to realize:

1. highlight related variable in all related sas code.

2. change one variable and change all related variables in all related sas codes.

for instance, variable $chr, it appears in proc sql 2 times, macro 3 times, data step 1 time

I need tool to highlight $chr in all related code

I need to change one place and change all other places.

I need to measure the change in terms the performance, stability, etc.

2 REPLIES 2
Reeza
Super User

Why are you changing the variable name?

Is it because you're re-running the code to apply to different variables? Or is it code maintenance?

You can consider looking at macro variables that you set at the beginning and then change in one place instead of replace everytime.

%let my_var=age;

proc means data=sashelp.class;

var &my_var;

run;

proc freq data=sashelp.class;

table &my_var/missing;

run;

Ksharp
Super User

SAS is not a IDE tool like Eclipse or Netbeans . I am afraid it is too hard for sas .But you can use menu EDIT->REPLACE to replace the variable name , also you can use data step to processs the sas code(sas code is a txt file). But it is also limited for refactoring .

Ksharp

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
  • 1107 views
  • 0 likes
  • 3 in conversation