Howdy:
This may seem a little silly:
I'm running an SQL script and redirecting the output into a
file. I'd like to import that data into another database,
but when I view the file, there doesn't seem to be a delimiter
(or rather, there are spaces between all of the fields).
The number of columns never appear correct and I can't import
the information because of that fact.
Background:
I'm running the NT DB2 client through a gateway to connect to
OS/390 v6.1 DB2 database. The NT client application is version 5.
The SQL script is very straight forward; this is the method I'm
using:
db2 -tf script.sql -z f:\backup\output_file.txt
I have tried the EXPORT option inside my script:
[snip]
connect to DB2DATA user joeuser using password;
export to f:\backup\output_file.txt
select * from DB2DATA.DB2TABLE_Table
[/snip]
And the message I got from THAT was:
[snip error]
C:\SQLLIB\bin\scripts>db2 -tf script.sql
Database Connection Information
Database server = DB2 OS/390 6.1.1
SQL authorization ID = JOEUSER
Local database alias = DB2DATA
SQL1325N The remote database environment does not support the command or one
of the command options.
DB21018E A system error occurred. Command Line Processor could not continue
processing.
[/snip error]
So ... my questions are:
1) Is there an option to input, say, a tab delimiter between
the column when I create the file from this script? That is to
say, if I use the db2 CLP options, is there a particular option
I can use to separate the fields in a way I can use to IMPORT the
data into another database.
2) My method of using export my be incorrect ... does anyone have
an example of how I should be using this? I imagined that I did use
the command properly, but, as stated with the error above, the
environment doesn't support it.
Note: We're trying to get away from tools, such as MS Access; so I'm
sticking with the command line option.
Thanks!
-shaunn
