|
If I'm understanding the situation correctly, all of the program Bs
are not going to actually do anything with the information in the data
structure. They are just going to pass it along to the procedures in
service program C as a parameter.
That being said, you don't need to pass a pointer. As has already
been mentioned, parameters on dynamic program calls in RPG are already
using pointers. (So if you pass a pointer field, you are actually
passing a pointer to a pointer.)
In program A, use the data structure directly on calls to the program
Bs.
In all of the program Bs, define it as just a one byte character
field. Pass the one byte field on the procedure calls to service
program C.
In service program C, define a data structure idential to the one in
program A. Make it based on a pointer. Set the pointer to the
address of the one byte field.
Another thought ... if the program Bs are going to call multiple
procedures in service program, and most/all of those procedures are
going to need the data in the data structure, you might want to
consider:
1. Making the data structure a global variable, based on a global
pointer field.
2. Creating a special procedure in service program C that would accept
the one byte character field and establish the pointer.
Then at the beginning of each program B, call the special procedure.
Doing this, you would not need to pass the one byte character on any
of the other procedures.
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.