Re: Aw: Re: !do-!doend question

Posted by PRogman on
URL: http://spssx-discussion.165.s1.nabble.com/do-doend-question-tp5740533p5740554.html

!eval() does not change anything here. I tried early to edit my post but
somehow lost it(?).

It is a strange behavior. After SET MPRINT ON the output from the macro
without !do-loop displays:
...
2188  0  macro1 pop =Z.
2188  0 M>  .
Z
2189  0  
2189  0 M>  
2190  0  * End of INSERT and INCLUDE nesting level 01.
2190  0 M>  * End of INSERT and INCLUDE nesting level 01.

whereas with the !do-loop it is:
...
2121  0  macro1 pop =Z.
2122  0  
2122  0 M>  echo '*'
*
2123  0 M>   of INSERT and INCLUDE nesting level 01.
 
>Error # 1.  Command name: of
>The first word in the line is not recognized as an SPSS Statistics command.
>Execution of this command stops.
2124  0 M>   =Z.
 
>Error # 1.  Command name: =Z
>The first word in the line is not recognized as an SPSS Statistics command.
>Execution of this command stops.

It seems like part of the system-inserted comment are mixed with the insert
file command. The data written to foo.sps is correct. Notice (in line 2123
above) that 5 characters are missing '* End' and the argument to macro1 is
'*', then 'macro1 pop' is missing and only a '=Z' is executed and fails.

Surely this is a bug...

/PR



Guido Schiffhorst wrote
> Hi, thank you. But no, it doesn't solve the problem. !eval(!pop) leads
> to the same results. 'Z' without loop, '*' and errors
> within a !do-!doend loop
>
>  
>  
>
> Gesendet: Donnerstag, 20. Mai 2021 um 21:31 Uhr
> Von: "PRogman" <

> peder@

> >
> An: 

> SPSSX-L@.UGA

>  
> Betreff: Re: !do-!doend question
>
> See if the !EVAL() function can solve your argument problems.
> /PR
>
>
>
> --
> Sent from: http://spssx-discussion.1045642.n5.nabble.com/ 
>
> =====================
> To manage your subscription to SPSSX-L, send a message to

> LISTSERV@.UGA

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

> LISTSERV@.UGA

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





--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

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