Desktop productivity for business analysts and programmers

Code to 'save as' EG project to folder using name provided through Prompt

Reply
New Contributor
Posts: 2

Code to 'save as' EG project to folder using name provided through Prompt

Hi,

 

I am creating an EG template, to be used by many people, and I want it set up to include a save as to a new folder location, that they have specified through prompts and the folder is already being created within the program.  I don't want the template to be overwritten and I am trying to make it easy for the people who will run this.  So after they have provided the required parameters I want to save the project to the new location without them having to remember to select save as.

 

I've googled to try and find a solution but no luck.  Does anyone have any ideas?  I've looked a vbscripts but I want something that can be run within an EG program.

 

I am running SAS EG 6.1 in a Unix environment.

 

Thanks.

Super User
Posts: 3,250

Re: Code to 'save as' EG project to folder using name provided through Prompt

I don't think you can save an EG project programmatically, but perhaps the keyboard shortcut for the SAVE dialog may help (Ctrl S).

SAS Super FREQ
Posts: 326

Re: Code to 'save as' EG project to folder using name provided through Prompt

The EG automation interface (ex. VBScript) does support Save and SaveAs for EG projects, but as you noted, this would not solve your problem if you wish to SaveAs the project (aka. template) the user currently has open.  I can't think of an easy solution other than making your template EG project file read-only and instructing users to manually SaveAs.  There isn't a built-in way to Save/SaveAs a project by running something in said project.

 

If you really want an automated solution and willing to get dirty, I bet you could accomplish with a "Save Current Project As" custom task that you could add as a final step in your process flow.  However, you'd have to hook into EG's non-public APIs to perform the SaveAs on the project (without prompting).  And you'd have to deploy the custom task to your users' EG installations (whoever was going to use the template project, containing a reference to the custom task).  While possible, I suspect this would be more trouble than just instructing users to manually SaveAs.

 

Casey

New Contributor
Posts: 2

Re: Code to 'save as' EG project to folder using name provided through Prompt

Posted in reply to CaseySmith

Thanks Casey, have gone with the read only option and split some of the steps requiring prompts so that the process of what to run flows better.

Super User
Posts: 7,761

Re: Code to 'save as' EG project to folder using name provided through Prompt

As others suggested, make the template read-only, and otherwise rely on your user's savy. After all, it's called Business Intelligence for a reason.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 4 replies
  • 203 views
  • 2 likes
  • 4 in conversation