Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2002
    Posts
    4

    Red face Unanswered: db2 command options

    newbie here,

    Does anyone know how to run a sql file on db2 command line and to create two output files, one to hold the query (select) output, and another to hold just the messages ( if occurs )?



    This is DB2 7.

    TIA

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

    Re: db2 command options

    Originally posted by Poneken
    newbie here,

    Does anyone know how to run a sql file on db2 command line and to create two output files, one to hold the query (select) output, and another to hold just the messages ( if occurs )?



    This is DB2 7.

    TIA
    If you really need the CLP messages then you could export query results to a file (using EXPORT INTO ... SELECT ...) and redirect CLP output to another file.

    If what you really want is the query output without any other data being printed then use these options to launch CLP:

    db2 +o -rreport.fil

    This will disable all CLP output to screen and write query results to report.fil
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •