IBM Support

IC70329: CLP CANNOT EXECUTE A FILE WHICH CONTAINS CR+LF IN THE LAST OF A STATEMENT ON 9.7FP2 FOR LINUX/UNIX.

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error 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.
    

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).
    

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.                      *
    ****************************************************************
    

Problem conclusion

  • This issue is fixed in db2_v95fp7 and db2_v97fp4. After the
    fix, user can execute clp script without any error.
    

Temporary 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).
    

Comments

APAR Information

  • APAR number

    IC70329

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-08-02

  • Closed date

    2010-09-30

  • Last modified date

    2010-09-30

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IC70571

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSY

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC70329

Modified date: 30 September 2010