Hi Dave

I am so used to using this stuff that I forget a first step. You have to create the source physical file first for queries and for forms. The help text on the source file parameter has an important phrase - "previously created source file"!

So for the queries use

CRTSRCPF YOURLIB/QQMQRYSRC RCDLEN(91)

and for forms use

CRTSRCPF YOURLIB/QQMFORMSRC RCDLEN(162)

These are the recommended names by IBM - documented in that Query Management Programming manual.

You should run the RTVQMQRY command against your Query/400 queries and put the result into the above-created file QQMQRYSRC - the member will be created if it does not exist. You should run the RTVQMFORM command against the same Query/400 queries and put the result into the above-created file QQMFORMSRC. The members you get can be pulled down to the PC using FTP in ASCII mode or maybe even directly through a network drive connection to your source file.

On the iSeries, QM procedures are already in a source file member - they are not compiled into objects, so if QMF can import them, just do it.

BTW, just a thought - Query/400 queries, to my mind, combine the data retrieval and presentation that is provided by the 2 kinds of objects, QM queries and QM forms. QM queries only retrieve data (or run any SQL statement) whereas QM forms define how the output will look.

There is a chapter in the above-mentioned manual on what the possible problems will be when retrieving queries and forms from Query/400 queries - there's a summary there of what you have probably seen already. One of the most common problems is in JOINs - although you can specify 3 kinds of JOIN in Query/400. you will get only INNER JOINs in the retrieved SELECT statement.

HTH my friend
Vern

At 06:48 PM 11/28/2006, you wrote:

Vern,

Tried two of the commands you recommended:  RTVQMQRY  & ANZQRY.

ANZQRY worked well and told me how out of wack/non-standard the
Query/400 queries created here really are.   Oh, boy.

Tried RTVQMQRY per what you said below:

"There are 2 commands that work against both QM and Query/400 queries -
RTVQMQRY and RTVQMFORM - they generate source - in QM terms are an
EXPORT. The source can be IMPORTed by something that understands QM."


Doesn't seem to work for me.   The command REQUIRES I put in a source
file.  If I had a source file I could probably export that and be done
with what I'm doing.   You said the command generates source... can't
get it to do so because it wants a SOURCE file... a Catch-22 to me.

So how do I CREATE a source file which I can export when all I have are
queries and no source?

Thanks,

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