Search code examples
sasenterprise-guide

Is it possible to copy prompts between SAS enterprise guide projects?


I'm developing software across multiple different enterprise guide projects.

While code can be easily moved between files, I'm using prompts to capture user input. Is it possible to move/copy prompts between projects?


Solution

    1. Take a backup copy of your source and target projects (just in case)
    2. Rename the projects from .egp to .zip
    3. Open the source zip file
    4. Find project.xml and search for the text “ParameterCollection”
    5. Copy the lines describing the parameters you want to duplicate (name is about 4 or 5 attributes in)
    6. Open the project.xml of the target zip file (Note you may have to copy it out of the zip file in order to make it writable)
    7. Search for ParameterCollection again
    8. Insert your copied lines
      • note, if the target project had no prompts to start with, you may need to add before the prompt lines. It should end up looking a little like: (Apologies, the xml sample below should have angle brackets and stepped indenting, but I can't get the markup to work!)
        [Parameters]
        [ParameterCollection]
        [PWParameter]…
        [PWParameter]…
        [/ParameterCollection]
        [/Parameters]
    9. Save the changes (you may need to copy the xml file back into the zip file)
    10. Rename the projects back from .zip to .egp