Hello Community,
I would like to have a SAS EG project created automatically with installed methods on the work computers.
With older SAS EG versions one could create a project.xml, which one afterwards with a ZIP program compressed. A subsequent renaming from .zip to .egp has worked great. However, no longer with the SAS EG 7.1 version. (The project is empty, or has to be updated or throws an error message). Did I use the wrong conversion from the file? Is there a global template?
Because of that, I've tried it with C Sharp (it works). However, the employees receive an error message when saving the document. In addition, I did not find a method to save the .sas file to an external location and point it to the SAS EG Project.
Finally, I tried to find a solution here in the community. (https://communities.sas.com/t5/SAS-Communities-Library/Create-a-SAS-Project-Scaffold-on-the-Command-...)
Unfortunately this creates no .epg file, but only a single .sas file. In addition, I need a portable version of Python on our network, so that every employee can run my code.
Now I am with my knowledge at the end and now ask again actively, how to simplify the creation of SAS EG projects simplest? We manage everything about an Excel file with several macros, with which we had autoamtized all until 7.1.
The target solution is a SAS EG file with a .sas file which is also stored in a different location (save as).
Thank you very much.
Hi @StoneCat,
SAS doesn't document the EGP file format -- it is subject to change with each release. So everything I'm sharing here is based on my ideas and experience, but does not represent an approach that would be officially supported. You would want to conduct plenty of testing to ensure these processes worked for you.
That said, your method could be made to work, I think. Approach:
I've done this sort of thing with a SAS-based process, using SAS to read/modify the Project.XML file (as a text file, not as data), and then used ODS PACKAGE to assemble all files/folders into a ZIP file with an EGP extension.
To simplify, you could base your template on an earlier version of EG (before the Git integration, perhaps). EG 7.1 can read/upconvert old projects. Your users would be prompted with a message that the project file was from an earlier version.
What is the purpose of this all?
If you want to supply pre-packaged projects, create them in a central location and have your software deployment tool copy them out to the clients.
Yes i want to supply pre-packaged projects.
These should include a modified .sas program (replacing analysis path and other attributes).
The .sas program should also be stored externally (same folder as sas project).
However, I have not yet found a suitable solution.
Thanks for the guide. I will try again.
Do you know what file conversion I need to read and write the xml file? ISO-8859-1?
@StoneCat - don't try to read and write the XML as data -- treat is as a text-based template only. If you use an XML parser and writer to process, the result won't be readable by EG. You will need to use UTF-8 encoding for the text file.
If you need to modify certain parameters in programs, why not do it centrally?
Store a .sas with the necessary steps on your SAS server, and %include that in an autoexec code node in your prototype .egp.
That way that prototype egp does not need to be modified.
Hi @StoneCat,
SAS doesn't document the EGP file format -- it is subject to change with each release. So everything I'm sharing here is based on my ideas and experience, but does not represent an approach that would be officially supported. You would want to conduct plenty of testing to ensure these processes worked for you.
That said, your method could be made to work, I think. Approach:
I've done this sort of thing with a SAS-based process, using SAS to read/modify the Project.XML file (as a text file, not as data), and then used ODS PACKAGE to assemble all files/folders into a ZIP file with an EGP extension.
To simplify, you could base your template on an earlier version of EG (before the Git integration, perhaps). EG 7.1 can read/upconvert old projects. Your users would be prompted with a message that the project file was from an earlier version.
I've always forgotten the default folder. Correspondingly, the program always went wrong on opening.
Furthermore does not have to be encoded in UTF-8, but in ucs-2, then everything works.
Thank you so much @ChrisHemedinger
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.