• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • iSeries Navigator Job Monitor

    March 21, 2007 Bruce Guetzkow

    Note: The code accompanying this article can be downloaded here

    As the only developer in a small company, I try to find ways to make the computer work so I don’t have to. We don’t have an operator and no one is dedicated to monitoring the QSYSOPR message queue, so when problems happen, I need a way to be notified, wherever I am. I’ve tried a couple of programming solutions that captured information from the WRKACTJOB screen, but there were always conditions that I didn’t anticipate and weren’t captured by those methods.

    Then I learned about Monitors in iSeries Navigator Management Central. With a Job Monitor, I can let the iSeries check specified jobs for indicated conditions, and when one occurs have it execute a command of my choice to notify me of the problem. In my case, I am more concerned about batch jobs, as those problems tend to go unnoticed until a backlog occurs. Here’s how you can set up a Job Monitor for your own use.

    Creating a Monitor

    Begin by starting iSeries Navigator. Navigator is IBM‘s graphical tool for administering the iSeries. Expand the Management Central section and you will find a sub-section called Monitors. Expand Monitors to reveal the different types available. Although this discussion is about Job Monitors, the concepts are similar for each type.

    If you click on Job, you may see a sample Monitor supplied by IBM. You can right-click on the monitor and select Properties to see the specifics. For our purposes, I will be creating a new Monitor. A new Monitor can be created by right-clicking on Job and selecting New Monitor. There is also an option on the File menu and an icon just below the menu. Selecting New Monitor opens up a tabbed-window where characteristics can be specified. Start on the General tab by giving the Monitor a name, such as Batch Jobs. The name and description fields are required and you can not proceed to other tabs unless these are filled in.

    On the General tab, you specify which jobs to monitor. You can select jobs by any combination of Job Name, User, Subsystem and Job Type. You can be as broad or narrow as you like with your selections. Choose from available drop-down options or type over. When you have a combination that suits your needs, click on the Add button. You can add multiple selections. If any job that meets any of your criteria is affected, rules on subsequent tabs will be applied. There is also a tab labeled Servers to Monitor. I won’t go into that here, but take a look for options to consider for additional Monitors.

    After you have completed entering on the General tab, select the Metrics tab. Here you specify the conditions to monitor for. For our Batch Job Monitor, I selected Job Status and clicked on Add. This changes the bottom half of the window to reveal Job Status options to monitor for. Scroll through the list and you will find the option Waiting for Message. This means that the Monitor will be looking for jobs with a status of MSGW. You can select as many conditions as you like.

    There is a tab on the lower half of this window labeled Status Threshold. Here you can indicate how many times the condition must occur before an action is triggered and when the Monitor should be reset so that the condition can be monitored in the future. You can also specify an i5/OS command to be executed when the condition is triggered. I’ll go into more detail on this later.

    The Collection Interval tab indicates how often the jobs will be polled for the indicated conditions. The default is 15 minutes. Specifying a shorter time can have a performance impact on your system, so use caution when changing this value. You can also specify different intervals based on different metric types. I haven’t had a need to use that feature, but in my case I am only looking at one type of metric (Job Status). If you choose to use multiple metric types these options should be considered.

    Next is the Action tab. Here you indicate Navigator actions that should occur when the condition is triggered and when the Monitor is active. If you specified a command on the Metrics tab, i5/OS Command is checked and that option cannot be changed. Opening the Monitor and sounding an alarm can only happen if the event is triggered while Navigator is running. If you always have Navigator running during the day, these settings may be of value.

    The Systems and Groups tab is where you specify which iSeries servers this Monitor will run on. If you have multiple iSeries servers, you can define a Monitor and have it execute on all servers that you deem appropriate. There is a Browse button that provides a list of the systems available.

    The final tab is called Sharing. Monitors normally can only be viewed and maintained by the person who defined them. You can change this behavior based on the setting you choose.

    Click on OK to create the Monitor. You will return to the list of Monitors where you will see your Monitor has been added. The Status column should indicate Stopped at this time, meaning that this Monitor is not yet active. You can start monitoring jobs by selecting the Monitor and selecting the Start icon, or right-clicking and selecting Start. There is also a Start option on the File menu.

    Before you do this, I recommend one change to your Monitor. In releases prior to OS/400 V5R2, when an IPL was done, you needed to manually restart your Monitors–meaning, they didn’t restart automatically. At V5R2, a feature was added to automatically restart a Monitor. If you don’t remember seeing a check-box on any of the tabs, that’s because there isn’t one. Instead, you need to change the name of your Monitor by adding a single blank and the string &RESTART (in upper case) at the end of your Monitor name.

    Specify a Command

    Now back to the i5/OS command I mentioned earlier. We’ve identified the jobs we want to monitor, what to monitor for, how often and what Navigator functions (if any) to perform. So, if I don’t have Navigator open all day long (and all night!), how do I get the Monitor to tell me there’s a problem?

    That’s where the command comes in. You can specify any valid i5/OS command, including one you’ve created yourself, and you can even pass some job information as command parameters. You could use something as simple as the Send Message (SNDMSG) command. Of course, you will only get the message if you happen to be signed on at the time. I’ve created a command that does the following:

    • If I’m signed on, send an iSeries message to me
    • If I’m not signed on but my backup is, send an iSeries message to him
    • If neither of us is signed on, send a text message to both of our cell phones

    I’ve included a version of that command that you can use (see the link at the top of this article for that). I had to modify it for this publication because we use a third-party tool to send emails from the iSeries. I have labeled that part of the code as an “Alternate Plan.” You’ll have to determine what course of action to take if no one is signed on.

    There are four source members included in the code:

    • Physical file (SNDMONMSGP) to contain the names of people to notify
    • Logical file (SNDMONMSG1) keyed by the order that you want the names processed
    • Command Send Monitor Message (SNDMONMSG)
    • Command processing program (SNDMONMSGC)

    Compile instructions are included in each member and they should be compiled in the order listed above. Remember to review the section of the command processing program labeled “Alternate Plan”. In the area labeled i5/OS trigger command, enter:

        SNDMONMSG MONITOR('&MON')
                                   JOBNAME(&JOBNAME)
                                   JOBUSER(&JOBUSER)
                                   JOBNUMBER(&JOBNUMBER)
                                   MSGID(&MSGID)
    

    For more information on Monitors, click on Help on any tab. If you click Help on the Metrics tab, then click Thresholds for Job Log Message, then i5/OS commands, you will see a list of all variables that can be passed from a Monitor.

    Now you can sleep peacefully, knowing that someone is carefully watching your iSeries for you.



                         Post this story to del.icio.us
                   Post this story to Digg
        Post this story to Slashdot

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    WorksRight Software

    Do you need area code information?
    Do you need ZIP Code information?
    Do you need ZIP+4 information?
    Do you need city name information?
    Do you need county information?
    Do you need a nearest dealer locator system?

    We can HELP! We have affordable AS/400 software and data to do all of the above. Whether you need a simple city name retrieval system or a sophisticated CASS postal coding system, we have it for you!

    The ZIP/CITY system is based on 5-digit ZIP Codes. You can retrieve city names, state names, county names, area codes, time zones, latitude, longitude, and more just by knowing the ZIP Code. We supply information on all the latest area code changes. A nearest dealer locator function is also included. ZIP/CITY includes software, data, monthly updates, and unlimited support. The cost is $495 per year.

    PER/ZIP4 is a sophisticated CASS certified postal coding system for assigning ZIP Codes, ZIP+4, carrier route, and delivery point codes. PER/ZIP4 also provides county names and FIPS codes. PER/ZIP4 can be used interactively, in batch, and with callable programs. PER/ZIP4 includes software, data, monthly updates, and unlimited support. The cost is $3,900 for the first year, and $1,950 for renewal.

    Just call us and we’ll arrange for 30 days FREE use of either ZIP/CITY or PER/ZIP4.

    WorksRight Software, Inc.
    Phone: 601-856-8337
    Fax: 601-856-9432
    Email: software@worksright.com
    Website: www.worksright.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    COMMON:  Join us at the 2007 conference, April 29 – May 3, in Anaheim, California
    Databorough:  X-analysis is the world leader in AS/400 application retro-documentation
    Patrick Townsend & Associates:  Alliance AES/400 - database field encryption

    IT Jungle Store Top Book Picks

    The System i Pocket RPG & RPG IV Guide: List Price, $69.95
    The iSeries Pocket Database Guide: List Price, $59.00
    The iSeries Pocket Developers' Guide: List Price, $59.00
    The iSeries Pocket SQL Guide: List Price, $59.00
    The iSeries Pocket Query Guide: List Price, $49.00
    The iSeries Pocket WebFacing Primer: List Price, $39.00
    Migrating to WebSphere Express for iSeries: List Price, $49.00
    iSeries Express Web Implementer's Guide: List Price, $59.00
    Getting Started with WebSphere Development Studio for iSeries: List Price, $79.95
    Getting Started With WebSphere Development Studio Client for iSeries: List Price, $89.00
    Getting Started with WebSphere Express for iSeries: List Price, $49.00
    WebFacing Application Design and Development Guide: List Price, $55.00
    Can the AS/400 Survive IBM?: List Price, $49.00
    The All-Everything Machine: List Price, $29.95
    Chip Wars: List Price, $29.95

    TomorrowNow Takes Steps to Ensure Rapid Response Rexair Taps Quadrant to Improve Document Processing

    Leave a Reply Cancel reply

Volume 7, Number 11 -- March 21, 2007
THIS ISSUE SPONSORED BY:

Profound Logic Software
Help/Systems
WorksRight Software

Table of Contents

  • iSeries Navigator Job Monitor
  • Reader Feedback on Using the SQL SET OPTION Statement
  • Changing ODBC Sign-On Pop Up Values

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Public Preview For Watson Code Assistant for i Available Soon
  • COMMON Youth Movement Continues at POWERUp 2025
  • IBM Preserves Memory Investments Across Power10 And Power11
  • Eradani Uses AI For New EDI And API Service
  • Picking Apart IBM’s $150 Billion In US Manufacturing And R&D
  • FAX/400 And CICS For i Are Dead. What Will IBM Kill Next?
  • Fresche Overhauls X-Analysis With Web UI, AI Smarts
  • Is It Time To Add The Rust Programming Language To IBM i?
  • Is IBM Going To Raise Prices On Power10 Expert Care?
  • IBM i PTF Guide, Volume 27, Number 20

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle