What is difference between Initialize and value?

Showing Answers 1 - 10 of 10 Answers

Shashank Kapoor

  • Sep 1st, 2006
 

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.

asha

  • Sep 21st, 2006
 

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.

  Was this answer useful?  Yes

vijaya

  • Oct 9th, 2006
 

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.

khamuruddin

  • Nov 20th, 2006
 

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

where as

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

talluri

  • Jul 27th, 2011
 

INITIALIZE verb is used to refresh the alphabetic & alphanumeric empty fields with SPACES and numeric empty fields with ZEROS

  Was this answer useful?  Yes

nagaraju

  • Apr 30th, 2013
 

value : value clause is used to initialize values at working storage section only.

i.e.., giving the values at declaration time initialize : this verb is used in 2 ways.

1) used to supply the initial values to numeric and alphanumeric.supply zeros to numeric and spaces to alphanumeric at a time.

2) used to replace character or string to alphanumeric and numbers to numeric but it is not recommended.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions