Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: I need to add these two variables to get the result as zero.
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

Site Director


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

PostPosted: Tue May 25, 2010 12:17 am    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue May 25, 2010 12:34 am    Post subject: Reply to: I need to add these two variables to get the resul
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

Site Director


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

PostPosted: Tue May 25, 2010 12:51 am    Post subject: Reply to: I need to add these two variables to get the resul
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
This topic is locked: you cannot edit posts or make replies. How to run and see the result of DFH$... lind sh CICS 2 Wed Jul 27, 2016 7:04 pm
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm
No new posts TWS 'global' or 'local' variables Steve Coalbran IBM Tools 2 Thu Mar 17, 2016 7:40 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us