Posted by Shane Gibson on July 7, 2010
Struck a problem converting some Enterprise Guide projects from 4.1 (SAS 9.1.3) to 4.2 (SAS 9.2) around date prompts.
The EG projects have a large bunch of custom code nodes (so hate those!) and they are all running some macro’s that use a date prompt.
Of course they work fine in 4.1 but fail in 4.2.
Traced it to a change in the way date prompts work in eG 4.2 via this SAS Support note:
Problem Note 36581: Date and Datetime parameters might cause syntax errors after project migration to SAS® Enterprise Guide® 4.2
Followed the fix below and updated the date variable in the code from &date to “&date”d and the date is back on!
For example, in earlier versions of SAS Enterprise Guide, the correctly generated %LET statement might be %let datevar = '01jan2009'd;. However, after migrating projects to 4.2, the statement is incorrectly generated as %let datevar = 01jan2009;.
To circumvent the problem, open the query in 4.2 and edit the filter by adding quotes around the parameter. For example, use "&YourDateVar"d for dates, and "&YourDateTimeVar"dt for datetime parameters.
Posted by Shane Gibson on March 19, 2010
And following on with the theme of migrating SAS formats …..
SAS Support article here:
http://support.sas.com/kb/22/194.html
Outlines how to migrate formats across SAS systems.
Basically you just:
1) Export the formats to a transport file by using the follwing code:
libname library 'location-of-existing-formats-catalog';
libname trans xport 'transport-file-name';
proc format library=library cntlout=trans.cntlfmt;
2) Import the formats from the transport file using the following code:
libname library 'output-library-for-format-storage';
libname trans xport 'transport-file-name-from-sending-site';
proc format library=library cntlin=trans.cntlfmt;
This is of course assuming you don’t have the code that originally created teh formats, because you could just run that instead. But bet you dont as you have just searched for something that made you find this blog post
Posted by Shane Gibson on March 19, 2010
Following on from my post about needing to migrate Formats for EM projects to successfully migrate, I found a post in a SAS forum that helped me easily find the current format paths on the old SAS 9.1 and new SAS 9.2 servers here (Chris from SAS helping people yet again!)
Basically you just go:
PROC OPTIONS OPTION=FMTSEARCH;
And the format paths will be listed.
In addition Chris also mentioned:
“Next, EG maintains a cached list of formats that it gathers from the SAS server. To make sure that your new format has a chance to be detected, go to Tools->Options->Data: Data General, and look at the “SAS Formats/Informats Cache”. If the button is enabled, click “Clear cache”. It will be enabled only if you have already used EG to browse the list of available formats during the current EG session.”
Another EG button I didn’t know existed!
Posted by Shane Gibson on March 18, 2010
If you are manually migrating EM models from SAS 9.1 to SAS 9.2 then it is a relatively easy task.
The process is:
- Copy the entire EM project structure to the new server (assuming you are going from like platform, i.e windows to like platform, i.e windows)
- In EM 6.1 create a new project and call it the same name as the one you copied and give it the same path
- When it tells you it already exists the accept the warning.
Wallah your EM project is now in SAS 9.2 / EM 6.1
(Warning you can;t send it back to EM 5.1)
I did strike a few gotach’s:
- I hadn’t migrated the SAS formats that the tables in EM model were using, so it didn’t import the tables, but also didn’t give me an error, they just didn’t show up. Once i migrated the formats, it was fine (had to recopy the EM project files though)
- I got some horrendous SCL error when opening the Diagrams, so ended up deleting them, exporting them as xml objects in EM 5.1 and then importing them as new diagrams in EM 6.1