IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is it possible to mutiply a comp and comp3 field


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prabhucs01
Warnings : 1

New User


Joined: 07 Mar 2005
Posts: 43

PostPosted: Sun Sep 13, 2009 9:07 pm
Reply with quote

Is it possible to mutiply a comp and comp3 field and vice versa. Will there be any error if we try to multiply?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Sun Sep 13, 2009 9:25 pm
Reply with quote

Why would you think there would be ANY problems in multiplying two numeric fields together? Unless, of course, the result field is too small to contain the result.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Sep 14, 2009 5:07 am
Reply with quote

Quote:
Unless, of course, the result field is too small to contain the result.
Or if the comp-3 field does not contain a valid numeric value. . .

d
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Sep 14, 2009 4:43 pm
Reply with quote

prabhucs01 wrote:
Is it possible to mutiply a comp and comp3 field and vice versa?
Don't you have mainframes connection these days?
Back to top
View user's profile Send private message
santy
Warnings : 1

New User


Joined: 19 Jul 2007
Posts: 22
Location: mumbai

PostPosted: Wed Oct 07, 2009 4:19 pm
Reply with quote

yes, it is possible to multiply a COMP and COMP3 field or vice versa, but the your COMP3 variable should contain the numeric value and the data size for the COMP3 variable should be sufficient to store the result value or above multiplication operation.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts S0C7 - Field getting overlayed COBOL Programming 2
Search our Forums:

Back to Top