Re: CALL using OMITTED
- From: "Frank Swarbrick" <Frank.Swarbrick@xxxxxxxxxxxxxx>
- Date: Mon, 29 Sep 2008 17:48:29 -0600
<748Ek.804832$3p2.397919@xxxxxxxxxxxxxxxxxxxxxx>, William M.On 9/29/2008 at 11:16 AM, in message
Klein<wmklein@xxxxxxxxxxxxxxxxx> wrote:
Frank,
Thinking a little more about this, I do NOT think IBM will/should
"easily"
treat an omitted final parameter like an explicit OMITTED phrase (at
least
without call prototypes).
IBM has an (undocumented?) feature that Micro Focus emulates with its
"sticky-linkage" compiler directive. The USEFUL part of this feature is
that if
you call the same program using multiple (IBM extension) ENTRY
statements and
one has 4 parameters and the 2nd call uses only 3 parameters, then
"addressability" is MAINTAINED for the omitted parameter.
The (less useful?) variation of this is if you call a program with NO
ENTRY
statement and call it first with 4 parameters and then with 3
parameters, then
the 4 item retains "sticky-linkage" (i.e. addressability) from the
previous
call.
THEREFORE< I don't think that they (IBM) could (uparwadly compatibly)
treat an
omitted trailing parameter as the same as an explicit OMITTED parameter.
***
I still haven't heard make from my usually reliable sources, but this is
my
opinion on the subject.
Wow! I never in my wildest dreams would have imagined linkage to work this
way. I have seen occasional reference to Micro Focus' "sticky linkage", but
I did not realize it was inherited from IBM mainframe Cobol. I just tried
it on z/OS and it works just as you say. (Didn't try VSE, but I imagine it
is the same.)
Even if one wanted to do this kind of trick, it seems to me it would make
more sense for a program to move the data to working storage if there was a
need to retain addressability to it between calls. Well, I guess this would
only work if the calling program didn't want to change the value in the
calling program. Of course you could save the address itself in
working-storage and do it that way. I can see no good (only evil) coming
out of taking advantage of this feature.
Oh well. I imagine I'm 30 or 40 years to late to get that fixed! Though if
it is undocumented, I guess they could go ahead and change it without
worrying about compatibility. :-)
Frank
.
- References:
- CALL using OMITTED
- From: Frank Swarbrick
- Re: CALL using OMITTED
- From: William M. Klein
- Re: CALL using OMITTED
- From: William M. Klein
- CALL using OMITTED
- Prev by Date: Re: Flowchart of Cobol code
- Next by Date: Re: CALL using OMITTED
- Previous by thread: Re: CALL using OMITTED
- Next by thread: Re: CALL using OMITTED
- Index(es):
Relevant Pages
|