BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sajid01
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?

1 ACCEPTED SOLUTION

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

View solution in original post

7 REPLIES 7
Quentin
Super User

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 ".../myrprogram.sas"

 

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.

The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.
Sajid01
Meteorite | Level 14
Thanks Quentin.
Simple all in one server.
Code stored on the disk and not metadata.

AllanBowe
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:  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.

 

 

/Allan
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
Sajid01
Meteorite | Level 14
Thanks AllanBowe.
I also suspect that there is a cache of the code kept some where.
Quentin
Super User

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.  

The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.
Vince_SAS
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

SAS R&D

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

SAS Innovate 2025: Register Now

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!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 1483 views
  • 0 likes
  • 4 in conversation