Does anyone know of a tool that I can run to search for specific tables or data columns being used in an egp file?
Thank you.
You can try using this "unofficial" tool that I built a while ago. Lots of folks have had success with it.
Hello for some reason, I was not able to download the version for SAS EG 8.1. The link did nothing.
Direct link: http://support.sas.com/documentation/onlinedoc/guide/blog/EGPSearcherTool.zip
But unfortunately there is not a version specifically for EG 8.1 -- we have versions for 7.x and 8.2/8.3.
Thank you for your quick response.
Is there another way for me to receive this tool?
I fixed the link in the blog. But as I said, it won't address the specific version of SAS Enterprise Guide 8.1, which has been updated for a long time to 8.2/8.3.
As an alternative you could use SAS Enterprise Guide automation -- via scripts -- to export and examine much of the content in EGP files.
Hi,
This might not help, but I think needs like this are a great reason to store .sas code outside of .egp files (and link to them from EG process flows). To my mind, EG became a much better tool for developers when it added that option. Storing code outside of EG gives you the ability to execute it from other SAS sessions / environments, and also search code using any text search tools.
Too approach this problem, I might be tempted to script a process that would extract all the code from EG projects and dump it to .sas files as a first step.
Good advice @Quentin -- and to get you started I have several scripts on GitHub -- in PowerShell or VBScript.
I have C# code to work with EG files and do similar processes.
Ping me offline Quentin if you need help. I am busy until after the holidays but can look at it after new years.
Thanks Alan. I'm not the OP for this question, but appreciate the offer!
I was responding to your mention of writing a script: I should have made that clear.
Ultimately, you need to open the egp XML, get the elements, find the one with SAS code, and extract it. i am pretty sure I have that already. the OP question regarding the datasets should also be discoverable in a similar manner.
I would use SAS Packages for storing and sharing my SAS code (https://github.com/yabwon/SAS_PACKAGES).
Other thing, wouldn't a macro like one below solve the issue?
Bart
%macro getSASfilesFromEGP(
path
,libOut
);
%local inZIP inF outF;
%let inZIP = z%sysfunc(datetime(),hex7.);
%let inF = i%sysfunc(datetime(),hex7.);
%let outF = o%sysfunc(datetime(),hex7.);
data _null_;
rc0 = filename("&inZIP.", "&path.", "ZIP", "lrecl=1 recfm=n");
did = dopen("&inZIP.");
did = dopen("&inZIP.");
if not did then
do;
put "ERROR- Aborting.";
stop;
end;
do i=1 to dnum(did);
file = dread(did, i);
if upcase(scan(file,-1,".")) ne "SAS" then continue;
rc1 = filename("&inF.", "&path.", "ZIP", "member='" !! strip(file) !! "' lrecl=1 recfm=n");
rc2 = filename("&outF.", catx("/", dequote(symget("libOut")), translate(file,"_","/")), "DISK", "lrecl=1 recfm=n");
rc3 = fcopy("&inF.", "&outF.");
if ^fexist("&outF.") then put "WARNING: UnZIP failed.";
put i= file=;
put (rc:) (=);
rcY = filename("&inF.");
rcZ = filename("&outF.");
end;
did = dclose(did);
run;
%mend getSASfilesFromEGP;
%getSASfilesFromEGP(
C:\Users\bart\Desktop\Project.egp
,C:\Users\bart\Desktop\TEST123
)
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.