Problem with ODBC and ILE Trigger - IBM AS400

This is a discussion on Problem with ODBC and ILE Trigger - IBM AS400 ; Firing an after insert trigger always ended in msg CPF502B (twice) and SQL0443. Looking (hard!) for more information was without success. Only after i wrapped a CLP round the original CLLE trigger program it then gave me more meaningful error ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: Problem with ODBC and ILE Trigger

  1. Problem with ODBC and ILE Trigger

    Firing an after insert trigger always ended in msg
    CPF502B (twice) and SQL0443. Looking (hard!) for more
    information was without success.
    Only after i wrapped a CLP round the original CLLE
    trigger program it then gave me more meaningful error
    messages.

    What is wrong with using CLLE-triggers?

    Martin

  2. Re: Problem with ODBC and ILE Trigger

    Too little information is given. The statement that the CLP wrapper
    gave more meaningful error messages seems almost to suggest that the
    error is now known.? If the trigger program is not being called [debug
    and trace would assist to determine that] or fails to activate [manifest
    effectively same as not being called], then there will be no "previous
    messages in the job log to determine the error." Such error conditions
    for which the trigger program could not be activated would typically be
    MCH08xx, MCH16xx, MCH34xx. It is complicated to explain why a failure
    to activate the program does not leave any prior messages, so I will not
    even try.

    If the CLLE uses a named activation group instead of *CALLER, then
    use *CALLER instead; at least until all other issues are resolved. If
    any RCLACTGRP is used in the session, remove that action, then start a
    new session; do not reintroduce the request until a better understanding
    of the what/how that impacts the trigger program.

    Regards, Chuck
    --
    All comments provided "as is" with no warranties of any kind
    whatsoever and may not represent positions, strategies, nor views of my
    employer

    Martin Hinze wrote:
    > Firing an after insert trigger always ended in msg CPF502B (twice)
    > and SQL0443. Looking (hard!) for more information was without
    > success. Only after i wrapped a CLP round the original CLLE trigger
    > program it then gave me more meaningful error messages.
    >
    > What is wrong with using CLLE-triggers?


  3. Re: Problem with ODBC and ILE Trigger

    Hi Martin,

    SQL0443? is it something with too long and to complex? sounds like the
    phantastic new query engine, bug or feature is here the question

    Dieter Bender

    Martin Hinze wrote:

    > Firing an after insert trigger always ended in msg
    > CPF502B (twice) and SQL0443. Looking (hard!) for more
    > information was without success.
    > Only after i wrapped a CLP round the original CLLE
    > trigger program it then gave me more meaningful error
    > messages.
    >
    > What is wrong with using CLLE-triggers?
    >
    > Martin



  4. Re: Problem with ODBC and ILE Trigger

    CRPence wrote:
    > Too little information is given.

    What would be needed?
    The statement that the CLP wrapper
    > gave more meaningful error messages seems almost to suggest that the
    > error is now known.?

    There was no error, besides that the clle *pgm object
    was used but did definitely not run.
    But when the wrapped pgm had an error it was shown now.
    If the trigger program is not being called [debug
    > and trace would assist to determine that]

    believe me i really tried but with no success!
    >
    > If the CLLE uses a named activation group instead of *CALLER, then use
    > *CALLER instead;

    I'll give it another try, thx!

    Regards, Martin

  5. Re: Problem with ODBC and ILE Trigger

    Hi,

    have you tried to debug your trigger program to get more information?

    The best way is to use the debugger in iSeries Navigator's Run an SQL
    script.
    After you started the debugger, just try to insert a row into your
    table.
    Then step through your CLLE prgoram to make sure where the error
    occurs and analyze the joblog after.

    Birgitta


  6. Re: Problem with ODBC and ILE Trigger

    On 2 Nov., 21:33, Dieter Bender wrote:
    > Hi Martin,
    >
    > SQL0443? is it something with too long and to complex? sounds like the
    > phantastic new query engine, bug or feature is here the question
    >
    > Dieter Bender
    >

    SQL0443 means, an error in the trigger program occured.
    If you look at the message file QSQLMSG, Message-Id SQL0443, you get
    detailed information what SQL0443 means.

    Because the trigger is CLLE and not SQL, I assume it has nothing to do
    with the SQE!

    Not all errors that occur are initiated by the SQE!
    (We already had some discussions about this topic.)
    Most SQL-problems, our clients had the last time that I analyzed were
    caused by the CQE. What I see, almost nobody is really working with
    the SQE, because most the legacy applications work with DDS described
    logical files with select/omit clauses. When moving to the SQE we
    could gain for around 90% of all SQL statements a much better
    performance.

    In spite of all I'm far off to declare the SQE as perfect. There are
    still a lot of (big) bugs. Just yesterday I discovered a new one.

    Birgitta


  7. Re: Problem with ODBC and ILE Trigger

    Martin Hinze wrote:
    > Firing an after insert trigger always ended in msg CPF502B (twice) and
    > SQL0443. Looking (hard!) for more information was without success.
    > Only after i wrapped a CLP round the original CLLE
    > trigger program it then gave me more meaningful error messages.
    >
    > What is wrong with using CLLE-triggers?


    I don't know - I just used one, and it worked fine. I
    wondered if perhaps it had something to do with your
    activation group, but I successively created the CLLE
    program with DFTACTGRP(*YES), DFTACTGRP(*NO)
    ACTGRP(*NEW), and DFTACTGRP(*NO) ACTGRP(MYAG), and the
    trigger ran without error in all three cases.

  8. Re: Problem with ODBC and ILE Trigger

    I forgot to mention that the clle was running fine when it was fired
    from a 5250 session.

    Meanwhile IBM helped me fixing the problem: it was the (missing)
    librarylist beeing active for ODBC.
    As the CLLE used some servicpgms located in different libs.

    Thx to all.
    Martin


+ Reply to Thread