diff --git a/CISTOOLS/Functions/SET_LIBRARY_LIST.sql b/CISTOOLS/Functions/SET_LIBRARY_LIST.sql
index 25930e7..481c0ec 100644
--- a/CISTOOLS/Functions/SET_LIBRARY_LIST.sql
+++ b/CISTOOLS/Functions/SET_LIBRARY_LIST.sql
@@ -1 +1,90 @@
-âÅã@×ÁãÈ@\ÓÉÂÓ@^@
%
%ÃÙÅÁãÅ@ÖÙ@ÙÅ×ÓÁÃÅ@ÆäÕÃãÉÖÕ@ÃÉâãÖÖÓâKâÅãmÓÉÂÙÁÙèmÓÉâã@M@
%ÉÕÅÕå@ÃÈÁÙMò]@]@
%ÙÅãäÙÕâ@åÁÙÃÈÁÙMñððð]@@@
%ÓÁÕÇäÁÇÅ@âØÓ@
%â×ÅÃÉÆÉÃ@ÃÉâãÖÖÓâKâÅãÓÉÂÓ@
%ÕÖã@ÄÅãÅÙÔÉÕÉâãÉÃ@
%ÔÖÄÉÆÉÅâ@âØÓ@ÄÁãÁ@
%ÃÁÓÓÅÄ@ÖÕ@ÕäÓÓ@ÉÕ×äã@
%ÕÖã@ÆÅÕÃÅÄ@
%âÅã@Ö×ãÉÖÕ@@ÁÓæÂÓÒ@~@\ÁÓÓÙÅÁÄ@k@
%ÁÓæÃ×èÄãÁ@~@\Ö×ãÉÔÉéÅ@k@
%ÃÖÔÔÉã@~@\ÕÖÕÅ@k@
%ÄÂÇåÉÅæ@~@\âÖäÙÃÅ@k@
%ÄÅÃÙÅâäÓã@~@Móñk@óñk@ðð]@k@
%ÄèÕÄÆãÃÖÓ@~@\ÕÖ@k@
%ÄèÕäâÙ×ÙÆ@~@\ÖæÕÅÙ@k@
%âÙãâÅØ@~@\ÈÅç@@@
%ÂÅÇÉÕ@
%ÄÅÃÓÁÙÅ@ÓÉÂmÃÖäÕã@ÉÕã@ÄÅÆÁäÓã@ð@^@
%ÄÅÃÓÁÙÅ@ÓÉÂmÓÉâã@åÁÙÃÈÁÙ@M@ñððð@]@ÄÅÆÁäÓã@}}@^@
%âÅã@ÃÉâãÖÖÓâ@K@ÔÁ×ÉÃâmÅÕå@~@}}@^@
%âÅã@ÓÉÂmÓÉâã@~@M@
%âÅÓÅÃã@ÓÉâãÁÇÇ@M@ÆÙÁÇÔÅÕã@]@
%ÆÙÖÔ@ãÁÂÓÅ@M@
%ÃÉâãÖÖÓâ@K@â×ÓÉãmâãÙÉÕÇ@M@
%M@
%âÅÓÅÃã@
%ÃÁâã@M@
%Ù×ÁÄ@M@ÓÉÂðñ@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂðò@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂðó@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂðô@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂðõ@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂðö@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂð÷@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂðø@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂðù@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂñð@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂññ@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂñò@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂñó@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂñô@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂñõ@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂñö@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂñ÷@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂñø@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂñù@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂòð@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂòñ@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂòò@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂòó@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂòô@k@ññ@k@}@}@]@OO@
%Ù×ÁÄ@M@ÓÉÂòõ@k@ññ@k@}@}@]@Áâ@åÁÙÃÈÁÙ@M@ñððð@]@
%ÃÃâÉÄ@ó÷@]@Áâ@ÓÉÂÓÉâã@
%ÆÙÖÔ@ØÇ×Ó@K@ÔÔÓÉâã@
%æÈÅÙÅ@ÓÉÄÅâ@OO@ÆÉÄÅâ@~@ÉÕÅÕå@]@k@ññ@]@
%]@
%æÈÅÙÅ@ÅçÉâãâ@M@
%âÅÓÅÃã@ñ@
%ÆÙÖÔ@ãÁÂÓÅ@M@
%Øâèâò@K@âÃÈÅÔÁâ@M@]@
%]@
%æÈÅÙÅ@ãÙÉÔ@M@ÆÙÁÇÔÅÕã@]@~@ÖÄÖÂÕÔ@]@]@^@
%âÅã@ÓÉÂmÃÖäÕã@~@M@âÅÓÅÃã@ÃÖäÕã@M@\@]@
%ÆÙÖÔ@ãÁÂÓÅ@M@
%ÃÉâãÖÖÓâ@K@â×ÓÉãmâãÙÉÕÇ@M@ÓÉÂmÓÉâã@k@ññ@]@
%]@
%æÈÅÙÅ@ÆÙÁÇÔÅÕã@Ln@}}@]@^@
%ÃÁÓÓ@ÃÉâãÖÖÓâ@K@ÃÈÁÕÇÅmÓÉÂÙÁÙèmÓÉâã@M@ÃäÙmÓÉÂ@~n@Ù×ÁÄ@M@
%}ÃÉâãÖÖÓâ}@k@ññ@k@}@}@]@k@ÕÅæmÓÉÂÙÁÙèmÓÉâã@~n@ÓÉÂmÓÉâã@k@
%ÕäÔmÓÉÂ@~n@ÓÉÂmÃÖäÕã@]@^@
%âÅã@ÃÉâãÖÖÓâ@K@ÔÁ×ÉÃâmÅÕå@~@ÉÕÅÕå@^@
%ÙÅãäÙÕ@M@âÅÓÅÃã@ÑâÖÕmÖÂÑÅÃã@M@
%ÉÕÅÕå@åÁÓäÅ@ÑâÖÕmÁÙÙÁèÁÇÇ@M@
%âÃÈÅÔÁmÕÁÔÅ@
%]@
%]@
%ÆÙÖÔ@ÓÉÂÓÉâã@]@^@
%ÅÕÄ@@^@
%
%ÇÙÁÕã@ÁÓãÅÙ@k@ÅçÅÃäãÅ@@@
%ÖÕ@â×ÅÃÉÆÉÃ@ÆäÕÃãÉÖÕ@ÃÉâãÖÖÓâKâÅãÓÉÂÓ@
%ãÖ@ÁÔÁ×ÉÃâ@æÉãÈ@ÇÙÁÕã@Ö×ãÉÖÕ@^@
%
%ÇÙÁÕã@ÅçÅÃäãÅ@@@
%ÖÕ@â×ÅÃÉÆÉÃ@ÆäÕÃãÉÖÕ@ÃÉâãÖÖÓâKâÅãÓÉÂÓ@
%ãÖ@×äÂÓÉÃ@^@
%
%
\ No newline at end of file
+SET PATH *LIBL ; 
+
+CREATE OR REPLACE FUNCTION CISTOOLS.SET_LIBRARY_LIST ( 
+	INENV CHAR(2) ) 
+	RETURNS VARCHAR(1000)   
+	LANGUAGE SQL 
+	SPECIFIC CISTOOLS.SETLIBL 
+	NOT DETERMINISTIC 
+	MODIFIES SQL DATA 
+	CALLED ON NULL INPUT 
+	NOT FENCED 
+	SET OPTION  ALWBLK = *ALLREAD , 
+	ALWCPYDTA = *OPTIMIZE , 
+	COMMIT = *NONE , 
+	DBGVIEW = *SOURCE , 
+	DECRESULT = (31, 31, 00) , 
+	DYNDFTCOL = *NO , 
+	DYNUSRPRF = *OWNER , 
+	SRTSEQ = *HEX   
+	BEGIN 
+DECLARE LIB_COUNT INT DEFAULT 0 ; 
+DECLARE LIB_LIST VARCHAR ( 1000 ) DEFAULT '' ; 
+SET CISTOOLS . MAPICS_ENV = '' ; 
+SET LIB_LIST = ( 
+SELECT LISTAGG ( FRAGMENT ) 
+FROM TABLE ( 
+CISTOOLS . SPLIT_STRING ( 
+( 
+SELECT 
+CAST ( 
+RPAD ( LIB01 , 11 , ' ' ) || 
+RPAD ( LIB02 , 11 , ' ' ) || 
+RPAD ( LIB03 , 11 , ' ' ) || 
+RPAD ( LIB04 , 11 , ' ' ) || 
+RPAD ( LIB05 , 11 , ' ' ) || 
+RPAD ( LIB06 , 11 , ' ' ) || 
+RPAD ( LIB07 , 11 , ' ' ) || 
+RPAD ( LIB08 , 11 , ' ' ) || 
+RPAD ( LIB09 , 11 , ' ' ) || 
+RPAD ( LIB10 , 11 , ' ' ) || 
+RPAD ( LIB11 , 11 , ' ' ) || 
+RPAD ( LIB12 , 11 , ' ' ) || 
+RPAD ( LIB13 , 11 , ' ' ) || 
+RPAD ( LIB14 , 11 , ' ' ) || 
+RPAD ( LIB15 , 11 , ' ' ) || 
+RPAD ( LIB16 , 11 , ' ' ) || 
+RPAD ( LIB17 , 11 , ' ' ) || 
+RPAD ( LIB18 , 11 , ' ' ) || 
+RPAD ( LIB19 , 11 , ' ' ) || 
+RPAD ( LIB20 , 11 , ' ' ) || 
+RPAD ( LIB21 , 11 , ' ' ) || 
+RPAD ( LIB22 , 11 , ' ' ) || 
+RPAD ( LIB23 , 11 , ' ' ) || 
+RPAD ( LIB24 , 11 , ' ' ) || 
+RPAD ( LIB25 , 11 , ' ' ) AS VARCHAR ( 1000 ) 
+CCSID 37 ) AS LIBLIST 
+FROM QGPL . MMLIST 
+WHERE LIDES || FIDES = INENV ) , 11 ) 
+) 
+WHERE EXISTS ( 
+SELECT 1 
+FROM TABLE ( 
+QSYS2 . SCHEMAS ( ) 
+) 
+WHERE TRIM ( FRAGMENT ) = ODOBNM ) ) ; 
+SET LIB_COUNT = ( SELECT COUNT ( * ) 
+FROM TABLE ( 
+CISTOOLS . SPLIT_STRING ( LIB_LIST , 11 ) 
+) 
+WHERE FRAGMENT <> '' ) ; 
+CALL CISTOOLS . CHANGE_LIBRARY_LIST ( CUR_LIB => RPAD ( 
+'CISTOOLS' , 11 , ' ' ) , NEW_LIBRARY_LIST => LIB_LIST , 
+NUM_LIB => LIB_COUNT ) ; 
+SET CISTOOLS . MAPICS_ENV = INENV ; 
+RETURN ( SELECT JSON_OBJECT ( 
+INENV VALUE JSON_ARRAYAGG ( 
+SCHEMA_NAME 
+) 
+) 
+FROM LIBLIST ) ; 
+END  ; 
+
+GRANT ALTER , EXECUTE   
+ON SPECIFIC FUNCTION CISTOOLS.SETLIBL 
+TO AMAPICS WITH GRANT OPTION ; 
+
+GRANT EXECUTE   
+ON SPECIFIC FUNCTION CISTOOLS.SETLIBL 
+TO PUBLIC ; 
+
