To change the message logging level, and thus gather more logging information on any job, you need to access and change the job parameters per one of the following:
- To change your own interactive job, enter the CHGJOB command, then press F4.
- To change another interactive job: Locate the job using WRKACTJOB SBS(subsystem), use OPTION 2 next to the job, press F4.
- To change a submitted job: Put the JOBQ on HLD status temporarily (WRKJOBQ jobqname, OPTION 3 to HOLD), submit the job, use WRKJOBQ OPTION 5 to “Work With JOBQ,” and use OPTION 2, press F4.
*CAUTION* Holding the JOBQ will hold all jobs being submitted into that JOBQ for the duration that the JOBQ is actually on hold. Once the message level is changed, it is critical to release the JOBQ.)
Once the interactive or batch job is identified, and the OPTION 2 “Change,” menu has been entered, do the following:
1) Press F10 for further detail.
2) Modify the parameters as follows: Message Logging: Level 4, Severity 00, Text *SECLVL, Log CL Program Commands *YES, press enter.
3) Release the JOBQ. (WRKJOBQ jobqname, OPTION 6 “Release”
*Note* The message level will only remain for the job it was changed for, and would need to be repeated anytime it is needed unless further measures are taken to change the Job Description, in which doing so affects all jobs that utilize that Job Description.
9/16/09 How to obtain further message logging for interactive or submitted jobs
7/28/08 Using the System Request menu.
The System Request menu is basically a shortcut screen that allows you to access some commonly used commands without leaving the your current screen.
Accessing the System Request menu can be done in a variety of ways depending on your environment and emulation program. Common ways are: pressing the SHIFT and SysRq keys together, or if using PC emulation, right clicking your mouse and selecting ‘SysRq’ from the pop-up window.
Transfer to secondary display session.
Choosing Option 1 will give you a second sign on for the same session, but there is a caveat: once you start another session the first one is paused and it will not resume until you go back to it. This is important to remember if you are running an interactive query, compile, etc.
Cancel a display session
To cancel out the display session that your are viewing, use Option 2.
Display user messages
User messages for your log-on profile can be seen by selecting Option 4. From there you can also manage the messages (i.e. remove all or selected messages).
View System Operator messages (QSYSOPR) To display the system operator messages use Option 6. It takes you right to the QSYSOPR messages screen. This is particularly useful if your display session is running a program and receives an error message that needs to be answered.
View current job information
See your current job information by selecting option 7. This is particularly useful if you need to see job names and job numbers. If you have second display session running, you can see that job information too.
Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation. All other brands are property of their respective registered owners.
4/13/07 How to ensure a job creates a job log when it ends
Ever have a job that ends abnormally but does not create a job log?
The command CHGJOB *SECLVL can be used to change an active job so that it creates a job log, which will allow you to see what has caused it to end.
From the WRKACTJOB screen, find the job and type a 2 (Change) next to the job, then press F10 (Additional parameters)
The following will appear under Message Logging:
Level . . . . . . . . . . . . > 4
Severity . . . . . . . . . . . > 00
Text . . . . . . . . . . . . . > *NOLIST
In the Text field, change *NOLIST to *SECLVL
You can also change parameters on this screen to log additional information about the CL being run.
In the Log CL Program Commands field change *NO to *Yes
So, the CHGJOB would look like this:
Message logging:
Level . . . . . . . . . . . . 4
Severity . . . . . . . . . . . 00
Text . . . . . . . . . . . . . *SECLVL
Log CL program commands . . . . *YES
This would then produce a joblog such as QEZJOBLOG
If you are running this from a command line - then do a CHGJOB LOG(4 00 *SECLVL) LOGCLPGM(*YES) before running your job. This should produce a job log when it ends abnormally (abend) or is shutdown abnormally.
If you cannot change the job once you logon - then look at what job description is being used and change that to the following:
CHGJOBD LOG(4 00 *SECLVL) LOGCLPGM(*YES)
You may need to change the signoff command to LOG(*LIST) to keep it from ditching the job log. SIGNOFF LOG(*LIST) if this is an interactive job you are wishing to log.
Disclaimer: Vision Solutions makes every effort to provide accurate system management information and programming code; however the company cannot be held liable for the accuracy of information nor its compatibility in your own environment. Please review and test thoroughly before implementing. © Copyright 2008, Vision Solutions, Inc. All rights reserved. IBM, System i, iSeries, and AS/400 are trademarks of International Business Machines Corporation.