× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Jeff,

You can pass data structures back to the calling program.

Matt

-----Original Message-----
From: Jeff Crosby [mailto:jlcrosby@DILGARDFOODS.COM]
Sent: Tuesday, August 06, 2002 9:46 AM
To: RPG400-L@midrange.com
Subject: Procedure with multiple fields computed


I have converted a couple of programs to free-format C-specs ("FFT").
One of the op codes not supported in FFT is the CALL opcode.  The
suggestion in the manual and elsewhere is to convert these to
procedures.

I have a particular subprogram that determines 2 fields, "portion cost"
and "portion cost description".  These 2 fields are always used together
so it makes logical business sense to determine them together.  Various
attribute about an item (cost, how it's packed, how it's sold, how it's
served, etc.) are passed to the subprogram, and the portion cost and
portion cost description are returned.

Procedures can only export 1 value, however.  For the present, I have
made 2 procedures and call them back-to-back.  It seems wasteful to me,
however, as they will _always_ be used together.  Is there a solution?
Can I use a data structure as the export?  Is that how to do this?

Thanks for any insight.

--
Jeff Crosby
Dilgard Frozen Foods, Inc.
P.O. Box 13369
Ft. Wayne, IN 46868-3369
260-422-7531

The opinions expressed are my own and not necessarily
the opinion of my company.  Unless I say so.


_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.