If you use Paul's idea of journaling the PF, I suggest this:
A* This is a DDS to create a formatted file from the journal
A* entries you retrieve.
A*
0001.00 A REF(RF$)
A* This REF should point to the reference file for YOUR fields
A* This is optional if you hard-code all your field data.
A*
A* The record name is anything you want.
A*
0002.00 R RF$yourfile
A*
A* The fields in the first section below must stay as they are--
A* they're the fields that a DSPJRN will populate.
A*
A* DSPJRN JRN(lib/journal) FILE(file name(s)) +
A* RCVRNG(*CURCHAIN)
A* FROMTIME(&FROMDATE 000000) +
A* TOTIME(&TODATE 235959) +
A* OUTPUT(*OUTFILE) +
A* OUTFILFMT(*TYPE2) +
A* OUTFILE(worklib/workfile) +
A* ENTDTALEN(*CALC) ENTTYP(*RCD)
A*
A* OUTFILFMT(*TYPE2) creates records with the following
A* "JO*" fields, followed by the raw data from the updated
A* record.
A*
A* CPYF the OUTFILE from DSPJRN into this file,
A* using FMTOPT(*NOCHK). This will plop the journal
A* information into the JO* fields, and your data into the
A* remaining fields, formatted and ready to view.
A*
A* CPYF FROMFILE(worklib/workfile) +
A* TOFILE(mylib/myfile) +
A* MBROPT(*ADD) CRTFILE(*YES) FMTOPT(*NOCHK)
A*
0003.00 JOENTL 5S 0
0004.00 JOSEQN 10S 0
0005.00 JOCODE 1A
0006.00 JOENTT 2A
0007.00 JODATE 6A
0008.00 JOTIME 6S 0
0009.00 JOJOB 10A
0010.00 JOUSER 10A
0011.00 JONBR 6S 0
0012.00 JOPGM 10A
0013.00 JOOBJ 10A
0014.00 JOLIB 10A
0015.00 JOMBR 10A
0016.00 JOCTRR 10S 0
0017.00 JOFLAG 1A
0018.00 JOCCID 10S 0
0019.00 JOUSPF 10A
0020.00 JOSYNM 8A
0021.00 JOINCDAT 1A
0022.00 JORES 19A
0023.00 *****
0024.00 yourfield1 2A
0025.00 yourfield2 4A
0026.00 yourfield3 2A
A* Insert all of the fields from the DDS for your file here.\
A* If they have any REFFLDs, make sure to update the REF statement
A* at the top of this DDS.
0027.00 etc.
0039.00 *****
0040.00 K keyfield1 TEXT('One of your fields')
0041.00 K keyfield2 TEXT('Keyfileds are optional')
****************** End of data ********
Paul E Musselman
PaulMmn@xxxxxxxxxxxxx
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Steinmetz, Paul
Sent: Friday, April 27, 2018 4:44 PM
To: 'Midrange Systems Technical Discussion' <midrange-l@xxxxxxxxxxxx>
Subject: RE: Anybody know a good way for a program to see what's on its job's call-stack?
Turn on journaling for the PF with duplicate records.
Recreate the error.
The journal entries will tell you the programs that wrote the duplicate records.
Paul
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of James H. H. Lampert
Sent: Friday, April 27, 2018 4:34 PM
To: Midrange Systems Technical Discussion
Subject: Anybody know a good way for a program to see what's on its job's call-stack?
Anybody know a good way for a program to see what's on its job's
call-stack? Preferably something that can be called from ILE RPG.
I'm in a situation where, in order to catch a bug that has started
breeding duplicate records in a file (apparently in some periodic update
process), I need to be able to write something that will, when the
suspect program is called, log what called it -- the entire call stack.
--
JHHL
As an Amazon Associate we earn from qualifying purchases.
This thread ...
Re: Anybody know a good way for a program to see what's on its job's call-stack?, (continued)
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.