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
 

 

Difference between +1 and 1 in a Move or in Add statement

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Priya_Shankar

New User


Joined: 07 Aug 2007
Posts: 22
Location: Chennai

PostPosted: Tue Aug 07, 2007 6:49 pm    Post subject: Difference between +1 and 1 in a Move or in Add statement
Reply with quote

What is the difference between adding +1 or 1 to a variable? For example:

i). ADD +1 TO WS-VARIABLE1.
ii). ADD 1 TO WS-VARIABLE1.

Similarly in a MOVE statement:

1). MOVE +1 TO WS-VARIABLE1.
2). MOVE 1 TO WS-VARIABLE1.
Back to top
View user's profile Send private message

balakrishna reddy

Active User


Joined: 13 Jul 2007
Posts: 130
Location: Guntur

PostPosted: Tue Aug 07, 2007 6:56 pm    Post subject:
Reply with quote

hi priya,

can you provide the definition of WS-VARIABLE1
Back to top
View user's profile Send private message
Priya_Shankar

New User


Joined: 07 Aug 2007
Posts: 22
Location: Chennai

PostPosted: Tue Aug 07, 2007 8:26 pm    Post subject:
Reply with quote

WS-VARIABLE1 is defined as S9(4) COMP VALUE ZERO.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Aug 07, 2007 8:41 pm    Post subject: Re: Difference between +1 and 1 in a Move or in Add statemen
Reply with quote

Priya_Shankar wrote:
What is the difference between adding +1 or 1 to a variable? For example:

i). ADD +1 TO WS-VARIABLE1.
ii). ADD 1 TO WS-VARIABLE1.

Similarly in a MOVE statement:

1). MOVE +1 TO WS-VARIABLE1.
2). MOVE 1 TO WS-VARIABLE1.


There would be no difference.
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 ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 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