We are running SAS 9.4 M6 on UNiX (RHEL 6).
We have a stored process that is run frequently.
Sometimes when we make a change to the code using the vi editor and save,
it is not reflected in the stored process results.
We have to request help from the SAS Admin.
SAS Admin exports and imports the stored process and it works.
Is this the default behavior or we doing some thing wrong?
Is it not possible to make the change take effect without exporting and importing the stored process from the Management Console?
Hard to say where the misunderstanding is happening without knowing more about your set up, but this is not the way it's supposed to work.
When you look at the stored process in SAS Management Console, and go to the execution tab, where does it say the source code is stored? Is it stored in metadata, or in a .sas file on the server?
I typically use source code stored in metadata, but the source code is just:
With that, I can edit myprogram.sas with any editor. I don't have to update the metadata. When the stored process runs, it runs the %include.
If SMC shows the source code location as being a .sas file on the server, you should be able to edit that file with any editor and see the changes immediately when you run the stored process.
The only time you should have to update the stored process itself is if you are storing the source code in metadata, and need to update that code.
I've seen this behaviour, also on unix, using Type 2 (code stored in metadata) although normally it would reset itself after a few seconds or a minute. I changed my deployment process to always remove and rebuild the STP instead, using the macros here: https://github.com/macropeople/macrocore/tree/master/meta
I would have to assume there's a cache (in SAS, not filesystem) of the code being kept somewhere.
Sounds scary to me. If you can replicate it, I'd pass it on to tech support.
I suppose it's possible they'll say "stop editing the source code with vi", but that would be a disappointing response. If we can't trust a SAS job to run the correct program, that sounds like a problem to me.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.