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 16:36:34 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (242 lines)
Thanks to everyone who replied on this topic. I'll use your suggestions.

Thanks,

Jim.

-----Original Message-----
From: Tony Summers [mailto:[log in to unmask]] 
Sent: Wednesday, August 24, 2005 10:47 AM
To: James English; [log in to unmask]
Subject: RE: Re: [HP3000-L] Composite Of Operands Too Big


The same argument applies as given in a previous post - the Add
statement is essentially

Add Var-A to Var-B GIVING Var-B

... and VAR-B can't hold the decimal part of the resultant addition.

You really need to define a new field VAR-C as PIC s9(9)V9(11) COMP and
change the statement to 

ADD VAR-A to VAR-B GIVING VAR-C 

However, that's too many digits for HP Cobol to handle. 

So you really need to go back to the drawing board and check whether you
can reduce the picture of VAR-A or VAR-B so that the composite field is
18 digits max. 

BoL.

-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On
Behalf Of James English
Sent: 24 August 2005 13:50
To: [log in to unmask]
Subject: Re: [HP3000-L] Composite Of Operands Too Big

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 *

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



The contents of this email are confidential to the intended recipient
and may not be disclosed. Although it is believed that this email and
any attachments are virus free, it is the responsibility of the recipient to
confirm this.

Smith & Williamson Corporate Finance Limited - A member of the London Stock
Exchange.  
A member of M&A International Inc. http://www.mergers.net  Registered in
England No. 4533970. Authorised and regulated by the Financial Services
Authority 
Smith & Williamson Investment Management Limited, Registered No. 976145.
Authorised and regulated by the Financial Services Authority.
Smith & Williamson Pension Consultancy Limited - Independent Intermediary.
Registered No. 3133226. Authorised and regulated by the Financial Services
Authority.
Smith & Williamson Fund Administration Limited, Registered No. 1934644.
Authorised and regulated by the Financial Services Authority.
Smith & Williamson Limited - A member of Nexia International.  Registered in
England No. 4534022. Regulated by the Institute of Chartered Accountants in
England & Wales for a range of investment business activities.
NCL Investments Limited, Registered No. 1913794.
Member of the London Stock Exchange authorised and regulated by the
Financial Services Authority.

Registered Office: 25 Moorgate, London EC2R 6AY
Telephone: 020 7131 4000 http://www.smith.williamson.co.uk

Nexia Audit Limited - A member of Nexia International. Registered in
England No. 4469576. Registered to carry on audit work and regulated by the
Institute of Chartered Accountants in England & Wales for a range of
investment business activities.

Registered Office: 25 Moorgate, London EC2R 6AY
Telephone: 020 7131 4000 http://www.nexiaaudit.co.uk


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



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