getting an SQLCODE of 1403 when i know i shouldn't
441278Apr 19 2006 — edited Feb 7 2008ok, i have the following sql stmt in my COBOL program:
EXEC SQL
DECLARE DENT_CSR CURSOR FOR
SELECT TO_CHAR(D_AFFCNTLN_EFF, 'YYYYMMDD'),
TO_CHAR(D_AFFCNTLN_TERM,'YYYYMMDD')
FROM SQLIS.AFFCNLNK@SQLP
WHERE I_AFF_LIC = :WXIAFFLICD
AND I_CNTRCT_TYPE = 'DENT'
AND TO_CHAR(D_AFFCNTLN_EFF, 'YYYYMMDD') <=
TO_CHAR(SYSDATE, 'YYYYMMDD')
AND TO_CHAR(D_AFFCNTLN_TERM, 'YYYYMMDD') >=
TO_CHAR(SYSDATE, 'YYYYMMDD')
END-EXEC.
the contents of the variable :WXIAFFLICD is passed in from another SQL stmnt;
when i do the FETCH to execute this cursor, i get a SQLCODE of 1403 (not found), when i should be finding something;
i have taken this statement and run it thru SQL (outside of the COBOL program) and it retrieves at least one row, which is what i expect, so why do i get the ORA-1403 msg when i run this SQL stmnt inside my COBOL program????
Your help would be greatly appreciated.