Results 1 to 4 of 4

Thread: DB2 load

  1. #1
    Join Date
    Feb 2008
    Posts
    4

    Unanswered: 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:\>

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    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?
    Last edited by stolze; 02-18-08 at 09:52.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  3. #3
    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.

  4. #4
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •