Loop through a number of files macro

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Loop through a number of files macro

Jignesh Sutar-3
The macro below does not work but hopefully give you an idea of what I am
trying achieve.
What would be the correct way of setting up this macro?

DEFINE !runJob (file1 !ENCLOSE ("'","'") /file2 !ENCLOSE ("'","'"))
!DO !file !IN (!file1 !file2)
GET FILE=!pathdat + !QUOTE('C:\Program Files\SPSS\',!file,'.sav').
FREQUENCIES ALL.
!DOEND
!ENDDEFINE.

SET MPRINT ON.
!runJob file1='Employee data' file2='cars'.
SET MPRINT OFF.

Many thanks in advance
Jigs

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD