Recall the known bug (SPSS 15) that if you use XSAVE within a LOOP (a
usual place for XSAVE), you get a warning; see below. (The code works
properly, however):
>LOOP year = StartYr TO StartYr + 4.
>. COMPUTE ComeFrom = '?????'.
>. DO IF year EQ StartYr.
>. COMPUTE ComeFrom = 'Real'.
>. ELSE.
>. COMPUTE ComeFrom = 'Create'.
>. END IF.
>. XSAVE OUTFILE=Expand
>
> >Warning # 142. Command name: XSAVE
> >LOOP has no effect on this command.
>
> /DROP = StartYr.
>END LOOP.
>EXECUTE /* which is necessary, here */.
Here's another one. This is SPSS 15.0.1 draft output. (I've no idea
about 16.) The code is incorrect; there's a missing END IF, which is
correctly reported in a second error message. But there's also the
"LOOP has no effect on this command." warning, this time for LIST. Even
stranger than for XSAVE, as
(1) LIST isn't part of the transformation language, and shouldn't be
named in any transformation-language error message;
(2) There's no LOOP in the code.
If the bug is still of interest, this may help locate it.
NUMERIC Point1 Point2 (F3).
COMPUTE #Slash = INDEX(TwoPoint,'/').
STRING #OneValu (A8).
DO IF #Slash EQ 0.
. COMPUTE Point1 = NUMBER(TwoPoint,F8).
ELSE.
. COMPUTE #OneValu = SUBSTR(TwoPoint,1,#Slash-1).
. COMPUTE Point1 = NUMBER(#OneValu,F8).
. COMPUTE #OneValu = SUBSTR(TwoPoint, #Slash+1).
. COMPUTE Point2 = NUMBER(#OneValu,F8).
LIST.
>Warning # 142. Command name: LIST
>LOOP has no effect on this command.
>Error # 4095. Command name: LIST
>The transformations program contains an unclosed LOOP, DO IF, or
complex
>file structure. Use the level-of-control shown to the left of the
SPSS
>commands to determine the range of LOOPs and DO IFs.
>This command not executed.