BookmarkSubscribeRSS Feed
ScottBass
Rhodochrosite | Level 12

SAS 9.3

Summary:

Does anyone have any examples of using the Data Targets option for a Stored Process?  I have no idea what it does, how to configure it, or whether I'd want to use it.  I'm creating the STP using EG, and calling the STP from AMO (Excel), so I have an input stream.

Details:

I looked here:

http://support.sas.com/documentation/cdl/en/stpug/62758/PDF/default/stpug.pdf and searched on "target" (36 hits).  The only hit that came close was:

8 Click Next in the New Stored Process Wizard if you have data sources or data

targets to define. Otherwise, click Finish.

I propose that this text, in the main Stored Process documentation, is a bit "sparse" and light on the details.

So I looked here:

http://support.sas.com/resources/papers/proceedings11/050-2011.pdf and searched on "target" (4 hits).  The only hit that came close was:

  1. Data sources are used to stream data between the clients. Currently SAS Enterprise Guide 4.3 does not support the

execution of stored processes with data sources.  However, it will enable you to configure them. In the "Additional

Topics" section of this paper, data sources are used to stream data from an Excel spreadsheet into a stored process.

For this example, however, leave the Data Sources and Data Targets fields blank.

There was nothing relevant in the "Additional Topics" section.

I checked the EG help, section "Defining the data sources to use as input and specifying the data targets for output", but it's a combined input/output help, and doesn't go into detail for creating a data target.  For example:

4.  In the Table parameter name box, specify the macro name of the SAS table. The macro variables are prefixed with "_SOURCE" or "_TARGET," and the value of the macro variable is the name of the template. This field is required. 

5.  (Optional) Specify the name of the table to use as a template.

So, I don't know the macro variable name to use, only that there is some macro variable(s) prefixed with _SOURCE or _TARGET, the value of the macro variable is the name of the template, and the template field is optional!

I think the EG help would be better if it had separate, discrete sections for Data Source and Data Targets, with a greater detail of explanation.

If any little birdies are listening, can you revisit this section of your documentation?

In the meantime, if anyone has defined a data target within a stored process, can you fill me in?

Thanks...


Please post your question as a self-contained data step in the form of "have" (source) and "want" (desired results).
I won't contribute to your post if I can't cut-and-paste your syntactically correct code into SAS.
3 REPLIES 3
PaulHomes
Rhodochrosite | Level 12

Hi Scott,

Data sources and targets can be used for passing data into, and receiving data back from, stored processes deployed as web services.

For an example have a look at the following (and surrounding) sections from SAS Data Integration Studio 4.6: User's Guide:

You might also want to look at the SAS 9.3 BI Web Services: Developer's Guide.

Imagine 3rd party applications (Java, .NET etc.), using Web Service standards, passing data (via XML streams) into a SAS stored process for processing and analysis, then getting back data for display in that application.

Cheers

Paul

AngelaHall
SAS Employee

Hi Scott!

Tricia and I have an example in our 'The 50 Keys to Learning SAS Stored Processes" of using the Data Targets so that an excel spreadsheet can be forwarded into the Stored Process to run custom code. (via SAS Add-in to MS Office)

Also, new in 9.3 is Proc STP. The data targets definitions in metadata are used directly by SAS to generate the correct Proc STP statements. We have an example of that in the book as well.

Hope you find other interesting uses for it!

Angela

TedP
Obsidian | Level 7

Anybody want to walk through an example with this? I've tried for 20 hours and cannot send a stored process a file.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 3165 views
  • 1 like
  • 4 in conversation