diff --git a/CISTOOLS/Functions/GENERATE_JSON.sql b/CISTOOLS/Functions/GENERATE_JSON.sql
index 716c12a..b6254ee 100644
--- a/CISTOOLS/Functions/GENERATE_JSON.sql
+++ b/CISTOOLS/Functions/GENERATE_JSON.sql
@@ -1 +1,121 @@
-âÅã@×ÁãÈ@\ÓÉÂÓ@^@
%
%ÃÙÅÁãÅ@ÖÙ@ÙÅ×ÓÁÃÅ@ÆäÕÃãÉÖÕ@ÃÉâãÖÖÓâKÇÅÕÅÙÁãÅmÑâÖÕ@M@
%âØÓâãÔã@åÁÙÃÈÁÙMóòððð]@k@
%ÃÁÔÅÓÃÁâÅÓÁÂÅÓâ@âÔÁÓÓÉÕã@ÄÅÆÁäÓã@@ð@@]@
%ÙÅãäÙÕâ@ÃÓÖÂMòñô÷ôøóöô÷]@@@
%ÓÁÕÇäÁÇÅ@âØÓ@
%â×ÅÃÉÆÉÃ@ÃÉâãÖÖÓâKÇÅÕÅÙÁãÅmÑâÖÕ@
%ÕÖã@ÄÅãÅÙÔÉÕÉâãÉÃ@
%ÔÖÄÉÆÉÅâ@âØÓ@ÄÁãÁ@
%ÃÁÓÓÅÄ@ÖÕ@ÕäÓÓ@ÉÕ×äã@
%ÕÖ@ÅçãÅÙÕÁÓ@ÁÃãÉÖÕ@
%ÕÖã@ÆÅÕÃÅÄ@
%ÃÖÕÃäÙÙÅÕã@ÁÃÃÅââ@ÙÅâÖÓäãÉÖÕ@ÄÅÆÁäÓã@
%âÅã@Ö×ãÉÖÕ@@ÁÓæÂÓÒ@~@\ÁÓÓÙÅÁÄ@k@
%ÁÓæÃ×èÄãÁ@~@\Ö×ãÉÔÉéÅ@k@
%ÃÖÔÔÉã@~@\ÕÖÕÅ@k@
%ÄÂÇåÉÅæ@~@\âÖäÙÃÅ@k@
%ÄÅÃÙÅâäÓã@~@Móñk@óñk@ðð]@k@
%ÄèÕÄÆãÃÖÓ@~@\ÕÖ@k@
%ÄèÕäâÙ×ÙÆ@~@\ÖæÕÅÙ@k@
%ÓÁÕÇÉÄ@~@ÅÕä@k@
%Ö×ãÓÖÂ@~@\èÅâ@k@
%âØÓÃäÙÙäÓÅ@~@\âãÄ@k@
%âÙãâÅØ@~@\ÓÁÕÇÉÄâÈÙ@@@
%ÂÅÇÉÕ@
%ÄÅÃÓÁÙÅ@ÃÖÓäÔÕmÓÉâã@ÃÓÖÂ@M@ò@Ô@]@ÄÅÆÁäÓã@}@}@^@
%ÄÅÃÓÁÙÅ@ÑâÖÕmâØÓ@ÃÓÖÂ@M@ó@Ô@]@ÄÅÆÁäÓã@}@}@^@
%ÄÅÃÓÁÙÅ@ÑâÖÕmÄÁãÁ@ÃÓÖÂ@M@ò@Ç@]@ÄÅÆÁäÓã@}}@^@
%ÄÅÃÓÁÙÅ@ÅÙÙÖÙmÑâÖÕ@åÁÙÃÈÁÙ@M@óòððð@]@ÄÅÆÁäÓã@}}@^@
%ÄÅÃÓÁÙÅ@ÃÖÕãÉÕäÅ@ÈÁÕÄÓÅÙ@ÆÖÙ@âØÓÅçÃÅ×ãÉÖÕ@
%ÂÅÇÉÕ@
%ÄÅÃÓÁÙÅ@åmâØÓâãÁãÅ@ÃÈÁÙ@M@õ@]@^@
%ÄÅÃÓÁÙÅ@åmÄÂòmÙÅãäÙÕmÃÖÄÅ@ÉÕã@^@
%ÄÅÃÓÁÙÅ@åmÄÂòmÔÅââÁÇÅmÉÄ@ÃÈÁÙ@M@÷@]@^@
%ÄÅÃÓÁÙÅ@åmÅÙÙÖÙmÔÅââÁÇÅ@ÃÓÖÂ@M@òðôø@]@^@
%ÇÅã@ÄÉÁÇÕÖâãÉÃâ@ÃÖÕÄÉãÉÖÕ@ñ@
%åmÄÂòmÙÅãäÙÕmÃÖÄÅ@~@ÄÂòmÙÅãäÙÕÅÄmâØÓÃÖÄÅ@k@
%åmâØÓâãÁãÅ@~@ÙÅãäÙÕÅÄmâØÓâãÁãÅ@k@
%åmÅÙÙÖÙmÔÅââÁÇÅ@~@ÔÅââÁÇÅmãÅçã@k@
%åmÄÂòmÔÅââÁÇÅmÉÄ@~@ÄÂòmÔÅââÁÇÅmÉÄ@^@
%ÙÅãäÙÕ@
%ÑâÖÕmÖÂÑÅÃã@M@
%}¢¤ƒƒ…¢¢}@åÁÓäÅ@}†�“¢…}@k@}âØÓÉ•†–}@åÁÓäÅ@ÑâÖÕmÖÂÑÅÃã@M@
%}âØÓâ£�£…}@åÁÓäÅ@åmâØÓâãÁãÅ@k@
%}âØÓÃ–„…}@åÁÓäÅ@åmÄÂòmÙÅãäÙÕmÃÖÄÅ@k@
%}”…¢¢�‡…ÉÄ}@åÁÓäÅ@åmÄÂòmÔÅââÁÇÅmÉÄ@k@
%}”…¢¢�‡…}@åÁÓäÅ@åmÅÙÙÖÙmÔÅââÁÇÅ@k@
%}ƒ¤™™…•£ã‰”…¢£�”—}@åÁÓäÅ@ÃäÙÙÅÕãmãÉÔÅâãÁÔ×@k@
%}âØÓâ£�£…”…•£}@åÁÓäÅ@ÃÉâãÖÖÓâ@K@âãÙÉ×mâ×ÁÃÅâ@M@âØÓâãÔã@]@
%]@
%]@^@
%ÅÕÄ@^@
%âÅã@ÃÖÓäÔÕmÓÉâã@~@M@
%âÅÓÅÃã@ÃÁâã@M@
%ÓÉâãÁÇÇ@M@
%}}}}@OO@
%ÃÁâã@M@
%ÃÁâÅ@
%ÃÁÔÅÓÃÁâÅÓÁÂÅÓâ@
%æÈÅÕ@
%ñ@
%ãÈÅÕ@
%ÃÉâãÖÖÓâ@K@ÇÅãmÃÁÔÅÓmÃÁâÅ@M@
%ÃÁâÅ@
%æÈÅÕ@
%ÓÖÃÁãÅ@M@}m}@k@ÃÖÓäÔÕÕÁÔÅ@]@n@ð@
%ãÈÅÕ@ãÙÉÔ@M@ÃÖÓäÔÕÕÁÔÅ@]@
%æÈÅÕ@
%ÃÖÓäÔÕÓÁÂÅÓ@Éâ@ÕÖã@ÕäÓÓ@
%ÁÕÄ@ãÙÉÔ@M@ÃÖÓäÔÕÓÁÂÅÓ@]@Ln@}}@
%ãÈÅÕ@ãÙÉÔ@M@ÃÖÓäÔÕÓÁÂÅÓ@]@
%ÅÓâÅ@ãÙÉÔ@M@ÃÖÓäÔÕÕÁÔÅ@]@
%ÅÕÄ@]@
%ÅÓâÅ@ãÙÉÔ@M@ÃÖÓäÔÕÕÁÔÅ@]@
%ÅÕÄ@OO@}}}z}@OO@
%ÃÁâÅ@
%æÈÅÕ@
%ÃÖÓäÔÕÃÃâÉÄ@~@öõõóõ@
%ãÈÅÕ@
%}Ã�¢£MÙã™‰”M}@OO@
%ÄÅÓÉÔÉãmÕÁÔÅ@M@ãÙÉÔ@M@ÃÖÓäÔÕÕÁÔÅ@]@]@
%OO@}]@Á¢@å�™ƒˆ�™M}@OO@
%ÃÖÓäÔÕÓÅÕÇãÈ@OO@}]@Ãƒ¢‰„@ó÷]}@
%æÈÅÕ@
%âØÓãè×Å@ÉÕ@M@}âØÓmÄÅÃÉÔÁÓ}@k@
%}âØÓmÕäÔÅÙÉÃ}@k@}âØÓmÉÕãÅÙÇÅÙ}@k@
%}âØÓmâÔÁÓÓÉÕã}@k@}âØÓmÂÉÇÉÕã}@k@
%}âØÓmÄÖäÂÓÅ}@k@}âØÓmÆÓÖÁã}@k@
%}âØÓmÙÅÁÓ}@]@
%ãÈÅÕ@
%ÄÅÓÉÔÉãmÕÁÔÅ@M@ãÙÉÔ@M@ÃÖÓäÔÕÕÁÔÅ@]@]@OO@
%}@Æ–™”�£@Ñ¢–•}@
%ÅÓâÅ@
%}Ùã™‰”M}@OO@
%ÄÅÓÉÔÉãmÕÁÔÅ@M@ãÙÉÔ@M@ÃÖÓäÔÕÕÁÔÅ@]@]@OO@
%}]}@
%ÅÕÄ@Áâ@ÃÓÖÂ@M@ñ@Ô@]@]@k@}k@}@]@
%æÉãÈÉÕ@ÇÙÖä×@M@ÖÙÄÅÙ@Âè@ÖÙÄÉÕÁÓ×Öâ@]@Áâ@ÃÓÖÂ@M@ò@Ô@]@]@
%ÆÙÖÔ@ãÁÂÓÅ@M@
%ÃÉâãÖÖÓâ@K@ÇÅãmÄÅâÃÙÉ×ãÖÙ@M@âØÓâãÔã@]@
%]@]@^@
%âÅã@ÑâÖÕmâØÓ@~@
%}å�“¤…¢@Mâ…“…ƒ£@Ñ¢–•mÖ‚‘…ƒ£MÒ…¨@}}¢¤ƒƒ…¢¢}}@@å�“¤…@}}£™¤…}}k@}@
%OO@}Ò…¨@}}„�£�}}@å�“¤…@}@OO@}Ñ¢–•mÁ™™�¨Á‡‡MÑ¢–•mÖ‚‘…ƒ£M}@OO@
%ãÙÉÔ@M@ÃÖÓäÔÕmÓÉâã@]@OO@}]@
\ No newline at end of file
+SET PATH *LIBL ; 
+
+CREATE OR REPLACE FUNCTION CISTOOLS.GENERATE_JSON ( 
+	SQLSTMT VARCHAR(32000) , 
+	CAMELCASELABELS SMALLINT DEFAULT  0  ) 
+	RETURNS CLOB(2147483647)   
+	LANGUAGE SQL 
+	SPECIFIC CISTOOLS.GENERATE_JSON 
+	NOT DETERMINISTIC 
+	MODIFIES SQL DATA 
+	CALLED ON NULL INPUT 
+	NO EXTERNAL ACTION 
+	NOT FENCED 
+	CONCURRENT ACCESS RESOLUTION DEFAULT 
+	SET OPTION  ALWBLK = *ALLREAD , 
+	ALWCPYDTA = *OPTIMIZE , 
+	COMMIT = *NONE , 
+	DBGVIEW = *SOURCE , 
+	DECRESULT = (31, 31, 00) , 
+	DYNDFTCOL = *NO , 
+	DYNUSRPRF = *OWNER , 
+	LANGID = ENU , 
+	OPTLOB = *YES , 
+	SQLCURRULE = *STD , 
+	SRTSEQ = *LANGIDSHR   
+	BEGIN 
+DECLARE COLUMN_LIST CLOB ( 2 M ) DEFAULT ' ' ; 
+DECLARE JSON_SQL CLOB ( 3 M ) DEFAULT ' ' ; 
+DECLARE JSON_DATA CLOB ( 2 G ) DEFAULT '' ; 
+DECLARE ERROR_JSON VARCHAR ( 32000 ) DEFAULT '' ; 
+DECLARE CONTINUE HANDLER FOR SQLEXCEPTION 
+BEGIN 
+DECLARE V_SQLSTATE CHAR ( 5 ) ; 
+DECLARE V_DB2_RETURN_CODE INT ; 
+DECLARE V_DB2_MESSAGE_ID CHAR ( 7 ) ; 
+DECLARE V_ERROR_MESSAGE CLOB ( 2048 ) ; 
+GET DIAGNOSTICS CONDITION 1 
+V_DB2_RETURN_CODE = DB2_RETURNED_SQLCODE , 
+V_SQLSTATE = RETURNED_SQLSTATE , 
+V_ERROR_MESSAGE = MESSAGE_TEXT , 
+V_DB2_MESSAGE_ID = DB2_MESSAGE_ID ; 
+RETURN 
+JSON_OBJECT ( 
+'success' VALUE 'false' , 'SQLInfo' VALUE JSON_OBJECT ( 
+'SQLState' VALUE V_SQLSTATE , 
+'SQLCode' VALUE V_DB2_RETURN_CODE , 
+'messageID' VALUE V_DB2_MESSAGE_ID , 
+'message' VALUE V_ERROR_MESSAGE , 
+'currentTimestamp' VALUE CURRENT_TIMESTAMP , 
+'SQLStatement' VALUE CISTOOLS . STRIP_SPACES ( SQLSTMT ) 
+) 
+) ; 
+END ; 
+SET COLUMN_LIST = ( 
+SELECT CAST ( 
+LISTAGG ( 
+'''' || 
+CAST ( 
+CASE 
+CAMELCASELABELS 
+WHEN 
+1 
+THEN 
+CISTOOLS . GET_CAMEL_CASE ( 
+CASE 
+WHEN 
+LOCATE ( '_' , COLUMNNAME ) > 0 
+THEN TRIM ( COLUMNNAME ) 
+WHEN 
+COLUMNLABEL IS NOT NULL 
+AND TRIM ( COLUMNLABEL ) <> '' 
+THEN TRIM ( COLUMNLABEL ) 
+ELSE TRIM ( COLUMNNAME ) 
+END ) 
+ELSE TRIM ( COLUMNNAME ) 
+END || ''':' || 
+CASE 
+WHEN 
+COLUMNCCSID = 65535 
+THEN 
+'Cast(RTrim(' || 
+DELIMIT_NAME ( TRIM ( COLUMNNAME ) ) 
+|| ') As Varchar(' || 
+COLUMNLENGTH || ') Ccsid 37)' 
+WHEN 
+SQLTYPE IN ( 'SQL_DECIMAL' , 
+'SQL_NUMERIC' , 'SQL_INTERGER' , 
+'SQL_SMALLINT' , 'SQL_BIGINT' , 
+'SQL_DOUBLE' , 'SQL_FLOAT' , 
+'SQL_REAL' ) 
+THEN 
+DELIMIT_NAME ( TRIM ( COLUMNNAME ) ) || 
+' Format Json' 
+ELSE 
+'RTrim(' || 
+DELIMIT_NAME ( TRIM ( COLUMNNAME ) ) || 
+')' 
+END AS CLOB ( 1 M ) ) , ', ' ) 
+WITHIN GROUP ( ORDER BY ORDINALPOS ) AS CLOB ( 2 M ) ) 
+FROM TABLE ( 
+CISTOOLS . GET_DESCRIPTOR ( SQLSTMT ) 
+) ) ; 
+SET JSON_SQL = 
+'Values (Select Json_Object(Key ''success''  Value ''true'', ' 
+|| 'Key ''data'' Value ' || 'Json_ArrayAgg(Json_Object(' || 
+TRIM ( COLUMN_LIST ) || ') Format Json ))  From Table(' || 
+SQLSTMT || ')) into ? ' ; 
+SET CISTOOLS . SQL_STATEMENT = JSON_SQL ;  -- global variable sql_statement for
+PREPARE JSONSTMT FROM JSON_SQL ; 
+EXECUTE JSONSTMT USING JSON_DATA ; 
+RETURN JSON_DATA ; 
+END  ; 
+
+GRANT ALTER , EXECUTE   
+ON SPECIFIC FUNCTION CISTOOLS.GENERATE_JSON 
+TO AMAPICS WITH GRANT OPTION ; 
+
+GRANT EXECUTE   
+ON SPECIFIC FUNCTION CISTOOLS.GENERATE_JSON 
+TO PUBLIC ; 
+
