BookmarkSubscribeRSS Feed
ecoware
Calcite | Level 5
Is there some way to text search through a multitude of SAS program code listings within an EG Project. A variation of this, of course, is the ability to export all of the code listings, within a project, to a text file. I have tried to cut and paste but I have hundreds of programs embedded within numerous EG projects.
Thanks,
Steve
7 REPLIES 7
deleted_user
Not applicable
Hello Ecoware,

An EGP file is actually a set of xml, txt, ... zipped together. You can unzip an EGP: make a copy of the file, change the extension from EGP to ZIP and unzip it. You can then use the search functionnality of your file explorer to find the code you are looking for.

I hope this will help you,

Yoba
ecoware
Calcite | Level 5
Yoba,
Thanks for your very timely response !
I did change the extension to zip and the unzip process created a single .xml file and a series of folders; each folder containing a single .sas program.
I did not see any .txt files.
The .egp files were created with EG 4.1
Any additional advice would be very much appreciated.
Thanks again.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Consider this opportunity to use SAS to drive the unzip process (in batch) - you need not worry about any file-rename actually with this technique:

http://www2.sas.com/proceedings/forum2007/005-2007.pdf


Also, consider using SAS and FILENAME PIPE engine with a DATA step (to generate the SAS code) to identify and process your *.egp files programmatically, for further automation.

Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
Hello Ecoware,

Sorry ... instead of txt files, I should have written sas files. Sas files are actually in plain text.This means that you can search in those files with the file explorer.

Regards,

Yoba
ecoware
Calcite | Level 5
Thanks Yoba,
Good information and a solution to my building a code "knowledge base" that is searchable. I appreciate your time.
Steve
charles_s_patridge
Calcite | Level 5

Did you ever find / create a solution to this problem of searching for text within / across SAS EG project code?

charles_s_patridge
Calcite | Level 5

To ALL,

Chris Hemedinger of SAS Institute provided me with a solution that works.  The code/tool to do this is located at this URL - http://blogs.sas.com/content/sasdummy/2013/01/25/egp-search-tool2/

You can download the tool on your Windows Platform and run the code without having to get your IT people involved.

Thanks Chris for the tool and making it available to all.

Charles Patridge

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

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 7 replies
  • 5404 views
  • 0 likes
  • 4 in conversation