WSCLEAR
Use WSCLEAR
to clear a program's non-EXTERNAL
data items in WORKING-STORAGE
to
binary zeros at initialization. The storage is cleared before any VALUE
clauses
are applied.
Default is: NOWSCLEAR
Abbreviations are: None
Use NOWSCLEAR
to bypass the storage-clearing
process.
nnn is
any integer from 0 to 255. WSCLEAR
without the suboption
is the same as WSCLEAR
(0).
WSCLEAR
option
either in a command line or in a COBOL statement. However, the WSCLEAR
option
that is specified in the COBOL statement takes precedence over the
option specified in the command line.- To specify
WSCLEAR
with the nnn suboption in the command line, use the format of-qwsclear
(nnn). In this case, the command processor scans characters that are in the range of 0 to 255 only, and other excessive characters are ignored. No error message is issued.For example, if you specify
-qwsclear
(99999), the command processor takesWSCLEAR
(99) only. - To specify
WSCLEAR
with the nnn suboption in COBOL statements, use theWSCLEAR
(nnn) format.
If you specify WSCLEAR
(nnn),
the byte value represented by nnn is used to initialize
each byte of WORKING-STORAGE
data to a specific value.
This applies only to data items that do not have a VALUE attributed
specified.
Performance
considerations: If you use WSCLEAR
and are concerned
about the size or performance of an object program, also use OPTIMIZE(FULL)
. Doing so instructs the compiler
to eliminate all unreferenced data items from the DATA DIVISION
,
which will speed up initialization.