Results 1 to 12 of 12
  1. #1
    Join Date
    Feb 2004
    Posts
    21

    Question Unanswered: create a simple procedure failed.pls help me

    hi,everyone.
    yesterday,i run a script to create a procedure. but i got failed.
    anyone can help me solve this problem.
    From the message,May be the "catalog node"problem.
    But something confuse me is that script i once got success.and my database is fine.nothing wrong with node.

    Any Help will be appreciated.

    Metatron.
    ################################################
    db2 -td@ -vf getText.sql
    CREATE PROCEDURE getTEXT (IN in_put smallint,OUT out_put smallint)
    language sql
    begin
    select int(12/in_put) into out_put from sysibm.sysdummy1;
    end
    DB21034E The command was processed as an SQL statement because it was not a
    valid Command Line Processor command. During SQL processing it returned:
    SQL0901N The SQL statement failed because of a non-severe system error.
    Subsequent SQL statements can be processed. (Reason "CREATE PROCEDURE with
    LANGUAGE SQL only allowed at catalog node".) SQLSTATE=58004
    #################################################
    Last edited by Metatron; 01-13-05 at 22:36.

  2. #2
    Join Date
    Feb 2004
    Posts
    21
    who can help me ?

    pls

    Metatron.

  3. #3
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Did you put a @ at the end of the source code? Should be right after the END statement (same line).
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  4. #4
    Join Date
    Feb 2004
    Posts
    21

    Question

    Quote Originally Posted by Marcus_A
    Did you put a @ at the end of the source code? Should be right after the END statement (same line).
    First,Thank you for your reply.
    of course i put a @ at the end of the code.
    the content of getText.sql is
    #####################################
    CREATE PROCEDURE getTEXT (IN in_put smallint,OUT out_put smallint)
    language sql
    begin
    select int(12/in_put) into out_put from sysibm.sysdummy1;
    end@
    #####################################
    Actually,whatever my "create procedure" script is,i always get the message below
    #####################################
    DB21034E The command was processed as an SQL statement because it was not a
    valid Command Line Processor command. During SQL processing it returned:
    SQL0901N The SQL statement failed because of a non-severe system error.
    Subsequent SQL statements can be processed. (Reason "CREATE PROCEDURE with
    LANGUAGE SQL only allowed at catalog node".) SQLSTATE=58004
    #####################################
    Is there something wrong with my database or db configure?
    Last edited by Metatron; 01-16-05 at 21:12.

  5. #5
    Join Date
    May 2002
    Location
    General Deheza, Cba, Arg.
    Posts
    276

  6. #6
    Join Date
    Feb 2004
    Posts
    21

    Smile

    Quote Originally Posted by achiola
    thank you achiola.
    thank you for your reply.
    i had already read that article before.it had nothing with my problem.
    i can't get anything helps for my problem.

    regards.
    Metatron

  7. #7
    Join Date
    Apr 2004
    Posts
    54
    connect to test

    Database Connection Information

    Database server = DB2/NT 8.2.0
    SQL authorization ID = DB2ADMIN
    Local database alias = TEST


    create procedure gettext (in in_put int,inout out_put int)
    language sql
    begin
    values in_put*10 into out_put;
    end

    DB20000I The SQL command completed successfully.

    call gettext(10,0)

    Value of output parameters
    --------------------------
    Parameter Name : OUT_PUT
    Parameter Value : 100

    Return Status = 0


    just change "out" to "inout", because clp does not have variable where to save result

  8. #8
    Join Date
    Feb 2004
    Posts
    21

    Unhappy

    Quote Originally Posted by gardenman
    connect to test

    Database Connection Information

    Database server = DB2/NT 8.2.0
    SQL authorization ID = DB2ADMIN
    Local database alias = TEST


    create procedure gettext (in in_put int,inout out_put int)
    language sql
    begin
    values in_put*10 into out_put;
    end

    DB20000I The SQL command completed successfully.

    call gettext(10,0)

    Value of output parameters
    --------------------------
    Parameter Name : OUT_PUT
    Parameter Value : 100

    Return Status = 0


    just change "out" to "inout", because clp does not have variable where to save result
    thanks gardenman.

    sorry,but it seems to didn't work.
    i got the same error.
    #####################################
    >db2 -td@ -vf getText.sql

    create procedure gettext (in in_put int,inout out_put int)
    language sql
    begin
    values in_put*10 into out_put;
    end
    DB21034E The command was processed as an SQL statement because it was not a
    valid Command Line Processor command. During SQL processing it returned:
    SQL0901N The SQL statement failed because of a non-severe system error.
    Subsequent SQL statements can be processed. (Reason "CREATE PROCEDURE with
    LANGUAGE SQL only allowed at catalog node".) SQLSTATE=58004

  9. #9
    Join Date
    Apr 2004
    Posts
    54
    db2 => ? SQL0901N


    SQL0901N The SQL statement failed because of a non-severe system
    error. Subsequent SQL statements can be processed.
    (Reason "<reason>".)

    Explanation:

    An error has occurred which is due to a system error. Processing
    of the SQL statement has ended for reason "<reason>" (this is in
    English only and is useful only to IBM support personnel).

    User Response:

    Record the message number (SQLCODE) and reason "<reason>".

    If trace was active, invoke the Independent Trace Facility at
    the operating system command prompt. Then contact your technical
    service representative with the following information:

    o Problem description

    o SQLCODE

    o reason "<reason>"

    o SQLCA contents if possible

    o Trace file if possible.



    Federated system users: isolate the problem to the data source
    failing the request (refer to the problem determination guide to
    determine which data source is failing to process the SQL
    statement) and take the necessary diagnostic steps for that data
    source. The problem determination procedures for data sources
    vary, so refer to the applicable data source manuals.

    sqlcode : -901

    sqlstate : 58004
    Sorry, I have not read your post carefully
    Hmm...
    I think your must pay attention to words "Federated system users:".
    I don't know anything about your system environment...

  10. #10
    Join Date
    Feb 2004
    Posts
    21

    Unhappy

    Quote Originally Posted by gardenman
    db2 => ? SQL0901N


    SQL0901N The SQL statement failed because of a non-severe system
    error. Subsequent SQL statements can be processed.
    (Reason "<reason>".)

    Explanation:

    An error has occurred which is due to a system error. Processing
    of the SQL statement has ended for reason "<reason>" (this is in
    English only and is useful only to IBM support personnel).

    User Response:

    Record the message number (SQLCODE) and reason "<reason>".

    If trace was active, invoke the Independent Trace Facility at
    the operating system command prompt. Then contact your technical
    service representative with the following information:

    o Problem description

    o SQLCODE

    o reason "<reason>"

    o SQLCA contents if possible

    o Trace file if possible.



    Federated system users: isolate the problem to the data source
    failing the request (refer to the problem determination guide to
    determine which data source is failing to process the SQL
    statement) and take the necessary diagnostic steps for that data
    source. The problem determination procedures for data sources
    vary, so refer to the applicable data source manuals.

    sqlcode : -901

    sqlstate : 58004
    Sorry, I have not read your post carefully
    Hmm...
    I think your must pay attention to words "Federated system users:".
    I don't know anything about your system environment...
    thanks.
    i'm not a Federated system user.
    my database is on the aix os machine and my database version is ver7.1.

  11. #11
    Join Date
    Feb 2004
    Posts
    21

    Question

    ^_^
    guys...
    something strange!
    in my database ,i have 8 node(0,1,2,3,4,5,6,7)
    only on node0 i can run the script then get success.
    on other nodes,whatever the content of script,i always get failed.
    why can be this?!
    someone knows?

  12. #12
    Join Date
    May 2004
    Posts
    25
    Hi Gardenman/Metatron:

    I have a similar problem, with the difference that when I try to create my SP, it returns:

    P3402646.c
    P3402646.c(17) : error C2065: 'wchar_t' : undeclared identifier
    P3402646.sqc(257) : error C2065: 'NULL' : undeclared identifier
    P3402646.sqc(257) : error C2099: initializer is not a constant
    P3402646.sqc(258) : error C2099: initializer is not a constant
    P3402646.sqc(259) : error C2099: initializer is not a constant
    P3402646.sqc(260) : error C2099: initializer is not a constant
    P3402646.sqc(276) : error C2143: syntax error : missing ')' before 'type'
    P3402646.sqc(282) : error C2143: syntax error : missing ')' before 'type'
    P3402646.sqc(308) : warning C4047: '==' : 'struct _psm_CB *' differs in levels o
    f indirection from 'int '
    P3402646.sqc(386) : warning C4047: 'function' : 'struct sqla_setds_list *' diffe
    rs in levels of indirection from 'int '...

    Maybe you can help me....

Posting Permissions

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