Basically what I want to do is take a RegTotal/A10 field and subtract by 12.
Here are my code
DEFINE TABLE NAME
…..
IntRegTotal/I10 = EDIT(RegTotal);
COMPUTE Leftover/I10 = IntRegTotal - 12;
OtherTotal/I10 = IF RegTotal GE ‘13’ THEN LeftOver
ELSE IF RegTotal LE ‘12’ THEN HoursTot
Else ‘ ‘;
END
But it is not letting me, it said that my Leftover field is not recognized.
One thing to note is that the leftover field might be a negative number. I tried using
P10.2 for datatype, but it still gave me the same error message.
Any help would be appreciated.
Thank you,
Here are my code
DEFINE TABLE NAME
…..
IntRegTotal/I10 = EDIT(RegTotal);
COMPUTE Leftover/I10 = IntRegTotal - 12;
OtherTotal/I10 = IF RegTotal GE ‘13’ THEN LeftOver
ELSE IF RegTotal LE ‘12’ THEN HoursTot
Else ‘ ‘;
END
But it is not letting me, it said that my Leftover field is not recognized.
One thing to note is that the leftover field might be a negative number. I tried using
P10.2 for datatype, but it still gave me the same error message.
Any help would be appreciated.
Thank you,