If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 load

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-18-08, 01:58
mohammedredha mohammedredha is offline
Registered User
 
Join Date: Feb 2008
Posts: 4
DB2 load

Hello,
I am using db2 load utility to load data from DB2/VSE to DB2 UDB. all steps of creating server and nickname was ok. But unfortunately I faced problem in last step when I load from cursor.


Below is the steps of declare cursor with error:

C:\>db2 connect to bodb user db2admin
Enter current password for db2admin:

Database Connection Information
Database server

= DB2/NT 7.2.5
SQL authorization ID

= DB2ADMIN
Local database alias BODB

C:\>DB2 CREATE NICKNAME zemtempl2 FOR SQLDS.DBADMIN.zemtempl
DB20000I The SQL command completed successfully.

C:\>DB2 DECLARE MYCURS CURSOR FOR SELECT * FROM zemtempl2
DB20000I The SQL command completed successfully.

C:\>DB2 LOAD FROM MYCURS OF CURSOR MESSAGES zemtempl.TXT REPLACE INTO db2admin.zemtempl
SQL0104N An unexpected token "CURSOR" was found following "OF". Expected tokens may include: "ASC". SQLSTATE=42601
C:\>
Reply With Quote
  #2 (permalink)  
Old 02-18-08, 04:41
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
DB2 V7 is out of service for more than 2 years - so I will not bother checking the manuals myself. But have you verified LOAD supports cursors as input in your old DB2 version?
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development

Last edited by stolze; 02-18-08 at 08:52.
Reply With Quote
  #3 (permalink)  
Old 02-18-08, 04:51
mohammedredha mohammedredha is offline
Registered User
 
Join Date: Feb 2008
Posts: 4
hello,

thank you for your reply, I am using the load command to load data from IXF files to DB2 UDB. what I want to do is to load directly from DB2 VSE mainframe to DB2 UDB.

when I create nickname then declare curosr I can use select data from the cursor my problem is only when loading.
Reply With Quote
  #4 (permalink)  
Old 02-18-08, 08:52
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Yes, querying a nickname is basic functionality of DB2's federated features. But the support for loading from a cursor (independent of nicknames) may just not have been available in DB2 V7. Have you checked the manuals as I suggested?
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On