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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

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