BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Meteorite | Level 14

Hello All
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?


Accepted Solutions
Meteorite | Level 14
Thanks AllanBowe.
I also suspect that there is a cache of the code kept some where.

View solution in original post


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:

%include ".../"


With that, I can edit 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.

Check out the Boston Area SAS Users Group (BASUG) video archives:
Meteorite | Level 14
Thanks Quentin.
Simple all in one server.
Code stored on the disk and not metadata.

Barite | Level 11

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:


I would have to assume there's a cache (in SAS, not filesystem) of the code being kept somewhere.



SAS Challenges - SASensei
MacroCore library for app developers
SAS networking events (BeLux, Germany, UK&I)

Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs
Meteorite | Level 14
Thanks AllanBowe.
I also suspect that there is a cache of the code kept some where.

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.  

Check out the Boston Area SAS Users Group (BASUG) video archives:
Rhodochrosite | Level 12

Can you provide detailed information about the steps that you take to execute the stored process when the problem occurs?


Vince DelGobbo


Meteorite | Level 14
Next time when we do it, will document and update.



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. 

Register now!

How to Concatenate Values

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.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 4 in conversation