Use a HLL such as ILE RPG. You can use SQL to substring the entry specific data but, in my opinion, if you do, you are a member of the Hurt-Me-Hurt-Me crowd.
Dump the journal to a file with DSPJRN. You can use the API if you want. Just adapt the "read" to fit using an API.
FyouroutfilIF E DISK
FDUPCUSMST O E DISK
D customerrcd E DS extname(yourtablename)
D reclaimedrcd E DS extname(DUPCUSMST)
/free
doW (not %eof(youroutfil));
read youroutfile;
if (%EOF);
iter;
endif;
if (JOCODE <> 'R');
iter;
endif;
// What type of journal entry type you select depends upon what you are looking for
// In this example I chose before images.
If (JOENTT = 'UB');
customerrcd = JOESD; // JOESD is in youroutfil
reclaimedrcd = customerrcd;
write DUPCUSMSTRCD;
endif;
enddo;
*INLR = *On;
/end-free
Gary Monnier
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Stone, Joel
Sent: Thursday, June 14, 2012 2:33 PM
To: 'Midrange Systems Technical Discussion'
Subject: retrieving PF records from journal
How can I get (for example) customer records from a journal receiver into an empty copy of the CUST DB file (with externally described fields).
APYJRNCHG seems like the obvious choice, but doesn't seem to provide a filter on START-DATE & TIME, which I need.
DSPJRN seems to bring back a string of the record buffer. What is an easy method to copy this into externally-described fields?
Must I use an HLL? Can SQL do this with a substring?
Is there a simple way to accomplish this?
Thanks!
(ps my last post was mistaken, DBU on the DSPJRN outfile shows DB fields which aren't really there!)
______________________________________________________________________
This outbound email has been scanned for all viruses by the MessageLabs Skyscan service.
For more information please visit
http://www.symanteccloud.com ______________________________________________________________________
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx<mailto:MIDRANGE-L@xxxxxxxxxxxx> To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx<mailto:MIDRANGE-L-request@xxxxxxxxxxxx> Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.