Re: !do-!doend question

Posted by Kirill Orlov on
URL: http://spssx-discussion.165.s1.nabble.com/do-doend-question-tp5740533p5740555.html

I am sure that this is a bug of macro facility.

In my previous response I've shown a remedy.
But here is a simpler one!
Just insert an idle command or text after the !doend, and the error will
dissapear: .

define !macro_loop(v=!tokens(1))
!do !i = 1 !to 2
-get file = 'c:\temp\d.sav'.
-do if $casenum = 1.
- write outfile = !quote(!conc('c:\temp\foo',!i,'.sps'))
     /'!macro1 pop = ' !quote(!conc(!v,!i)) '.'.
-end if.
-exe.
-insert file = !quote(!conc('c:\temp\foo',!i,'.sps')).
!doend
*.
!enddefine.

!macro_loop v = Z.

=====================
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