... its a liitle bit offtopic for the OP, but...
@ set(property : value): the drawback of this aproach is: readability and
you loose all type checking of the compiler => I would not recommend this,
it's a bad practice!
@ the caller owns the memory: another rpg- typic bad practice! this aproach
destroys all encapsulation, the contents of the memory could be corrupted by
the caller => I would strongly recommend to avoid this!!!
@ multiple instances: you could define a DS instanceType based dummy
pointer, containing all "instance Variables" (:= all statefull information)
then you woul need a procedure new (a "Constructor") returning an instance
(an int as a handle), allocating storage for another occurence of a DS of
instanceType. Last not least you would have an additional parm int handle
for all exported procedures. For an example you could have a look to:
http://bender-dv.de/Sourcen/QRPGLESRC.APILIST .
@OP: I would start to forget Subroutines and using subprocedures instead.
Second step would be to forget the opcodes call and callb and to use callp
instead. When you habe incorporated this, next step would be to export
procedures. When this is managed, come bacjk to discussion about design of
modules and SRVPGMs.
D*B
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.