On 21-Jan-2014 08:33 -0800, Matt Lavinder wrote:
<<SNIP>> Any idea if there is a way to run a remote SQL command from
a text file? I tried db2batch but I believe it isn't working due to
us not having a DB2 Connect license. I am sure I can find a command
line ODBC/JDBC tool but was wondering if there was something built in
that would use the saved credentials like RMTCMD does.

Not sure if it meets the requirements, but...

The DB2 command line interface in QShell enables running SQL statements from a text [stream] file [using the -f switch\parameter for SQL-source-options]. And that utility can be invoked via the CL command QSH CMD() via a RmtCmd invocation; optionally directly referencing a file residing on the requesting system, as the scripted-source input.

IBM i 7.1 Information Center -> Programming -> Shells and utilities -> Qshell -> Utilities
_Utilities for DB2 Universal Database_
"Select this link to view the utilities for DB2 Universal Database™.

_Qshell db2 utility_ <http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rzahz/rzahzdb2utility.htm>
The db2 utility uses the SQL CLI (Call Level Interface) and allows you to run SQL statements directly, interactively, or from a file.
_Perl utility_ <http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rzahz/rzahzperlutility.htm>
The Perl utility allows you to run Perl scripts on your system. The Perl utility is available as freeware.

This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page