Hi SAS Experts,
This poster was written to ask how to obtain result files that returned by a stored process when it was called from SAS code from another computer?
Assume StoredProcess_A is a web service on a server, which will generate a result file (for example a pdf file). When the STP is called from a webpage, it is quite easy to send the result to frontend for downloading by redirect the file contents to _webout.
However, I am not sure how to obtain the result file when the stored process is called from SAS code, such as by using PROC HTTP in EG on another computer?
I understand that one way to achieve the feature is to save the output file on the server, and then to download the save file from the client computer with the URL returned by the STP. However, this strategy is not allowed in my working environment.
I wonder is there any direct way to obtain the result file from the stored process when it was called from SAS code?
Any suggestions or examples are much appreciated!
Regard,
Zach
Will something like this give you what you need?
filename resp 'C:\temp\myoutput.pdf';
proc http url='http://server:port/SASStoredProcess/guest?_program=%2FProducts%2FSAS+Intelligence+Platform%2FSamples%2FSample%3A+Multiple+Output+Formats&dataset=SASHELP.CLASS&_odsdest=PDF&_odsstyle=HTMLBlue'
out=resp;
run; quit;
Vince DelGobbo
SAS R&D
Hi Vince,
Thank you very much for the help.
The strategy did work. When we publish a stored process, there a few URLs along with it and each of them have their different features as called. Eventual, I find the restful URL can be used to return results of any file types back to client at the background.
Thank you again for your kind help with the matters.
Regards,
Zach
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.