Published on :
Macro CREATION_INTERNE

Utility Macro for Interacting with an External System (RCS)

This code is also available in: Deutsch Español Français
Attention : This code requires administrator privileges.
The code is a SAS© macro-program named `AHGmodtot`. The detailed comment header, using RCS (Revision Control System) keywords like `$Source$` and `$Revision$`, indicates that the file is managed by a version control system. The macro itself iterates through a list of names provided in the `tots` parameter. For each name, it constructs a command string for an external script `modrcstot`, likely related to RCS. The macro depends on several other undefined macros (`%AHGcount`, `%AHGblank`, `%AHGpm`, `%AHGsubmitRcommand`) and an environment variable or global macro `&root3` to function correctly. The execution of external commands makes it an administrative or utility type script.
Data Analysis

Type : CREATION_INTERNE


The macro does not manipulate any SAS data tables. Its role is to generate character strings to execute external commands. It neither reads nor creates datasets.

1 Code Block
MACRO
Explanation :
This block defines the '%AHGmodtot' macro. It accepts the parameters 'tots', 'f', 't', and 'k'. The macro iterates through the 'tots' list, and for each element, it constructs a system command using the 'modrcstot' script. It then calls the '%AHGpm' and '%AHGsubmitRcommand' macros (not defined in this code) to presumably display and submit this command for execution.
Copied!
1%macro AHGmodtot(tots,f=,t=,k=);
2 %local tot i cmd paraf;
3 %let k=%upcase(&k);
4 %DO i=1 %to %AHGcount(&tots);
5 %let tot=%scan(&tots,&i,%str( ));
6 %IF not %index(&tot,.tot) %THEN %let tot=&tot..tot;
7 %IF %AHGblank(&f) %THEN %let paraf=;
8 %ELSE %let paraf=-f &f;
9 %let cmd=modrcstot -k &k ¶f -t &t -w &root3/tools/&tot;
10 %AHGpm(cmd);
11 %AHGsubmitRcommand(cmd=&cmd);
12 %END;
13%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.
Copyright Info : Author: Hui Liu / $Author: Liuh04 $