DB2 - Problem description
Problem IC70329 | Status: Closed |
CLP CANNOT EXECUTE A FILE WHICH CONTAINS CR+LF IN THE LAST OF A STATEMENT ON 9.7FP2 FOR LINUX/UNIX. | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
When we execute a file including CR+LF in the last of a CLP statement on V9.7FP2/Linux or Unix, it fails with DB21007E. It only occurs on Fixpack2 and does not occur on GA, FP1. For example: $ echo 'connect to sample;' | perl -pe 's/\012/\015\012/' > crlf.sql $ db2 -tvf crlf.sql DB21007E End of file reached while reading the command. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * When user execute a clp script which contains CR at the end * * of a line on Linux/Unix platform. * **************************************************************** * PROBLEM DESCRIPTION: * * When we execute a file including CR+LF in the last of a CLP * * statement on V9.7FP2/Linux or Unix, it fails with DB21007E. * * It only occurs on Fixpack2 and does not occur on GA, FP1. * * * * For example: * * $ echo 'connect to sample;' | perl -pe 's/\012/\015\012/' > * * crlf.sql * * $ db2 -tvf crlf.sql * * DB21007E End of file reached while reading the command. * **************************************************************** * RECOMMENDATION: * * Upgrade to db2_v97fp4 or later release. * **************************************************************** | |
Local Fix: | |
Open file in vi(m) editor and remove CR character manually using find and replace command. f.e. this single command could update the file and make ready for use. :%s/^M//g Note that here ^M is (ctrl+v+m). | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows | |
Solution | |
This issue is fixed in db2_v95fp7 and db2_v97fp4. After the fix, user can execute clp script without any error. | |
Workaround | |
Open file in vi(m) editor and remove CR character manually using find and replace command. f.e. this single command could update the file and make ready for use. :%s/^M//g Note that here ^M is (ctrl+v+m). | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC70571 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 02.08.2010 30.09.2010 30.09.2010 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.4 |