IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Initializing cobol verb vs Assigning a variable


IBM Mainframe Forums -> FAQ & Basics
Post new topic   Reply to topic
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> FAQ & Basics

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top