Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mp_appendfile.sas File Reference

Append (concatenate) two or more files. More...

Go to the source code of this file.

Detailed Description

Will append one more more appendrefs (filerefs) to a baseref. Uses a binary mechanism, so will work with any file type. For that reason - use with care! And supply your own trailing carriage returns in each file..

Usage:

  filename tmp1 temp;
  filename tmp2 temp;
  filename tmp3 temp;
  data _null_; file tmp1; put 'base file';
  data _null_; file tmp2; put 'append1';
  data _null_; file tmp3; put 'append2';
  run;
  %mp_appendfile(baseref=tmp1, appendrefs=tmp2 tmp3)
Parameters
[in]baseref=(0) Fileref of the base file (should exist)
[in]appendrefs=(0) One or more filerefs to be appended to the base fileref. Space separated.
Version
9.2
Author
Allan Bowe, source: https://github.com/sasjs/core

SAS Macros

Definition in file mp_appendfile.sas.