Re: Compile error
From: KL (klbjornme_at_aol.comjunkhell)
Date: 03/14/04
- Next message: JerryMouse: "Re: Compile error"
- Previous message: KL: "Re: Compile error"
- In reply to: William M. Klein: "Re: Compile error"
- Next in thread: Donald Tees: "Re: Compile error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 14 Mar 2004 16:51:57 GMT
Actually, I don't know what compiler I am using. This is for a class and we
use RED for editor, I think we use REALCOB for the compiler, but not sure if
that makes any sense to you all.
KL
In article <X2T4c.19905$%06.915@newsread2.news.pas.earthlink.net>, "William M.
Klein" <wmklein@nospam.netcom.com> writes:
>You don't tell us compiler - but what you are doing is valid as a Micro Focus
>extension - or in the 2002 ISO COBOL Standard - but *not* in a "strictly" '85
>Standard compiler. You are using a "partial expression" in your when clause,
>i.e. a clause that starts with a relational operator. It is valid to code:
>
> Evaluate A
> When B
> ...
> When C thru D
>
>***
>but it is NOT valid to code
>
> Evaluate A
> When > B
> ....
> When = C
>
>***
>
>You can code
> Evaluate True
> When A > B
> ...
> When A = C
>
>***
>
>Does this make the problem clear?
>
>--
>Bill Klein
> wmklein <at> ix.netcom.com
>"KL" <klbjornme@aol.comjunkhell> wrote in message
>news:20040313233938.02537.00003479@mb-m23.aol.com...
>> Can someone help? I have coded this and can't figure out why I get an
>error:
>>
>> BONUS-PROCESS.
>> DIVIDE SAL-SLD-P BY SAL-ASKING-P GIVING SAL-PO-ASKING.
>> MULTIPLY 100 BY SAL-PO-ASKING.
>> EVALUATE SAL-PO-ASKING
>> WHEN SAL-PO-ASKING >= 95
>> MULTIPLY SAL-SLD-P BY .05 GIVING SAL-COMM-PAID
>> COMPUTE SAL-BONUS = (SAL-SLD-P - (SAL-ASKING-P * .95)) * .4
>> ADD SAL-BONUS TO SAL-COMM-PAID
>> WHEN SAL-PO-ASKING >= 94
>> MULTIPLY SAL-SLD-P BY .045 GIVING SAL-COMM-PAID
>> WHEN SAL-PO-ASKING >= 93
>> MULTIPLY SAL-SLD-P BY .04 GIVING SAL-COMM-PAID
>> WHEN SAL-PO-ASKING >= 92
>> MULTIPLY SAL-SLD-P BY .035 GIVING SAL-COMM-PAID
>> WHEN SAL-PO-ASKING >= 91
>> MULTIPLY SAL-SLD-P BY .03 GIVING SAL-COMM-PAID
>> WHEN SAL-PO-ASKING >= 90
>> MULTIPLY SAL-SLD-P BY .025 GIVING SAL-COMM-PAID
>> WHEN OTHER
>> MULTIPLY SAL-SLD-P BY .025 GIVING SAL-COMM-PAID
>> COMPUTE SAL-PENALTY = (SAL-ASKING-P * .95) - SAL-SLD-P
>> SUBTRACT SAL-PENALTY FROM SAL-COMM-PAID
>> END-EVALUATE.
>>
>> It appears to have a problem with the numeric literals 95-90. The exact
>> compile error I get is:
>> E Selection object or THROUGH/THRU invalid; found '95'
>>
>> and it says the same thing for 94-90. Any ideas?
>>
>> KL
>
- Next message: JerryMouse: "Re: Compile error"
- Previous message: KL: "Re: Compile error"
- In reply to: William M. Klein: "Re: Compile error"
- Next in thread: Donald Tees: "Re: Compile error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|