Hi Community
I don't know if this question belongs in this community or in administration, so please forgive me if I have choosen the wrong place.
After updating to EG 8.2 we get complaints from users, because their projects fail with "invalid SAS name" errors. It turns out that the previous version had the option ValidMemName=Extended set by default, and many users have spaces, national characters etc. in their data set names.
We don't want to enable extended names again, but we would like to spare our users from the tedious work of changing all existing projects. So I am looking for a way to identify and change names in EG projects. It wouldn't be difficult to write a program to identify and change names in DI Studio metadata and rename the disk files as well, but I have no idea of how to do it in EG projects. Is it possible?
First, check that Tools->Project Maintenance won't do what you need. That tool can rename libraries and servers in a project, but I'm not sure that it can do individual data sets. If it does, you can use the Migration Wizard (included in the install path with SEGuide.exe) to do the renaming in batch across many project files.
If you get desperate... It's a poorly kept secret that EGP files are zip compressed files with a Project.XML (which defines project contents and structure) and file assets like code, results, logs, etc. Some customers have had success by cracking this open with a zip tool and modifying the XML. This is not an approach that SAS documents/supports/sanctions, and if you go down this path you should make backup copies of all EGP files you touch.
First, check that Tools->Project Maintenance won't do what you need. That tool can rename libraries and servers in a project, but I'm not sure that it can do individual data sets. If it does, you can use the Migration Wizard (included in the install path with SEGuide.exe) to do the renaming in batch across many project files.
If you get desperate... It's a poorly kept secret that EGP files are zip compressed files with a Project.XML (which defines project contents and structure) and file assets like code, results, logs, etc. Some customers have had success by cracking this open with a zip tool and modifying the XML. This is not an approach that SAS documents/supports/sanctions, and if you go down this path you should make backup copies of all EGP files you touch.
Your Idea worked very well up to the final test. I modified an existing scanning program to identify macro calls and macro definitions in our batch jobs, and that part worked fine. But EG couldn't open my test project after rezipping and renaming. It found errors in the file format.
I have only tried with the native zip engine in windows 10, so every hope isn't lost. I accept your solution because I find your idea really worth crediting, even if it didn't work in first try. Thanks.
Hi @Tom and @ChrisHemedinger
Thanks for input.
An easy solution would be to make users aware of the possibility to change local settings, But we want to prevent the use of extended names. In some cases data sets from EG projects are written to libraries defined in DI Studio to used as input in batch jobs, and data sets with extended names are not visible, i.e. cannot be registered as tables in DI Studio, even if they exist in the physical directory. So we want to get rid of of them.
The unzip-change-rezip idea looks promising. I think that if a user runs a project that fails, and then saves the project, the log with errors will be saved in the zip file also, and it could be used as a starting point to identify the names which should be changed in the SAS code file. I am not sure if table names are kept in other places in the zip folder structure also, but it is definitely worth a try.
I will let you know it it works.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.