12-06-04, 19:09 #1Registered User
- Join Date
- Dec 2004
Unanswered: Script Out Telnet Session and Issue a DB2 RUNSTATS Command
Does anyone know how to script out a telnet session? Here's what I have:
I'm working in SQL Server and I have a DTS package that has a process that drops/creates a table, populates it, adds an index and then issues a command that updates the statistics on the table. The problem is that the update statistics command is actually a DB2 Utility (RUNSTATS) that can only be executed at a DB2 command prompt because it is a utility, not a SQL statement.
My thought is if I could create a script that would open a telnet session, I could issue the command from there and then move on in my process. So basically, I'm looking for something similar to the ftp command where you specify the commands in a file and then point to the file using the -s parameter...
ftp [-s: filename] [hostname]
where -s: filename specifies a text file containing ftp commands; the commands automatically run after ftp starts.
Is this possible to create a script that controls a telnet session?
Or is there some other way to get statistics updated in DB2?
TIA -- Brian
12-07-04, 13:15 #2Registered User
Originally Posted by bkellis
- Join Date
- Mar 2004
- Toronto, ON, Canada
What language is your DTS package in?--
DB2 Database Consultant