Desktop productivity for business analysts and programmers

Stored Procedure creation using the EG SP wizard

New User
Posts: 1

Stored Procedure creation using the EG SP wizard


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:

        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 ;


Super User
Posts: 4,025

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:


Trusted Advisor
Posts: 1,852

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
  • 3 in conversation