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



My objection to externalizing file I/O in RPG is that unlike the
languages where it makes sense to do it, in RPG file names and record
format names can't be assigned to character variables.  I've seen
situations where it made sense like files divided into several parts
(relic from much smaller file size limits) where it was nice to have a
routine that protected you from deciding when to go to the next file.
Writing separate routines for a file and all its logical views or having
monolithic procedures with long selects doesn't seem like it has a big
payoff.  You still have to hard code the file name or record format.
Calling the access routines seems remarkably like using the I/O opcodes.


  

> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
> Sent: Tuesday, July 19, 2005 9:07 AM
> To: RPG programming on the AS400 / iSeries
> Subject: RE: Free format sql,was: Nice trick for easy viewing
> free-form RPG and embedded SQL
>
> I'm Rob, not Ron.  Basically I am not a big fan of
> externalizing I/O because it's been my impression that a bulk
> of the people who are enthused about it are the ones who
> write the external I/O routines.  Not the consumers of the routines.
>
> I'd rather write a program that does something like FMyFile....
>  /free
>   read(e) MyFile;
>   Dow %status(MyFile)=ReadOk;
>     // process the data
>     read(e) MyFile;
>   EndDo;
>   Select;
>   When %status(MyFile)=EOF;
>     // Ok, don't worry about this one
>   Other;
>     // Oh darn!!!
>     ...
>   EndSl;
>
> Than a program that does something like
> /free
> Select;
>   When OpenInventoryData()=Cool;
>     Select;
>     When GetInventoryData(Key1: Key2...)=Cool;
>       MyField1=GetBalance();
>       MyField2=GetWarehouse();
> ...
> Some externalizing gurus might say you wouldn't have a
> GetInventoryData.
> Instead the keys would be on the GetBalance, etc.  Then what,
> does it read a record for each field requested?  I'm not
> expecting an answer.  It's just a sample of how externalizing
> may raise more questions than it solves.
>
> Oh, there's the popular myth that if I change a file
> structure then I do not need to worry about it if I've
> externalized.  My counter is that a popular package changed
> the size of their key field and all the rest of their fields.
>  So if I have a program
> D MyItem         s            15a
> D ItemDesc       s            30a
> I still have issues.  Now, if I've LIKEd these fields off of
> an external data structure I'm better off.  I still have to
> compile though.  (And maybe redesign any 5250 screens to
> change the layout, etc).  Then again, isn't using an external
> method supposed to hide from your developers what the name of
> the actual physical file is?  If so, how would they know
> file(s) to use in the data structure(s)?
>
> Rob Berendt
> --
> Group Dekko Services, LLC
> Dept 01.073
> PO Box 2000
> Dock 108
> 6928N 400E
> Kendallville, IN 46755
> http://www.dekko.com
>
>
>
>
>
> "Wilt, Charles" <CWilt@xxxxxxxxxxxx>
> Sent by: rpg400-l-bounces+rob=dekko.com@xxxxxxxxxxxx
> 07/19/2005 08:37 AM
> Please respond to
> RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
>
>
> To
> "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
> cc
>
> Subject
> RE: Free format sql,    was: Nice trick for easy viewing
> free-form RPG and
> embedded SQL
>
>
>
>
>
>
> Ron,
>
> I'm surprised that you're not a fan of externalizing I/O.
>
> Why not?
>
> Charles Wilt
> --
> iSeries Systems Administrator / Developer
> Mitsubishi Electric Automotive America
> ph: 513-573-4343
> fax: 513-398-1121
> 
>
> > -----Original Message-----
> > From: rpg400-l-bounces@xxxxxxxxxxxx
> > [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of rob@xxxxxxxxx
> > Sent: Monday, July 18, 2005 5:10 PM
> > To: RPG programming on the AS400 / iSeries
> > Subject: Re: Free format sql, was: Nice trick for easy
> > viewing free-form
> > RPG and embedded SQL
> >
> >
> > I just don't see the advantage of the service program; but
> > then, I've not
> > seen this iSeries Toolkit.  I'm not a big fan of the
> > externalizing I/O
> > concept either.
> >
> > Rob Berendt
> > --
> > Group Dekko Services, LLC
> > Dept 01.073
> > PO Box 2000
> > Dock 108
> > 6928N 400E
> > Kendallville, IN 46755
> > http://www.dekko.com
> >
> >
> >
> >
> >
> > "Carel Teijgeler" <coteijgeler@xxxxxxxxx>
> > Sent by: rpg400-l-bounces@xxxxxxxxxxxx
> > 07/18/2005 03:56 PM
> > Please respond to
> > RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
> >
> >
> > To
> > rpg400-l@xxxxxxxxxxxx
> > cc
> >
> > Subject
> > Re: Free format sql, was: Nice trick for easy viewing
> > free-form RPG and
> > embedded SQL
> >
> >
> >
> >
> >
> >
> > Rob,
> >
> > Ever thought to do embedded SQL in a service programme
> > (*SRVPGM)? Then you
> > only have to write one SQLRPGLE programme and keep it out
> of the main
> > programme. (In the iSeries Toolkit there is a sample, DYNSQL.)
> >
> > I would rather see that the cursor naming is more flexible:
> >
> > C*EXEC SQL
> > C* Fetch C(:ArrayIndex) into :SourceFile.Library, :SourceFile.File
> > C*END-EXEC
> >
> > But you have to name each cursor seperately:
> >
> > >C*EXEC SQL
> > >C* Fetch C1 into :SourceFile.Library, :SourceFile.File
> > >C*END-EXEC
> > >C*EXEC SQL
> > >C* Fetch C2 into :SourceFile.Library, :SourceFile.File
> > >C*END-EXEC
> >
> > and, unfortunately, each SQL element gets the next sequence
> > handle (with 8
> > Cursors):
> > Prepare 1 - 8
> > Open     9 - 16
> > Fetch    17 - 24
> > Close   25 - 32
> >
> > Or perhaps prototyping the call to SQLROUTE and stick to
> plain RPGLE.
> >
> > Just my thoughts.
> >
> > Regards,
> > Carel Teijgeler
> >
> > *********** REPLY SEPARATOR  ***********
> >
> > On 18-7-05 at 14:09 rob@xxxxxxxxx wrote:
> >
> > >Then again, I would love to see free format SQLRPGLE.  Yes,
> > it would be
> > >nice to not have to break in/out of /free.  However the biggest
> > >improvement I am looking to see in free format SQLRPGLE is
> not these
> > >esthetics.  It's the ability to get rid of the preprocessor
> > converting
> > sql
> > >to calls like
> > >C*EXEC SQL
> > >C* Fetch C1 into :SourceFile.Library, :SourceFile.File
> > >C*END-EXEC
> > >C                   Z-ADD     -4            SQLER6
> > >C                   CALL      SQLROUTE
> > >C                   PARM                    SQLCA
> > >C                   PARM                    SQL_00006
> > >C     SQL_00009     IFEQ      '1'
> > >C                   EVAL      SOURCEFILE.LIBRARY = SQL_00011
> > >C                   EVAL      SOURCEFILE.FILE = SQL_00012
> > >C                   END
> > >
> > >Then maybe we could use variables like
> > >MyArray(x).SubArray(y).SubSubArray(z)
> > >
> > >Functions over esthetics.
> >
> >
> >
> > --
> > This is the RPG programming on the AS400 / iSeries (RPG400-L)
> > mailing list
> > To post a message email: RPG400-L@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> > or email: RPG400-L-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the archives
> > at http://archive.midrange.com/rpg400-l.
> >
> >
> > --
> > This is the RPG programming on the AS400 / iSeries (RPG400-L)
> > mailing list
> > To post a message email: RPG400-L@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> > or email: RPG400-L-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the archives
> > at http://archive.midrange.com/rpg400-l.
> >
> >
>
> --
> This is the RPG programming on the AS400 / iSeries (RPG400-L)
> mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>
> --
> This is the RPG programming on the AS400 / iSeries (RPG400-L)
> mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>

*****************************
NOTICE:
All e-mail sent to or from this e-mail address will be received or otherwise 
recorded by
The Sharper Image corporate e-mail system and is subject to archival, 
monitoring,
and review by and/or disclosure to Sharper Image security and other management.
This message is intended only for the use of the addressee and may contain 
information
that is privileged and confidential.

The contents of this message may contain personal views which are not the views 
of The Sharper Image.
If you are not the intended recipient, dissemination of this communication is 
prohibited.
*****************************


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.