[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
DO IF Block appears to execute regardless
From: |
Stuart McKenzie |
Subject: |
DO IF Block appears to execute regardless |
Date: |
Thu, 16 Jan 2014 14:49:33 +1100 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- DO IF Block appears to execute regardless,
Stuart McKenzie <=