HP3000-L Archives

August 2005, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
James English <[log in to unmask]>
Reply To:
James English <[log in to unmask]>
Date:
Wed, 24 Aug 2005 08:50:08 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (124 lines)
I must apologize. The source code I cited in my example isn't correct. The
source code I was using wasn't written by me and it was wrapped like this:

 PARA-A.
     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

So it was hard to determine exactly which statement was causing the error.

This is the actual source code that was causing the error:

01 VAR-A PIC V9(11) COMP.
01 VAR-B PIC S9(9) COMP.

ADD VAR-A TO VAR-B.

Jim.


-----Original Message-----
From: Brian Donaldson [mailto:[log in to unmask]] 
Sent: Tuesday, August 23, 2005 8:46 PM
To: HP3000 List; James English
Subject: Re: Composite Of Operands Too Big


You might try the following:

01  VAR-A PIC S9(4) COMP.
01  VAR-B PIC S9(9) COMP.
01  VAR-C PIC S9(18) COMP.

IF VAR-A < 0 THEN
    MULTIPLY VAR-A BY VAR-B GIVING VAR-C
END-IF.

That may help you.

Also, I was looking at your $control statements, two of which would appear
to conflict with each other :

>$CONTROL USLINIT, SUBPROGRAM, SOURCE

USLINIT only applies to CM *MAINLINE* programs and subprogram is for
subroutines (duh!)

I have no idea if this conflict means anything but I would never use
USLINIT and SUBPROGRAM in the same program nor would I put USLINIT in CM
source.

Got that info from an HP techie once upon a time when there was an Hewlett
Packard company.....

HTH,
Brian Donaldson.

On Tue, 23 Aug 2005 15:01:57 -0400, James English <[log in to unmask]>
wrote:

>I'm compiling an HP COBOL II program (ANSI85) and I'm getting the error
>COMPOSITE OF OPERANDS TOO BIG when I multiply the two variables below.
>
>VAR-A PIC S9(4) COMP.
>VAR-B PIC S9(9) COMP.
>
>Here's the multiply statement I'm using:
>
>IF VAR-A < 0 THEN
>    MULTIPLY VAR-A BY VAR-B
>END-IF.
>
>The compiler directives I'm using are:
>
>$CONTROL LIST,SOURCE,NOCODE,NOCROSSREF,ERRORS=100,NOVERBS,WARN
>$CONTROL LINES=60,NOMAP,MIXED,QUOTE=",NOSTDWARN,SYNC32,INDEX32
>$CONTROL NOVALIDATE,OPTIMIZE=0
>$CONTROL USLINIT, SUBPROGRAM, SOURCE
>
>From the HP COBOL II manual, p. 8-45, it says that the composite of the
>operands cannot be more than 18 digits. If that's the case, then I don't
>understand why I'm getting this error. Multiplying a 9 digit number by a 4
>digit number results in a 13 digit number - which is less than 18 digits.
>
>We are running an HP3000/N4000-100-33 with MPE/iX 7.0.
>
>Thanks,
>
>Jim.
>
>---------------------------------
>James English
>Financial Systems Analyst
>MIS Department
>TB Wood's Incorporated
>440 N Fifth Avenue
>Chambersburg, PA 17201
>Phone: (717) 264-7161 x2119
>Fax: (717) 264-0890
>[log in to unmask]
>http://www.tbwoods.com
>---------------------------------
>
>
>This e-mail is intended solely for the person or entity to which it is
addressed and may contain confidential and/or privileged information. Any
review, dissemination, copying, printing, forwarding or other use of this e-
mail by persons or entities other than the addressee is prohibited. If you
have received this e-mail in error, please contact the sender immediately
and delete the material from your computer. Opinions, conclusions and other
information in this message that do not relate to the official business of
TB Woods Incorporated shall be understood as neither given or endorsed by
it.
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *



This e-mail is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. Any review, dissemination, copying, printing, forwarding or other use of this e-mail by persons or entities other than the addressee is prohibited. If you have received this e-mail in error, please contact the sender immediately and delete the material from your computer. Opinions, conclusions and other information in this message that do not relate to the official business of TB Woods Incorporated shall be understood as neither given or endorsed by it.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2