|
Can anyone tell me how to specify operational descriptors for a main procedure.
I have
OPDESC on the prototype and procedure interface but get an error "operational
descriptors
not passed" when the program is called. Is this because you can't pass
operational
descriptors to a main procedure? This procedure is an OPM interface to a
sub-procedure
that receives highly variable parms. I have found that callprc to a
sub-procedure does
pass operational descriptors. I may just have to use %len(%trimr()) to set the
length and
require that they be declared at the maximum width in OPM programs.
%len(%trimr()) for a
long field takes a hemosecond to execute.
Can anyone tell me the "correct" way to specify a main procedure with a
prototype? The
manual is vague. I have settled on the name Main for the prototype and
procedure
interface. I also found a that a main procedure will loop if you specify a
begin and
end procedure. Found that through trial and error while trying to get the
OPDESC to
work. This means that a main procedure cannot be used as a sub-procedure.
One more question. What is the best way to pass omittable parms through a
program?
I don't understand why a parameter passed by reference can't just be passed
through
to a another procedure with the associated descriptors, etc. intact. Is there
a trick?
All I get is a reference to a parameter not passed. Depending on the number of
omittable parameters I have had to code up to 25 different calls in a case
statement. In
another case I had to use subroutines and copy source because there would have
been hundreds of possible combinations.
Thanks,
David Morris
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List! To submit a new *
* message, send your mail to "RPG400-L@midrange.com". To unsubscribe *
* from this list send email to MAJORDOMO@midrange.com and specify *
* 'unsubscribe RPG400-L' in the body of your message. Questions should *
* be directed to the list owner / operator: david@midrange.com *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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.