Macros for SAS Application Developers
https://github.com/sasjs/core
mp_streamfile.sas File Reference

Streams a file to _webout according to content type. More...

Go to the source code of this file.

Detailed Description

Will set headers using appropriate functions per the server type (Viya, EBI, SASjs Server) and stream content using mp_binarycopy().

Usage:

filename mc url
  "https://raw.githubusercontent.com/sasjs/core/main/all.sas";
%inc mc;

%mp_streamfile(contenttype=csv,inloc=/some/where.txt,outname=myfile.txt)
Parameters
[in]contenttype=(TEXT) Supported:
[in]inloc=/path/to/file.ext to be sent
[in]inref=fileref of file to be sent (if provided, overrides inloc)
[in]iftrue=(1=1) Provide a condition under which to execute.
[out]outname=the name of the file, as downloaded by the browser
[out]outref=(_webout) The destination where the file should be streamed.

SAS Macros

Author
Allan Bowe

Definition in file mp_streamfile.sas.