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

I need to add these two variables to get the result as zero.


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

New User


Joined: 27 Jul 2006
Posts: 5
Location: chennai

PostPosted: Tue May 25, 2010 12:00 am
Reply with quote

01 WS-NUM-STR1 PIC X(04) VALUE '-450'.
01 WS-NUM-STR2 PIC X(04) VALUE '+450'.

I need to add these two variables to get the result as zero.

I need help to sort out this.
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: Tue May 25, 2010 12:17 am
Reply with quote

Hello,

At the top of the page is a link to "IBM Manuals".

Pick the COBOL Language Reference for your version of COBOL and read about NUMVAL/NUMVAL-C.

Make sure the result field is defined as numeric.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Tue May 25, 2010 12:34 am
Reply with quote

I'm surprised when I see a basic/rudimentary question like this, from someone who joined the forum nearly fours ago (one and one-half years before I did), but yet, this is only their 5th post?

It certainly makes me wonder.... icon_rolleyes.gif

Bill
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: Tue May 25, 2010 12:51 am
Reply with quote

Hi Bill,

Many prefer to watch for topics of interest and read these and only rarely post.

Check out the number of views some of the topics have accumulated (versus the number of replies).

I believe there are very many who have come away with useful info even thought they did not post in the topic(s) that helped icon_smile.gif

d
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 first column truncated in search result IBM Tools 13
No new posts SDSF like solution in EJES (store com... All Other Mainframe Topics 4
No new posts executing XCTL command in COBOL witho... CICS 10
No new posts JCL with variables JCL & VSAM 1
No new posts JCL Variables JCL & VSAM 1
Search our Forums:

Back to Top