Getting 'SQLCODE = -124 SQLCA-ERR-MSG = PLAN authid.planname DOES NOT EXIST' in Production environment.

Document ID : KB000007841
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

My SQL Cobol program was successfully precompiled/compiled/linked and executed in my TEST environment.

In Production environment however,it fails with PLAN NOT FOUND.  

SQLCODE = -124

SQLCA-ERR-MSG = PLAN SYSADM.APCB8005 DOES NOT EXIST 

 

Environment:
z/OS and z/VSE CA Datacom SQL - all versions
Cause:

In TEST environment you ran the SQL Cobol precompiler DBXMMPR and that process created the SQL PLAN in Datadictionary.

If you do not promote the COBOL program source to the PROD environment and run the SQL Cobol Precompiler/Cobol compiler/link-editor there but you just transfer the program loadmodule then you need to transfer the corresponding PLAN from your TEST datadictionary into the PROD datadictionary.

 

The PLAN needs to be in sync with the program loadmodule. 

Resolution:

1.In your TEST environment,run DDTRSLM using SYSIN cards:  

SET USER DATACOM-INSTALL NEWUSER ;

EXPORT PLAN SYSADM.APCB8005 ONLY ALL PLAN;   

 

2.In your PROD environment,run DDTRSLM using the DDTRSLM generated TRANSF data set from TEST as input and use SYSIN cards :

SET USER DATACOM-INSTALL NEWUSER ;

SET IMPORT COLLISION REPLACE;

IMPORT PLAN SYSADM.APCB8005;

 

Note that the layout of the tables in TEST and PROD needs to be the same.

 

Additional Information:

See the online documentation here.