Hi there,

I need to convert QMF-query into stored procedure native SQL (STP). that's a bit of typing required, but works fine.

problem is, how to transfer empty (null ? blank ?) variable from QMF to STP.
although STP is defined with CALLED ON NULL INPUT in order to receive no value for a variable, STP runs without returning any result.

when I run this query in QMF, also with null variable (i.e. SUBREGION as ''), I get my expected result.

right now we are running DB2 V10 CM on z/OS

CREATE PROCEDURE MY.SKJ04
(IN UNIT CHAR( 1) FOR SBCS DATA CCSID EBCDIC,
IN REGION CHAR( 1) FOR SBCS DATA CCSID EBCDIC,
IN SUBREGION CHAR( 2) FOR SBCS DATA CCSID EBCDIC,
IN USER_ID CHAR( 8) FOR SBCS DATA CCSID EBCDIC)
VERSION V1
LANGUAGE SQL
NOT DETERMINISTIC
READS SQL DATA
CALLED ON NULL INPUT