Hi.
We have UDB 8.2 on Windows and we want it to be migrated to V8 of DB2
on Mainframe.
1. Can a SQL FUNCTION contains SELECT statements in RETURN Clause in
Mainframe? below function compiles in UDB.. Will it compile on
Mainframe DB2 V8?
create FUNCTION X.IsHoliday(dDate TIMESTAMP , HolidaySched varchar(12))
Returns INTEGER
READS SQL DATA
NOT DETERMINISTIC
LANGUAGE SQL
BEGIN ATOMIC
RETURN
SELECT count(1)
FROM XXX
WHERE XXcode = HolidaySched
and country = 0
and holidaydate = dDate;
END
2) CAN A READ STORED PROCEDURE BE CALLED FROM A SQL FUNCTION? Any
example?