|
I'm going to suggest that you embed the CREATE VIEW statement into the RPG
code in a procedure, maybe - make it the first thing you run in the program.
Or, if the view is needed to do something more with the results from the
other cursor, put its definition in as part of a JOIN or some such. Nested
table expression instead of the view.
Otherwise, you might look at the create attribute that controls when the
cursor is closed. It might make a difference.
HTH
Vern
On 7/25/2014 7:54 AM, Siwicki, Gary (GSiwicki) wrote:
In my RPG program, I call a CL that has a RUNSQLSTM command that uses
the commands in a TXT source member to create an SQL view in QTEMP. The
only command executed is "CREATE VIEW". When this occurs, there is
already another, unrelated SQL cursor that is open and being processed
in the RPG program. When the view is created by the CL program, as soon
as control is returned to the RPG program, the "unrelated" SQL cursor is
closed.
I realize this is a very awkward way of creating a view but it was
decided that this is the best way to address the unique needs of the
application. Does anyone know what's going on here? I posted here
because I don't think this really has much to do with RPG.
Gary Siwicki
RPG Developer
Lincare, Inc.
(727) 431-8186
************************************************************
************************************************************
************************************************************
************************
This message originates from Lincare Holdings Inc. It contains
information which may be confidential or privileged and is intended only
for the individual or entity named above.
It is prohibited for anyone else to disclose, copy, distribute or use the
contents of this message.
All personal messages express views solely of the sender, which are not
to be attributed to Lincare Holdings Inc., and may not be copied or
distributed without this disclaimer.
If you received this message in error, please notify us immediately at
MailAdmin@xxxxxxxxxxx or (800) 284-2006.
************************************************************
************************************************************
************************************************************
************************
--
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 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.