|
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 ***
> Where bribes are cheerfully accepted.
--
*** Vicker Programming and Service *** Have bits will byte *** www.vicker.com
***
Where bribes are cheerfully accepted.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.