Write and run SAS programs in your web browser

Creating stored process in SAS Studio 3.5

Reply
Contributor L_R
Contributor
Posts: 24

Creating stored process in SAS Studio 3.5

Hi,

 

I am trying to create a stored process from sas studio. But i do not see any option to create a stored process. Could someone help me with this.

 

Thank you

Trix
Super User
Posts: 5,256

Re: Creating stored process in SAS Studio 3.5

Actually, I don't think that feature is availble in SAS Studio ...(yet, I hope)

Data never sleeps
SAS Super FREQ
Posts: 8,743

Re: Creating stored process in SAS Studio 3.5

Hi, well, you could, if you wanted to do all the typing yourself, create the stored process manually, but to register the stored process in the metadata, you'd have to use either Enterprise Guide or SAS Management Console and then to test the stored process, you'd need to use either Enterprise Guide or one of the SAS Platform client applications (like Word or PPT) or another app like Web Report Studio or the Information Delivery Portal.

There's not a Stored Process Wizard in SAS Studio, so right now, I don't thing that SAS Studio has anything to offer above and beyond what you can get from Notepad for typing code.

Supposedly, stored processes with SAS Studio are on the way or being considered, but I do not thin they are here yet.

cynthia
SAS Employee
Posts: 146

Re: Creating stored process in SAS Studio 3.5

As the others have said, there's no stored process creation mechanism in SAS Studio beyond your abillity to get your SAS code tested - registration in metadata has to be done elsewhere.  What we've been focusing on is integrating stored processes & Studio tasks since the functionality is similiar.  

 

There is hidden experimental functionality starting in SAS Studio 3.3 which allows users of the enterprise edition to access their stored processes in a SAS Folders tree in Studio and run them as tasks. To enable this functionality, the administrator must alter the config properties file to turn on experimental features (webdms.showExperimentalFeatures=true) then the user can go to Preferences -> Tasks and turn it on by checking "Enable Stored Process Adapter (Experimental)." This preference does not appear if the config file has not been altered. Once enabled, you can drag a stored process from the SAS Folders tree and it will open as a SAS Studio task. The code generated by the task uses PROC STP to run the stored process. Not all types of stored process prompts are supported. The main important omissions right now are dynamic prompts & date handlers.


The Studio and stored process R&D teams are looking for feedback on this feature in general and specifically on what important prompt types are still missing. So if you have a chance to give it a try, please let us know your thoughts.

Contributor L_R
Contributor
Posts: 24

Re: Creating stored process in SAS Studio 3.5

Hi Amy,

 

Thanks for the information. I would like to try out this. Where is the config property file located and what is the name of the file?

 

Thank you

Trix
SAS Employee
Posts: 146

Re: Creating stored process in SAS Studio 3.5

Take a look at the admin guide - http://support.sas.com/documentation/cdl/en/webeditorag/69506/HTML/default/viewer.htm#p0fecekwkd0dx3... - that should help you find what you need (and you might have to ask the person who did the installation if it wasn't something you were involved with).

Contributor L_R
Contributor
Posts: 24

Re: Creating stored process in SAS Studio 3.5

Thanks Amy. I have turned on the feature. i will test it on this weekend and will update you by Monday.

 

Thank you

Trix
Contributor L_R
Contributor
Posts: 24

Re: Creating stored process in SAS Studio 3.5

Hi Amy,

 

Is there any other experiemental feature available?

Trix
Contributor L_R
Contributor
Posts: 24

Re: Creating stored process in SAS Studio 3.5

Hi Amy,

 

Testing stored process:

 

i ran the sample stored process. i got the following errors:

 

Testing stored process in sas studio:

Findings:

Not able to edit the code or save it

The sample stored process was run and received the following errors

WARNING: Remote execution of a SAS 9.2 stored process is not supported.

 NOTE: The stored process will execute locally.

 NOTE: PROC_STP: ====== Proc STP Execution Starting ======

 NOTE: PROC_STP: ====== Stored Process:  /Products/SAS Intelligence Platform/Samples/Sample: Shoe Sales by Region ======

 65 +  if first.region then rnumber + 1; 66 + 67 +  file = "region"     || trim(left(put(rnumber, 4.0))) || ".html"; 68 + 69 +  href  = 'href="'   || &_replay || trim(file) || '"'; 69 +  href  = 'href="'   || &_replay || trim(file) || '"';                                       --                                       22 ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant, a missing value, INPUT, PUT.   WARNING: The data set WORK.SHOES may be incomplete. When this step was stopped there were 0 observations and 10 variables. WARNING: RUN statement ignored due to previous errors. Submit QUIT; to terminate the procedure. 112 +%STPBEGIN; 112   body=region1.html newfile=table       ----  -------       22    22        ----        202 ERROR 22-322: Syntax error, expecting one of the following: ;, CAT, CATALOG, CLOSE, DIR, NAME.   ERROR 202-322: The option or parameter is not recognized and will be ignored.  112   body=region1.html newfile=table            -------            76 ERROR 76-322: Syntax error, statement will be ignored.  

 

What all the things have to be changed or takend into consideration before running the stored process in sas studio?

 

Thank  you

Trix
SAS Employee
Posts: 146

Re: Creating stored process in SAS Studio 3.5

Thanks for giving it a try & sorry for the bad first experience.  Studio makes use of PROC STP to run the stored process so when you have a stored process that has syntax PROC STP can't handle, it will fail.  Some of the sample stored processes have syntax in the SAS code that was written for the stored process server instead - for example, some samples were written to be output to a browser or have hooks that are recognized by the STP Web App and other clients. The PROC STP environment doesn’t know about those hooks and so the stored process will fail.  Here's a list the stored process testing folks made of the common samples and their status:

  • Macro Variable Properties – works
  • Multiple Output Formats – works
  • Frequency Analysis – works
  • Cholesterol by Sex and Age – works
  • Shoe Sales By Region – fails because replay is not supported. However if you remove the href references then the code works fine.
  • Year to date budget – fails because no access to preassigned library
  • Shoe Sales Graphics – fails, it doesn’t handle STREAMCONTENTS
  • Hello World – fails because it does not produce ODSDOC output. Editing the proc stp code to handle _webout allows this to work.
  • European Demographic Data – fails, no access to preassigned library
  • European Demographic Data Detail – fails, no access to preassigned library

If you're game to keep trying, we're still looking for what functionality you commonly use in stored processes that you'd want to see working in Studio.  We won't be able to completely recreate this wheel, but we want to get in as much commonly used functionality as we can before this can be marked production.

 

And to answser your earlier question, there's no other experimental functionality hiding out there (so far).

Contributor L_R
Contributor
Posts: 24

Re: Creating stored process in SAS Studio 3.5

Thank you Amy for the detail explanation.

 

We are mainly looking to create REST webservices using SAS Studio. Hoping for the feature to be available soon Smiley Happy

 

Will keep you posted on how our experiment goes.

 

Thank you

Trix
Ask a Question
Discussion stats
  • 10 replies
  • 810 views
  • 5 likes
  • 4 in conversation