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



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.


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.