Is there a easy method to copy Stored Process in SAS?

371 Views Asked by At

I am creating 40+ Stored Processes in SAS EG (Programs already written) and I am creating Stored Processes so that end users can run them without my intervention.

Its a sloooow progress! Each SP has to be created individually. The SPs are generally all the same with a few differences (eg. program name)

Is there a copy paste or similar I can use to speed up the creation process?

3

There are 3 best solutions below

4
On

Are you using management console?

If so,

  • In detail pane
    • Select one or more STP
    • Right click and choose copy.
  • In folder pane
    • Right click and choose paste (can be the same folder)
    • If same folder, the new copies will get a (#) suffix added but have the same properties.
  • In detail pane
    • Change properties
    • Rename to what you what
    • Change Execution property to appropriate program (already written)
    • Save

You might need to right click the folder and choose Select if the new entries (copies of STP) are not automatically shown.

1
On

Yes i have the same issue, but the thing i do is to copy the whole sascode and paste it in new stored process and make the small changes like table name … etc, and create the inputs then finish

0
On

Using SAS you could make use of the following macros:

But you would be much better off keeping your source code in a GIT repository and compiling / deploying your STPs as part of a release process. By doing this you can then also easily migrate your STPs to Viya (or SASjs Server).

We built a CLI tool to enable this: https://cli.sasjs.io