Login  Register

IF statement to overwite an existing value with a missing value

Posted by Gary Oliver on Feb 09, 2007; 3:56am
URL: http://spssx-discussion.165.s1.nabble.com/Information-about-S-curve-in-SPSS-tp1073784p1073787.html

Colleagues

I have the following set of IF statements which successfully execute.
IF ( P01_VAR4 > 0 ) P01_VAR3 = P01_VAR1 .
...
IF ( P35_VAR4 > 0 ) P35_VAR3 = P01_VAR1 .

In some cases the value for VAR3 is zero and I rightly get a warning
message and the cell is marked with a dot for missing value.

The command has evolved over a week of modifying the calculation with
the result that the cells contain pre-existing values. What I have
noticed is that the IF statement above does not replace the pre-existing
values with a blank cell.

My questions are:

(a) Is there a command that I can apply to a variable to clear values?

I cannot see anything in the syntax help file that
erases/deletes/removes values. These key words only seem to apply to
files or variables themselves.


(b) Is there an amendment to the syntax which can force a missing value
to be inserted overriding whatever is in the cell?

TIA/gary