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

Increments a macro variable. More...

Go to the source code of this file.

Detailed Description

Useful outside of do-loops - will increment a macro variable every time it is called.

Example:

%let cnt=1;
%put We have run %mf_increment(cnt) lines;
%put Now we have run %mf_increment(cnt) lines;
%put There are %mf_increment(cnt) lines in total;
Parameters
[in]macro_nameThe name of the macro variable to increment
[in]incr=(1) The amount to add or subtract to the macro

Related Files

Definition in file mf_increment.sas.