Skip to main content

Micro Focus Visual COBOL.

An item in working storage is described as PIC X type but no VALUE clause, as follows:

       WORKING-STORAGE.

           01  WORK-ITEM       PIC X(10).

In this example, when program loads, does this item have an initial value of spaces?  ... or is it "undefined"?

(Assume default environment,  should environment variables affect the answer).

Also, if there is a documentation reference, please provide a link.

Thanks!

 

 

Micro Focus Visual COBOL.

An item in working storage is described as PIC X type but no VALUE clause, as follows:

       WORKING-STORAGE.

           01  WORK-ITEM       PIC X(10).

In this example, when program loads, does this item have an initial value of spaces?  ... or is it "undefined"?

(Assume default environment,  should environment variables affect the answer).

Also, if there is a documentation reference, please provide a link.

Thanks!

 

 

There are two compiler directives you can use:

DEFAULTBYTE and INIT-BY-TYPE

Here are links to the documentation:

www.microfocus.com/.../HRCDRHCDIR2L.html

www.microfocus.com/.../GUID-FC6FFD2F-F9BA-49A5-9CF6-EDE1353A36D9.html

The default initialisation for WORKING-STORAGE items is spaces.

Micro Focus Visual COBOL.

An item in working storage is described as PIC X type but no VALUE clause, as follows:

       WORKING-STORAGE.

           01  WORK-ITEM       PIC X(10).

In this example, when program loads, does this item have an initial value of spaces?  ... or is it "undefined"?

(Assume default environment,  should environment variables affect the answer).

Also, if there is a documentation reference, please provide a link.

Thanks!

 

 

Thank You !!!