diff --git a/RESTAPI/Functions/GENERATE_DBML2.sql b/RESTAPI/Functions/GENERATE_DBML2.sql
index 980bfa5..f673e9e 100644
--- a/RESTAPI/Functions/GENERATE_DBML2.sql
+++ b/RESTAPI/Functions/GENERATE_DBML2.sql
@@ -1 +1,99 @@
-âÅã@×ÁãÈ@\ÓÉÂÓ@^@
%
%ÃÙÅÁãÅ@ÖÙ@ÙÅ×ÓÁÃÅ@ÆäÕÃãÉÖÕ@ÙÅâãÁ×ÉKÇÅÕÅÙÁãÅmÄÂÔÓò@M@
%ÉÕÁ××åÅÙ@åÁÙÃÈÁÙMñð]@k@
%ÉÕÁ××ÕÁÔÅ@åÁÙÃÈÁÙMñòø]@]@
%ÙÅãäÙÕâ@ÃÓÖÂMòñô÷ôøóöô÷]@@@
%ÓÁÕÇäÁÇÅ@âØÓ@
%â×ÅÃÉÆÉÃ@ÙÅâãÁ×ÉKÇÅÕÅÙÁãÅmÄÂÔÓò@
%ÕÖã@ÄÅãÅÙÔÉÕÉâãÉÃ@
%ÙÅÁÄâ@âØÓ@ÄÁãÁ@
%ÃÁÓÓÅÄ@ÖÕ@ÕäÓÓ@ÉÕ×äã@
%âÅã@Ö×ãÉÖÕ@@ÁÓæÂÓÒ@~@\ÁÓÓÙÅÁÄ@k@
%ÁÓæÃ×èÄãÁ@~@\Ö×ãÉÔÉéÅ@k@
%ÃÖÔÔÉã@~@\ÕÖÕÅ@k@
%ÄÂÇåÉÅæ@~@\âÖäÙÃÅ@k@
%ÄÅÃÙÅâäÓã@~@Móñk@óñk@ðð]@k@
%ÄèÕÄÆãÃÖÓ@~@\ÕÖ@k@
%ÄèÕäâÙ×ÙÆ@~@\ÖæÕÅÙ@k@
%âÙãâÅØ@~@\ÈÅç@@@
%ÂÅÇÉÕ@
%ÄÅÃÓÁÙÅ@åmÙÅâäÓã@ÃÓÖÂ@M@ò@Ç@]@^@
%âÅÓÅÃã@çÔÓâÅÙÉÁÓÉéÅ@M@ÃÖÕãÅÕã@çÔÓÅÓÅÔÅÕã@M@ÕÁÔÅ@„‚”“@k@çÔÓÁããÙÉÂäãÅâ@M@}a}@
%Áâ@™…¢£ä™‰×�£ˆã…”—“�£…@k@}ñKð}@Áâ@¥…™¢‰–•@]@k@çÔÓÁÇÇ@M@çÔÓÅÓÅÔÅÕã@M@
%ÕÁÔÅ@—™–‡™�”@k@çÔÓÁããÙÉÂäãÅâ@M@}}@Áâ@…™™–™”…¢¢�‡…@k@}\ÕÖÕÅ}@Áâ@
%ˆ££—ˆ…�„…™¢@k@}õðð}@Áâ@ˆ££—¢£�£¤¢–•†�‰“¤™…@k@}òðð}@Áâ@
%ˆ££—¢£�£¤¢–•¢¤ƒƒ…¢¢@k@}‡…£}@OO@ä××ÅÙ@M@ÓÅÆã@M@Ø@K@Á××ÆäÕÃ@k@ñ@]@]@OO@
%âäÂâãÙ@M@Ø@K@Á××ÆäÕÃ@k@ò@]@OO@}É•—¤£}@Áâ@‰•—¤£æ™�——…™É„…•£‰†‰…™@k@
%}‡…£}@OO@ä××ÅÙ@M@ÓÅÆã@M@Ø@K@Á××ÆäÕÃ@k@ñ@]@]@OO@âäÂâãÙ@M@Ø@K@Á××ÆäÕÃ@k@ò@]@Áâ@
%•�”…@k@}‡…£}@OO@ä××ÅÙ@M@ÓÅÆã@M@Ø@K@Á××ÆäÕÃ@k@ñ@]@]@OO@âäÂâãÙ@M@Ø@K@Á××ÆäÕÃ@k@ò]@
%OO@}Ù…¢¤“£}@Áâ@–¤£—¤£æ™�——…™É„…•£‰†‰…™@k@}”…„‰�`™…¢–¤™ƒ…}@Áâ@
%˜¤…™¨£¨—…@k@}\a\}@Áâ@™…¢£Ã–•¢¤”…¢@k@}×Öâã}@Áâ@
%™…¢£È££—Ù…˜¤…¢£Ô…£ˆ–„@k@}�——“‰ƒ�£‰–•a‘¢–•}@Áâ@™…¢£×™–„¤ƒ…¢@k@
%}a¥ña}@OO@Ø@K@Á××ÕÁÔÅ@OO@}a}@OO@Ø@K@Á××ÆäÕÃ@Áâ@™…¢£ä™‰×�£ˆã…”—“�£…@k@
%}\ÅÙÙÖÙâ}@Áâ@™…£¤™•¢˜“¢£�£…@k@}£™¤…}@Áâ@£™…�£¦�™•‰•‡�¢…™™–™@k@
%}\ãÙÁÉÓÉÕÇ}@Áâ@£™‰””–„…@k@}†�“¢…}@Áâ@¦™�—É•—¤£×�™�”¢@k@}£™¤…}@Áâ@
%¦™�—Ö¤£—¤£×�™�”@]@
%k@çÔÓÅÓÅÔÅÕã@M@ÕÁÔÅ@¢˜“@k@çÔÓÁããÙÉÂäãÅâ@M@
%}å�“¤…¢@Ù…¢£�—‰KÅ§…ƒ¤£…mâ˜“M}}}@OO@Ø@K@Á××åÅÙ@OO@}}}k@}}}@OO@
%Ø@K@Á××ÕÁÔÅ@OO@}}}k@}}}@OO@Ø@K@Á××ÆäÕÃ@OO@
%}}}k@Ã�¢£MÑ¢–•mÖ‚‘…ƒ£M}@OO@Ø@K@Á×××ÁÙÔâ@OO@
%}@]@Á¢@å�™ƒˆ�™Mñðòôð]@ÃÃâÉÄ@ó÷]]}@Áâ@¢£�£…”…•£@]@
%k@ÄÁãÁãÁÇâ@]@]@ÖÙÄÅÙ@Âè@Ø@K@Á××ÆäÕÃ@]@]@Áâ@ÃÓÖÂ@M@ò@Ç@]@]@
%ÉÕãÖ@åmÙÅâäÓã@
%ÆÙÖÔ@
%M@
%âÅÓÅÃã@â@K@Á××åÅÙ@k@â@K@Á××ÕÁÔÅ@k@â@K@Á××ÆäÕÃ@k@
%ÓÉâãÁÇÇ@M@
%}}}}@OO@×@K@Á×××ÁÙÁÔ@OO@}}}z}@OO@}o}@k@}k@}@]@
%æÉãÈÉÕ@ÇÙÖä×@M@ÖÙÄÅÙ@Âè@×@K@×ÁÙÁÔ×Öâ@]@Áâ@Á×××ÁÙÔâ@k@
%çÔÓÁÇÇ@M@çÔÓÅÓÅÔÅÕã@M@ÕÁÔÅ@„�£�@k@
%çÔÓÁããÙÉÂäãÅâ@M@ÃÖÁÓÅâÃÅ@M@×@K@ÃÃâÉÄ@k@ñòðø@]@Áâ@ƒƒ¢‰„@k@
%×@K@Á×××ÁÙÁÔ@Áâ@•�”…@k@
%ÃÁâÅ@
%æÈÅÕ@×@K@ÉâmÙÅØäÉÙÅÄ@~@ñ@ãÈÅÕ@}†�“¢…}@
%ÅÓâÅ@}£™¤…}@
%ÅÕÄ@Áâ@•¤““�‚“…@k@
%ÃÁâÅ@
%æÈÅÕ@×@K@ãè×ÅÕÁÔÅ@ÉÕ@M@}ÃÓÖÂ}@]@ãÈÅÕ@òñô÷ôøóöô÷@
%æÈÅÕ@
%×@K@ãè×ÅÕÁÔÅ@ÉÕ@M@}åÁÙÃÈÁÙ}@k@}ÃÈÁÙ}@]@
%ãÈÅÕ@ÃÖÁÓÅâÃÅ@M@×@K@ÓÅÕÇãÈ@k@òõö@]@
%æÈÅÕ@
%×@K@ãè×ÅÕÁÔÅ@ÉÕ@M@}ÄÅÃÉÔÁÓ}@k@}ÕäÔÅÙÉÃ}@]@
%ãÈÅÕ@ÃÖÁÓÅâÃÅ@M@×@K@ÓÅÕÇãÈ@k@óñ@]@
%æÈÅÕ@
%×@K@ãè×ÅÕÁÔÅ@ÉÕ@M@}ÉÕã}@k@
%}ÉÕãÅÇÅÙ}@k@}ÂÉÇÉÕã}@k@}âÔÁÓÓÉÕã}@]@ãÈÅÕ@ñð@
%ÅÓâÅ@òõö@
%ÅÕÄ@Áâ@—™…ƒ‰¢‰–•@k@
%ÃÁâÅ@
%æÈÅÕ@×@K@ÓÖÃÁãÉÖÕ@~@}×ÁãÈ}@ãÈÅÕ@×@K@ÙÅâãÕÁÔÅ@
%ÅÕÄ@Áâ@™…¢£É•×�£ˆ×�™�”@k@
%ÃÁâÅ@
%æÈÅÕ@×@K@ÓÖÃÁãÉÖÕ@~@}ØäÅÙè}@ãÈÅÕ@×@K@ÙÅâãÕÁÔÅ@
%ÅÕÄ@Áâ@™…¢£É•Ø¤…
\ No newline at end of file
+SET PATH *LIBL ; 
+
+CREATE OR REPLACE FUNCTION RESTAPI.GENERATE_DBML2 ( 
+	INAPPVER VARCHAR(10) , 
+	INAPPNAME VARCHAR(128) ) 
+	RETURNS CLOB(2147483647)   
+	LANGUAGE SQL 
+	SPECIFIC RESTAPI.GENERATE_DBML2 
+	NOT DETERMINISTIC 
+	READS SQL DATA 
+	CALLED ON NULL INPUT 
+	SET OPTION  ALWBLK = *ALLREAD , 
+	ALWCPYDTA = *OPTIMIZE , 
+	COMMIT = *NONE , 
+	DBGVIEW = *SOURCE , 
+	DECRESULT = (31, 31, 00) , 
+	DYNDFTCOL = *NO , 
+	DYNUSRPRF = *OWNER , 
+	SRTSEQ = *HEX   
+	BEGIN 
+DECLARE V_RESULT CLOB ( 2 G ) ; 
+SELECT XMLSERIALIZE ( CONTENT XMLELEMENT ( NAME "dbml" , XMLATTRIBUTES ( '/' 
+AS "restUriPathTemplate" , '1.0' AS "version" ) , XMLAGG ( XMLELEMENT ( 
+NAME "program" , XMLATTRIBUTES ( '' AS "errormessage" , '*NONE' AS 
+"httpheaders" , '500' AS "httpstatusonfailure" , '200' AS 
+"httpstatusonsuccess" , 'get' || UPPER ( LEFT ( Q . APPFUNC , 1 ) ) || 
+SUBSTR ( Q . APPFUNC , 2 ) || 'Input' AS "inputWrapperIdentifier" , 
+'get' || UPPER ( LEFT ( Q . APPFUNC , 1 ) ) || SUBSTR ( Q . APPFUNC , 2 ) AS 
+"name" , 'get' || UPPER ( LEFT ( Q . APPFUNC , 1 ) ) || SUBSTR ( Q . APPFUNC , 2) 
+|| 'Result' AS "outputWrapperIdentifier" , 'media-resource' AS 
+"querytype" , '*/*' AS "restConsumes" , 'POST' AS 
+"restHttpRequestMethod" , 'application/json' AS "restProduces" , 
+'/v1/' || Q . APPNAME || '/' || Q . APPFUNC AS "restUriPathTemplate" , 
+'*ERRORS' AS "returnsqlstate" , 'true' AS "treatwarningaserror" , 
+'*TRAILING' AS "trimmode" , 'false' AS "wrapInputParams" , 'true' AS 
+"wrapOutputParam" ) 
+, XMLELEMENT ( NAME "sql" , XMLATTRIBUTES ( 
+'Values Restapi.Execute_Sql(''' || Q . APPVER || ''', ''' || 
+Q . APPNAME || ''', ''' || Q . APPFUNC || 
+''', Cast(Json_Object(' || Q . APPPARMS || 
+' ) As Varchar(10240) CCSID 37))' AS "statement" ) 
+, DATATAGS ) ) ORDER BY Q . APPFUNC ) ) AS CLOB ( 2 G ) ) 
+INTO V_RESULT 
+FROM 
+( 
+SELECT S . APPVER , S . APPNAME , S . APPFUNC , 
+LISTAGG ( 
+'''' || P . APPPARAM || ''':' || '?' , ', ' ) 
+WITHIN GROUP ( ORDER BY P . PARAMPOS ) AS APPPARMS , 
+XMLAGG ( XMLELEMENT ( NAME "data" , 
+XMLATTRIBUTES ( COALESCE ( P . CCSID , 1208 ) AS "ccsid" , 
+P . APPPARAM AS "name" , 
+CASE 
+WHEN P . IS_REQUIRED = 1 THEN 'false' 
+ELSE 'true' 
+END AS "nullable" , 
+CASE 
+WHEN P . TYPENAME IN ( 'CLOB' ) THEN 2147483647 
+WHEN 
+P . TYPENAME IN ( 'VARCHAR' , 'CHAR' ) 
+THEN COALESCE ( P . LENGTH , 256 ) 
+WHEN 
+P . TYPENAME IN ( 'DECIMAL' , 'NUMERIC' ) 
+THEN COALESCE ( P . LENGTH , 31 ) 
+WHEN 
+P . TYPENAME IN ( 'INT' , 
+'INTEGER' , 'BIGINT' , 'SMALLINT' ) THEN 10 
+ELSE 256 
+END AS "precision" , 
+CASE 
+WHEN P . LOCATION = 'PATH' THEN P . RESTNAME 
+END AS "restInPathParam" , 
+CASE 
+WHEN P . LOCATION = 'QUERY' THEN P . RESTNAME 
+END AS "restInQueryParam" , 
+CASE 
+WHEN P . LOCATION = 'FORM' THEN P . RESTNAME 
+END AS "restInFormParam" , P . TYPENAME AS "type" , 
+'input' AS "usage" ) ) ORDER BY P . PARAMPOS ) AS DATATAGS 
+FROM RESTAPI . SQLSTMTS S 
+JOIN TABLE ( 
+RESTAPI . GET_PARAM_PLACEHOLDERS2 ( ) 
+) P 
+ON ( S . APPVER , S . APPNAME , S . APPFUNC ) = ( P . APPVER , 
+P . APPNAME , P . APPFUNC ) 
+WHERE ( S . APPVER , S . APPNAME ) = ( INAPPVER , INAPPNAME ) 
+GROUP BY S . APPVER , S . APPNAME , S . APPFUNC 
+) AS Q ; 
+RETURN CISTOOLS . STRIP_SPACES ( V_RESULT ) ; 
+END  ; 
+
+GRANT ALTER , EXECUTE   
+ON SPECIFIC FUNCTION RESTAPI.GENERATE_DBML2 
+TO AMAPICS WITH GRANT OPTION ; 
+
+GRANT EXECUTE   
+ON SPECIFIC FUNCTION RESTAPI.GENERATE_DBML2 
+TO PUBLIC ; 
+
