Calling a stored procedure from REXX - REXX

This is a discussion on Calling a stored procedure from REXX - REXX ; On Mon, 21 Feb 2005 16:33:32 +0100, FRITS VAN HEES wrote: >Has anyone got an idea what the reason for the SQL -104 is. [C:\]DB2 ? SQL00104 SQL0104N An unexpected token "<token>" was found following "<text>". Expected tokens may include: ...

+ Reply to Thread
Results 1 to 3 of 3

Calling a stored procedure from REXX

  1. Default Re: Calling a stored procedure from REXX

    On Mon, 21 Feb 2005 16:33:32 +0100, FRITS VAN HEES wrote:

    >Has anyone got an idea what the reason for the SQL -104 is.


    [C:\]DB2 ? SQL00104

    SQL0104N An unexpected token "<token>" was found following
    "<text>". Expected tokens may include:
    "<token-list>".

    Explanation: A syntax error in the SQL statement was detected at
    the specified token following the text "<text>". The "<text>"
    field indicates the 20 characters of the SQL statement that
    preceded the token that is not valid.

    As an aid to the programmer, a partial list of valid tokens is
    provided in the SQLERRM field of the SQLCA as "<token-list>".
    This list assumes the statement is correct to that point.

    The statement cannot be processed.

    User Response: Examine and correct the statement in the area of
    the specified token.

    sqlcode: -104

    sqlstate: 42601



    Doug Kneupper



  2. Default Calling a stored procedure from REXX

    Hello all,

    I'm trying to write some rexx code to call a stored procedure that returns a
    result set.
    I copied an example 6.2.6.8 Calling a stored procedure from a REXX
    Procedure in
    DB2 UDB for OS/390 and z/OS V7 Application Programming and SQL

    53 *-* ADDRESS DSNREXX ,
    "EXECSQL ALLOCATE C101 CURSOR FOR RESULT SET :RESULT"
    >>> "EXECSQL ALLOCATE C101 CURSOR FOR RESULT SET :RESULT"

    +++ RC(1) +++

    55 *-* IF SQLCODE^=0
    >>> "0"


    58 *-* CURSOR='C101'
    >>> "C101"


    59 *-* ADDRESS DSNREXX ,
    "EXECSQL DESCRIBE CURSOR :CURSOR INTO :SQLDA"
    >>> "EXECSQL DESCRIBE CURSOR :CURSOR INTO :SQLDA"


    61 *-* IF SQLCODE^=0
    >>> "0"

    66 *-* DO UNTIL(SQLCODE^=0)

    67 *-* ADDRESS DSNREXX "EXECSQL FETCH C101 INTO :SEQNO, :TEXT"
    >>> "EXECSQL FETCH C101 INTO :SEQNO, :TEXT"

    +++ RC(-1) +++


    66 *-* DO UNTIL(SQLCODE^=0)

    99 *-* SAY'SQLCODE='SQLCODE
    >>> "SQLCODE=-104"

    SQLCODE=-104

    100 *-* SAY'SQLERRMC='SQLERRMC
    >>> "SQLERRMC=<END-OF-STATEMENT>:,"

    SQLERRMC=<END-OF-STATEMENT>:,

    101 *-* SAY'SQLERRP='SQLERRP
    >>> "SQLERRP=DSNTZNTO"

    SQLERRP=DSNTZNTO

    Has anyone got an idea what the reason for the SQL -104 is.

    Thanks in advance



  3. Thumbs down Re: Calling a stored procedure from REXX

    Did you ever get to the bottom of this? Am getting the same thing on my FETCH, although I got 466 on my cursor open.

    Thanx!

+ Reply to Thread

Similar Threads

  1. setting up for calling a stored procedure
    By Application Development in forum ADO DAO RDO RDS
    Replies: 1
    Last Post: 08-16-2007, 09:02 PM
  2. calling stored procedure using c++
    By Application Development in forum DOTNET
    Replies: 0
    Last Post: 08-16-2007, 07:45 PM
  3. RE: Calling an Oracle Stored Procedure
    By Application Development in forum ADO DAO RDO RDS
    Replies: 0
    Last Post: 01-05-2007, 11:31 PM
  4. Calling stored procedure - JScript
    By Application Development in forum Inetserver
    Replies: 7
    Last Post: 02-27-2006, 05:09 AM
  5. bad SP, or calling a stored procedure problem
    By Application Development in forum Inetserver
    Replies: 1
    Last Post: 01-18-2006, 03:30 PM