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



This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Immensely.

STRQMQRY has the SETVAR function.  RUNSQLSTM does not have any equivalent.

Everybody and their brother has written a wrapper for STRQMQRY which will
process a generic SQL statement.  It's a queer way of getting embedded SQL
in CL.  We stole ours out of a magazine years ago.  RUNSQL.
RUNSQL REQUEST('UPDATE MYLIB/MYFILE SET MYFIELD=''A'' WHERE
MYFIELD=''B''')
You could use that to build your sql string on the fly and then process
it.

But then you're getting close to the time when you need to start
considering imbedding SQL into RPG.

Rob Berendt
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin




"Meade, Bernard" <bmeade@fmgroup.com>
Sent by: midrange-l-admin@midrange.com
04/26/2002 08:56 AM
Please respond to midrange-l


        To:     "'midrange-l@midrange.com'" <midrange-l@midrange.com>
        cc:
        Fax to:
        Subject:        RE: STRQMQRY Command


Rob:

Yes I an using substitution variables.  Does that change things?

Bernie

 -----Original Message-----
From:            rob@dekko.com [mailto:rob@dekko.com]
Sent:            Friday, April 26, 2002 9:47 AM
To:              midrange-l@midrange.com
Subject:                 Re: STRQMQRY Command

This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Use RUNSQLSTM instead, or are you using substitution variables?

For example Library MYLIB, source file QRUNSQL member TEST has the
following
Update mylib/myfile
 set myfield='A'
 where myfield='B';
Update mylib/otherfile
 set itsfield='C'
 where itsfield='D';

Separate statements with a semicolon.
Execute using
RUNSQLSTM SRCFILE(ROB/QRUNSQL) SRCMBR(TEST) COMMIT(*NONE)

Rob Berendt
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin




"Meade, Bernard" <bmeade@fmgroup.com>
Sent by: midrange-l-admin@midrange.com
04/26/2002 08:35 AM
Please respond to midrange-l


        To:     "'midrange-l@midrange.com'" <midrange-l@midrange.com>
        cc:
        Fax to:
        Subject:        STRQMQRY Command



Is it possible to put multiple update SQL statements in a QMQRYSRC member
to
be executed by the STRQMQRY command?  If so, do you separate the commands
with a special character or just put them on separate lines?

Bernie

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
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@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
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@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
or email: MIDRANGE-L-request@midrange.com
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 ...


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.