07-17-2017 07:09 AM
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.
07-17-2017 07:15 AM
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:
07-17-2017 07:33 AM - edited 07-17-2017 07:34 AM
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.
07-17-2017 03:46 PM
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.
07-18-2017 12:19 PM
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.
07-19-2017 07:00 AM
07-19-2017 07:10 AM
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.
Does it help?