BookmarkSubscribeRSS Feed
Shanthi123
Fluorite | Level 6
I have a bulk of sas programs i need to replace one word with other word in all the sas programs which are located in a folder it should search for the word in all sas programs and replace with the new word . Can someone help me on this?
2 REPLIES 2
Reeza
Super User

SAS programs are just text files so you can use your OS to do this more efficiently than SAS. 

 

If you search on the appropriate forum you should find examples

https://askubuntu.com/questions/20414/find-and-replace-text-within-a-file-using-commands

 

Here is a likely related question you may have seen. 

https://communities.sas.com/t5/SAS-Programming/Automate-a-code-using-SAS-macro/m-p/771326

 


@Shanthi123 wrote:
I have a bulk of sas programs i need to replace one word with other word in all the sas programs which are located in a folder it should search for the word in all sas programs and replace with the new word . Can someone help me on this?

 

Sajid01
Meteorite | Level 14

That is something doable using a script . What is the OS?
In case you want to use SAS have a look here
https://support.sas.com/resources/papers/proceedings17/1136-2017.pdf
https://www.lexjansen.com/pharmasug/2006/TechnicalTechniques/TT04.pdf

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 328 views
  • 4 likes
  • 3 in conversation