Discussion:
Embedded SQL support for Korn Shell
(too old to reply)
r***@btmna.com
2007-09-11 16:44:56 UTC
Permalink
In order to run a SQL statement in Korn shell I have to pass the SQL statement to the DB2 Command-line processor or in the case of Oracle to SQL*Plus as a here-document. Although this work it is a bit sloppy. I have not been able to find a Korn shell solution, which would allow true embedded SQL support, such as Perl DBI or Rexx with DB2 support.

Does anyone know of a solution (software package, function or open source code), which would enable Korn shell to support embedded SQL?
Knut Stolze
2007-09-12 09:30:34 UTC
Permalink
Post by r***@btmna.com
In order to run a SQL statement in Korn shell I have to pass the SQL
statement to the DB2 Command-line processor or in the case of Oracle to
SQL*Plus as a here-document. Although this work it is a bit sloppy. I
have not been able to find a Korn shell solution, which would allow true
embedded SQL support, such as Perl DBI or Rexx with DB2 support.
Does anyone know of a solution (software package, function or open source
code), which would enable Korn shell to support embedded SQL?
I'm not sure that I understand what you want to do, but this is possible in
a shell:

#!/bin/sh

db2 "connect to <dbname>"
db2 "select ..."
db2 "..."
db2 "connect reset"
--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Continue reading on narkive:
Loading...