Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2014
    Posts
    294

    Unanswered: Dynamic scrollable cursor error

    Hi,

    I am trying to create a dynamic scrollable cursor. I am getting some sort of error. can some one plz let me know what I am missing here

    DECLARE cur1 SENSITIVE DYNAMIC SCROLL CURSOR WITH RETURN for
    select cst.OWNER DB_NAME,cst.TBNAME TABLE_NAME,total_columns as max_columns
    FROM YEW as cst, YEN_c1 as cstc
    WHERE COALESCE(truncate_flag, 'N') = 'N'
    and cst.owner = cstc.owner
    and cst.mt_name = cstc.mt_name
    and cstc.total_rows > 0
    order by 1, 2 ;

    ERROR:

    An unexpected token "<space>" was found following "cur1". Expected tokens may include: "SENSITIVE".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.17.30
    An unexpected token "<space>" was found following "cur1". Expected tokens may include: "SENSITIVE".. SQLCODE=-104, SQLSTATE=42601, DRIVE

  2. #2
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Hi,

    If you don't work with DB2 on Z/OS, then don't look at the DECLARE CURSOR on Z/OS statement.
    It differs significantly from the DECLARE CURSOR on LUW statement.
    Regards,
    Mark.

  3. #3
    Join Date
    Jul 2014
    Posts
    294
    Thanks for the reply mark.I am not working on Z/os.
    Last edited by HABBIE; 11-12-14 at 05:59.

Tags for this Thread

Posting Permissions

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