Hello all,
is there another way to export data to a csv-file (comma-separated format)?
We tried the EXPORT-command and got the following error
"
SQL1325N The remote database environment does not support the command
or one of the command options.
Explanation: An attempt has been made to issue a DB2 workstation database
specific command or command option against a host database through DB2
Connect or federated server. The following commands generate this error when
issued against a DB2 for MVS*, DB2 for OS/400* or SQL/DS* database:
a.. OPSTAT (Collect Operational Status)
b.. DARI (Database Application Remote Interface)
c.. GETAA (Get Administrative Authorizations)
d.. GETTA (Get Table Authorizations)
e.. PREREORG (Prepare to Reorganize Table)
f.. REORG (Call Reorganize Function)
g.. RQSVPT/ENSVPT/RLBSVPT (Subtransaction Requests)
h.. RUNSTATS (Run Statistics).
i.. COMPOUND SQL ATOMIC STATIC (Atomic Compound SQL)
j.. ACTIVATE DATABASE
k.. DEACTIVATE DATABASE
As well, the following commands generate this error with incorrect options:
a.. IMPORT (Import table) The filetype must be IXF, commitcount must be 0,
and the first word in the Action String (e.g. "REPLACE into ...") must be
INSERT.
b.. EXPORT (Export table) The filetype must be IXF.
The command cannot be processed.
User Response: Do not attempt to issue this command against a host database
through DB2 Connect or federated server.
"
Well, is there a workaround or am I hopelessly stuck?
Thanks for any help in advance!
Bye!
Oli 6 33630
You can simulate export to CSV with a Select statement.
For instance:
select '"""' concat rtrim(charcol1) concat '""",' , '"""' concat
rtrim(charcol2) concat '""",' , numcol3 from table
Oliver Stratmann wrote: Hello all,
is there another way to export data to a csv-file (comma-separated format)? We tried the EXPORT-command and got the following error " SQL1325N The remote database environment does not support the command or one of the command options.
Explanation: An attempt has been made to issue a DB2 workstation database specific command or command option against a host database through DB2 Connect or federated server. The following commands generate this error when issued against a DB2 for MVS*, DB2 for OS/400* or SQL/DS* database:
a.. OPSTAT (Collect Operational Status) b.. DARI (Database Application Remote Interface) c.. GETAA (Get Administrative Authorizations) d.. GETTA (Get Table Authorizations) e.. PREREORG (Prepare to Reorganize Table) f.. REORG (Call Reorganize Function) g.. RQSVPT/ENSVPT/RLBSVPT (Subtransaction Requests) h.. RUNSTATS (Run Statistics). i.. COMPOUND SQL ATOMIC STATIC (Atomic Compound SQL) j.. ACTIVATE DATABASE k.. DEACTIVATE DATABASE As well, the following commands generate this error with incorrect options:
a.. IMPORT (Import table) The filetype must be IXF, commitcount must be 0, and the first word in the Action String (e.g. "REPLACE into ...") must be INSERT. b.. EXPORT (Export table) The filetype must be IXF. The command cannot be processed.
User Response: Do not attempt to issue this command against a host database through DB2 Connect or federated server.
" Well, is there a workaround or am I hopelessly stuck?
Thanks for any help in advance!
Bye! Oli
--
Anton Versteeg
IBM Certified DB2 Specialist
IBM Netherlands
Hello Anton,
if this is the only way I will implement it. Though it is a bit tedious
because I have to export quite a lot of different tables.
If there is no other way. I will start to write a Select which generates
SELECT-statements as depicted by You below.
Thank You for Your help!
Bye!
Oli
"Anton Versteeg" <an************@nnll.ibm.com> schrieb im Newsbeitrag
news:cb**********@sp15en20.hursley.ibm.com... You can simulate export to CSV with a Select statement. For instance:
select '"""' concat rtrim(charcol1) concat '""",' , '"""' concat rtrim(charcol2) concat '""",' , numcol3 from table
Oliver Stratmann wrote: Hello all,
is there another way to export data to a csv-file (comma-separated
format)? We tried the EXPORT-command and got the following error " SQL1325N The remote database environment does not support the
command or one of the command options.
Explanation: An attempt has been made to issue a DB2 workstation
database specific command or command option against a host database through DB2 Connect or federated server. The following commands generate this error
when issued against a DB2 for MVS*, DB2 for OS/400* or SQL/DS* database:
a.. OPSTAT (Collect Operational Status) b.. DARI (Database Application Remote Interface) c.. GETAA (Get Administrative Authorizations) d.. GETTA (Get Table Authorizations) e.. PREREORG (Prepare to Reorganize Table) f.. REORG (Call Reorganize Function) g.. RQSVPT/ENSVPT/RLBSVPT (Subtransaction Requests) h.. RUNSTATS (Run Statistics). i.. COMPOUND SQL ATOMIC STATIC (Atomic Compound SQL) j.. ACTIVATE DATABASE k.. DEACTIVATE DATABASE As well, the following commands generate this error with incorrect
options: a.. IMPORT (Import table) The filetype must be IXF, commitcount must
be 0, and the first word in the Action String (e.g. "REPLACE into ...") must
be INSERT. b.. EXPORT (Export table) The filetype must be IXF. The command cannot be processed.
User Response: Do not attempt to issue this command against a host
database through DB2 Connect or federated server.
" Well, is there a workaround or am I hopelessly stuck?
Thanks for any help in advance!
Bye! Oli
-- Anton Versteeg IBM Certified DB2 Specialist IBM Netherlands
Oliver Stratmann wrote: Hello Anton,
if this is the only way I will implement it. Though it is a bit tedious because I have to export quite a lot of different tables. If there is no other way. I will start to write a Select which generates SELECT-statements as depicted by You below.
1. Export to .IXF file format all your host tables.
2. For each of the table:
a) import into local database (here IXF format comes handy - it
will create table for you;
b) export table in CSV;
c) drop table (but why are you exporting in CSV format when you
already have table in local database from step a?)
3. Have a beer (job finished).
Jan M. Nelken
"Jan M. Nelken" <Un**********@Invalid.Domain> wrote in message 1. Export to .IXF file format all your host tables. 2. For each of the table: a) import into local database (here IXF format comes handy - it will create table for you; b) export table in CSV; c) drop table (but why are you exporting in CSV format when you already have table in local database from step a?)
The above looks like easiest solution for quite a lot of tables.
Here's another just in case - for each table, build your query based
upon system tables. The query builder would be a little bit of work,
but you only need to write that once - and embed it into a function or
whatever. Then just call it for each table you want to export.
buck
Buck Nuggets wrote: Here's another just in case - for each table, build your query based upon system tables. The query builder would be a little bit of work, but you only need to write that once - and embed it into a function or whatever. Then just call it for each table you want to export.
Just as a starting point - I would run:
db2 -xtvf export.script -o doexport.script
where export.script would contain followin lines:
------------------- Begin of script-------------------
select
'export to '
concat
substr(tabschema,1,length(rtrim(tabschema)))
concat
'.'
concat
substr(tabname,1,length(rtrim(tabname)))
concat
'.IXF of ixf SELECT * FROM '
concat
substr(tabschema,1,length(rtrim(tabschema)))
concat
'.'
concat
substr(tabname,1,length(rtrim(tabname)))
from
syscat.tables
where
tabschema not in ('SYSIBM','SYSCAT','SYSSTAT','SYSTOOLS','SYSTEM')
;
------------------- End of script-------------------
Jan M. Nelken
DB2 for z/OS V8 supports LOAD/UNLOAD for delimited data.
Not sure if you can wait that long though, since migration to V8 is not
that trivial.
Oliver Stratmann wrote: Hello Anton,
if this is the only way I will implement it. Though it is a bit tedious because I have to export quite a lot of different tables. If there is no other way. I will start to write a Select which generates SELECT-statements as depicted by You below.
Thank You for Your help!
Bye! Oli
"Anton Versteeg" <an************@nnll.ibm.com> schrieb im Newsbeitrag news:cb**********@sp15en20.hursley.ibm.com...
You can simulate export to CSV with a Select statement. For instance:
select '"""' concat rtrim(charcol1) concat '""",' , '"""' concat rtrim(charcol2) concat '""",' , numcol3 from table
Oliver Stratmann wrote:
Hello all,
is there another way to export data to a csv-file (comma-separated format)? We tried the EXPORT-command and got the following error " SQL1325N The remote database environment does not support the command or one of the command options.
Explanation: An attempt has been made to issue a DB2 workstation database specific command or command option against a host database through DB2 Connect or federated server. The following commands generate this error when issued against a DB2 for MVS*, DB2 for OS/400* or SQL/DS* database:
a.. OPSTAT (Collect Operational Status) b.. DARI (Database Application Remote Interface) c.. GETAA (Get Administrative Authorizations) d.. GETTA (Get Table Authorizations) e.. PREREORG (Prepare to Reorganize Table) f.. REORG (Call Reorganize Function) g.. RQSVPT/ENSVPT/RLBSVPT (Subtransaction Requests) h.. RUNSTATS (Run Statistics). i.. COMPOUND SQL ATOMIC STATIC (Atomic Compound SQL) j.. ACTIVATE DATABASE k.. DEACTIVATE DATABASE As well, the following commands generate this error with incorrect options: a.. IMPORT (Import table) The filetype must be IXF, commitcount must be 0, and the first word in the Action String (e.g. "REPLACE into ...") must be INSERT. b.. EXPORT (Export table) The filetype must be IXF. The command cannot be processed.
User Response: Do not attempt to issue this command against a host database through DB2 Connect or federated server.
" Well, is there a workaround or am I hopelessly stuck?
Thanks for any help in advance!
Bye! Oli
-- Anton Versteeg IBM Certified DB2 Specialist IBM Netherlands
--
Anton Versteeg
IBM Certified DB2 Specialist
IBM Netherlands This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Zeff |
last post by:
Hi all,
I'm trying to generate a csv file from an ldap query (by generating a
string by concatenating with comma's - echo of the string in the browser
looks fine).
Is there a simple way...
|
by: kk |
last post by:
Hi,
I am trying to set up scheduled export in DB2. DB2 seems to be
missing the ability to export column names for CSV. Apparently
'method N' is only for ixf and wsf files. I have a C# and/or...
|
by: John Graham |
last post by:
I thought this would be easier, however I seem to be struggling with
this.
I'd like to create a command button that will look at a certain query I
have created and export the records as a csv...
|
by: johnlim20088 |
last post by:
Hi All,
I does have a question about export datagrid data to csv. Well, I know the common solution is
1) select the data again and put in the datatable, then export to csv.
BUT I don't want...
|
by: lightning |
last post by:
I have a search form that returns records to another form, rather than a table. Here are my questions:
1) Is it possible to export the form results (as opposed to query results) to CSV? I've been...
|
by: Designing Solutions WD |
last post by:
Hello,
I have some questions on my options available.
I have to export some tables to csv files to enable another department
to process the files. What I need is a way to do this in ms sql...
|
by: babdya |
last post by:
Hi there,
I need to extract huge amount of data from a DB2 dabase periodically.
The extracted data needs to be exported to CSV format. I have thought
of writing a Java piece of code to connect to...
|
by: naish |
last post by:
Hey i have on question?
I have CSV data and i want to import it to the excel sheet.
I know about Microsoft.Office.Interop.Excel
but still i am not able to do it.
Thks in advance
Nai
|
by: hjaffer2001 |
last post by:
I have three array values using nested loop. Now i want to export the array values to csv(excel). The code is
for($j=0;$j<count($TimeEntriesList);$j++){
...
|
by: maheswaran |
last post by:
Hi,
i have no problem in export the data from php to csv. But i have struggled to put the <br> in of csv coloumn. Here the details
PostId PostTitle Reply Ip
1 ...
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |