Friday, November 18, 2011

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)

No comments:

Post a Comment