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
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts RMM Cannot move a volume from SHELF l... tspr52 IBM Tools 0 Thu Mar 01, 2018 3:48 pm
No new posts ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm

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