I will say that I loved QMQRY for user reporting. I had a rough template of RPG/DDS/CLLE/QMQRY that I could crank them out pretty easily.
Use the RPG to get/validate parms and then run query to an outfile, feed it to GoAnywhere for whatever format they wanted and we were good-to-go.
The GoAnywhere project handled retrieving the column titles from SYSCOLUMNS.
COMMON Certified Application Developer - ILE RPG on IBM i on Power
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of VERNON HAMBERG Owner via MIDRANGE-L
Sent: Tuesday, January 31, 2023 12:47 PM
Cc: VERNON HAMBERG Owner <vhamberg@xxxxxxxxxxxxxxx>; midrange-l@xxxxxxxxxxxxxxxxxx
Subject: Re: Running a QRYDFN using STRQMQRY to pass the parameters
IBM had a PTF somewhere around April 2011 - SI42345 for 6.1, SI42363 for 7.1, before that, types 2 & 3 were processed as type 1. Now (7.3 for us) a type 2 is a LEFT OUTER JOIN, type 3 is a LEFT EXCEPTION JOIN - I just did this with only 2 tables, created 3 Q4i queries, and used RTVQMQRY on each.
BTW, the QM message descriptions for what happens that might not work, etc., are QWM2301 - QWM2393 in QCPFMSG. The messages about join type are still there but probably never called now.
On Tue, 31 Jan, 2023 at 8:33 AM, Dsternb <dieter.bender@xxxxxxxxxxxx> wrote:
To: midrange systems technical discussion
... using STRQMQRY for Query400 queries would change your join logic and I
woldn't recommend this.
As a (better) alternative:
create a table with parms, in your example with to datefields fromdate and
to date. fill this table with only one record, containing the needed values.
this could be easily done by QMQRY or sql
( create or replace table parms as(
select date('2023-01-11') fromdate,
on replace delete rows )
or QMQRY and parametrized as needed.
add this table to your queries and you have the values available, whereever
I've read a few places that this can be done, saving one having to convert
a QRYDFN to a QMQRY.
I have tried to find examples on how to do this, but have not had success.
The examples I find show the QRYDFN being run but there are steps missing,
it appears. I need to keep the QRYDFN's as the users create the reports. I
am trying to schedule the queries in the scheduler passing from and to
Does anyone know how to do this?
TIA, Darryl Freinkel
As an Amazon Associate we earn from qualifying purchases.