Production Ready Macros for SAS Application Developers
mp_binarycopy.sas File Reference

Copy any file using binary input / output streams. More...

Go to the source code of this file.

Detailed Description

Reads in a file byte by byte and writes it back out. Is an os-independent method to copy files. In case of naming collision, the default filerefs can be modified. Based on http://stackoverflow.com/questions/13046116/using-sas-to-copy-a-text-file

%mp_binarycopy(inloc="/home/me/blah.txt", outref=_webout)
Parameters
inlocfull, quoted "path/and/filename.ext" of the object to be copied
outlocfull, quoted "path/and/filename.ext" of object to be created
inrefcan override default input fileref to avoid naming clash
outrefan override default output fileref to avoid naming clash
Returns
nothing
Version
9.2

Definition in file mp_binarycopy.sas.