--
-- Upgrade 4.5.x objects to 4.8 
--

DROP PROCEDURE QUEST.QC45_OBJLIST_390 RESTRICT;

COMMIT;

CREATE PROCEDURE QUEST.QC45_OBJLIST_390
 (IN FUNCTION INTEGER,
  IN LISTNAME CHARACTER(18) FOR SBCS DATA CCSID EBCDIC,
  IN TRACE SMALLINT,
  OUT RETCODE INTEGER
 ) 
  DYNAMIC RESULT SETS 1
  EXTERNAL NAME QCOBJLST
  LANGUAGE C
  PARAMETER STYLE GENERAL WITH NULLS
  NOT DETERMINISTIC
  FENCED
  MODIFIES SQL DATA
  NO DBINFO
  CALLED ON NULL INPUT
  PROGRAM TYPE SUB
  COLLID %COLLID%
  WLM ENVIRONMENT %SINGTCB%
  STAY RESIDENT NO
  SECURITY USER
  RUN OPTIONS 'STACK(40960,40960,BELOW,KEEP,40960,40960)'
  COMMIT ON RETURN YES;

COMMIT;

DROP SPECIFIC FUNCTION QUEST.QP450READSDIR RESTRICT;

COMMIT;

-- Function: Spotlight IFI  

CREATE FUNCTION QUEST.QP450READSDIR
  ( REQTYPE0 INTEGER
  , REQTYPE1 INTEGER
  , REQTYPE2 INTEGER
  , REQTYPE3 INTEGER
  , REQTYPE4 INTEGER
  , REQTYPE5 INTEGER
  , REQTYPE6 INTEGER
  , REQTYPE7 INTEGER
  , REQTYPE8 INTEGER
  , REQTYPE9 INTEGER
  , REQTYPE10 INTEGER
  , REQTYPE11 INTEGER
  , REQTYPE12 INTEGER
  , REQTYPE13 VARCHAR(8) FOR SBCS DATA CCSID EBCDIC
  )
  RETURNS TABLE
  ( RECTYPE INTEGER
  , RECLENG INTEGER
  , TRACREC VARCHAR(32000) FOR BIT DATA CCSID EBCDIC
  )
  SPECIFIC QUEST.QP450READSDIR
  EXTERNAL NAME QPREAD45
  LANGUAGE C
  PARAMETER STYLE DB2SQL
  NOT DETERMINISTIC
  FENCED
  RETURNS NULL ON NULL INPUT
  READS SQL DATA
  EXTERNAL ACTION
  SCRATCHPAD 512
  NO FINAL CALL
  DISALLOW PARALLEL
  NO DBINFO
  COLLID %COLLID% 
  WLM ENVIRONMENT %MULTTCB%
  STAY RESIDENT YES
  PROGRAM TYPE SUB
  SECURITY DB2
  ;

COMMIT;