Published on :
Macro CREATION_INTERNE

Initialize variables and clean up for batch comparison

This code is also available in: Deutsch Español Français
Attention : This code requires administrator privileges.
The %AHGinitdiffbatch macro defines the global variables 'batchcompare', 'strold', and 'strnew'. It then performs preventive cleanup by deleting specific temporary files (*.old.sas© and *.new.sas©) in the ~/temp/ directory via shell commands encapsulated in the %AHGrpipe macro.
Data Analysis

Type : CREATION_INTERNE


The script does not manipulate analytical data but initializes macro variables and manages system files.

1 Code Block
MACRO
Explanation :
Macro definition. Declaration of global comparison variables. Execution of system commands via %AHGrpipe to check for existence and delete previous .old.sas and .new.sas files associated with the protocol (&prot).
Copied!
1%macro AHGinitdiffbatch;
2 %global batchcompare strold strnew;
3 %let batchcompare=1;
4 %let strold=;
5 %let strnew=;
6 /* Nettoyage des fichiers temporaires */
7 %AHGrpipe(%str(test -e ~/temp/&prot..old.sas %nrstr(&&) rm -f ~/temp/&prot..old.sas),q);
8 %AHGrpipe(%str(test -e ~/temp/&prot..new.sas %nrstr(&&) rm -f ~/temp/&prot..new.sas),q);
9%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.