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 Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Sticky: difference between ... DUMMY ... and ... enrico-sorichetti JCL & VSAM 0 Mon Oct 17, 2016 4:31 pm


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