Version: 0.8.1-g0343d5
OS Windows 7 64 bit

Hi all

I have a block of code

COMPUTE PulseCheck = INDEX(UPCASE(@JobName),"PULSE") > 0.

DO IF (PulseCheck < 1).
        Recode CONT (Convert) into CONT1.
        *do other stuff
END IF.

If I include the line
LIST PulseCheck
I see that PulseCheck is being calculated correctly so that line appears
to be correct, however, the DO IF block of code currently executes
regardless of the value of PulseCheck. This script is used to run across 2
data files, one of which has the CONT variable and the other doesn't, so I
need to skip over this block when the CONT variable does not exist.  Am I
missing something stupidly obvious here? The less preferred solution is to
use 2 scripts, but that has other implications which I would prefer not to
have to deal with.

I have tried swapping the skip logic around at the for the DO IF argument
but no matter what I enter, the code executes which suggests that I have a
fundamental misunderstanding of how this should work.


Any suggestions gratefully received.

Regards
Stuart

_______________________________________________
Pspp-users mailing list
Pspp-users@gnu.org
https://lists.gnu.org/mailman/listinfo/pspp-users

Reply via email to