Hi
My guess is that the files were created but they are not in the folder where
you expect them.
Did you search you drive for file school1.txt?
You could spell out the path in the write command.
This is not important but note that the macro could be written as follows:
define !macro()
!do !schid=1 !to 30.
do if (schid=!schid).
write outfile=!concat('school',!schid,'.txt')/ v1 to v5.
end if.
execute.
!doend
!enddefine.
Cheers!
Raynald Levesque
www.spsstools.net
On 7/19/07, David Millar <
[hidden email]> wrote:
>
> Dear All
>
> I have a piece of syntax (see below) that I used (in the distant past) to
> write 30 separate text files based on an SPSS data file with 30 cases - one
> for each school, numbered 1-30 (variable 'schid'). Now, when I come back to
> it 9 years later, I find it does diddly squat. I don't get my 30 files. I
> don't even get an error message!
>
> Any help would be greatly appreciated.
>
> Regards
>
> David Millar
> ERC
> Dublin
>
> define !macro().
>
> compute p=1.
>
> !do !schid=1 !to 30.
>
> do if (schid=p).
>
> write outfile=!concat('school',!schid,'.txt')/ v1 to v5.
>
> end if.
>
> compute p=p+1.
>
> execute.
>
> !doend.
>
> !enddefine.
>
> !macro.
>