Date: Thu, 1 Mar 2012 22:32:37 +0800
Reply-To: deepanshu bhalla <deepanshu_bhalla@yahoo.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: deepanshu bhalla <deepanshu_bhalla@yahoo.com>
Subject: MACRO
Content-Type: multipart/alternative;
Hi Team,
I have multiple sav formatted files in the folder and one template that contains all the variables that the multiple files have .
Right now i manually open each file use ADD FILES to combine cases and do some compute commands and then save the file by the name it was earlier.
It is very tedious process as i have more than 50 files and i have to do the same task in all of them ..
I am looking for some cool macro that open template file and use ADD FILES to combine cases into the template and do some computing stuff and close the file after saving it ...
Assume all the files are stored in one folder.
My syntax looks like this :
GET FILE = " TEMPLATE FILE PATH".
ADD FILES FILE =*
/ FILE = "PATH".
Compute eng = mean (Q1,Q2,Q3,Q4).
IF eng >=4 iseng =1.
IF eng<4 iseng =0.
execute.
SAVE OUTFILE ="PATH".
Thanks in advance !
[text/html]
|