If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > db2 command options

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-18-03, 15:38
Poneken Poneken is offline
Registered User
 
Join Date: Sep 2002
Posts: 4
Red face 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
Reply With Quote
  #2 (permalink)  
Old 11-18-03, 16:49
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Re: db2 command options

Quote:
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On