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
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts scheduling between OPC and TWS give u... nsbl IBM Tools 1 Sun Mar 12, 2017 5:35 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:23 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:21 pm


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