TAA Tools
RTVJOBQA        RETRIEVE JOB QUEUE ATTRIBUTES          TAAJOBR

The RTVJOBQA  command  allows you  to extract  one  or more  parameters
from an  existing job queue  into a CL program.   This can  be used for
various  functions  in  working  with job  queues.    The  command also
allows return  values for the  current status  information such as  how
many jobs exist and what active subsystem has the job queue.

RTVJOBQA uses the API QSPRJOBQ to access the information.

A typical  use of the  command is to  extract the NBRJOBS  parameter to
determine if any jobs exist:

        DCL         &NBRJOBS *DEC LEN(9 0)
        .
        .
        RTVJOBQA    JOBQ(QBATCH) NBRJOBS(&NBRJOBS)
        IF          (&NBRJOBS *EQ 0) DO ...

Another  typical use of  the command is  to determine if  the job queue
is  attached to  an  active  subsystem.    The  SBSNAM  parameter  will
describe the  subsystem.  If  the name is blank,  the job queue  is not
attached to an active subsystem.

        DCL         &SBSNAM *CHAR LEN(10)
         .
        RTVJOBQA    JOBQ(QBATCH) SBSNAM(&SBSNAM)
        IF          (&SBSNAM *EQ ' ') DO
         .
         .          /* Your processing when the job queue is   */
         .          /*    not attached to an active subsystem  */
         .
        ENDDO

The  command parameters  may be  prompted  for with  the command.   The
value in the parenthesis  for each parameter  describes the length  and
type  of field  to  be specified  in  your CL  program  to receive  the
parameter.

Command parameters                                    *CMD
------------------

   JOBQ          The  qualified job queue  name.  The  library defaults
                 to *LIBL.

   RTNLIB        An  optional  return  variable that  will  contain the
                 library name  where  the job  queue  was found.    The
                 value  may be  helpful if  the job  queue  is accessed
                 without  a specific library  name.   If specified, the
                 variable must be declared as *CHAR LEN(10).

   OPRCTL        An optional  return  variable that  will  contain  the
                 value of  the Operator Control  parameter.  A  *YES or
                 *NO  will  be returned.   If  specified,  the variable
                 must be declared as *CHAR LEN(4).

   AUTCHK        An optional  return  variable that  will  contain  the
                 value of  the Authority Check  parameter.  A  value of
                 *OWNER  or *DTAAUT  will be  returned.   If specified,
                 the variable must be declared as *CHAR LEN(7).

   NBRJOBS       An  optional  return  variable that  will  contain the
                 number of jobs  on the job  queue.  If specified,  the
                 variable must be declared as *DEC LEN(9 0).

   QSTATUS       An  optional return  variable  that  will contain  the
                 status  of  the job  queue.   A  value of  RELEASED or
                 HELD will  be returned.   If  specified, the  variable
                 must be declared as *CHAR LEN(10).

   SBSNAM        An  optional return  variable  that  will contain  the
                 name  of the subsystem  the job queue  is attached to.
                 If the name is  blank, the job  queue is not  attached
                 to an  active subsystem.   If specified,  the variable
                 must be declared as *CHAR LEN(10).

   SBSLIBNAM     An  optional  return variable  that  will contain  the
                 name  of  the  subsystem  library  the  job  queue  is
                 attached to.  If  the name is blank, the job  queue is
                 not attached  to an  active subsystem.   If specified,
                 the variable must be declared as *CHAR LEN(10).

   SEQNBR        An  optional  return variable  that  will  contain the
                 sequence  number  of   the  job   queue  entry.     If
                 specified,  the  variable  must be  declared  as  *DEC
                 LEN(9 0).

   MAXACT        An  optional  return variable  that  will  contain the
                 maximum number  of jobs  that may  be made  active  at
                 the  same  time  from  the  job  queue.     If  -1  is
                 returned,  the value  is  *NOMAX.   If  specified, the
                 variable must be declared as *DEC LEN(9 0).

   CURACT        An  optional  return  variable that  will  contain the
                 current number of  jobs that are  active from the  job
                 queue.   If specified,  the variable must  be declared
                 as *DEC LEN(9 0).

   TEXT          An  optional  return variable  that  will  contain the
                 text description  of  the job  queue.   If  specified,
                 the variable must be declared as *CHAR LEN(10).

Restrictions
------------

Because the  command returns variables,  it can  only be executed  in a
CL program.

Prerequisites
-------------

None.

Implementation
--------------

None, the tool is ready to use.

Objects used by the tool
------------------------

   Object        Type       Attribute      Src member     Src file
   ------        -----      ---------      ----------     -----------

   RTVJOBQA      *CMD                      TAAJOBR        QATTCMD
   TAAJOBRC      *PGM          CLP         TAAJOBRC       QATTCL
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top