I did mimic one of our reports that currently uses FMTDTA to preselect data, using embedded SQL. The SQL statements were dynamically created within the RPG program. While the process did work, it was over 10 times slower then the FMTDTA method. I am by no means an SQL expert, perhaps there is tuning and such that could be done. However, the slowness of our tests with embedded SQL precludes us from using it.

Kelley

----- Original Message ----- From: "Michael Ryan" <michaelrtr@xxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Sent: Thursday, April 26, 2007 6:29 PM
Subject: Re: Sorting


This sounds like a great application for an RPG program using embedded
SQL. Search the archives - you'll find some good material.

On 4/26/07, Kelley Shaddrick <kshaddrick@xxxxxxxxxxxxxxxx> wrote:
Folks,

I am currently working in a shop that has a lot of older code. The code was
run through some kind of utility to make it RPG IV compliant, sort of, this
was done before my time. There are still large numbers of programs that have
internally defined files, and so on. The other thing that is used very
heavily is FMTDTA. One of the reasons is that we do a lot of selecting of
data. As an example, our item number is made up of 5 2-digit codes. Each of
these 5 codes is used to select the data a user wants to see on screens and
reports. Depending on what they want, all five could be used or only one or
any combination of. The data is then sorted into the proper order. The
source specs for FMTDTA are generated on the fly. FMTDTA seems to do this
well.

I've read through a number of entries in the forum archive that discussed
open query, SQL, etc. These options, from what was written, either don't
seem to be able to handle this very well, or are not really in favor any
more then FMTDTA is. I looked briefly at using SQL with the RUNSQLSTM
command, but don't seem to see any way to use the order by clause (perhaps
I'm doing something wrong, but I always get an error that it is not a valid
tag). I'm concerned with FMTDTA, one of these days IBM may just neglect to
include it as an option. I'm looking for ideas for replacing it with
something else.

Thanks,

Kelley


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.





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.