Sotred Procedure  (End of file)

Posted on 2011-10-24
Last Modified: 2012-08-14
I read the following doc:

and then executed my command to read in my stored procedure, and got much further

but did not quite complete the work, this is the stored procedure:

[db2inst1@sandbox1 ddl]$ cat hello.sql
CREATE procedure DropIt ()
  modifies sql data
   drop table deleteme cascade;

Open in new window

This is the command I used to eliminate the semicolon errors:

[db2inst1@sandbox1 ddl]$ db2 -td/ -vf hello.sql

DB21007E  End of file reached while reading the command.

Open in new window

However,  it still has a problem of hitting the EOF, even if I terminate the last line with a semi-colon

Any ideas ?

Question by:Los Angeles1
    1 Comment
    LVL 37

    Accepted Solution

    your file should look like

    CREATE procedure DropIt ()
      modifies sql data
       drop table deleteme cascade;

    since you specified -td/ it means that "/" is the command terminator
    so you must place that after the create procedure command

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
    Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now