Your SAS programs, embedded in web apps and elsewhere

Export and import metadata for all stored processes

Reply
Occasional Contributor AMK
Occasional Contributor
Posts: 5

Export and import metadata for all stored processes

Hi,

 

we are moving from SAS 9.1 to SAS 9.4, on new hardware and I have been manually recreating stored processes in the new environment based on the code etc. from the old environment, however it is very slow and boring and I'm thinking there has to be an easier way!

 

Is it possible to export the metadata for all the stored processes in our old environment in such a way that I can then tweak the metadata so that it will work in our new environment and then import the metadata into our new environment?

 

I saw on the sas support site that there is some java tool that can do it, but there's no mention of a name for it or where to find it, so I am stumped.

 

Thanks,

Adrian.

Occasional Contributor
Posts: 6

Re: Export and import metadata for all stored processes

Hi Adrian,

 

You can export the required stored process as a package (.spk) from your old environment and copy into some media. And then import the package (.spk) into new environment.

 

Hope the below scenario will help you:

 

http://support.sas.com/documentation/cdl/en/bisag/68240/HTML/default/viewer.htm#p1k1twndkw9je7n1sq3y...

 

Occasional Contributor AMK
Occasional Contributor
Posts: 5

Re: Export and import metadata for all stored processes

[ Edited ]

Thanks sandykota, however I don't think the "Folder" structure mentioned in that documentation exists in the Management Console in SAS 9.1, so I can't make a package to export.

 

 

 

 

Contributor
Posts: 39

Re: Export and import metadata for all stored processes

Hello Amk, 

 

What sort of changes are you planning to make to the metadata? This is important, as not all changes are supported by the tools I am about to discribe. 

 

You might have SASObjectFramework installed on your PC or the server. Look for it in your SASHome folder. The rule of thumb, is you have SMC or SASDI installed, you will have SASPlatformObjectFramework too. It should be something like: "C:\Program Files\SASHome\SASPlatformObjectFramework\9.4" 

 

There are two tools that you need: 

* ExportPackage.exe - this tool has all the functionality of your SMC package tool. You need to provide to it a list of objects, the profile name, package name and the object type, the tool will do the rest. To see full list of commands and examples, just launch the exe file in CMD without any parameters, it will output the command line help for you. 

* ImportPackage.exe - this tool is the reverse of the above, it imports the package while taking into account the substitution file (text file describing what changes you want to be made to the mappings). Via a command line you need to specify the connection profile, package name and destination in SAS Folders. 

* sas-list-objects.exe - this tool allows to to export out the full list of all of SAS metadata objects based on a search criteria. Really useful to generate a list of objects to be inputed into ExportPackage.exe You will find this tool in "tools" in the root folder for your SASPlatformObjectFramework. 

 

This tools sometimes isn't that easy to use, post in here the challenges you will find and I will help you to overcome them. 

 

Regards,

Vasilij

=======================================
For more information about {An}alytium, visit https://www.analytium.co.uk
Occasional Contributor AMK
Occasional Contributor
Posts: 5

Re: Export and import metadata for all stored processes

Hi Vasilij,

 

thanks for your suggestions and offer of help, however I cannot see those executables in SAS 9.1 and from talking with Tech support in parallel, it looks like it's not possible to migrate directly from 9.1 to 9.4. Instead we would need to migrate to 9.2 first and from there to 9.4, but obviously we don't have an install of 9.2, so we cannot do that.

 

I have asked Tech Support if it's possible to take one of the stored processes I have set up in 9.4 and to use it (somehow) as a template. The only thing that changes on our stored processes is the name, URL and .sas file, so if I can figure out what needs to be changed in the template, I should be able to script the migration of the last 200 stored processes.

 

Thanks,

Adrian.

 

Contributor
Posts: 39

Re: Export and import metadata for all stored processes

Hello Amk,

Are you able to manually export all 200 STPs as one SPK? Or that where the problem is?
If you export STP from your environment, what happens when you import that package into 9.4? It should offer you a mapping screen where you can udpate the parameters that you want.

Let me know. We can figure this out.

Regards,
Vasilij
=======================================
For more information about {An}alytium, visit https://www.analytium.co.uk
Trusted Advisor
Posts: 1,141

Re: Export and import metadata for all stored processes

Hello @AMK,

 

if you are moving from 9.1 to 9.4, the best option you have is to migrate your environment in 2 stages, from 9.1 to 9.3 and from 9.4 to 9.4, instead of manual promotion. As you said, the re are no proper tools otherwise. As you said as well, metadata structure changed, tools changed...

 

Please give a look to thos Paper, it explains the process: http://support.sas.com/resources/papers/proceedings15/SAS1801-2015.pdf

 

About the tool you mention, is the SMU tool, the SAS migration utility. it comes with every SAS depot now, but in the SAS 9,4 depot there is no tool to migrate from SAS 9.1, that is why the migration in 2 steps.

 

http://support.sas.com/rnd/migration/utility/index.html

http://support.sas.com/documentation/cdl/en/bisag/68240/HTML/default/viewer.htm#p04l8c3fo8tpyhn103dp...


Does it help?

 

Kind regards,

 

Juan

 

Ask a Question
Discussion stats
  • 6 replies
  • 270 views
  • 3 likes
  • 4 in conversation