A fix is available
APAR status
Closed as program error.
Error description
DB2 CLP always return RC00 when running in batch mode ( BPXBATCH ) even if the Db2 command or SQL fails Additional keywords and symptoms: ********************************** IDAAV7R5/K case: TS015363256 KnowIssue: DT261782
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: * * All Db2 12 and 13 for z/OS users who run * * Db2 command line processor (CLP) in * * batch mode. * **************************************************************** * PROBLEM DESCRIPTION: * * Running Db2 CLP in batch mode returns * * a return code of 0 even if statements * * in the input file fail. * **************************************************************** * RECOMMENDATION: * * Apply corrective PTF when available * **************************************************************** Db2 CLP can run in batch mode by providing an input file with the -f option. Batch mode will process all of the statements in the input file in a single transaction. In batch mode, Db2 CLP will always return a return code of 0 even if any statements in the input file fail. The return code can be checked by running "echo $?" after running the Db2 CLP batch mode command.
Problem conclusion
Db2 CLP has been updated to return a return code of 255 if a statement in the input file fails while running in batch mode. Db2 CLP batch mode may be used in automated scripts or as a job step in batch jobs like BPXBATCH in JCL. Today, if a statement fails in Db2 CLP batch mode, the script or batch job will continue to the next command or step. With the fix, if a statement fails in Db2 CLP batch mode, the script or batch job may stop after receiving a non-zero return code from Db2 CLP.
Temporary fix
Comments
APAR Information
APAR number
PH59896
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
C10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2024-02-19
Closed date
2024-04-24
Last modified date
2024-05-01
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI96667 UI96668
Modules/Macros
DSNCLP
Fix information
Fixed component name
DB2 OS/390 & Z/
Fixed component ID
5740XYR00
Applicable component levels
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSEPEK","label":"DB2 for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"12.0","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Document Information
Modified date:
02 May 2024