BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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!
5 REPLIES 5
Vince_SAS
Rhodochrosite | Level 12
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
deleted_user
Not applicable
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.
Vince_SAS
Rhodochrosite | Level 12
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
deleted_user
Not applicable
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
Vince_SAS
Rhodochrosite | Level 12
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

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
  • 5 replies
  • 908 views
  • 0 likes
  • 2 in conversation