Macros for SAS Application Developers
No Matches File Reference

Creates an batch spk export command. More...

Go to the source code of this file.

Detailed Description

Creates a script that will export everything in a metadata folder to a specified location. If you have XCMD enabled, then you can use mmx_spkexport (which performs the actual export)

Note - the batch tools require a username and password. For security, these are expected to have been provided in a protected directory.


%* import the macros (or make them available some other way);
filename mc url
%inc mc;

%* create sample text file as input to the macro;
filename tmp temp;
data _null_;
  file tmp;
  put '%let mmxuser="sasdemo";';
  put '%let mmxpass="Mars321";';

filename myref "%sysfunc(pathname(work))/"

Alternatively, call without inputs to create a function style output

filename myref "/tmp/"

You can then navigate and execute as follows:

cd /tmp
./ "myuser" "mypass"

SAS Macros

[in]metaloc=the metadata folder to export
[in]secureref=fileref containing the username / password (should point to a file in a secure location). Leave blank to substitute $bash vars.
[in]excludevars=(0) A space seperated list of macro variable names, each of which contains a value that should be used to filter the output objects.
[out]outref=fileref to which to write the command
[out]cmdoutloc=(sysfunc(pathname(work))) The directory to which the command will write the SPK
[out]cmdoutname=(mmxport) The name of the spk / log files to create (will be identical just with .spk or .log extension)
Allan Bowe

Definition in file