Hello,
I am creating a new cobol program which accesses a DB2 table. I am using an old plan which is no longer used by any program. Is this OK? Are plans table-specific? Does each plan include unique access information for specific tables only?
In other words, do i need to find a plan that includes accesses infomation for the table that my program needs? I am asking because i get compile errors regarding the fetch statement. I am wondering if the table used in the program is not included in the plan??
EXEC SQL
FETCH CUR_PMTYR
INTO : DCLADVTB950.YRGIVING
END-EXEC.
Errors:
UNDEFINED OR UNUSABLE HOST VARIABLE "DCLADVTB950".
UNDEFINED OR UNUSABLE HOST VARIABLE "YRGIVING".
THE OPEN STATEMENT FOR CURSOR 'CUR_PMTYR' IS INVALID BECAUSE THE CURSOR WAS DEFINED BY AN ALLOCATE CURSOR STATEMENT.
Thanks much in advance!!