Home > Ask the AS/400 Experts > iSeries Backup and Recovery Questions & Answers > Advanced Job Scheduler help
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

Advanced Job Scheduler help

Ken Graap EXPERT RESPONSE FROM: Ken Graap

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site


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


>
QUESTION POSED ON: 31 July 2007
I need to build a CL program to read the logs from one of my jobs in Advanced Job Scheduler (option 19). I need to monitor a process and make sure it ends with code 0. What is the IBM physical file (Qxxxx) that holds the logs for Advanced Job Scheduler jobs?

Thanks in advance.


>
The Advanced Job Scheduler (IJS) already provides several ways to monitor for job completion.
  1. Job Notification
  2. Alternate Job
  3. Displaying Job History
Job Notification:

First of all, you need to specify a "Notification Command" for IJS to use when sending messages:

My IJS configuration uses a command called SNDICM. This command is defined to IJS via the CHGNFYJS command:

Change Notification Command (CHGNFYJS)

Type choices, press Enter.

Notification command . . . . . . CMD 'QGPL/SNDICM RCP(&RCP) MSG(''&MSGTXT'')'

Once you have defined a "Notification Command" to IJS you can then utilize the preexisting fields in the IJS job definition.

For example, I have defined a job to send messages for both a *NORMAL completion and an *ABNORMAL completion.

When this job finishes properly, IJS sends a message to SYSADM "Daily Prod BU 10 finished OK"

If it finishes with errors, IJS sends a message to SYSADMCRT "Daily Prod BU 10 had errors"



                            Display Job                             S02     
                                                           7/31/07   8:39:48
Remote location name . . . . :   *JOBCTL                                    
Start time and date:                                                        
  Beginning time . . . . . . :   *NONE                                      
  Beginning date . . . . . . :   *NONE                                      
End time and date:                                                          
  Ending time  . . . . . . . :   *NONE                                      
  Ending date  . . . . . . . :   *NONE                                      
Maximum run time . . . . . . :   *NOMAX                                     
Notification recipient normal:   SYSADM                                     
  Notification message . . . :     Daily Prod BU 10 finished OK             
Notification recipient abnorm:   SYSADMCRT                                  
  Notification message . . . :     Daily Prod BU 10 had errors              
Alternate job  . . . . . . . :   *NONE                                      
  Group name . . . . . . . . :     *NONE                                    
  Group sequence . . . . . . :                                              

Alternate Job:

In my example above I have specified *NONE for the Alternate Job. However, I could have specified another IJS job, and this job would only be executed when the job ends abnormally. This job could be defined to send out notification messages, start other jobs or anything else that you might want to do when a job ends abnormally.

Displaying Job History:

If you choose not to utilize the built in notification features, you can still query the IJS history log using the DSPLOGJS command.

For example the command:

DSPLOGJS PERIOD((*AVAIL *BEGIN)) SEV(20) OUTPUT(*PRINT) DETAIL(*FULL) JOB(D_BU10)

... will scan the IJS History Log and generate a report showing any message with a severity of 20 or greater for job D_BU10.

Here is an example of the report. (Sample re-created by editorial team may differ from actual log output.)
5722JS1 V5R3MO     Job Scheduler Log   S02   7/31/07 8:58:28
Page 1                
Date Time Message Sev Text       Program  
User Type                
8/02/06 2:28:55 BRM10A1 40 Control group D_PRDGEN10 type *BKU completed with errors.
Cause . . . . . : Control group D_PRDGEN10 type *BKU completed
processing but errors were detected. This may be caused from
objects not being saved.
Recovery . . . : See previously listed messages to determine
possible causes for the errors and for any objects not saved
      QIJSCEC BACKUP
8/02/06 2:28:55 IJS6008 50 Command sequence 0030 for job D_BU10 group D_BU10 sequence 01 ended in
error.
Cause . . . . . : Command to execute was: STRBKUBRM
CTLGRP(D_PRDGEN10) SBMJOB(*NO).
      QIJSCEC BACKUP
8/02/06 2:28:55 IJS6003 50 Job 268712/BACKUP/D_BU10 ended abnormally for job D_BU10 group D_BU10
sequence 01.
      QIJSLRUN BACKUP

Good luck!


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



RELATED CONTENT
iSeries Backup and Recovery
Parallel backups using save option 21
How to migrate old *ALLUSR data using BRMS to V6R1
How to save HMC critical data through the console
Authority restrictions on the AUTL on backup/test systems and AUTL on live system
Perform a full system backup without user profile QSECOFR
Faster backup method for System i
Solve problems concerning the ALLOW OBJECT DIFFERENCES parameter when restoring a library
System i backup not advised using network NETBACKUP
How to clear expired BRMS created *SAVF files from System i
Restore a full system backup from the production partition to the test partition

iSeries CL programming
Taking advantage of CL advancements, starting with V5R3
Checking in on your IBM i authorization lists
Running PHP open source applications: NOBODY needs authority
Simplify the process of converting a spool file from iSeries into an Excel spreadsheet
CL program for daily backups
An automated CL method of moving a query from AS/400 to Excel
Changing user password expiration
Eight steps for creating program documentation using AS/400 utilities
DAYSPAST CLLE program for AS/400: Compares object creation date with today's date
How do I retrieve the source for an output queue description to put in to a CL program?

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



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



iSeries Networking - Printing, Remote Access, TCP/IP
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