1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
* How can run the same macro on several different files?

* Answer by Ray.

* This macro gets the data files; (they are named file1 to file10) .
DEFINE !GETIT ().
!DO !var=1 !TO 10.
GET FILE !QUOTE(!CONCAT("c:\\Temp\\file",!var,".sav")).
* Call macro to do analysis.
!DOWORK.
!DOEND.
!ENDDEFINE.

* This macro does the analysis of each file.
DEFINE !DOWORK().
* command needed.
LIST.
!ENDDEFINE.

*Next line starts the whole process.
!GETIT.