Home > AS/400 Tips > iSeries programmer tips > Take control of your job logs
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES PROGRAMMER TIPS

Take control of your job logs


Kenneth Graap, Search400.com expert
09.10.2003
Rating: -3.95- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


A job log is invaluable in determining the cause of a problem when a job ends abnormally. If not properly managed, though, job logs can eat up huge amounts of system storage. Understanding how job logs get generated is the first step to understanding how to managing them.

Let's start at the beginning. What is a job log? Well, a quick search of IBM's iSeries Information Center says a job log is this:

A record of requests submitted to the system by a job, the messages related to the requests, and the actions performed by the system on the job. The job log is maintained by the system program.


[IMAGE]
[IMAGE][IMAGE]
Kenneth Graap [IMAGE]
[IMAGE]

Every job that runs on your server has an associated job log that records its activities. A job log can contain the following:

  • The commands in the job
  • The commands in a control language (CL) program
  • All messages associated with that job

What determines when a job log will be created?

There are several ways within OS/400 to specify the creation of or restrict the creation of a job log.

The message logging parameters on the job description and for an active job determine what kind of information will be collected:

I won't go into all the specifics related to those values at this time, but if the message logging 'TEXT' parameter is set to *NOLIST, a job log will be created only if the job ends abnormally. If the job completes normally, no job log will be created. This is the same whether the job is an interactive or batch job.

If any value other than *NOLIST is specified for the message logging 'TEXT' parameter in a batch job, a job log will always be produced -- whether the job ends normally or abnormally.

This works differently for interactive jobs, though. To conserve disk space consumed by job logs, the SIGNOFF command may be define...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Application Development
iSeries calling an .exe
Top 10 programmer tips
Formatted work job scheduler
Convert system date and time
Mixing free format code with embedded SQL
SQL update a field in one file from a field in another file
Webcasts for iSeries programmers
Programming advice from the pros
Easy code copying via the drag and drop method
Setting FTP time-outs

Systems Management
Can you trust all those trigger programs?
Are your backups complete?
Controlling remote command processing
Watch your profiles
Avoid locking issues
Send message to users at a remote site
Security journal receiver management
Top 10 backup commands
Tracking critical file access in real time
Create an iSeries Access image and update it with the latest Service Pack

iSeries programmer tips
Enhancing RPG with external SQL stored procedures
Tracking data changes on IBM i with triggers
Introduction to SQLRPGLE on IBM i: Making a report
Implementing a browser interface in COBOL: Displaying database fields
Taking advantage of CL advancements, starting with V5R3
TAATOOL: Useful tools for programmers on IBM i
Implementing a browser interface in COBOL: Creating your graphic Web page
Implementing a browser interface in COBOL: Getting started
Making the most of RPG data handling on IBM i
Groovy programming on IBM i

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


d as

So, by default, when an interactive job is ended normally, no job log will be produced as specified by the LOG(*NOLIST) parameter. However, if an interactive job ends abnormally, a job log will be produced.

This job log is usually stored in the QEZJOBLOG output queue in library QUSRSYS. You can determine where your job log output goes with this command:

Scroll down to the Spooling Description section of the Display File Description listing to see which output queue job log output will be directed to:

If you want to always force the creation of a job log from an interactive job, you can do it in one of two ways:

  1. When you sign off enter SIGNOFF LOG(*LIST) instead of using the default.
  2. Prior to signing off enter DSPJOBLOG OUTPUT(*PRINT).

When one of those options is used, a job log will always be created from an interactive job.

Now that you understand how job logs are created on the iSeries, let's look at how to view one?

To view a job log that has already been created, use one of the following commands:

To see ALL job log output on the system, use this command:

For further information on how to create/display or modify job descriptions, review the HELP text associated with the following OS/400 commands:

CHGJOBD
CRTJOBD
DSPJOBD
WRKJOBD

For further information on how to view/change a jobs message logging attributes and to display a job log, review the HELP text associated with these OS/400 commands:

DSPJOB
CHGJOB
DSPJOBLOG

---------------------------
About the author: Kenneth is a senior AS/400e system administrator at Northwest Natural Gas in Portland, Ore. He has extensive experience in all aspects of iSeries systems management. That includes proactive performance tuning, system software upgrades and maintenance, hardware upgrade planning, backup/recovery procedures and security.

==================================
MORE INFORMATION
==================================

  • Suppressing job logs
    "Kimk" says normally he wants his jobs logged. However, he has a few that create huge logs and he doesn't want them produced. He says, "I could do this as chgjob logging text to *nolist, but is that the easiest way?" Site expert Laird Scranton advises.
  • Get QPJOBLOG routed to a different outq
    "Mggraham" is trying to track a user problem in which the user didn't tell him of a problem until several days afterwards and by then the joblog outq had been cleared. How can he get the job log of a particular job routed to an outq that is different than the one specified on the QPJOBLOG file? A couple other users had some ideas.
  • Determine when the last IPL was performed
    How can you tell when the last IPL was performed? Site expert Rich Belles and a few other users share their methods.
  • View a history log on the iSeries
    A user asks, "We are working as quickly as possible to convert from s36 environment to native 400. Is there any way we can view a history log like what we had on our old s36?" Site expert Rich Belles describes what the iSeries can do.


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts