TAA Tools
RTVJOBSTRA      RETRIEVE JOB START ATTR                TAAJOBS

The Retrieve Job Start  Attributes command provides one or  more return
variables which  contain data about  the start of  a job.   The command
can be run from any job (not just the current job).

The  information retrieved includes such things  as the job queue used,
the  subsystem,  the  date/time   the  job  entered  the  system,   the
date/time the job started etc.

A typical  command to  retrieve the information  about the  current job
would be:

          DCL            &JOBQ *CHAR LEN(10)
           .
          RTVJOBSTRA     JOBQ(&JOBQ)

Either the current job or any job on the system may be named.

RTVJOBSTRA   uses  the  QUSLJOB   and  QUSRJOBI  APIs   to  access  the
information.   If  the value  returned is  blank,  the system  has  not
provided the information.

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

   JOB           The qualified job  name of the job.  The  default is *
                 meaning the current job.

                 A  single job name, the  job name plus  the user name,
                 or a fully qualified job name may be entered.

                 If  no  jobs  are  active  for  the  specified   name,
                 TAA9883 is sent as an escape message.

                 If less than  a fully qualified job name  is specified
                 and duplicates  exist, the TAA9884 message  is sent as
                 an escape message.

The following return variables exist:

     Parameter  Length    Description
     ---------  ------    -----------

     JOBTYP       1       Job type - Note 1
     JOBSTS      10       Job status - Note 2
     JOBPTY       2       Job priority
     JOBQ        10       Job queue - Note 3
     JOBQL       10       Job queue library - Note 3
     JOBQPTY      1       Job queue priority
     SBSD        10       Subsystem - Note 4
     ENTDAT       6       Entry date - YYMMDD
     ENTTIM       6       Entry time - HHMMSS
     JOBQDAT      6       Date placed on job queue - YYMMDD - Note 5
     JOBQTIM      6       Time placed on job queue - HHMMSS - Note 5
     SCDDAT       6       Schedule date - YYMMDD - Note 6
     SCDTIM       6       Schedule time - HHMMSS - Note 6
     STRDAT       6       Start date - YYMMDD
     STRTIM       6       Start time - HHMMSS
     SBMJOB      10       User name that submitted the job
     SBMJOBN      6       Job number that submitted the job
     RTNJOB      10       Job name retrieved
     RTNUSER     10       User of the job retrieved
     RTNJOBN      6       Job number of the job retrieved

  1.   The  job  type is  the same  as that  provided by  RTVJOBA (i.e.
       I=Interactive, B=Batch, etc.)

  2.   The job status is *ACTIVE, *JOBQ, or *OUTQ.

  3.   The job  queue, job queue  library, and  job queue priority  are
       blank if  a job  queue was  not used.   Interactive jobs  do not
       use a job queue.

  4.   The subsystem name is blank if the job is not active.

  5.   The  date and  time  the job  was placed  on  the job  queue are
       blank if no job queue was  used.  Interactive jobs do not use  a
       job queue.

  6.   The  schedule date  and time  will be  blank unless  the job  is
       scheduled by the SBMJOB SCDDATE and SCDTIME parameters.

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

Because  the command returns  parameters, it can  only be used  in a CL
program.

The system does  not always  provide the  information.   If the  return
variable is blank, the information was not provided.

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

The following TAA Tools must be on your system:

            EDTVAR        Edit variable
            RTVJOBSTS     Retrieve job status
            SNDESCMSG     Send escape message

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

None, the tool is ready to use.

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

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

   RTVJOBSTRA    *CMD                   TAAJOBS       QATTCMD
   TAAJOBSC      *PGM       CLP         TAAJOBSC      QATTCL
					

Added to TAA Productivity tools May 1, 1996


Home Page Up to Top