|
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mark S. Waterbury
Sent: Wednesday, October 01, 2008 11:44 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Best way to determine which program is causing
execution oftrigger program.
Hi, Stephen:
Put your trigger program in debug, and set breakpoints, and
run a program interactively that updates the file, thus
invoking the trigger, and when it stops at a breakpoint in
the trigger program, issue F21 to get a command line, and
type DSPJOB and then select option "11. Call stack" to see
the call stack. This should give you a better idea of what's going on.
The IBM database I/O routines all begin with "QDB" (e.g.
QDBGET, QDBPUT,
etc.) -- it is responsible for calling the trigger program.
So, the one you want, your program that issued the I/O that
caused the trigger to get invoked, will always be one level
higher (or one level back) from the QDBxxx program in the
call stack. Does this "make sense"?
Hope that helps,
Mark S .Waterbury
> Brown, Stephen GRNRC wrote:
Alan,that hopefully
Now compiled and I am debugging, noticed something else
you can help me with. I am debugging a batch job usingstrsrvjob etc I
have added a record to the file that executes the trigger.The first
program your piece of code finds when doing an insert isQDBPUT which
is in QSYS. Now I'm not sure if this is result of servicejob debug or
whether this relates to something background task. Now guess I canlibrary we keep
always check the program library and if it matches the
all our program objects then I can select this program as theexecution
originating one. Just thought I'd mention this in case there was
something I was missing or can do to avoid the QDBPUT etc.
Thanks again for your help
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Shore
Sent: 01 October 2008 15:09
To: RPG programming on the AS400 / iSeries
Subject: RE: Best way to determine which program is causing
oftrigger program.They are part
Sorry Stephen, I knew there would be something I forgot
of the SDS We have a copybook for thiswhat/where
D sds
D psdsPgmName *proc
D psdsStatus *status
D psdsPstatus 5S 0
D psdsLineNbr 8A
D psdsRoutine *routine
D psdsParms *parms
D psdsException 7A
D psdsExcType 3A overlay(psdsException)
D psdsExcNbr 3A overlay(psdsException:4)
D psdsMsgWork 51 80A
D psdsPgmLib 81 90A
D psdsMsgData 91 170A
D psdsFile 175 184A
D psdsJob 244 253A
D psdsUser 254 263A
D psdsJobNbr 264 269S 0
D psdsProcProg 334 343A
D psdsProcMod 344 353A
D psdsLineNbr2 354 355I 0
If theres anything else you need
Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxxxxx
P:(631) 244-2000 ext. 5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill
rpg400-l-bounces@xxxxxxxxxxxx wrote on 10/01/2008 09:51:10 AM:
Alan,
What are the two fields psdsPgmName and psdsPgmLib ? And
causing executionare they defined
Thanks
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Shore
Sent: 01 October 2008 13:35
To: RPG programming on the AS400 / iSeries
Subject: RE: Best way to determine which program is
GetCaller(Var:VarLen:'CSTK0100':JobIdInfoftrigger program.
Stephen
here is what I have used to find the name of the calling program
D GetCaller PR Extpgm('QWVRCSTK')
D 2000
D 10I 0
D 8 CONST
D 56
D 8 CONST
D 15
D Var DS 2000
D BytAvl 10I 0
D BytRtn 10I 0
D Entries 10I 0
D Offset 10I 0
D EntryCount 10I 0
D VarLen S 10I 0 Inz(%size(Var))
D ApiErr S 15
D JobIdInf DS
D JIDQName 26 Inz('*')
D JIDIntID 16
D JIDRes3 2 Inz(*loval)
D JIDThreadInd 10I 0 Inz(1)
D JIDThread 8 Inz(*loval)
D Entry DS 256
D EntryLen 10I 0
D PgmNam 10 Overlay(Entry:25)
D PgmLib 10 Overlay(Entry:35)
c eval CallingPgmNam = *blanks
c eval CallingPgmLib = *blanks
C CallP
email. I haveC :'JIDF0100':ApiErr)
C Do EntryCount
C Eval Entry = %subst(Var:Offset + 1)
c if CallingPgmNam = *blanks and
c CallingPgmLib = *blanks
c if PgmNam = psdsPgmName and
c PgmLib = psdsPgmLib
C Else
c eval CallingPgmNam = Pgmnam
c eval CallingPgmLib = Pgmlib
C Endif
C Endif
C Eval Offset = Offset + EntryLen
C Enddo
I think I have everything
If not just drop me a line with whatever info you have
Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxxxxx
P:(631) 244-2000 ext. 5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill
rpg400-l-bounces@xxxxxxxxxxxx wrote on 10/01/2008 08:19:59 AM:
Sorry should have been more descriptive in my initial
(And batchconsidered this but I do have other situations where I need to
differentiate between which interactive calling program
maybe handy forfor
that matter)is causing trigger and also I thought it
program if
other application.
I already have the call to QUSRJOBI (JOBI0400) in the Trigger
program but I really would like to determine the calling
Hillier, Martinpossible.
Thanks
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
job typeSent: 01 October 2008 12:46
To: RPG programming on the AS400 / iSeries
Subject: RE: Best way to determine which program is causing
execution oftrigger program.
Hi Stephen,
Your description makes it sound more like you want to use
command, and itsrather than calling program. Check out the RTVJOBA
Brown, Stephencorresponding API if thats the case.
Cheers,
Martin
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
executed as theGRNRC
Sent: 01 October 2008 12:23
To: RPG400-L@xxxxxxxxxxxx
Subject: Best way to determine which program is causing execution
oftrigger program.
Folks,
Anyone know of the best way to determine which program is the
causing execution of a trigger program.
I would like to do different things when trigger is
one causedresult of an interactive change to a file as opposed to
--------------------------------------------------------------------by a batch change.
Thanks.
Confidential, unpublished property of CIGNA Do not duplicate or
distribute. Use and distribution is limited solely to authorised
personnel.
(c) Copyright 2008 (CIGNA Corporation)
shown. This--please
--
------
CONFIDENTIALITY NOTICE: If you have received this email in error,
immediately notify the sender by e-mail at the address
Please deleteemail transmission may contain confidential information. Thisentity
information is intended only for the use of the individual(s) or
to whom it is intended even if addressed incorrectly.
=====================================================================it
from your files if you are not the intended recipient. Thank you
for your compliance. Copyright 2008 CIGNA
please take=
==
======
--
This is the RPG programming on the AS400 / iSeries (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting,
use of thea moment to review the archives at
http://archive.midrange.com/rpg400-l.
--------------------------------------------------------
This message (including any attachments) is only for the
please takeperson(s) for whom it is intended. It may contain Mattel
confidential and/or trade secret information. If you are not the
intended recipient, you should not copy, distribute or use this
information for
any purpose, and you should delete this message and inform the
sender immediately.
--
This is the RPG programming on the AS400 / iSeries (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting,
---------------------------------------------------------------------a moment to review the archives at
http://archive.midrange.com/rpg400-l.
address shown.-
--
------
CONFIDENTIALITY NOTICE: If you have received this email in error,
please immediately notify the sender by e-mail at the
information. This
This email transmission may contain confidential
incorrectly. Pleaseinformation is intended only for the use of the individual(s) or
entity to whom it is intended even if addressed
=====================================================================
delete it from your files if you are not the intended recipient.
Thank
you for your compliance. Copyright 2008 CIGNA
please take=
==
======
--list
This is the RPG programming on the AS400 / iSeries (RPG400-L)
mailing
To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting,
(RPG400-L) mailinga moment to review the archives at--
http://archive.midrange.com/rpg400-l.
This is the RPG programming on the AS400 / iSeries
please take alist To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting,
----------------------------------------------------------------------moment to review the archives at
http://archive.midrange.com/rpg400-l.
--address shown.
------
CONFIDENTIALITY NOTICE: If you have received this email in error,
please immediately notify the sender by e-mail at the
information. ThisThis email transmission may contain confidential
incorrectly. Pleaseinformation is intended only for the use of the individual(s) or
entity to whom it is intended even if addressed
======================================================================delete it from your files if you are not the intended recipient.
Thank
you for your compliance. Copyright 2008 CIGNA
==(RPG400-L) mailing
======
--
This is the RPG programming on the AS400 / iSeries
please take alist
To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting,
--moment to review the archives at
http://archive.midrange.com/rpg400-l.
This is the RPG programming on the AS400 / iSeries (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit
http://www.messagelabs.com/email
______________________________________________________________________
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.