Re: Compile error

From: KL (klbjornme_at_aol.comjunkhell)
Date: 03/14/04


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
>



Relevant Pages

  • Re: Test request (for Enter;prise COBOL)
    ... source code had errors in it. ... I do hope to have a compiler available again ... Bill Klein wrote: ... you said you were interested in FIPS errors, ...
    (comp.lang.cobol)
  • Re: Dumb Question 2: Start syntax
    ... COBOL V4. ... > That compiler was originally written for ISAM not even VSAM (and also supports ... > Bill Klein ... > wmklein ix.netcom.com ...
    (comp.lang.cobol)
  • Re: Validating input file
    ... can be either line sequential or record sequential - depending the compiler ... Bill Klein ... wmklein ix.netcom.com ...
    (comp.lang.cobol)
  • Re: Treeviews
    ... Both are extensions and the compiler is telling you that they are NOT Standard. ... Bill Klein ... > source program and the ... > directives in the program ...
    (comp.lang.cobol)
  • Re: Obsolete elements of COBOL language
    ... > There is a REAL difference between compiler errors and informational errors. ... > If your instructor doesn't understand this, ... > Bill Klein ...
    (comp.lang.cobol)