Question

  Asked: Jan 12 2008   8:22 PM GMT
  Asked by: AS400DBA


Cannot end RGZPFM on V5R4 (Journaled file)


ENDJOB, RGZPFM, V5R4, AS/400, DB2 universal database, RPG, REUSEDLT, Recovery, Journaling, AS/400 performance

Batch job RGZPFM on V5R4 not complete after 3 days. I issued an ENDJOB, and job is not completely ended 1.5 days later. The file is journaled and is very large. SBMJOB CMD(RGZPFM FILE(MYLIB/MYFILE) KEYFILE(*NONE) ALWCANCEL(*YES) LOCK(*SHRUPD)) How can I end this job? If MYFILE is damaged, I can delete it and restore it from a backup. I just need to end the job.

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
+2
Click to Vote:
  •   2
  •  0



You don't mention how you have tried to end the job. Have you used ENDJOB with OPTION(*IMMED)?

If so, have you also tried ENDJOBABN (End Job Abnormal)?

After the reorg of the physical file is finished, the RGZPFM command will rebuild all of the logical files attached to the physical file. Also, if you are allowing the users to change the file (Add/Delete/Update) while the reorg is processing you will add to the amount of time needed to finish the job.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400, Database and DataCenter.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Znason  |   Jan 14 2008  5:51PM GMT

Why didn’t you stop Journaling prior to the reog?

 

AS400DBA  |   Jan 15 2008  6:05PM GMT

I finally got the job to finish by using ENDJOBABN (End Job Abnormal). This was on our test box, so we only had 2 real issues.

1- Operators had not been able to get a system backup in 3 days.
2- Since I wanted to be able to cancel the reorg, it was submitted with ALWCANCEL *YES, which meant it had to be journalled. The journal receivers were taking up too much space on the system and we still had 25% more to go.

Day 1 - RGZPFM started (System storage @ 52%)
Day 2 - system storage now @ 71%
Day 3 - Still running, job had created 120 journal receivers, about 75% complete. System storage now at 83%. I ended the job with ENDJOB *IMMED. We were concerned about the system crashing because of storage. (I probably should have deleted some of the journal receivers instead of ending the job. I was not sure if I could.)
Day 4 - Job is at END status but is still ACTIVE.
Day 5 - Still not ended. ENDJOBABN was issued and the job ended within 5 minutes. System storage still @ 83% but we will be deleting the 120 extra journal receivers.

Since this is a test box, I will turn off the journalling and submit the RGZPFM with ALWCANCEL *NO. My other option is to use CPYF as suggested in some articles.

For the question of “Why didn’t you turn off journalling first?” - The file had to be journalled in order to use the ALWCANCEL *YES and I wanted to be able to cancel it, if it was taking too long. (so much for being able to cancel it)

Thanks for all the input. I would still love to hear other suggested options or solutions.

 

Gilly400  |   Feb 20 2008  4:09PM GMT

Hi,

I assume (as you’re doing a reorg with no keyfile) that you’re just trying to remove deleted records from this file to get some space back?

You could try doing a CHGPF REUSEDLT(*YES) which will allow re-use of deleted records so you won’t need to reorg to get rid of them.

Cheers,

Martin Gilbert.
.