Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mv_createfile.sas 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.

Usage:

filename myfile temp;
data _null_;
  file myfile;
  put 'something';
run;
%mv_createfile(path=/Public/temp,name=newfile.txt,inref=myfile)
Parameters
[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 mp_binarycopy.sas macro.
  • BASE64 File will be first decoded using the mp_base64.sas 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
Version
VIYA V.03.05
Author
Allan Bowe, source: https://github.com/sasjs/core

SAS Macros

Definition in file mv_createfile.sas.