× 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: a strange RPG program
  • From: Dave Shaw <dshaw1@xxxxxxxxxxx>
  • Date: Fri, 26 Mar 1999 11:02:54 -0500

RE: Joel's comment - OPNQRYF can do that, using the "work fields" that Booth
describes.  The MAPFLD statements would probably be messy, plus it's more
than likely that a "format file" would have to be created to specify on the
FORMAT parameter.  It would be a lot more complex than with FMTDTA, but it
can be done.  (It's VASTLY simpler with "better" interfaces to the
optimizer, such as ASC's Sequel product.  Disclaimer: I'm a Sequel
user/junkie/customer. ;)

Re: Booth and Ron's discussion of FMTDTA's efficiency advantage - One of the
options that the query optimizer has is to use the same sort engine as
FMTDTA, if the parameter settings on the OPNQRYF statement allow it
(OPTION(*INP) SEQONLY(*YES) ALWCPYDTA(*OPTIMIZE), for starters) and if it
decides that a sort is less costly than building indexes.  For a thumbnail
discussion of this, prompt OPNQRYF and press HELP for the ALWCPYDTA
parameter.  If the optimizer uses a sort, the difference between OPNQRYF and
FMTDTA performance is pretty much just the optimizer analysis overhead,
which is probably insignificant on a large file.

---
Dave Shaw, General Nutrition, Greenville, SC
To subscribe to the MAPICS-l mailing list send email to
MAPICS-L-SUB@midrange.com
The opinions expressed may not be my employer's unless I'm sufficiently
persuasive...

-----Original Message-----
From: Joel Fritz <JFritz@sharperimage.com>
To: 'RPG400-Lmidrangecom' <RPG400-L@midrange.com>
Date: Thursday, March 25, 1999 8:44 PM
Subject: RE: a strange RPG program


>One thing I know you can do with FMTDTA is to build a sort key using
>arbitrarily chosen bytes from a record in an arbitrary order.  We use it to
>"randomize" files.  Start with, say a check digit from some kind of a
serial
>number and throw in whatever else you can find to come up with a bizarre
>composite key which can contain alpha or numeric bytes.
>
>
>
>-----Original Message-----
>From: boothm@ibm.net [mailto:boothm@ibm.net]
>Sent: Thursday, March 25, 1999 3:42 PM
>To: RPG400-L@midrange.com
>Subject: RE: a strange RPG program
>
>
>It is my understanding that FMTDTA is still very effective on large file
>sorts, yes.
>
>It is also my understanding that you can define workfields in OPNQRYF and
>then use the workfields for sorting.  The workfields can, I believe, be
>filled by substringing any defined fields.
>
>Do not bet the family farm on those two comments though.  Others much more
>knowledgable than me will answer, I feel sure.
>
>
>In <01BE76A2.09AC0300.rdubson@kcata.org>, on 03/25/99
>   at 09:29 AM, Ron Dubson <rdubson@kcata.org> said:
>
>
>>boothm@ibm.net: I was able to solve my problem but thanks anyway. It is
>>my  understanding that FMTDTA has some advantages over OPNQRYF when the
>>file  being sorted is very large (over 100K records). Also, OPNQRYF can
>>only sort  on the fields in the DDS, not on subfields - isn't that
>>so?
>
>--
>-----------------------------------------------------------
>boothm@ibm.net
>Booth Martin
>-----------------------------------------------------------


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.