× 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.



In order to make the condition work, the return value is defined as an
indicator. The procedure passes back *On or *Off depending on whether or
not a record was found. As for the data, there are a number of ways to do
it.

The simplest way is to define an externally described data structure using
EXTNAME and pass it back and forth as a parameter. This is not my
favorite way to do it, but it will definitely work. I personally prefer
to create a data structure of only the most commonly used columns to cut
down the length of the parameters being passed. For the less commonly
used columns, I will usually create "Get" procedures to retrieve them only
when needed.

To handle the setll, I normally use what I call a "Cursor Control"
parameter. So that parameter tells the procedure whether it should issue
the setll and then do the read (or reade) or if it should just grab the
next (or previous). So a typical loop for me would look something like
this:

Cursor_Ctl = cResetCursor ;
Dow BOM_GetLineDtl(BOM# : BOM_Dtl_DS : Cursor_Ctl) ;
Cursor_Ctl = cNextRec ;

// Do whatever with BOM Detail data
EndDo ;



Hope that clarifies,

Brian May
Project Lead
Management Information Systems
Garan, Incorporated
Starkville, Mississippi



rob@xxxxxxxxx
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
03/01/2010 09:59 AM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: File Read in Subprocedure WAS(Re: More on RPG style)






Brian,

How do you pass it back and forth as parameters and still do
Dow ReadMyfile();



Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.