Hello there Community,
I’m trying to understand where SAS Enterprise Guide stores the underlying code for prompts created through the Prompt Manager. Specifically, I’d like to know:
I’m asking because I’m working on creating similar functionality in SAS Viya jobs. I’ve already built an HTML form for user input, but I want to confirm whether the Prompt Manager in Enterprise Guide uses XML to store prompt screen metadata. If so, is it possible to extract that XML and make modifications for use with SAS Viya task prompt forms?
Any insights on how SAS Enterprise Guide manages and stores this prompt code would be much appreciated. Thanks!
An egp file is merely a zip. Rename it and replace .egp with .zip. Code is in there. I have a command-line parser on github that will parse it out.
The data is stored in XML files.
An egp file is merely a zip. Rename it and replace .egp with .zip. Code is in there. I have a command-line parser on github that will parse it out.
The data is stored in XML files.
Thank you, it worked! However, I wasn't expecting the XML file to be 20,000 lines of code. I did find the relevant part of the prompt, but I'm not sure if it's okay to modify it for the SAS Viya XML screen.
Are you aware that EG8.4 also works for Viya?
There are also migration scripts for EG projects to SAS Studio https://www.youtube.com/watch?v=wf1RL8U75YM Not sure if the latest version also migrates prompts - but certainly worth a shot before you're rebuilding the flows and prompts manually.
And to answer your question:
A .egp file is a zip archive. Using a tool like 7-zip you can extract the content to a folder. I've done this below for a super simple EG8.4 project.
In my case the prompt was under project.xml
<Parameters> <ParameterCollection> <PWParameter><PromptGroup obj="p1" version="1.0"><DefinitionsAndSubgroups><TextDefinition obj="p2" promptId="PromptDef_1730136796785_502334" name="MyTestPrompt" macroVarOutputLevel="2" minValueCount="0" macroVarListDelimiter="," macroVarListQuote="&quot;"><Label><Text obj="p3" xml:lang="en-AU">Prompt_1</Text></Label></TextDefinition></DefinitionsAndSubgroups></PromptGroup></PWParameter> </ParameterCollection> </Parameters>
Thanks for your answer!
I just discovered that when migrating SAS Enterprise Guide projects with prompts, they don’t convert directly and require special attention. Each prompt is transformed into a SAS Studio program step called "Specify Prompt Values," which defines the macro variables. It seems I need to specify values for these macro variables afterward to ensure everything runs correctly in SAS Studio.
also for your answer to my question
I converted my Enterprise Guide project to a zip file and used the copy files function in the task pane, which worked well. I can view the XML file, which contains about 20,000 lines of code. I found the section where the prompts are located, but I’m unsure if it’s worth modifying this for the SAS Viya job XML screen.
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.
Ready to level-up your skills? Choose your own adventure.