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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress db2 header information

Status
Not open for further replies.

pmcmicha

Technical User
May 25, 2000
353
I have an automated script which loads tables into a database. Everytime I connect to DB2 though, I get the DB2 connection information. Is there an option that you can set on the command line to shut this off?

DB2 Version: 8.1 (Unix)

Thanks in advance.
 
sathyarams,

Thanks for the response. The only problem with that solution is that since >&- (/dev/null) is STDOUT, nothing will ever show up for my result set that I am looking for. I was hoping that there were some switches which were not listed in the standard help for DB2 that could be turned off or on like you can in Sybase to get rid of the certain information.
 
Greg,

Thanks for link. While it looks like I can't get rid of all the header information, I can get rid of most of it using the db2 option at the beginning of each line instead of connecting first and then running each command.

At least that isn't as much unpertinent information to go through.

Thanks.
 
Can you explain why you are not happy with Sathyarams post. It seems to do what your post requires at first glance. I think Sathyaram is only proposing you put the output from the connect to /dev/null, nothing else. Therefore you should be able to see your result set as it won't be redirected. Have I missed something here?

Cheers
Greg
 
Greg,

Sure. Since I was orginally using the db2 -t <<-EOF in my shell script, that solution wasn't going to work since everything would have been sent to /dev/null, but with the db2 'command' structure I could do that without any problem. It isn't that you missed you anything, it is that I missed what was proposed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top