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



Were you in SQL Server mode when you tested previously, which would have executed the "SQL" including the QSYS2 QCMDEXC stored procedure in a separate job?

Have you signed off and back on to have a job not in SQL Server mode and hence the QSYS2 QCMDEXC stored procedure is now executed directly in your job?

Regards,

Kevin Wright

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of dlclark@xxxxxxxxxxxxxxxx
Sent: Tuesday, 5 March 2019 9:00 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: CL Commands in SQL

"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> wrote on 03/04/2019
04:53:17 PM:
...snip... However, Run SQL Statements does not
execute the compound statement interactively. It compiles it into a
temporary object and apparently executes it in a new (or second level)
job
environment and that apparently does not handle the internal QCMDEXC
calls
the same way as when Run SQL Scripts executes QCMDEXC interactively.


Well, strike all that. I just tried it again and it seems to be
working just fine.


create type comp_array as char(5) array[10];

begin
declare comp comp_array;
declare idx,max integer;

set comp = array['00620','00621'];
set max = cardinality(comp);
set idx = 0;

array_loop:
Loop
set idx = idx + 1;
if idx > max then
leave array_loop;
end if;
call qsys2/qcmdexc('CALL UTSETLLCL (''' || comp[idx] || ''')');
call qsys2/qcmdexc('IMIOVEVAL CMDUSE(*MONTHEND)');
End Loop;

End;


Sincerely,

Dave Clark

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.