Receiving journal entries

Backup and Recovery
IBM iSeries
System monitoring
tips and tricks
Hi, I am new to AS400, so need some help in solving a problem. I have tried to some extent but things seem to be more complicated than I thought. Problem Goal: receiving entries from a journal and putting them into a DB2 table in a predefined format(say Type5). RCVJRNE command can be used to specify an exit program that will receive entries from the journal. From within this Exit program, I can open the pre-created DB2 table and write into it. But the main problem I am facing is how to maintain the last processed journal entry sequence number. It can happen that due to some reason my exit program completes or is killed. When I execute RCVJRNE command again, my exit program will receive all the entries from the beginning. I guess I need to call the RCVJRNE from within a CL program and maintain the sequence number on the disk, so that I can read it at the time the job is restarted. Also is there a way to make sure that if the job containing RCVJRNE is stopped somehow, it is automatically restarted and RCVJRNE is run. All required info can be got from the CL programming guide & iSeries Info center but seems to be too big to go through for a quick solution. Any suggestions will be greatly helpful. Thanks, P.Prasad

Answer Wiki

Thanks. We'll let you know when a new response is added.

maybe you can take a look at

good luck


Discuss This Question: 3  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • LHrabar
    Why not just keep the sequence number in your DB file. Before you add the record, chain with the sequence number. If the record is found, skip it. You can also store the last sequence number - either in a file or in a data area - and use it to control which journal entries you receive with the RCVJRNE command - one of the parms is starting sequence number. As to automatically restarting the REVJRNE job: 1. Set a flag on the system(file or data area) showing the status of the job. Submit/Started/Completed. 2. Setup a scheduled job to run and check the flag. If it is not completed, resubmit the REVJRNE job. If it is started, check if the job is active. If not, resubmit it. If you need more info, let me know. I hope this helps. Len Hrabar
    95 pointsBadges:
  • TheQuigs
    I'm not sure what you're after. Are you trying to build a permanent record of the journal entries? If so, the Journal Receiver *JRNRCV is a better store -- it can't be changed whereas a DB2 table can be. We write programs that use RCVJRNE to build a work file and run then periodically run the report program. Then we simply pick a starting and ending point in time for which to receive the journal entries.
    0 pointsBadges:
  • Pprasad123
    Hi All, Thanks for the replies. I will implement your suggestions and get back if stuck again in some problem. Thanks, P.Prasad
    0 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: