Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spooling data

Status
Not open for further replies.

mjlong999

Programmer
Feb 12, 2002
9
US
I am trying to use the db2cmd utility to spool my result set to a flat file. I have no problem getting the data into the flat file, however, it always contains some db2 header and footer information. Does anyone know how to remove this from the output file, either using a db2cmd option or through db2 sql?

Here is an example of the output:

Database Connection Information

Database server = DB2/6000 6.1.0
SQL authorization ID = SADMIN
Local database alias = SIEBEL


AST_ASSET_NUM
------------------------------------------------------------
1001
888888001
1001
1001
888888001

5 record(s) selected.
 
mjlong999

are any of these any good for you.

Getting the output of a select without headings:

1) Use the -x flag for db2 command line processor.
This is available in db2 v7.1 and greater

2) Use DB2BATCH to do similar stuff.
&quot;db2batch -q on -s off -d <database> -f <sqlfile>&quot;


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top