Hello guy I create a function in DB2 UDB for AS/400
version 07.01.0000 V7R1m0
I use a windows with dbvisualizer to connect the server.
My function is...
CREATE FUNCTION JVAOBJ.BNOWPAPOL(POL VARCHAR(10)) RETURNS DECIMAL(7,7) LANGUAGE SQL NOT
DETERMINISTIC READS SQL DATA
RETURN
(
SELECT
CASE
WHEN NUM IN (1,2)
THEN 0.3
ELSE 0.19698
END AS VALOR
FROM
LMDDTA.VERT240
WHERE
POLLIFE = POL )
It return 0.3
or 0.19698
depending of POL param
To do it I delete DROP FUNCTION JVAOBJ.BNOWPAPOL
and run CREATE
until work well.
My problem is I can not see the actual code of the function in dbvisualizer I cant see the function created
How I can see the actual code?
Note: The server administrator has access to the console as400 (yes, that black screen with green letters or orange letters, which I have not much knowledge) maybe, I can see it from here.
Note 2: I use jt400 driver to connect.
Try IBM i Navigator for web. If it is configured on your machine, you can reach it through this URL: https://your.ibm.i:2005/ibm/console/login.do?action=secure
If it is not configured, then perhaps you can ask the admin to install the Windows client. It is part of Client Access for Windows and is called IBM i Navigator for Windows.
In either case, use the navigation tree to go to Databases > machine > Schemas > JVAOBJ > Functions. Right click your function > Definition and then choose Routine Body
EDIT Add SYSROUTINE
Another way to see the routine body is via the DB2 catalog table SYSROUTINE. select specific_schema, specific_name, routine_definition from sysroutine