Resolving "INTERNAL ERROR: REL 8.0 PLAN STMT SOURCE FOUND"
search cancel

Resolving "INTERNAL ERROR: REL 8.0 PLAN STMT SOURCE FOUND"

book

Article ID: 124429

calendar_today

Updated On:

Products

Ideal

Issue/Introduction

When running a program (CA Ideal), if the program uses a very old SQL plan, an error can be received:
FATAL ERROR OCCURRED
CLASS=DVW TYPE=SQL RETURN CODE=12
DESCRIPTION: SQLCODE = -999 SQLERRM = INTERNAL ERROR (stmtRbnd LINE 0551): REL 8.0 PLAN STMT SOURCE FOUND
PROGRAM=ppppppp PROCEDURE=xxxxx-xxxxxx-xxxxxxx STATEMENT=014400
NAME:the_sql_dataview
DATA-VIEW STATUS: -999 INTERNAL STATUS: N/A DBID: N/A
1-IDAETERR90E - DB Backout successful

Environment

Release: IDEAL.00200-15.1-Ideal-for CA-Datacom
Component:

Cause

In most cases, this error is caused by using a very old plan or by having a corrupt Datadictionary PLAN header. In the case which led to this article, the program was last compiled and the plan created in 1994.

Resolution

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-$Ivvvsssppppppp, 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.

Additional Information

As always, please contact CA Technologies support for CA Datacom if you have further questions.