HPlogo Communicator 3000 MPE/iX Release 6.5 (Non-Platform Software Release C.65.00) > Chapter 3 Growth Solution

User-Defined Job Queues and ALTJOB HIPRI Enhancements

MPE documents

Complete PDF
Table of Contents
Index

by Jayaram and S Shashikala
Commercial Systems Division

Enhancements Summary


Previously MPE/iX had one job queue into which all the submitted jobs went before getting launched by the dispatcher. Often this proved to be a hindrance, as a few long jobs could prevent a lot of short jobs from running.

MPE/iX can now have up to 255 user-defined job queues, each having a separate limit on 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.

  • ALTJOB command has a new option, ;HIPRI to change the priority of the job as HIPRI. This option can be used to override the job limit. SM or OP capability is required for this option.


    NOTE: The following commands have been changed since MPE/iX 6.0
  • NEWJOBQ and PURGEJOBQ commands accept only alphanumeric characters for queue name. A queue name longer than 8 characters will not be accepted.

  • STREAM, JOB, LIMIT, ALTJOB commands accept only alphanumeric characters for ;JOBQ= parameter. A queue name longer than 8 characters will not be accepted.

  • SHOWJOB #Jnn;JOBQ is a valid command.

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 until one of the jobs finishes 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 job queues, 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 do not persist across reboots, unless 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. Queuename can contain only alphanumeric characters. Queuename can be up to 8 characters in length; longer names will not be accepted. If a queue of this name already exists, an error is returned.

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 the 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= <qname> ]

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= <qname>]

The JOB command now accepts a new parameter ;jobq=. Users can specify 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, the default system job queue is used (HPSYSJQ).

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.

The 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 = {day-of-week    }  ]
                 {day-of-month   }
                 {day-until-month}
         [;DATE = datespec]
         [;IN = [days[, [hours] [,minutes]]]]
         [;JOBQ = qname]

The 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 (HPSYSJQ).

Examples:

  STREAM FOO; jobq=myjobq

SHOWJOB

Syntax:

          [[#]Snnn          ]
          [[#]Jnnn          ]
  SHOWJOB [STATUS           ][;JOBQ][;*listfile]
          [SCHED            ]
          [item[;item[;...]]]

The SHOWJOB command displays status information about jobs/sessions. It now accepts a new parameter ;JOBQ which indicates the queue name to which the job belongs. If the ;JOBQ option is not specified, the SHOWJOB output is the same as before.

A new field JOBQ is added to the showjob output format. The JLIST field in the showjob output format displays only 5 characters. In addition, the SCHEDULED-INTRO heading changes to SCHED-INTRO, in the showjob output format when the JOBQ option is used.

Examples:

1. Show jobs with jobq

  :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

2. To display a particular job and job queue name, enter

  :SHOWJOB #J7;JOBQ

  JOBNUM  STATE IPRI JIN  JLIST JOBQ    INTRODUCED  JOB NAME
  #J7     EXEC         2  LP    SYSMGRQ WED  5:47P  EMG,MGR.SYSMGR
  JOBFENCE= 7; JLIMIT= 10; SLIMIT= 60

3. To display all scheduled jobs with job queue name, enter

  :SHOWJOB ;JOBQ

  JOBNUM  STATE IPRI JIN  JLIST JOBQ    INTRODUCED  JOB NAME
  #J2     EXEC        10S LP    HPSYSJQ TUE  2:50P  JINETD,MANAGER.SYS
  #S2     EXEC        20  20            TUE  2:53P  KISHORE,MANAGER.SYS
  #S4     EXEC         2  2             TUE  3:25P  SHASHI,MANAGER.SYS
  3 JOBS (DISPLAYED):
    0 INTRO
    0 WAIT; INCL 0 DEFERRED
    3 EXEC; INCL 2 SESSIONS
    0 SUSP
  JOBFENCE= 7; JLIMIT= 60; SLIMIT= 60

  CURRENT:  5/11/99 15:25

  JOBNUM  STATE IPRI JIN  JLIST JOBQ    SCHED-INTRO    JOB NAME
  #J3     SCHED    8  10S LP    MJQ      5/11/99 19:00 JAY,MANAGER.SYS
  1 SCHEDULED JOB(S)




Increased Number of DSTs


NEWCI Command (CI Elimination)