× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Rob,

Correct, I start the debug and set a break point then from the same job write
a record with DFU or WRKDBF. When debug shows the program at the break point I
EVAL BUFFERLEN and get 0. EVAL TRIGPARM1 and all alpha fields are blank and
numeric are a large odd number. If I EVAL TRIGPARM1:X it shows it as all hex
40. I first suspected the problem without debug because the rest of the
program checks tgfile, tgevent, tgtime and uses tglib to perform an override
to set the correct secondary file to update.

Thanks.

Roger Vicker, CCP

rob@dekko.com wrote:

> This is a multipart message in MIME format.
> --
> [ Picked text/plain from multipart/alternative ]
> There are some tricks on changing a trigger program after modifications. I
> forget the actual rules but what I do, in early development, is remove the
> trigger and add it back.  Otherwise my changes were not taking effect.
>
> How are you determining that the fields are blank?  Running the debugger
> against the job?
>
> Rob Berendt
> --
> "They that can give up essential liberty to obtain a little temporary
> safety deserve neither liberty nor safety."
> Benjamin Franklin
>
> "Roger Vicker, CCP" <rvicker@vicker.com>
> Sent by: rpg400-l-admin@midrange.com
> 04/03/2002 05:08 PM
> Please respond to rpg400-l
>
>         To:     rpg400-l@midrange.com
>         cc:
>         Fax to:
>         Subject:        Re: Trigger parameters blank filled.
>
> Rob,
>
> 1&2) This is a brand new program. I haven't needed triggers on the system
> yet
> but have written them before on others.
>
> 3) Here is the standard copy member I use. Some what stolen. Some what
> customized for my tastes. I've tried both the *ENTRY as shown and the
> prototype that is commented out.
>
>       // First parameter of trigger call.  Trigger buffer header
> information.
>      D trigParm1       ds
>      D  tgfile                       10a
>      D  tglib                        10a
>      D  tgmbr                        10a
>      D  tgevent                       1a
>      D  tgtime                        1a
>      D  tgcmtlck                      1a
>      D  tgfillr1                      3a
>      D  tgccsid                      10i 0
>      D  tgrrn                        10i 0
>      D  tgfillr2                      4a
>      D  tgoldrcoff                   10i 0
>      D  tgoldrclrl                   10i 0
>      D  tgoldnuloff                  10i 0
>      D  tgoldnullen                  10i 0
>      D  tgnewrcoff                   10i 0
>      D  tgnewrclrl                   10i 0
>      D  tgnewnuloff                  10i 0
>      D  tgnewnullen                  10i 0
>      D  tgfillr3                     16a
>
>       // Second parameter of trigger call.  Ignored by program.
>      D tgbufferlen     s             10i 0
>
>       // Constants used for trigger verification: triggering event,
>       //  trigger time and commitment lock levels.
>      D triggerEventInsert...
>      D                 c                   const('1')
>      D triggerEventDelete...
>      D                 c                   const('2')
>      D triggerEventUpdate...
>      D                 c                   const('3')
>      D triggerEventRead...
>      D                 c                   const('4')
>
>      D triggerTimeAfter...
>      D                 c                   const('1')
>      D triggerTimeBefore...
>      D                 c                   const('2')
>
>      D commit_none...
>      D                 c                   const('0')
>      D commit_changes...
>      D                 c                   const('1')
>      D commit_cursorStability...
>      D                 c                   const('2')
>      D commit_all...
>      D                 c                   const('3')
>
>      D*trigger         PR
>      D* trigparm1                 32767    Options(*VarSize)
>      D* bufferlen                    10i 0
>      D*                PI
>      D* trigparm1                 32767    Options(*VarSize)
>      D* BufferLen                    10i 0
>       // Trigger entry parameter list.
>      C     *entry        plist
>      C     trigparm1     parm                    trigParm1
>      C     bufferlen     parm                    bufferLen
>
> This is the headers for the actual program. I use CRTBNDPGM with
> DBGVIEW(*SOURCE). I've tried the *CALLER activation and as it is here.
>
>      H copyright('Copyright 2002, Roger Vicker, CCP and Vicker
> Programming')
>      H option(*SRCSTMT : *NODEBUGIO)
>      H datfmt(*usa)
>      H* DFTACTGRP(*no )
>      H* actgrp(*caller)
>      h extbinint
>
> Thanks.
>
> Roger Vicker, CCP
>
> rob@dekko.com wrote:
>
> > This is a multipart message in MIME format.
> > --
> > [ Picked text/plain from multipart/alternative ]
> > 1)  Was this program working prior to V5R1?
> > 2)  Is this your first trigger program?
> > 3)  Please post your *ENTRY or your programs initial PI, whichever
> method
> > you are using.  And also post the datastructures used to make up these
> > variables.
> >
> > Rob Berendt
> > --
> > "They that can give up essential liberty to obtain a little temporary
> > safety deserve neither liberty nor safety."
> > Benjamin Franklin
> >
> > "Roger Vicker, CCP" <rvicker@vicker.com>
> > Sent by: rpg400-l-admin@midrange.com
> > 04/02/2002 03:43 PM
> > Please respond to rpg400-l
> >
> >         To:     RPG400 <rpg400-l@midrange.com>
> >         cc:
> >         Fax to:
> >         Subject:        Trigger parameters blank filled.
> >
> > Hello,
> >
> > I am using a system at V5R1M0 with current Cum PTF and trying to
> > create a new trigger program in RPGLE. My problem is that when the
> > trigger fires the first parameter (the buffers) is blank filled and
> > the second parm (buffer length) is zero. I've tried compiling
> > DFTACTGRP(*YES) and DFTACTGRP(*NO) ACTGRP(*CALLER) with no difference.
> > I've tried using procedure definitions and *ENTRY PLIST. The program
> > is compiled with CRTBNDRPG
> >
> > To add the trigger I use ADDPFTRG FILE(FILELIB/FILE) TRGTIME(*AFTER)
> > TRGEVENT(*INSERT) PGM(PGMLIB/TRIGGER)
> >
> > Shouldn't the parms always have something at least?
> >
> > Thanks.
> >
> > Roger Vicker, CCP
> > --

--
*** Vicker Programming and Service *** Have bits will byte *** www.vicker.com
***
I think ;-)




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.