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



in place of using the command, addlible, could you have a small CL program that accepts library for parm and supress the CPF message in there?

Bryan

Jay Vaughn wrote on 8/24/2022 7:31 AM:
In an sql trigger, I'm trying to implement the ability to add a library
list entry...

I have the below code...

On the first invocation everything works fine and myLIB gets added to the
libl.
But on the second invocation, it still fails with SQLSTATE '38501' because
myLib is in the library list...

I would think when SQLSTATE 38501 is detected it would not fail but
CONTINUE with what is in the BEGIN/END... no? What am I missing?

BEGIN DECLARE CONTINUE HANDLER FOR SQLSTATE '38501'
CALL QSYS2.QCMDEXC('RMVLIBLE LIB(myLib)');
END;
CALL QSYS2.QCMDEXC('ADDLIBLE LIB(myLib) POSITION(*LAST)');


tia
Jay


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.