ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Problem with File Trigger

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Re: Problem with File Trigger

    Hello,

    I just came across this thread while looking for trigger program-related topics.
    I would like to ask, if I have created a trigger program and attached it to a file using ADDPFTRG, will I not be able to upload data using data transfer to as400?
    I ask this because I encountered this problem when I tried to add data to a file with trigger program using Data Transfer to AS400.
    The error message is:

    Code:
    CWBDB0036 - Server returned SQL error
    
    CEE9901 - Application error.  RNX1216 unmonitored by CSTO0010 at statement 0001000001, instruction X'0000'.
    
    Cause . . . . . :   The application ended abnormally because an exception occurred and was not handled.  The name of the program to which the unhandled exception is sent is CSTO0010 CSTO0010 . The program was stopped at the high-level language statement number(s)  at the time the message was sent.  If more than one statement number is shown, the program is an optimized ILE program.  Optimization does not allow a single statement number to be determined.  If *N is shown as a value, it means the real value was not available. Recovery  . . . :   See the low level messages previously listed to locate the cause of the exception.  Correct any errors, and then try the request again.
    The trigger program is CSTO0010. The trigger program don't have any problems when I add data on the file in AS400. I only encounter the problem when I am using the Data Transfer to AS400. I removed the trigger program from the file and tried the data transfer and I was able to upload data successfully. If I put back the trigger, I encounter the message as above. Is there any way that I can execute the trigger program while doing the data transfer?

    Clifford

    P.S. I'm not sure if this question has already been asked and answered before in some thread. I tried to search in this forum but I am not successful.
    Last edited by cliffyboy18; April 11, 2014, 12:11 AM. Reason: for clearer explanation

    Comment


    • #17
      Re: Problem with File Trigger

      Originally posted by cliffyboy18 View Post
      RNX1216Is there any way that I can execute the trigger program while doing the data transfer?
      The answer is almost certainly a "Yes", but we'd first have to see what file error was reported by RNX1216, and then we'd have to see the relevant program source code. Without seeing those, there's not much more that can be said that isn't pure guesswork.
      Tom

      There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

      Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

      Comment


      • #18
        Re: Problem with File Trigger

        Originally posted by tomliotta View Post
        The answer is almost certainly a "Yes", but we'd first have to see what file error was reported by RNX1216, and then we'd have to see the relevant program source code. Without seeing those, there's not much more that can be said that isn't pure guesswork.
        Hello,

        I already found the problem. There is a conflict on some files that I am referring to the program. Error is related to CCSID.
        I found it during the download and checking it's joblog.

        Thanks for your advice.

        Clifford

        Comment


        • #19
          Re: Problem with File Trigger

          Adding this in order to provide some information should anyone come looking for it (I myself after 3~4 months)

          I have some files with both journal and trigger program. the database manager will write to the journal first before it calls the trigger program right? just need to know what is the sequence of events between journal and trigger pgms.
          With a recent project of ours, we found that this seems to occur in parallel and sometimes the trigger program running faster than the journals. Our trigger program was supposed to retrieve journal entries using the QjoRetrieveJournalEntries API to determine the user id and program causing the change. We were under the impression that the journal entry would be available when the trigger was called. However it was not the case always. Introducing a 100 millisecond delay reduced the instances of journal entries not found but is still present. We had to modify the trigger program to state user id and program as "NA" in these cases.

          Comment

          Working...
          X