In most cases, recompiling the CA Ideal program will cause a new plan to be created and resolving this problem. Note that the program must be in a Test status to recreate the SQL plan; a compile of a Prod status program does not create a new object and plan - it is only allowed to create a new program listing.
In some cases where a program compile does not work and where the dataview being used is an SQL-created View, dropping and recreating that view might be needed before recompiling the program.
If you want to drop the SQL Plan from the Datadictionary, it is necessary to first find the plan so that it is properly identified. Use these steps in DDOL:
1. Select option 3 - Set mode to Entity DIsplay
2. Select option 1 - Display an index
3. For the entity type, enter "PLAN", for the occurrence name, use SYSUSR-$I
vvvsssppppppp, where
vvv is the program version,
sss is the CA Ideal system where the program was created, and
ppppppp is the program name. If the version is unknown, you can use SYSUSR-$I* to list all programs, and then you can scroll until you find the correct one.
4. Once you have the program details, you can run the following JCL to drop the plan (note that the dash in the Datadictionary occurrence is replaced with a dot in the JCL):
//L JCLLIB ORDER=CAI.CHLQ.CUSPROC
//*
//* EXECUTE DBSRFPR TO DROP PLANS IN THE DDD-DATABASE
//*
//SQLCNV EXEC PGM=DBSRFPR,PARM='DROP PLAN=SYSUSR.$Ivvvsssppppppp'
// INCLUDE MEMBER=B15STLIB
//DDSNAP DD SYSOUT=*
//SNAPER DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSPUNCH DD DUMMY
//SYSUDUMP DD SYSOUT=*
This process should address most cases of this error.