BookmarkSubscribeRSS Feed
dwaa
Calcite | Level 5

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

2 REPLIES 2
SASKiwi
PROC Star

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

 

JuanS_OCS
Amethyst | Level 16

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. 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 715 views
  • 2 likes
  • 3 in conversation