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
 
Initializing cobol verb vs Assigning a variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> FAQ & Off Topics
View previous topic :: :: View next topic  
Author Message
SUREZTBW
Currently Banned

New User


Joined: 10 May 2007
Posts: 1
Location: pune

PostPosted: Mon May 21, 2007 5:35 pm    Post subject: Initializing cobol verb vs Assigning a variable
Reply with quote

Hi

Cobol program we initialized the value salary field, when iam doing arithmetic operation

I move the another value. Which value will take during arithmetic operation?

Ex;

02 salary pic 9(3) value 200
02 b pic 9(3) .
-
-
-
procedure division

move 300 to salary.

Compute c =salary + b
Back to top
View user's profile Send private message

rameshfoa

New User


Joined: 05 Apr 2007
Posts: 27
Location: chennai

PostPosted: Mon May 21, 2007 5:39 pm    Post subject:
Reply with quote

the value after move assumed
Back to top
View user's profile Send private message
sandeep1dimri

New User


Joined: 30 Oct 2006
Posts: 76

PostPosted: Mon May 21, 2007 6:22 pm    Post subject:
Reply with quote

C= 300 + B
Back to top
View user's profile Send private message
kgumraj

Active User


Joined: 01 May 2006
Posts: 151
Location: Hyderabad

PostPosted: Mon May 21, 2007 11:11 pm    Post subject:
Reply with quote

Hi Suresh,

All the variables will be having the latest value just before that statement, regardless of the initial value.
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 -> FAQ & Off Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to display offset thru cobol prog... tvinodkumar7 CICS 2 Sun Apr 22, 2018 8:42 pm
No new posts Linkage editor is part of COBOL, z/OS... ankit.jain COBOL Programming 4 Fri Apr 20, 2018 4:17 pm
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 Call COBOL or PLI with a click from w... vaibhav gs All Other Mainframe Topics 1 Mon Apr 16, 2018 7:29 pm
No new posts COBOL MVS options BiswajitDG COBOL Programming 8 Fri Apr 06, 2018 12:35 am

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