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.

Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power





-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of VERNON HAMBERG Owner via MIDRANGE-L
Sent: Tuesday, January 31, 2023 12:47 PM
To: midrange-l@xxxxxxxxxxxxxxxxxx
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.


Cheers
Vern


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,
date('2023-01-21') todate
from sysibm.sysdummy1)
with data
on replace delete rows )
or QMQRY and parametrized as needed.

add this table to your queries and you have the values available, whereever
needed.

D*B

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

Does anyone know how to do this?

TIA, Darryl Freinkel


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.