Your SAS programs, embedded in web apps and elsewhere

Stored process that outputs a data set?

Reply
Contributor
Posts: 53

Stored process that outputs a data set?

I have a stored process that performs commonly used business logic.  I'd like this stored process to output a data set, not a report.  Ideally if it were run in Enterprise Guide it would show a dataset coming out of it that could be used in subsequent steps.  Is there any way to do this?

Contributor
Posts: 40

Stored process that outputs a data set?

Frank

I have an example of how to do this kind of stored process in my Biz Intel Blog.  Here's the post:

http://www.bi-notes.com/2011/11/sas-stored-process-outputs-data-without-a-report/

Hope this helps,

Tricia

New Contributor
Posts: 2

Re: Stored process that outputs a data set?

Tricia,

Apparently this seems to work only if the target library is pre-assigned(sashelp etc.). Is there any way that we can make this work with the Work Library?

Occasional Contributor
Posts: 18

Re: Stored process that outputs a data set?

I'm not sure what you asking - is it about using the Data Library prompt or about not outputting a dataset?

New Contributor
Posts: 2

Re: Stored process that outputs a data set?

Tricia,

I am trying to create an output from the stored process, I have noticed that the output dataset appears as a step in the Enterprise guide project only if the it is created into a preassigned library.

However my dataset has more than one million rows, and I do not want that to be be created in a permanent library. Is there a way to  make the datset appear as a step in the project without writing it to a permanent library.

Thanks

Occasional Contributor
Posts: 18

Re: Stored process that outputs a data set?

Not that I know of. 

Super Contributor
Posts: 265

Re: Stored process that outputs a data set?

Writing to the work-library of another sas session is not possible - unless the server configuration lacks a proper configuration of write-access to the location in which then directories for the work-libraries are created.

Regular Contributor
Regular Contributor
Posts: 166

Re: Stored process that outputs a data set?

Hi i dont think it is necessary to have preassigned libraries. you can always define a libref in your code with a libname statement and use the same.

However it is always good to have preassigned libraries as shown by Tricia so that user restrictions/security are honoured by the stored process.

New Contributor trt
New Contributor
Posts: 4

Re: Stored process that outputs a data set?

Just to have it in the air within this discussion.

 

You can also use the Stored Process sessions (http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/sesssamp.html). A macro variable (_sessionid) you need to pass through your pages (as a GET parameter). All pages which have the same _sessionid can share the libref called SAVE, and all datasets created in it. This library is temporary, as session expires after (by default) 15 minutes.

 

If any of the SAS experts are there to correct me, please do.

Ask a Question
Discussion stats
  • 8 replies
  • 1331 views
  • 0 likes
  • 7 in conversation