0

I want to exec script.sql inside DB2 interactive input (DB2 =>)

I can only initiate db2 using krun -- db2

And for some reason krun -- db2 -vf script.sql doesn't seem to work.

Only interactive mode works for me. Help.

runkar
  • 456
  • 1
  • 4
  • 15
  • I don't understand why you have tagged this with the "clp" tag - what does your question have to do with a CLP (Command Language Programming on IBM iSeries machines) program? – Benny Hill Nov 30 '12 at 14:28
  • @BennyHill CLP is also an acronym for *Command Line Processor*, which is what the OP is talking about. – Ian Bjorhovde Dec 03 '12 at 00:19
  • It would be helpful if you gave the actual error that you receive. You're using `krun` as a wrapper for the `db2` command, so the problem could be with how `krun` sets up the environment, a simple file path issue, etc. – Ian Bjorhovde Dec 03 '12 at 00:22

1 Answers1

0

You could use the GET_LINE Built-in module for Oracle Compatibility. It is not available in Express-C edition.

http://pic.dhe.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.apdv.sqlpl.doc/doc/r0053534.html

AngocA
  • 7,655
  • 6
  • 39
  • 55