I have a procedure that inserts a record into a table and I need to return the timestamp from the insertion back to the calling java program. As I am relatively new to DB2 I am not sure how to do this. I have search the web for any info on this but, have not had any success.
SQL:
CREATE PROCEDURE "ATS"."MVP_ASC_INSERT" (
IN "P_SM_ACCOUNT_ID" VARCHAR(8),
IN "P_USER_ID" VARCHAR(30),
OUT "P_CREATED_TIMESTAMP" TIMESTAMP
)
LANGUAGE SQL
MODIFIES SQL DATA
CALLED ON NULL INPUT
INHERIT SPECIAL REGISTERS
BEGIN
INSERT INTO ATS_SYSTEM_CONTACTS
(ACCOUNT_ID, USER_ID, CREATED_TIMESTAMP)
VALUES
(P_SM_ACCOUNT_ID, P_USER_ID, CURRENT TIMESTAMP);
END;