initialize command

INITIALIZE

Command:

INITIALIZE

Syntax:

INITIALIZE <init-variable>.

Description:

The INITIALIZE command moves SPACES or ZEROS to variable init-variable; SPACES are moved to the variable if it is defined as alphanumeric (PIC X) and ZEROS if it has been defined as numeric (PIC 9).

Note that CobolScript automatically initializes all variables that have VALUE clauses; for this reason, using a VALUE clause is normally preferred to using the INITIALIZE statement.

Example Usage:

INITIALIZE var1.

Sample Program:

INIT.CBL