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



Brad;

If I don't close the files in the NOMAIN subprocedures are they not still
open when I exit the program entry module and it sets on *LR?

Doesn't that mean that those files including display files are open until
the User signs off?

Andy
----- Original Message -----
From: "Brad Stone" <brad@bvstools.com>
To: <rpg400-l@midrange.com>
Sent: Monday, January 07, 2002 3:51 PM
Subject: Re: NOMAIN in Inquiry Module Question


> You have it.  Use NOMAIN when you don't want the "main"
> procedure to run.  ie the logic cycle, etc.
>
> I would suggest against putting any "runtime logic" in
> subprocedures.  Keep them seperate as your own BIFs.  Don't
> code subprocedures into programs.
>
> As far as opening and closing files, even with NOMAIN files
> will be opened at first call.  When you compile, you'll see
> the warning that you should close the file implicitly.  I've
> ignored that for years now.  Why?  Even if you do close
> them, you'll need to open them again, and the flags and BIFs
> to check if the file is open don't recognize that, at least
> they didn't in the past.
>
> I still always let the system open my files that are defined
> in subprocedures and do not close them.  Faster access for
> future calls since it's already open.
>
> Brad
> www.bvstools.com
>
> On Mon, 7 Jan 2002 15:41:55 -0500
>  "Andy Hautamaki" <ahautamaki@tstoverland.com> wrote:
> > I'm a little uncertain on when to use 'NOMAIN' in a
> > module.
> >
> > I've got a group of inquiry modules where the User
> > selects a record from a
> > SFL and depending on the option it executes different
> > modules.
> >
> > Then from these modules the User can go down more levels.
> > At each level a
> > different module is executed.
> >
> > I realize by using a 'NOMAIN' module I should be doing
> > the opening and
> > closing of the files including the display files, so I
> > created exit routines
> > to close all the open files from the modules.
> >
> > Now I'm looking at all this and wondering when your
> > working with interactive
> > modules should I even be using 'NOMAIN'???
> >
> > Thanks
> > Andy
> >
> > _______________________________________________
> > 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.
> >
>
> Bradley V. Stone
> BVS.Tools
> www.bvstools.com
> _______________________________________________
> 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-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.