[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [open-cobol-list] question about linkage section variables
From: |
William M. Klein |
Subject: |
RE: [open-cobol-list] question about linkage section variables |
Date: |
Tue Jun 22 10:41:16 2004 |
Current and past ANSI/ISO Standards say "results are unpredictable" in such
cases.
Micro Focus has a directive that "changes" this behavior - appropriately
called
sticky-linkage
This issue is PARTICULARLY nasty in cases where you have the "ENTRY"
extension to the Standard and different ENTRY statements have different
parameters listed.
IBM *does* document the use of "testing for NULLS" for "omitted parameters"
- see:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy3pg20/4.2.1.3
Bottom-Line:
DEFAULTING to always NULLS seems reasonable to me. Having a compile-time
option or switch to "maintain addressability" seems reasonable as well.
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of David Korn
> Sent: Tuesday, June 22, 2004 12:20 PM
> To: address@hidden; address@hidden
> Subject: [open-cobol-list] question about linkage section variables
>
> cc: address@hidden
> Subject: question about linkage section variables
> --------
>
> With the current compiler, linkage section records that
> are not passed as usage parameters, are initialized
> to NULL pointers at the beginning of the module, for
> example
> unsigned char *b_1152 = NULL;
>
> However, this initialization takes place each time
> that the module is invoked.
>
>
> With the MVS compiler, values assigned to these variables
> are persistent. I changed this to use
> static unsigned char *b_1152 = NULL;
> instead to work around the problem.
>
> I am not familiar with Cobol semantics. Which is correct?
>
>
> David Korn
> address@hidden
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by Black Hat Briefings & Training.
> Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
> digital self defense, top technical experts, no vendor pitches,
> unmatched networking opportunities. Visit www.blackhat.com
> _______________________________________________
> open-cobol-list mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/open-cobol-list
>