Using prototypes and Procedure interfaces I understand that no parameter may be returned if a procedure is called directly via CALLP. And only one parameter may be returned if procedure is called via EVAL with return.
What is the best way to return multiple parameters from a procedure (assuming I don't want to use PLIST/PARM's).
For example a date routine (now created as procedure) passes back a date formatted in two different ways. Am I now supposed to format both dates into one field and return merged field/use the LDA? Or is there a better method?
Software/Hardware used:
AS400
ASKED:
October 15, 2009 11:09 AM
UPDATED:
October 19, 2009 1:18 PM
Where did you learn that parameter values for a procedure, external or internal, can’t be returned? That source of info needs to be corrected. You wouldn’t happen to be working out how to call a ‘stored procedure’, are you? That can take some extra effort.
Tom
If you want to return more than one value, you can return a data structure. Your prototype will look something like this: