Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compute within define

Status
Not open for further replies.

H1004

MIS
Oct 28, 2003
136
US
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,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top