Fixes are available
DB2 Version 11.1 Mod 2 Fix Pack 2 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod2 Fix Pack2 iFix001 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod2 Fix Pack2 iFix002 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod 3 Fix Pack 3 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod3 Fix Pack3 iFix001 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod3 Fix Pack3 iFix002 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod4 Fix Pack4 iFix001 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod 4 Fix Pack 4 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod 4 Fix Pack 6 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod 4 Fix Pack 5 for Linux, UNIX, and Windows
Db2 Version 11.1 Mod 4 Fix Pack 7 for Linux, UNIX, and Windows
APAR status
Closed as program error.
Error description
When a block comment containing slash sign(s) '/' is inserted at the beginning of a statement, the following SELECT SQL fails with DB2 CLP. $ db2 -tvf jt_bad.sql /*************************************************************** **************** Script Name : Comment Block Date : 23/02/2016 **************************************************************** ****************/ select 1 from sysibm.sysdummy1 DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0084N An EXECUTE IMMEDIATE statement contains a SELECT or VALUES statement. SQLSTATE=42612
Local fix
You can do one of the following options as a workaround. 1? Remove the slash '/' inside comment block $ db2 -tvf jt_good_1.sql /*************************************************************** **************** Script Name : Comment Block Date : 23-02-2016 **************************************************************** ****************/ select 1 from sysibm.sysdummy1 1 ----------- 1 1 record(s) selected. 2? Insert another statement before the SELECT query $ db2 -tvf jt_good_2.sql /*************************************************************** **************** Script Name : Comment Block Date : 23/02/2016 **************************************************************** ****************/ set current schema = 'JIANTANG' DB20000I The SQL command completed successfully. select 1 from sysibm.sysdummy1 1 ----------- 1 1 record(s) selected.
Problem summary
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 11.1 Mod 2 Fix Pack 2 or higher * ****************************************************************
Problem conclusion
First fixed in DB2 11.1 Mod 2 Fix Pack 2
Temporary fix
Comments
APAR Information
APAR number
IT20871
Reported component name
DB2 FOR LUW
Reported component ID
DB2FORLUW
Reported release
B10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2017-06-05
Closed date
2017-06-23
Last modified date
2017-06-23
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
DB2 FOR LUW
Fixed component ID
DB2FORLUW
Applicable component levels
RB10 PSN
UP
Document Information
Modified date:
04 May 2022