Home > Software > Mainframe > Cobol
Interview Questions   Tutorials   Discussions   Programs   

Cobol - What does the INITIALIZE verb do?




408
views
asked mar August 3, 2014 02:09 AM  

What does the INITIALIZE verb do?


           

1 Answers



 
answered By Mswami   0  
INITIALIZE:
VALUE clause is used to initialize the data items in the working storage section whereas INITIALIZE is used to initialize the data items in the procedure division.
INITIALIZE sets the alphabetic, alphanumeric and alphanumeric-edited items to SPACES and numeric and numeric-edited items to ZERO. This can be overridden by REPLACING option of INITIALIZE. FILLER, OCCURS DEPENDING ON items are not affected.

Syntax:   
        INITIALIZE identifier-1
        REPLACING (ALPHABETIC/ALPHANUMERIC/ALPHA-NUMERIC-EDITED
        NUMERIC/NUMERIC-EDITED)
        DATA BY (identifier-2 /Literal-2)

Note: Alphabetic, Alphanumeric fields & alphanumeric edited items are set to SPACES. Numeric, Numeric edited items set to ZERO. FILLER , OCCURS DEPENDING ON items left untouched.
flag   
   add comment

Your answer

Join with account you already have

FF

Preview

 Write A Tutorials
Online-Classroom Classes
www.writeabc.com


  1 person following this question

  3 people following this tag

  Question tags

cobol × 1

Asked 2 years and 3 months ago ago
Number of Views -408
Number of Answers -1
Last updated
3 years and 4 months ago ago

Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert