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



It would be nice if there was an option when creating SQL global variables
to create a data area instead of a service program.
Similar to when creating SQL SEQUENCEs, there is a data area.
The embedded SQL could set the global variable to the value you are
selecting.
Then you could use RTVDTAARA.

I wonder how the service program works anyway. Every time a global
variable is set, where is the data written to? If we knew that, maybe we
could retrieve the data in CL.


Yours truly,

Glenn Gundermann
Email: glenn.gundermann@xxxxxxxxx
Work: (416) 675-9200 ext. 89224
Cell: (416) 317-3144


On 19 April 2016 at 09:10, Rob Berendt <rob@xxxxxxxxx> wrote:

Now that I think about it, this isn't a CL issue. This is a database
issue. DB2 does the precompilers not the language teams.
In theory one could consume SQL-CLI from CL, just like those who don't
want to put out the money for 5770-ST1 for the RPG precompiler.
It doesn't take a big leap to then envision a precompiler.


Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From: Glenn Gundermann <glenn.gundermann@xxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 04/19/2016 09:02 AM
Subject: Re: Imbedded SQL in CL.
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>



Hi Rob,

I would agree embedded SQL in CL is not the friendliest but boy has it
come
a long way.

One method to retrieve data into a CL program is to have the embeded SQL
insert the data into a table. Use DCLF to declare the table and RCVF to
read the data.



Yours truly,

Glenn Gundermann
Email: glenn.gundermann@xxxxxxxxx
Work: (416) 675-9200 ext. 89224
Cell: (416) 317-3144


On 19 April 2016 at 07:40, Rob Berendt <rob@xxxxxxxxx> wrote:

I know that one can execute SQL from CL in a myriad of ways including
RUNSQL, qsHell, REXX, etc but with all these new DB2 for i Services I
really wished we could have true imbedded SQL within CL.

SELECT restricted_state
FROM TABLE(QSYS2.SYSTEM_STATUS()) SysInfo

could be
SELECT restricted_state into :&Restricted
FROM TABLE(QSYS2.SYSTEM_STATUS()) SysInfo

If (&Restricted = 'YES') THEN(...)

Is just one small sample.

I know, I know, there's a bazillion ways to determine restricted state
but
these services just make things so darn easy.

Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com

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

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

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

Please contact support@xxxxxxxxxxxx for any subscription related
questions.


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

Please contact support@xxxxxxxxxxxx for any subscription related
questions.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.