1,975 pts.
 Return more than one parameter from a subprocedure
I want to return Name, DOB and Place of Birth from a Subprocedure. Is it possible to return more than one parameter at a time? Any method other than using the same parameter as input and output?

Software/Hardware used:
ASKED: June 13, 2012  10:38 AM
UPDATED: June 14, 2012  4:40 PM
  Help
 Approved Answer - Chosen by RamvishakRamesh (Question Asker)

Return a data structure (i.e., a DS).

By returning a value, you are creating a function which by definition will always return "a value". Not two values or three values.

However, the value can be a structure; and you can use the single structure to carry a set of subfields.

Tom

ANSWERED:  Jun 14, 2012  0:00 AM (GMT)  by RamvishakRamesh

 
Other Answers:
Last Wiki Answer Submitted:  June 27, 2012  7:25 am  by    0 pts.
Latest Answer Wiki Contributors: 
To see other answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

For what you’ve described above and assuming you are going to use a service program can you not just define the procedure interface with a character return value long enough to contain all 3 pieces of information as fixed-length entities, and then split them back out again after the subprocedure call?

 465 pts.

 

I will typically define procedures to return a boolean – successful/unsuccessful
With input (Constant) paraamerters and output parameters (not constant) and error parameters (*OMIT) so they can be omitted from the list.

 44,220 pts.