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