Your SAS programs, embedded in web apps and elsewhere

retrieve and view permanent package

Reply
N/A
Posts: 0

retrieve and view permanent package

I have a stored process that creates a permanent package containing tabular and graphic content (print and gplot output) in an archive location (not webDAV). Is there a simple way to retrieve the package and add the contents to streamed output as part of a second stored process run from the stored process web application?

I do not have the full intelligence platform only integration technologies.

Thanks very much!
SAS Super FREQ
Posts: 304

Re: retrieve and view permanent package

Posted in reply to deleted_user
Your second stored process could use the Publishing Framework (part of SAS Integration Technologies) to retrieve the package. I don't know how "simple" it is, but here is a starting point:

http://support.sas.com/documentation/cdl/en/publishdg/61497/HTML/default/pkgintf.htm

Is it a requirement to create package output in the first stored process? It might be easier to write the original files to a directory under the control of a Web server, then point to them later.

Vince DelGobbo
SAS R&D
N/A
Posts: 0

Re: retrieve and view permanent package

Posted in reply to Vince_SAS
We have a reverse proxy in place for /SASStoredProcess/ and, for security reasons, no ability to put files (for frames, imbedded images, etc.) on the primary web server.
SAS Super FREQ
Posts: 304

Re: retrieve and view permanent package

Posted in reply to deleted_user
Others who have been in similar situations have made use of the FILESRV program:

http://support.sas.com/rnd/web/intrnet/filesrv/filesrv.html

The first program writes files to a directory on the server, and then when needed, you run a program that uses FILESRV to serve the file. This is especially helpful for serving image files. You will need to use the AUTHDSN argument to point to a SAS dataset that specifies which directories authorized.

Vince DelGobbo
SAS R&D
N/A
Posts: 0

Re: retrieve and view permanent package

Posted in reply to Vince_SAS
FILESRV is almost working. However, and I apologize for extending this a bit off topic, I cannot get the image files to return to the browser correctly. Trying gif and png, both return as base64 code and not images. I have tried adding 'Content-disposition: inline' and 'Content-Transfer-Encoding: base64', but neither fix the issue.

Thanks very much
SAS Super FREQ
Posts: 304

Re: retrieve and view permanent package

Posted in reply to deleted_user
I don't know where the BASE64 encoding is happening; I don't think FILESRV does that. In the headers dataset SASHELP.FSHEAD, you should see the following:
[pre]
ext datatype filetype
gif b e
jpeg b e
jpg b e
[/pre]

Running this code should open _WEBOUT in binary mode, and copy the file "some-path/some-name.jpg" to _WEBOUT:
[pre]
%filesrv(file=some-path/some-name.jpg,
filetyp=e,
authdsn=your-authorization-data-set);
[/pre]

Vince DelGobbo
SAS R&D
Ask a Question
Discussion stats
  • 5 replies
  • 276 views
  • 0 likes
  • 2 in conversation