
1. On occasion, there may be times when the CPU percentage for the Advanced Job Scheduler (AJS) job monitor appears higher than normal. There may be several reasons as to why this can occur, but the most likely reason is that the job monitor job is waking up more often then typical. This causes the job monitor to use CPU to open associated files more frequently than typical. The following is a list of reasons the job monitor may wake up more often than typical:
- A job is waiting on a dependency
- A scheduled job is running
- A job is scheduled to run every 1 - 5 minutes
To verify these conditions, the following suggestions can be used. To see if any jobs are waiting on dependencies, use the Work with Jobs Using AJS command, and specify *DEPW for the Job Status parameter (WRKJOBJS STATUS(*DEPW)). If any jobs are waiting on dependencies, ensure they are necessary. If not, you can use option 3 to hold those jobs. To see if any scheduled jobs are running, use the WRKJOBJS command and specify *PROCESS for the Job Status parameter. This shows all scheduled jobs that are currently processing. If any exist, ensure the jobs are running, and use option 6 to reset any jobs that are not currently running. Along the same lines, specify*JOBQ to list all jobs that are running or are being started on a remote system. If any exist, ensure the jobs are running, and use option 6 to reset any jobs not currently running. To check for jobs scheduled to run every 1 - 5 minutes, use the WRKJOBJS command, this time using the specifying *MINUTES for the Schedule Code parameter (WRKJOBJS SCDCDE(*MINUTES)). This lists all jobs that run every so many minutes. Use option 5 to display the minute interval. If any are scheduled to run every 1 - 5 minutes, ensure they are still necessary. If not, use option 4 to delete any jobs, or use option 2 to change the schedule code to *NONE.
2. When saving the QUSRIJS and QIJS product libraries, it is not a problem if any data queues (object type *DTAQ) do not get saved. Data queues used by the product are automatically created if they do not exist.
3. The job monitor for the IBM Advanced Job Scheduler for i5/OS defaults to run under the QIJS User Profile. The job monitor user profile will be used for any scheduled job that has *CURRENT specified as its user profile. The QIJS User Profile is provided with the product. To change the default User Profile to one that has sufficient authority for running the unattended batch jobs, do the following:
- Enter: GO JS on a command line
- Select: Option 5 (System controls)
- Select Option 3 (Change system controls)
- Specify the user profile in the Job monitor user field
4. To migrate from an System i that has a previous version/release level to a new System i that has the Advanced Job Scheduler preloaded, do the following:
- Save the QIJS and QUSRIJS libraries to tape on the system you are migrating from. Make sure the new System i will be able to read the tape.
- If the new System i is at least V5R3M0, do the following:
- End the job monitor by processing ENDJS on a command line.
- Delete the QUSRIJS library.
- Restore the QUSRIJS from the save above.
- Start the job monitor by processing STRJS on a command line. The data conversion will automatically happen during the STRJS command. Skip the following steps.
- Use the ENDJS command from a command line on the new System i to end the job monitor.
- Create savefile QIJSPROD in QGPL on the new System i.
- Run command SAVLICPGM LICPGM(5761JS1) DEV(*SAVF). SAVF(QGPL/QIJSPROD) DTACPR(*YES) from a command line on the new System i.
- Run command DLTLICPGM LICPGM(5761JS1) from a command line on the new System i.
- Restore QIJS and QUSRIJS libraries using the tape from the save step above.
- Run command RSTLICPGM LICPGM(5761JS1) DEV(*SAVF) SAVF(QGPL/QIJSPROD) to install the product.
- Run the STRJS from a command line on the new system i to start the job monitor.
- The data files should now be converted to the new release.
5. When converting jobs from OS/400 or i5/OS Job Scheduler entries to the IBM Advanced Job Scheduler, do the following:
- Enter: GO JS
- Select: Option 5 (System controls)
- Select Option 7 (Work with Operating System job schedule entries)
- Most jobs will convert. Jobs that will not convert include:
- jobs with omit dates
- jobs specifying a system profile (QSECOFR, QSYS, etc) as the User Profile.
- If you remove the omit dates by specifying *NONE on the OS/400 or i5/OS Job Scheduler entry, your job should then convert. Specify a non-system profile, and those jobs will convert. You may need to create a new User Profile with similar authorities to the System Profile to get these jobs to function as designed. You may also need to create a holiday calendar and change the job to use the calendar in order to omit the correct dates.
6. In addition to the Advanced Job Scheduler (AJS) log information found using the Display Log for Job Scheduler (DSPLOGJS) command, the job logs for the actual AJS jobs can also be useful in problem determination. Job QIJSSCD for the local AJS job monitor and job QIJSSRV for the remote AJS monitor in subsystem QSYSWRK often contain useful information when trouble shooting problems.
7. AJS has the ability to send a notification message when an inquiry message is sent to a scheduled job. These types of messages cause the job to wait for a reply or terminate immediately because of a default reply. For instance there is a job that receives an inquiry message that a file had reached its maximum size. At that time the Notification recipient would receive an email message with one of the following:
- Use error message. The text of the error message is sent.
- Send joblog. The joblog of the job will be embedded in the body of the message.
- Message-text. The user-defined text which is entered in the Message field will be sent.
You can access the Error notification fields on the Notification tab of a scheduled job.
NOTE:The notification will occur the next time the job monitor wakes up which is normally no more than five minutes. Error notification does not occur for remote jobs.
8. Use of the Advanced Job Scheduler (AJS) parameter passing facility can really expand the power of the Advanced Job Scheduler. Parameter values are resolved at run time and passed into the specified program. An example of a command for a job would be CALL PGMABC parm('&QYMD'). In this example, the system date in year/month/day format would be passed into program PGMABC.
9. When setting up a job group, it is a good idea to create the sequence 1 job without any commands and space the sequence numbers out for the other jobs. This will allow for inserting jobs at a later time. Also, create a job with sequence 99 that does not have commands. No matter how many jobs you add to the group this will be the last job. You can use it with dependencies.
Or by using the Graphical User Interface (GUI) in System i Navigator you can easily resequence jobs in a Job Group. To resequence jobs in a Job Group, follow these steps:
- In System i Navigator, expand My Connections -> Your system -> Work Management -> Advanced Job Scheduler -> Job Groups
- Right-click the Job Group and select Resequence Jobs in Group.
- Select the job and click Move Up or Move Down.
- Click OK when finished.
Here are a couple of things to keep in mind.
- After resequencing a Job Group, the sequence numbers of the jobs are renumbered with a gap in between each sequence number. The size of the gap is determined by the number of jobs in the group.
- When you add jobs to a Job Group using the GUI it will always add it to the end of the Job Group. You would use the steps above to move the job to the right location within the Job Group.
10. In order to specify active dependencies for all jobs in a group, specify *ALL as the job name when adding the active dependency for the group.
11. To add a job dependency so that a job will run after the last job in a group, specify *LAST as the job name when adding the group as a predecessor to the successor job. Using *LAST ensures that no matter what jobs run for the group the successor job will start when the group is done.
12. Within Advanced Job Scheduler for Wireless, you can change one of the Preferences to Don't Show Activity in order to increase response time. This causes the server to bypass the Schedule Activity counts.
13. To embed a spooled file in the body of an email, specify *NONE as the Attachment Name when using the Send Distribution using JS (SNDDSTJS) command and as the Attachment Name in the Report Distribution entries.
14. Adding a schedule to a holiday calendar causes the jobs that use the holiday calendar to skip running on the days based on that schedule. Use the Graphical User Interface to create a schedule and to add it to a holiday calendar.
15. The System Controls contain the values that determine how many days or how many occurrences of history to keep, along with how many days of log entries to retain.
16. During a disaster recovery it may be necessary to reset all jobs. This can be done for the entire product from the System Controls menu with option 8 Reset jobs.
17. The *NEWJOB functional authority is used to define the authority that will be assigned to all new jobs. Use option 7 Edit function authority when working with Job Defaults to change the *NEWJOB authorities associated with a specific Job Default (Job Control/Application).
18. To set up commands that should run at the start of every job for a certain Job Default (Job Control/Application), do the following:
- Go to the JSJOBCTL menu (GO JSJOBCTL).
- Use option 1 (Work with job defaults).
- On the Work with Job Defaults panel, use option 8 (Change pre command list) on the correct Job Default (Job Contro/Application) to enter the commands to run. When finished, press enter until you exit to the list.
- Select option 2 to change the job defaults and specify *PRE for the Use job default commands field at the bottom of the first screen to indicate that only the pre command job default commands should be used.
19. The Submit Job using Job Scheduler (SBMJOBJS) command and option 7 Submit immediately are used to run jobs individually as one-time runs. If you need to continue any job dependencies at that point, specify *YES for the Update dependencies (UPDDEP) parameter or *GRP if you want to continue with the next job in the job group. *NO is the default.
20. The Graphical User Interface must be used to set up Report Distribution so that it will automatically split up a spooled file and send each portion to a different email address.
21. Use the Graphical User Interface to view sent emails and stop escalation.
22. Each scheduled job can process up to 999 commands. One CL command that cannot be processed correctly is MONMSG. In order for a scheduled job to continue to the next command or complete normally even though an error message was encountered, you will need to specify all the messages that AJS should monitor. For instance, maybe you want to end a certain subsystem before calling the backup program. In the command list you could have the first command as ENDSBS QWHATEVER and the second command as CALL MYBACKUP. You would probably want to monitor for the CPF1054 ‘No subsystem QWHATEVER active.’ message when processing the ENDSBS command so that job would continue to the next command in case the subsystem was not active. You can also monitor for generic messages. For instance, you could monitor for CPF0000 which would monitor for all messages that begin with CPF.
To monitor for a message, follow these steps:
- In System i Navigator, expand My Connections -> Your system -> Work Management ->Advanced Job Scheduler.
- Click Scheduled Jobs to list the scheduled jobs.
- Right-click the appropriate job and select Properties.
- Select the command in the command list and click Properties on the right.
- Click the Messages button.
- Enter the message to monitor. For instance, you could monitor for CPF1054.
- Click Add to add the message to the Enabled Messages list.
- Click OK when all the messages have been added.
- Click OK when finished with updating the properties of the command.
- Click OK to update the job.
Your job is now monitoring for message CPF1054.
23. Specific commands within the command list can be bypassed. This can be helpful in case a command is temporarily not needed but you do not want to remove it from the list. From the properties of a scheduled job using the Graphical User Interface (GUI), you can de-select the check box that enables a command for processing. This will cause the command to be bypassed the next time the job is run.
24. Commands can run on non-System i platforms like PCs. They can be processed on a single system or a group of systems. When processing commands on a group of systems, each command must complete normally on each system within the group before the next command is processed. The Run Remote Command (RUNRMTCMD) command is being used to issue the commands on the remote systems. The RUNRMTCMD command allows server users to run a command on a remote system that is running the target portion of this function. The target portion of this function can be a remote executing daemon (rexecd). The Incoming Remote Command (IRC) service of the IBM System i Access for Windows is recommended on the remote systems to process the commands.
In order to take advantage of this feature, it will be helpful to run through a quick test outside of the Advanced Job Scheduler. Here are some things you need to know:
- The first thing you should do is get the remote system ready to receive commands by setting up the rexecd. Refer to the Information Center regarding the IRC service. There are many choices to make concerning the amount of security you will need to allow commands to be processed on the remote computer. Follow these steps for a quick test to process commands on a computer running Windows requiring virtually no security:
-
- IBM System i Access for Windows must be installed on the computer.
- From the IBM System i Access for Windows list of options choose System i Access for Windows Properties. Select the Incoming Remote Command tab. The following values for the IRC parameters will allow your system to accept commands with no authorization. After becoming familiar with the IRC you can add any necessary security authorization.
-
- Command mode: Detached
- Cache security: Not checked
- Allow generic security: Checked
- Generic security runs command as logged-on user: Checked
- Run as system: Checked
- Load user profile when command run in user context: Not checked
- You must manually start the IRC service. From the Control Panel, select Services from within Administrative Tools, right-click System i Access for Windows Remote Control and select Start. The IRC service can be changed to automatically start each time the PC is started.
- Locate the IP address of the remote computer. The IPCONFIG command can be used at the command prompt.
- On a command line from the System i, prompt the RUNRMTCMD using F4. Enter the following information:
-
- Command: calc.exe
- Remote location name: IP address of PC
- Remote location type: *IP
- Even though we have set up the IRC not to require a user ID and password, they still may be required by the PC. You should try it first without a user ID and password and if that fails you should try it with a user ID and password. If you try it with a user ID and password, it should be the same as the one that is logged onto the PC.
- Run the RUNRMTCMD. If it fails, there is a spooled file that is generated that can be used to determine the problem. If you see the calculator on the screen of the PC, then it worked.
To set up AJS to run remote commands on a non-System i system you will need to add the PC to the list of systems and create a scheduled job to run the remote command.
To add the PC to the list of systems, follow these steps:
- Open a single system under My Connections from your System i Navigator window.
- Open Work Management folder.
- Right-click Advanced Job Scheduler and select Properties.
- On the Systems and Groups tab use the New button to add a new system.
- From the dropdown, select Windows and click OK.
- Enter a system name. This is the name that represents your PC.
- Enter a brief description of the system.
- Enter the IP address of the PC.
- Enter a user ID and password if necessary. These should match the test you performed earlier when testing the RUNRMTCMD command on a command line.
- Click OK when finished.
- Click Cancel to close the AJS properties tabs.
To add a scheduled job, follow these steps:
- Open a single system under My Connections from your System i Navigator window.
- Open Work Management from your System i Navigator window.
- Expand Advanced Job Scheduler.
- Right-click Scheduled Jobs and select New Scheduled Job.
- Enter a job name and select Non-scheduled as the Type of job. We are not going to schedule the job since this is just a test.
- Below the Commands list box, check the Run as remote command box. This lets the scheduler know not to validity check the commands entered.
- Click Add to add a command to the list.
- Enter calc.exe as the command and click OK.
- Select the Batch Information tab.
- Click the Browse button for System to run job and select the PC from the list. Click OK to add the system.
- Click OK to add the job.
- Click the Scheduled Jobs folder to list the jobs. Right-click the new job and select Run.
- Click OK to run the job now. If the test is successful, a calculator will be on the screen of the PC running the rexecd.
25. It is not uncommon for someone to ask the person responsible for the nightly scheduling to locate all the scheduled jobs that call a certain program because the parameter list for that program is changing. From the 5250 emulation you could specify WRKJOBJS CMD(‘*PR7101*’) on a command line. The command will list all jobs that contain PR7101 anywhere in the command list. It is important to use the front and back generic asterisks (*) so that AJS will search anywhere within a command. Otherwise a single (*) at the end will only search the beginning of a command string and a single (*) at the beginning will only search at the end. After the jobs are listed you can use F17=Subset to change the search criteria instead of exiting the screen, changing the command and reentering the display. This type of filtering can also be done in the Graphical User Interface by accessing the Include option from the View menu when listing scheduled jobs.
26. To turn off the report produced during Report Distribution, change the Print Report Distibution Report field found on the Properties of the Notification folder to "No".
27. You can easily set up jobs to run weekly, monthly, or yearly in AJS. To run a job quarterly will take setting up a Fiscal Calendar. Fiscal Calendars are the collection of beginning and ending dates for one to thirteen periods. Fiscal Calendars can be set up for multiple purposes. You may have a Fiscal Calendar that represents your accounting fiscal periods. You may also set up a Fiscal Calendar with four periods which are the beginning and ending dates of each quarter. When a Fiscal Calendar is used in a scheduled job, the scheduled date is calculated based on the periods defined in the Fiscal Calendar. For instance, you may want a job to run on the third working day of a fiscal period. This may fall on a different day than the third working day of a month.
In order to see the latest PTFs for currently supported i5/OS releases, go to the System i Technical Support web site:
On the PTF Cover Letter Search page enter:
5761JS1
Then select:
All PTF Cover Letters
If you are experiencing a specific problem, and you already have the PTFs listed, please contact the System i Technical Support for service.
|