"select into" and local variables would be VERY welcome improvements to CL. Love subroutines - procedures with parameters would be even better. Never have figured out a decent use for the so-called "return" value from a CL subroutine
Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power
________________________________________
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxx> on behalf of Rob Berendt <rob@xxxxxxxxx>
Sent: Tuesday, April 19, 2016 4:55 AM
To: Midrange Systems Technical Discussion
Subject: Re: Imbedded SQL in CL.
I once almost abandoned CL because of the lack of structured programming
and just started using RPG and calling commands from within RPG. Then
they unleashed Guy Vig and he brought CL up to snuff.
But this lack of SQL...
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: Rob Berendt <rob@xxxxxxxxx>
To: midrange-l@xxxxxxxxxxxx
Date: 04/19/2016 07:40 AM
Subject: Imbedded SQL in CL.
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>
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.
As an Amazon Associate we earn from qualifying purchases.