|
Pete,
Call this pgm with two parms (&PGM is *BLANKS) from your trigger pgm...
modify the pgm below to fit your needs. This pgm populates the &PGM
variable.
PGM PARM(&TRGEVENT &PGM)
DCL &TRGEVENT *CHAR LEN(8)
DCL &PGM *CHAR LEN(10)
DCL &SENDER *CHAR LEN(80)
DCL &MSGID *CHAR LEN(7)
DCL &MSGDTA *CHAR LEN(80)
MONMSG MSGID(CPF0000) +
EXEC(GOTO ERROR)
IF COND(&TRGEVENT = '*INSERT') +
THEN(DO)
SNDPGMMSG MSG(' ') TOPGMQ(*PRV (QDBPUT)) MSGTYPE(*INFO)
RCVMSG PGMQ(*PRV (QDBPUT)) MSGTYPE(*LAST) RMV(*YES) +
SENDER(&SENDER)
ENDDO
ELSE DO
SNDPGMMSG MSG(' ') TOPGMQ(*PRV (QDBUDR)) MSGTYPE(*INFO)
RCVMSG PGMQ(*PRV (QDBUDR)) MSGTYPE(*LAST) RMV(*YES) +
SENDER(&SENDER)
ENDDO
CHGVAR VAR(&PGM) VALUE(%SST(&SENDER 56 10))
GOTO ENDPGM
ERROR:
RCVMSG MSGTYPE(*EXCP) MSGDTA(&MSGDTA) MSGID(&MSGID)
SNDPGMMSG MSGID(&MSGID) MSGF(QCPFMSG) MSGDTA(&MSGDTA) +
MSGTYPE(*ESCAPE)
ENDPGM:
ENDPGM
-----Original Message-----
From: mapics-l-bounces@xxxxxxxxxxxx
[mailto:mapics-l-bounces@xxxxxxxxxxxx]On Behalf Of Pete
Sent: Friday, May 09, 2003 9:38 AM
To: MAPICS ERP System Discussion
Subject: Trigger
List,
I am putting a trigger on a file When the file is read. What I want to
do is capture the original calling program, or procedure (Mapics pgm, cl,
dfu, qry, user program). Not the Trigger pgm. I have a program status data
structure in my trigger pgm, but that gives me the trigger pgm.. Is there a
way to do this.?
Any thoughts?
TIA
Pete Olshavsky
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.