GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Mainframe  >  COBOL
Go To First  |  Previous Question  |  Next Question 
 COBOL  |  Question 71 of 162    Print  
What is difference between Initialize and value?

  
Total Answers and Comments: 4 Last Update: November 20, 2006     Asked by: p.srinivas 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: khamuruddin
 

value--- value is used to initialize data item in working storage section

where as

intialize----is used to initialize data item in procedure division



Above answer was rated as good by the following members:
chandradutt
September 01, 2006 05:16:55   #1  
Shashank Kapoor        

RE: what is difference between Intialize and value?

Value will initialize values in variables at the time of declaration.

Whereas in Initialize value get initialize in procedure division. Initialize spaces in alphabhetic & in alphanumeric. Zeros in numeric.


 
Is this answer useful? Yes | No
September 21, 2006 05:34:51   #2  
asha        

RE: what is difference between Intialize and value?

value clause is used to initialize working storage variable.

initialize clause is used in procedure division to initialize record since its not possible to initilalize them at fd level.


 
Is this answer useful? Yes | No
October 09, 2006 06:42:50   #3  
vijaya        

RE: what is difference between Intialize and value?

value clause is used to initialize variables in the working-storage section.

initialize is also used to initialize the variables.its more efficient to use initialize clause for initialising some variables such as file-status etc.

bcoz whenever an operation is performed related to files (such as file opening reading a file..) we check for the status variable to know whether that step is performed successfully or not.

if these variable is initialized with initialize clase each time when a new record is going to be read the file status varible is initializd with the initial value.which is not possible with value clause.


 
Is this answer useful? Yes | No
November 20, 2006 13:26:11   #4  
khamuruddin        

RE: what is difference between Intialize and value?

value--- value is used to initialize data item in working storage section

where as

intialize----is used to initialize data item in procedure division


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape