Posted by
Guido Schiffhorst on
URL: http://spssx-discussion.165.s1.nabble.com/do-doend-question-tp5740533p5740556.html
Fascinating, i.e. the parser needs a kind of terminator to execute the last
iteration without error?! Bug or feature... anyway... thank you very much
Kirill for this solution!!!.
-----Ursprüngliche Nachricht-----
Von: SPSSX(r) Discussion [mailto:
[hidden email]] Im Auftrag von
Kirill Orlov
Gesendet: Freitag, 21. Mai 2021 18:47
An:
[hidden email]
Betreff: Re: !do-!doend question
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
=====================
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