Desktop productivity for business analysts and programmers

Stored Procedure creation using the EG SP wizard

Reply
New User
Posts: 1

Stored Procedure creation using the EG SP wizard

HI,

I am creating a stored procedure for the first time, and I am using the SP wizard. My SP is very simple, it just wants to open a SAS data set, using proc sql, and filter some of the records based on a particular field's value, and display the result. Right now, there are not any prompts designed in. I found a SAS Global Forum 2013 document on how to build an SP, and at a certain point it says to skip Step 5, the Data Sources and Targets page. If I do that, the summary page appears but the FINISH button is grayed out.

 

If I then go back to Step 5,  and click on NEW for the data sources, I get a page where I select the Data Table button. So

1 - what do I put for label and description

2 - more importantly what do I put for table parameter name (mandatory)?

3 - Do I need a data target output stream too? (is it mandatory?)

4 - so let's say this all works. My eventual objective is to allow a business user to launch a much bigger SAS program that will work with Teradata and generate a bunch of SAS data sets. If I want the user to look at 2 of these SAS data sets as feeder inputs (data extracted by the SP from a csv file) and 3 outputs (as SAS data sets), then I need to register each input or output data sets appropriately. Is that correct?

 

Thanks for any help

 

Her's the code:

LIBNAME MYLIB
        meta
        library = '/sas/data/578684/CI/QICS/input/p1dat' ;

proc sql ;
        create table temp as
                select *  from MYLIB.qics_level1_labeled_Jan31
                where tier = 'Gold'
        ;
quit ;
run ;
~       

dwaa

Respected Advisor
Posts: 3,063

Re: Stored Procedure creation using the EG SP wizard

In SAS they are called Stored Processes. A good place to start learning about these is the Developer's Guide:

 

http://support.sas.com/documentation/cdl/en/stpug/68399/HTML/default/viewer.htm#titlepage.htm

 

Super User
Posts: 1,098

Re: Stored Procedure creation using the EG SP wizard

Hello @dwaa,

 

as @SASKiwi indicated, please read the documentation if you have the chance, your questions are quite basic and general.

 

Let me give you some quick heads up, since I understand that a quick introduction might help. Very simple explained, a stored process is just a metadat object that can be called from almost everywhere in your SAS platform: EG, web applications, any sas code, and even can be created as web services if you have the SAS web server. This object will have many things in the definition, but the basics are just SAS code and some input/output parameters, if they are needed, but not necessary, because maybe you only need the code as with any SAS Base program.

 

Besides this quick introduction, the rest of the answers you will find them in the documentation. 

Ask a Question
Discussion stats
  • 2 replies
  • 123 views
  • 2 likes
  • 3 in conversation