×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
"I think, though, the question surrounds the issue of multiple parms, Jon.
I THINK Richard is implying that three 10-character parameters are passed as
one contiguous 30-character blob."
And I was trying to politely make the point that he's wrong about that.
This is no more or less likely when COBOL is involved than RPG. The
parameter mechanisms are identical. If you think about it - ILE couldn't
work if that were not the case - you'd always have to know the type of your
caller before knowing how to deal with the parms.
COBOL's PROCEDURE DIVISION USING maps directly to RPG's *ENTRY PLIST. The
entries in the LINKAGE SECTION are simply the parm definitions. COBOL
requires that you differentiate between WS variables and LS variables. RPG
simply allows them both to be defined in D-specs/I-specs etc. and then adds
the BASED keyword under the covers if the field/DS is discovered to be in
the *Entry list.
The only real difference between RPG and COBOL calling mechanisms is that
COBOL has a BY COPY option - which works in similar fashion to RPG's CONST
except it _always_ produces a copy (oh how I wish RPG had a CONST ALWAYS
option) and doesn't have any type/size transform built in - as there's no
proto to tell it what the parm is supposed to look like!
The only "mashing" effect that should ever occur is when passing by value
since all reference parms are simply the pointers to the original data.
Even then, it will only happen if the parms are of a type that will be
passed on the stack - char, zoned and packed are - float and pointers
aren't. I don't think integers are on the stack either but I'm not certain
- I stopped worrying about what was/wasn't on the stack after RPG added
float. It was only prior to that that I was playing silly games with the
stack while attempting to use the C function library.
Jon Paris
Partner400
www.Partner400.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.