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:
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...
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
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
Anybody want to walk through an example with this? I've tried for 20 hours and cannot send a stored process a file.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.