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



Buck mentioned that RUNSQL doesn't do a SELECT. It also doesn't have substitution variables, either. You have to put values into dynamic statement strings.

The generic SQL processors that Buck and I and others have written all use only substitution variables in a QMQRY, and those also need you to construct the statement, concatenating values into the statement. This makes it about the same as the new RUNSQL from IBM, with the benefit of being able to use STRSQL. I've done a presentation on this at COMMON and at a couple user groups.

Vern

On 5/23/2013 1:30 PM, Anderson, Kurt wrote:
We use QM in order to run SQL from CL because it handles variables unlike RUNSQLSTM. We're not actually using it for presentation, so we don't touch the forms aspect.
We should be getting the latest Technology Refresh soon so maybe we'll be able to use CL's RUNSQL instead of QM.

Thanks,
Kurt

-----Original Message-----
From: wdsci-l-bounces@xxxxxxxxxxxx [mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck Calabro
Sent: Thursday, May 23, 2013 1:27 PM
To: wdsci-l@xxxxxxxxxxxx
Subject: Re: [WDSCI-L] View QMQry Source in RDP

On 5/23/2013 2:15 PM, Anderson, Kurt wrote:
Buck,

I guess I wasn't aware of CRTQMQRY. I am in fact using STRQM (and to run it in a CL - STRQMQRY).
STRQM creates two objects: a *QMQRY and a *QMFORM. The form holds formatting instructions and the query holds the SQL. ish. You can convert STRQM queries to source-based queries via RTVQMQRY. This will result in two source files: QQMQRYSRC and QQMFORMSRC. The query part is easy to understand and edit. The form part can be a challenge. Once you've retrieved and edited the source you need to CRTQMFORM and CRTQMQRY.

If you mostly change the SQL and rarely change the presentation, this can work out OK. If you need to change the presentation (more columns,
etc) then you'll probably be best served by copying the SQL into the STRQM session and using that editor to handle the formatting. After getting it just so, RTVQMQRY again to get the source back out.

Lot of work for a small change until you get comfortable with QMFORMs.
--buck

-----Original Message-----
From: wdsci-l-bounces@xxxxxxxxxxxx
[mailto:wdsci-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck Calabro
Sent: Thursday, May 23, 2013 1:13 PM
To: wdsci-l@xxxxxxxxxxxx
Subject: Re: [WDSCI-L] View QMQry Source in RDP

On 5/23/2013 1:28 PM, Kurt wrote:

Is there a way to work with QMQry source in RDP?

I would like to update some SQL and I was thinking it'd be nice if I could do it in RDP. I know I can do it in RDP (or wherever) and copy what I want into QMQry, but I'd like to be able to directly modify the QMQry source from RDP.
To be clear, I think you are not talking about editing QQMQRYSRC; the place the source is stored for the CRTQMQRY command; the resulting object executed via STRQMQRY. RDp works fine for this although there is no prompting available.

I think you are talking about STRQM, which doesn't seem to have a source file associated with it. The 'source' seems embedded in the *QMQRY object. Unless STRQM has a secret stash where it keeps the source, I don't think any external editor is going to work with these.
--buck
--
This is the Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries (WDSCI-L) mailing list To post a message email: WDSCI-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/wdsci-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.