420 pts.
 how to delete joblog created by a program RPG/ILE
hi ,

i am running a program in batch that stores thousands of reports in a run .I want to delete joblog  that is created by the program simultaniously .Please help me out  



Software/Hardware used:
as400
ASKED: July 11, 2010  3:04 PM
UPDATED: July 22, 2010  5:37 PM
  Help
 Approved Answer - Chosen by ITKE

...here is the description of spools that were generated...

Those are the spooled files, but what job description is associated with those jobs?

The first one listed appears to be from job 079299/DMYPGMR/QZSHSH. So, run this command:

DSPJOB JOB( 079299/DMYPGMR/QZSHSH ) OPTION(*DFNA)

The job description should at the top of the display.

Most other jobs listed are QP0ZSPWP jobs with a single CSBLND job. I would look at at least a few different ones to see if they all use the same job description or a small group of job descriptions. I wouldn't be surprised if most them used QDFTJOBD.

Start by using the CHGJOBD command to set LOG(4 0 *NOLIST) for the most common job description. Post the results back here. If the number of spooled joblogs is reduced, then you are close to the resolution.

Tom

ANSWERED:  Jul 21, 2010  10:54 PM (GMT)  by ITKE

 
Other Answers:
Last Wiki Answer Submitted:  June 27, 2012  1:45 pm  by    0 pts.
Latest Answer Wiki Contributors: 
To see other answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

I want to delete joblog that is created by the program simultaniously

Are you asking if your job can delete the joblog simultaneously with storing its reports? Or do you simply want to know how to delete the joblog after the job finishes? Or do you want to delete messages that build up in the joblog?

Tom

 108,055 pts.

 

Hi Tom , yes i am asking if my job can delete the joblog simultaneously with storing its reports

 420 pts.

 

…if my job can delete the joblog simultaneously with storing its reports

The “joblog” is two different things depending on when it is accessed.

While the job is running, the ‘joblog’ is the job’s external message queue. Messages may be explicitly sent there or promoted from program message queues. This is what you see when you run the DSPJOB command against an active job and take the option to view the joblog.

When the job ends, the system may copy the external message queue to a spooled file. This is what might be most commonly thought of as the ‘joblog’ because it survives after the job ends. It can last in the system for a long time — until it’s deleted.

Now, if you expect to delete the spooled joblog, you can’t do it in the job because it doesn’t exist until after the job ends. However, you can use the LOG() attribute of the job to stop the spooled joblog from being created as long as the job ends normally.

The LOG() value can be most easily set by supplying it through the job’s job description. Set the job description to have LOG(4 0 *NOLIST) in order to stop the spooling. If an error cause the job to fail, the joblog will be created to show what the problem was.

If you need to know about the job description or how to change it, post back here. Or if you want some explanation of anything from above, post again.

Tom

 108,055 pts.

 

thanks tom!

 420 pts.

 

You might be logging more data than you want.
CHGJOB will allow you a to only log errors ( with status 30 or higher).
Phil

 44,160 pts.

 

hi Tom, another problem arises while processing program…i am using a command ADDRPT to process reports.This command fires multiple job ,i ran this command over thousands of reports and it created lacs of joblogs that are copied to spoolfile ..now this is a big problem. Is there any way through which i can delete those splf that are created by program after the completeion of this ADDRPT command..
thanks in advance

 420 pts.

 

Without knowing what the ADDRPT is, nor where it came from, it will be difficult to provide a useful answer. I see references to ADDRPT that might indicate that it is part of an “On Demand” product.

If so, I would probably look at one of the jobs that was submitted to see what job description was used. Then I would try changing that job description to set a LOG() level that was appropriate.

Tom

 108,055 pts.

 

Yes,Tom thats a on demand command ADDRPTOND …when i ran that command lacs of spools were generated ,please tell me how i could handle them ……here is the description of spools that were generated ..

Found that jobs were creating 10 job logs per second.

QPJOBLOG 1 QZSHSH DMYPGMR 079299 07/20/10 02:37:27
QPJOBLOG 1 QP0ZSPWP DMYPGMR 079301 07/20/10 02:37:27
QPJOBLOG 1 QP0ZSPWP DMYPGMR 079307 07/20/10 02:37:28
QPJOBLOG 1 QZSHSH DMYPGMR 079306 07/20/10 02:37:28
QPJOBLOG 1 QP0ZSPWP DMYPGMR 079309 07/20/10 02:37:28
QPJOBLOG 1 QZSHSH DMYPGMR 079308 07/20/10 02:37:28
QPJOBLOG 1 QP0ZSPWP DMYPGMR 079292 07/20/10 02:37:28
QPJOBLOG 1 QZSHSH DMYPGMR 079291 07/20/10 02:37:28
QPJOBLOG 1 CSBLND DMYPGMR 721910 07/20/10 02:38:24

outputq is QEZJOBLOG n lib is QUSRSYS….
Help me out Tom ,this is degrading system performance …..

thanks man!

 420 pts.

 

Munduuu, if the number of job logs is degrading your system, it sounds like you need to do a
GO CLEANUP and set up and schedule a cleanup job.

 5,670 pts.

 

yes Tom , it worked..thanks a lot

 420 pts.