BookmarkSubscribeRSS Feed
chirumalla
Calcite | Level 5

Hi,

I have developed programs in SAS development here my library name like ABC.dataset  but in UAT library name is different like DBA.dataset now i'm manually using ctrl + H  and replacing lib name. is any other option/ functions available to find the code and replace the code if I write at starting in the program. pls help me.

1 REPLY 1
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

If your writing code to run on multiple instances/different parameters then it is probably best to setup your parameters at the beginning of a file (or in separate file) and then reference the macro parameter throughout your code.  Saves you have to cntrl+f replace each time.  For example:

%let MYLIBNAME = ABC;

...

data &mylibname..newdataset;

     set &mylibname..olddataset...

Then when you release to UAT you only need to change the one row %let.

As for find / replace, I don't think there are any other tools within the editor itself which would help.  You could create a sas program to read in all the necessary sas files and doa datastep to replace the text with something else, but that sounds overcomplicated and takes time.

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
  • 1 reply
  • 4445 views
  • 3 likes
  • 2 in conversation