BookmarkSubscribeRSS Feed
Mushy
Quartz | Level 8

Hello,

 

In SAS Stored process the prompts pop up first and then the sas code executes based on the filter selection.

Is there a way where I could pre-execute the code  in SAS Stored process .

I need to ensure that the promts get the latest updated information which will be provided by the pre code I am referring to.

 

 

Thanks

Mushy

10 REPLIES 10
Mushy
Quartz | Level 8

Hi Chris,

 

Thanks for responding.

In fact my question is , when the dynamic promts use a dataset and we want to update the dataset in the same stored process,

is it possible to first update the dataset in the stored process so that when we open the stored process we get the updated information in the dynamic promt.

 

Thanks,

Mushy

JuanS_OCS
Azurite | Level 17

Indeed, either a second stored process or a SAS/Connect execution. Anyways, a separate SAS process.

Mushy
Quartz | Level 8

Hello Kurt,

 

Could you help me on how I could call a stored process from another stored process via EG?

I need ro first create the dataset and need to use that in the promp of another stored process.

 

Thanks,

Mushy

 

Mushy
Quartz | Level 8

@Kurt_Bremser 

Hello Kurt,

 

Could you help me on how I could call a stored process from another stored process via EG?

I need ro first create the dataset and need to use that in the promp of another stored process.

 

Thanks,

Mushy

 

Kurt_Bremser
Super User

You should be able to chain STP's as part of an Enterprise Guide project, IIRC.

But you may be entering the realm of building web applications with STP's here. You have a STP creating a HTML form, from which you then call other STP's (or the same STP to update the form).

AlanC
Barite | Level 11

Take control of the whole thing with a custom task. If you want power in SAS EG, custom tasks are your best bet. They aren't too hard to do. Focus on a simple Hello World to get started and work up from there. 

 

See these:

 

https://support.sas.com/documentation/onlinedoc/guide/customtasks/

https://blogs.sas.com/content/sasdummy/2015/06/11/creating-custom-tasks-for-sas-enterprise-guide-exp...

 

https://github.com/savian-net
Quentin
Super User

Not sure this will work, but if the pre-process code could be a single DATA step, then it might be possible to use a DATA step VIEW (https://documentation.sas.com/doc/en/lrcon/9.4/n07vq6hmss6f67n1vhnnn5cw0chh.htm) to calculate the values.  And then register that view in metadata and use it as the source for your dynamic prompt.  Views are dynamic, the code executes when the view is referenced.  I've never tried using a view as a source for a stored process prompt, but it might work. Assuming it's possible to register a view as metadata object.

macrobo
Fluorite | Level 6

Hello Mushy,

perhaps this Blog Entry can help you: https://blogs.sas.com/content/sgf/2017/07/28/controlling-stored-process-execution-through-request-in...

 

It describes how to request a code injection during the STP initialisation.

 

Regards,

Robert

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 10 replies
  • 2130 views
  • 5 likes
  • 7 in conversation