Macros for SAS Application Developers
No Matches File Reference

Creates a file in SAS Drive. More...

Go to the source code of this file.

Detailed Description

Creates a file in SAS Drive and adds the appropriate content type. If the parent folder does not exist, it is created.


filename myfile temp;
data _null_;
  file myfile;
  put 'something';
[in]path=The parent folder in which to create the file
[in]name=The name of the file to be created
[in]inref=The fileref pointing to the file to be uploaded
[in]intype=(BINARY) The type of the input data. Valid values:
  • BINARY File is copied byte for byte using the macro.
  • BASE64 File will be first decoded using the macro, then loaded byte by byte to SAS Drive.
[in]contentdisp=(inline) Content Disposition. Example values:
  • inline
  • attachment
[in]ctype=(0) Set a default HTTP Content-Type header to be returned with the file when the content is retrieved from the Files service.
[in]access_token_var=The global macro variable to contain the access token, if using authorization_code grant type.
[in]grant_type=(sas_services) Valid values are:
  • password
  • authorization_code
  • sas_services
[in]mdebug=(0) Set to 1 to enable DEBUG messages
VIYA V.03.05
Allan Bowe, source:

SAS Macros

Definition in file