initializing working storage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

I am porting COBOL/CICS code on iSeries to GnuCOBOL/OpenKicks on Linux.

What I am finding is that COBOL on iSeries is initializing working storage differently than GnuCOBOL on Linux.

I have not pinned down exactly what is happening but before I try to write some test programs I would like to come up with the list of compile options that control how memory is initialized in GnuCOBOL.

One of the members tipped me off to -fdefault-byte=0; that looks promising.

here are my questions/requests.

1. 
What exactly is defaultbyte setting and when does it set it?

here is my guess...

Default byte will set each variable in working storage that does not have a VALUE clause.  VALUE clauses will continue to be set to the stated value.  The default byte will be set each time the program is called even if it is called multiple times.

When there is a conflict caused by redefines the first definition will take precedence.  

2. 
What other options can help me initialize the memory?

3.
What does "IS INITIAL PROGRAM" do in GnuCOBOL?  When I turned it on to see what it did the program core dumped and I just turned it off.

4. 
Because OpenKicks has a preprocessor I could add in INITIALIZE statement to the code before GnuCOBOL compiles it.

would this work:
INITIALIZE SOME-01-LEVEL ALL to LOW-VALUES THEN TO DEFAULT.




[Index of Archives]     [Gcc Help]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Info]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux