|
I am trying to do my first 'Trigger' program and not having much luck. I have
a file that records are written to from several programs. I currently have a CL
that runs every 2mins. It reads my file and executes a program that adds the
record to a query file after some exiting.
What I want to do is have the CL and program run when every there is a recorded
added. I am using RPG III.
Here are the file layout and part of the CL and RPG program.
File: 1 field called ZZUSER for 128.
CL: ovrdbf file(trdata) tofile(wjmwork/zzuser)
ovrdbf file(dcsnew) tofile(wjmwork/dcsnew)
call pgm(wjmwork/trdata)
RPG: F:trdata uf f 128 disk
F:dcsnew o f 192 disk a
I:trdata ns 01
I: 1 1 recid
I: 8 12 badge
I: 25 30 date
I: 31 36 time
C: again tag
C: read trdata lr
C: *inlr ifeq '1'
C: goto endpgm
C: end
C:*
C: recid ifne 'A'
C: goto again
C: else
C: excpt update
C: excpt delrec
C: end
O:dcsnew eadd update
O: badge 22
O: date 17
O: time 30
O:trdata e delrec
I do the following command to add the trigger: addpftrg file(wjmwork/zzuser)
trgtime(*after) trgevent(*insert) pgm(wjmwork/dcscoletcl) rpltrg(*yes)
I would appreciate it if some one can give me help on getting this working. It
seams like it should be so simple.
Thanks in advance,
William Moore
wjmoore@xxxxxxxxxxxxxxx <mailto:wjmoore@xxxxxxxxxxxxxxx>
805-489-5144 ex.234
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.