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



> -----Original Message-----
> From: Dean Bathke [mailto:dbathke@Quintrex.com]
> Sent: Wednesday, March 06, 2002 6:49 AM
> To: 'rpg400-l@midrange.com'
> Subject: stand alone modules (no service program) and
> handling file I/O
>
>
>
>       I have 5 modules compiled into an ILE program. 4 of
> them are work
> modules that do a little formatting and validation. The 5th
> module is the
> driving program that will be doing a conversion. ( A One time
> only run ).
> The 4 validation modules generally are modules that I will be
> able to use in
> other conversion programs down the road.
>       The 4 work modules each open a file or two in the course of the
> processing. Currently I have each of these modules set up as
> Prototyped
> Calls (Function calls?) the last parm passed into these
> modules is an action
> parm. when this action code is OPEN all the work modules just open the
> files. When CLOSE, they close the files. Anything else means
> do the work. I
> am just not sure if this is how I HAVE to do this but I
> certainly dont want
> to Open and Close these files every single time that they are
> used by the
> driving program. An example of the simplest module is below.
> ANy comments ?
> One thing to remember is that the programming manager does
> NOT want any
> service programs created at this time. (   for now anyway  :)    )


My approach is to open the files the first time they are needed, by using
%open to check if they are open.  Then I just leave them open, they will be
closed when the activation group ends.  For our applications this works fine
although there may be circumstances that this would cause problems with.

Also, a dictate that service programs not be created at this time is
short-sighted and will cause maintenance nightmares in the future.  If one
of those modules is bound to say 100 programs and you need to change it you
must rebind all 100 of those programs.  And, guess what, if you miss
rebinding one of them then it will go along using the old version.  Service
programs can eliminate these headaches.

Scott Mildenberger


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.