Hi,

On Wed, 19 Apr 2000, Sean Porterfield wrote:

> I'm back to dabbling with the idea of journaling files and downloading
> only the changes with asdbget instead of getting the whole file every
> time.
> 
> I'm trying to follow Mike's directions, which I assume work for him.
> 
> > This is working quite well for us.  Here is a synopsis of how we do it.
> > Details are available if anyone is interested.
> >
> > 1) Create a journal
> > 2) Create two journal receivers to hold the journal entries
> > 3) Start journaling the physical files you want to mirror
> > 4) Once a day, or however often, change journal recievers (switch between
> > the two)
> > 5) Run DSPJRN to dump the journal entries to a database file.
> > 6) Download the database file
> > 7) Convert the entries in the database file to SQL statements(INSERT,
> > UPDATE, DELETE).  I have a utility for this which I can make available.
> > 8) Run a perl script which uses DBI to execute the SQL statements.  I have
> > a script for this also.
> >
> 
> I switched steps 1 and 2 since the CRTJRN command wanted a JRNRCV
> parameter.  So I used CRTJRNRCV to make two journal receivers, CRTJRN to
> create the journal with the first journal receiver, and STRJRNPF to let
> the system know what file I wanted to journal (can it do multiple files
> all in one journal?  or separate for each?)

You can have as many physical files in one journal as you want.

> Then I performed an operation that added a record to the file.  I used
> the CHGJRN command to switch to my second journal receiver.  I used
> DSPJRN to create a physical file and downloaded it via asdbget.
> 
> There is a record with JOCODE=R and JOENTT=PT that indicates I added a
> record, but the JOESD field has a bunch of garbage.
> 
> Is there any way to get FIELD=VALUE information for the record I added?

The problem is that journal records have a different format from regular
records.  This additional header information contains info about each
journal entry (time, file, ADD/DEL/UPDATE, etc.).  I have a modified
version of as400toascii which can handle journals.  This would be a good
basis for modifying asdbget.  I don't have access to it at the moment, as
I'm waiting for my computer to be shipped down to California, but I should
be able to post info on where to get it in the next week or two.

Mike

+---
| This is the LINUX5250 Mailing List!
| To submit a new message, send your mail to LINUX5250@midrange.com.
| To subscribe to this list send email to LINUX5250-SUB@midrange.com.
| To unsubscribe from this list send email to LINUX5250-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.