USER DEFINED JOB QUEUES AND ALTJOB HIPRI ENHANCEMENT ---------------------------------------------------- Enhancements Summary ********************* Presently MPE/iX has one job queue into which all the submitted jobs will go before getting launched by the dispatcher. Often times, this has proved to be a hindrance, as a few long jobs will prevent a lot of short jobs from running. MPE/iX can now have more than one job queue, each having a separate limit controlling the number of runnable jobs. Users can specify the queue to which their jobs should log on by using the newly added ;jobq= parameter of !job command or !stream command. There will be one default job queue named HPSYSJQ, which will be created during the system bootup. * Three new commands have been added: NEWJOBQ, PURGEJOBQ and LISTJOBQ * LIMIT, ALTJOB, JOB and STREAM commands now have a new parameter, ;jobq= . * LIMIT command can now be used to increment or decrement the limit values. * SHOWJOB command now has a new format parameter ;format=jobq to display the queue name to which each job belongs. New Commands ************* NEWJOBQ -------- Syntax: NEWJOBQ qname [;limit=n] The NEWJOBQ command creates a new job queue. SM/OP capability is required to execute this command. Limit is the only queue controlling property. The jobs in the queue are sorted by their INPRI. In case of a tie for INPRI, jobs are sorted by their INTRO time. The global limit takes precedence over individual queue limits. That is, even if a jobq has a slot available, if the overall limit has been reached, jobs have to wait till one of the jobs finish or the global limit is increased. When a global slot becomes available, the next job is picked from among the eligible jobqs (those which haven't yet reached their individual limits) using the following algorithm: Across all jobq's, the highest INPRI job is selected. In case of a tie for INPRI, the one which was introduced earliest is selected. There cannot be a tie in INTRO time. The job queues persist across reboots, provided a START RECOVERY is done. Any other system starts will cause the job queues to be deleted and they will have to be created again. This command is available in a session, job, or in BREAK. Pressing [Break] has no effect on this command. This command is not allowed in SYSSTART. Parameters: qname - Name of the queue to be created. Queuenames can contain any characters. Queuenames can be upto 8 characters in length and longer names will be truncated. If a queue of this name already exists, an error is indicated. limit - Maximum number of jobs that can be allowed in this queue. The limit value can be changed using the :limit [+-]n;jobq= command. If omitted, a value of zero is assumed. Examples: :NEWJOBQ MYJOBQ;limit=100 PURGEJOBQ --------- Syntax: PURGEJOBQ qname The PURGEJOBQ command deletes a job queue. The queue will be deleted only if it is empty, that is if no jobs are waiting or executing in the queue. The default system job queue can not be purged. The user must have SM/OP capability to execute the command. This command is available in a session, job, or in BREAK. Pressing [Break] aborts the execution of this command. This command is not allowed in SYSSTART. Parameters: qname - Name of the queue to be deleted. Examples: :PURGEJOBQ myjobq LISTJOBQ -------- Syntax: LISTJOBQ The LISTJOBQ command allows the user to list all the existing job queues in the system. It displays the queue name, limit, number of jobs in the queue that are in the EXEC state and the total number jobs in the queue, ( No. of jobs in the EXEC state + No. of jobs in th WAIT state). This command is not allowed in SYSSTART. Examples: :listjobq JOBQ LIMIT EXEC TOTAL HPSYSJQ 3500 1 1 MYJOBQ 100 1 1 MJQ 10 1 2 Modified Commands ***************** LIMIT ----- Syntax: {numberjobs } LIMIT [{ + }] [{,numbersessions }] { - } {numberjobs,numbersessions} [;jobq= ] The LIMIT command allows users with OP capability to change the job and session limits. As a result of this enhancement, it can be used to change the limit value of individual job queues. The LIMIT command now accepts a new parameter ;jobq= . It also accepts '+' or '-' before the numeric values to indicate increment or decrement. Parameters: qname - Name of the job queue whose limit is to be changed. If the queue name is not specified, LIMIT command will alter the global limit values. +/- - If +/- is specified before the numeric value, the corresponding limit value will be incremented/ decremented. Examples: : LIMIT 60;jobq=myjobq { Set the limit of MYJOBQ to 60} : LIMIT -1;jobq=myjobq { Decrement the limit by 1} : LIMIT +1 { increment the global job limit by 1} JOB --- Syntax: JOB [jobname,]username[/userpass].acctname[/acctpass] [,groupname[/grouppass]] [;TIME=cpusecs] {BS} {CS} [;PRI= ] {DS} {ES} [{;INPRI=inputpriority}] {;HIPRI } [;RESTART] [;OUTCLASS=[device][,outputpriority[,numcopies]]] [;TERM={termtype}] [;PRIVATE] [;SPSAVE] [;JOBQ= ] JOB command now accepts a new parameter ;jobq= . Users can specifiy the job queue name into which a particular job should logon. If a job queue is specified in the STREAM command then it overrides the name specified in the JOB command. If no queue name is specified default system job queue is used. Parameters: qname - Name of the queue into which the job should logon. Examples: :JOB foo,manager.sys;jobq=myjobq ALTJOB ------ Syntax: ALTJOB [JOB=] {#Jnnn} {#Snnn} [[;INPRI=]inputpriority] [[;OUTDEV=]{ldev }] {devclass} [;JOBQ=qname] [;HIPRI] ALTJOB alters the attributes of waiting or scheduling jobs. ALTJOB now accepts a new parameter ;jobq= . Jobs waiting or executing in a queue can moved to other queues. Only users with SM/OP capability can move jobs. When an executing job is moved, the limit of the target queue is ignored and the job continues to execute in the new queue. A waiting job continues to wait in the new queue if the queue has already reached its limit. ALTJOB command now accepts a new optional parameter HIPRI. The HIPRI option can be used for overriding the system jobfence or the joblimit. User must have System Manager(SM) or Operator(OP) capability to use this option. Also, the INPRI and HIPRI options may not be specified together. Parameters: qname - Name of the job queue into which the job is to be moved. HIPRI - HIPRI option can be used to change the priority of a job. Examples: :ALTJOB #jnnn;jobq=mjq :ALTJOB #jnnn;hipri STREAM ------ Syntax: STREAM [filename] [,char] [;AT = timespec] {day-of-week } [;DAY = {day-of-month }] {day-until-month} [;DATE = datespec] [;IN = [days[, [hours] [,minutes]]]] [;JOBQ = qname] STREAM command now accepts a new parameter ;jobq= . User can specify the queue name into which a particular job should go. The name specified overrides the queue name specified in the JOB command. Parameters: qname - The name of the queue into which the job must logon. If no queue name is specified the default system job queue will be used. Examples: STREAM FOO; jobq= myjobq SHOWJOB ------- Syntax: [[#]Snnn ] [[#]Jnnn ] SHOWJOB [STATUS ][;*listfile] [SCHED ] [item[;item[;...]]] [;JOBQ] SHOWJOB command displays status information about jobs/sessions. It now accepts a new parameter ;jobq which will indicate the queue name to which the job belongs. A new field JOBQ is added into the showjob output format. If the ;JOBQ option is not specified the SHOWJOB output will be the same as before. Examples: :SHOWJOB;jobq New field ~~~~~~~~~ JOBNUM STATE IPRI JLIST JOBQ INTRODUCED JOB NAME #J3 EXEC LP HPSYSJQ WED 11:46A FTPMON,FTP.SYS #J7 EXEC LP SYSMGRQ WED 5:47P EMG,MGR.SYSMGR #S81 EXEC 34 THU 12:17P MGR.GOPI Potential Problems: ------------------- Some of the problems that customers might run into while using User Defined Job Queues feature and how to debug them. Problem How to Troubleshoot Cannot create new jobq queues Check if the number of jobq's in the system has reached the max (255). Can do this by doing :listjobq or by looking at Jobq Table (JQT), KSO 170 in debug. Jobs are not logging in See if the limits for the corresponding jobq's has been set properly (using :listjobq). Jobs are not being recovered Must be a problem. Report to lab. after :start recovery Unable to purge Jobq's Check if any job is executing or waiting in that Jobq (by doing :showjob ;JOBQ). If so, abort those jobs and then do :purgejobq :stream command is giving an Check if the jobq specified in the stream error "Jobq does not exist" command or in the job command of that job script exists.