Published on :
Macro CREATION_INTERNE

Versioned Autoexec Include Macro

This code is also available in: Deutsch Español Français
The `AHGautoe` macro constructs a full file path by concatenating a root directory (defined in the global macro variable `autodir`) and a version number passed as a parameter. It displays this path in the log and then executes the code contained in this file via the `%include` statement.
Data Analysis

Type : CREATION_INTERNE


The code only performs macro-level string manipulations and does not directly interact with data tables.

1 Code Block
MACRO
Explanation :
Definition of the local macro `file` to store the path, construction of the path with the `&autodir` variable and the `&ver` parameter, display of the path for debugging, and inclusion of the target file.
Copied!
1%macro AHGautoe(ver);
2 %local file;
3 %let file="&autodir\autoexec&ver..sas";
4 %put &file;
5 %include &file;
6%mend;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.