Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm
No new posts Suppress value reported by BREAK in D... Learncoholic DFSORT/ICETOOL 3 Wed Aug 16, 2017 6:03 pm
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts ON 2 AND EVERY 1 - Statement ??? UmeySan COBOL Programming 2 Tue Jul 25, 2017 1:20 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us