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


  • Subject: Re: EXTFILE/EXTMBR in V5R1 question
  • From: Gary Guthrie <GaryGuthrie@xxxxxxxx>
  • Date: Wed, 09 May 2001 08:42:22 -0500

No, Brad, you won't have to do that. The external definition is
available.

What the new keyword does is allow you to provide an external name for
the file to open. In prior releases you could only specify the internal
name (the name in column 7 on the F-spec) and the external name was
always the same.

Now you must still specify the internal name (works like it always did),
but you have control over whether to specify a non-default value
(default of course being internal name) for the external name.

I'm not sure I like the function this provides, however. Sure it makes
it easy to specify a different file name or a different member to be
opened so that you don't need a driver CL to do so via an override, but
I think it opens the door for a bit of confusion and potential
design/maintenance issues.

If you provide the external name using the keyword, any overrides must
now be to the external name. This is counter to what RPG programmers
have done for centuries. The big potential problem I see is one in which
you design an application's flow. During the design phase, you know you
want the ability to open various files depending on run-time
considerations. You therefore use the keyword and you have a convenient
way to effect your goal. Time goes by and now all of a sudden you need
to issue some sort of additional override to the file. This means that
you must now, depending on your design, introduce a driver CL or
user-open and a call to QCmdExc (or one of its cronies) to put your
additoinal override into effect. This disrupts the general structure of
your application, and in my opinion maintenance will take longer (and be
more prone to introduce errors) than if your original design used a
driver CL (or the user-open method) and was already set up to let you
simply add the additional override parameters to your existing one.

I've rambled - does that make sense?


Gary Guthrie
NEWS/400 Technical Editor


"Stone, Brad V (TC)" wrote:
> 
> I have a quick question...
> 
> If I use the EXTFILE keyword to define which file to open at runtime in my F
> specs in V5R1, does that mean I have to internally define my fields?  I
> would assume since this is a run-time argument that the file description
> will not be available to my program.
> 
> Any ideas?
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.