TAA Tools
RTVJOBSCDE      RETRIEVE JOB SCHEDULE ENTRY            TAAJBSA

The  Retrieve Job  Schedule  Entry  command retrieves  the  information
about  a specific job  schedule entry  or the  first or last  entry for
the same job name.  Several optional return parameters exist.

A typical series of commands would be:

             DCL          &LSTSBMDATE *CHAR LEN(10)
              .
             RTVJOBSCDE   JOB(xxx) LSTSBMDATE(&LSTSBMDATE)

You  must be  authorized to  the TAAJOBSCDE  authorization list  to use
RTVJOBSCDE.

The default  of ENTRY(*ONLY)  requires that  a single  job name  exist.
If  multiple jobs  exist for  the same  name, a  specific  entry number
must be specified, or *FIRST or *LAST.

The API QWCLSCDE is used to retrieve the information.

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

   JOB           The name of the job schedule entry job.

   ENTNBR        The  entry number  assigned to  the job.   The default
                 is *ONLY which requires that  only a single job  exist
                 for the  JOB name.   If  multiple jobs  exist for  the
                 same  JOB  name,  a  specific  entry  number  must  be
                 specified or the special values *FIRST or *LAST.

                 *FIRST or  *LAST may  also be  used if  only a  single
                 entry exists.

   RTNENTNBR     The return  entry number  assigned to  the job.   This
                 is  an optional  return  variable.   If  specified, it
                 must  be declared as *CHAR  LEN(10).  This information
                 may be meaningful if ENTRY(*ONLY) was used.

   SCDDATE       The scheduled date  of the job.   This is an  optional
                 return variable.   If  specified, it must  be declared
                 as  *CHAR LEN(10).    The values  *CURRENT, *MONTHSTR,
                 *MONTHEND, *NONE,  or a  specific date  in the  format
                 of CYYMMDD will be returned.

   SCDDAY        The scheduled  days of the job.   This is  an optional
                 return  variable.  If  specified, it  must be declared
                 as *CHAR LEN(70).  The  values returned will be  *ALL,
                 *NONE, *SUN...*SAT.   Each day  is 10 bytes  and there
                 are 7 days in the returned value.

   SCDTIME       The scheduled  time of the  job.  This  is an optional
                 return  variable.   If specified, it  must be declared
                 as *CHAR  LEN(6).   The value  returned will  be in  a
                 format of HHMMSS.

   FRQ           The  frequency  of  the  job.   This  is  an  optional
                 return  variable.  If  specified, it  must be declared
                 as *CHAR LEN(10).  The  value returned will be  *ONCE,
                 *WEEKLY, or *MONTHLY.

   RELDAYMON     The relative  day of the month.   This is  an optional
                 return variable  which may contain up  to 5 days where
                 each day is 10 bytes  long.  For a full  understanding
                 of  the  parameter  see  the  corresponding  value  on
                 ADDJOBSCDE.

                 If specified,  the variable must be  declared as *CHAR
                 LEN(50).    The  values returned  will  be 1  -  5, or
                 *LAST.

   RCYACN        The recovery  action assigned  to  the job.   This  is
                 the  action  that  is  to  take  place  at  the  first
                 available  time  if  the  system  is  down  or in  the
                 restricted  state  when  the  submit  date  and   time
                 occurs.  For  example, if the system is  down when the
                 job  is  supposed  to  be  submitted  and  *SBMRLS  is
                 specified, the job will  be submitted when the  system
                 is IPLed.

                 If specified, the  variable must be declared  as *CHAR
                 LEN(10).    The   values  returned  will  be  *SBMRLS,
                 *SBMHLD, or *NOSBM.

   NXTSBMDATE    The   next  date  the  job  will  be  submitted.    If
                 specified,  it must  be  declared  as  *CHAR  LEN(10).
                 The value  returned will be in the  format of CYYMMDD.

   STATUS        The  status of the job schedule  entry.  If specified,
                 it must  be  declared as  *CHAR  LEN(10).   The  value
                 returned will be  SCD (scheduled), HLD (held),  or SAV
                 (the entry is saved).

   JOBQ          The job  queue to be used for  the job.  If specified,
                 it must  be declared  as *CHAR  LEN(10).   A value  of
                 *JOBD or a  specific job queue name will  be returned.

   JOBQLIB       The library  of the job queue to be  used for the job.
                 If  specified, it  must be declared  as *CHAR LEN(10).
                 If JOBQ(*JOBD) is  used, no library value  will exist.

   ADDUSER       The  user  who  added  the  job schedule  entry.    If
                 specified, it must be declared as *CHAR LEN(10).

   LSTSBMDATE    The   last  date  the  job  was   submitted  on.    If
                 specified, it  must  be  declared  as  *CHAR  LEN(10).
                 The format of  the value will be CYYMMDD.   If the job
                 has not been submitted, the value will be blank.

   LSTSBMTIME    The  last  time of  day  the job  was  submitted.   If
                 specified, it must be declared  as *CHAR LEN(6).   The
                 format of the  value will be  HHMMSS.  If the  job has
                 not been submitted, the value will be blank.

   TEXT          The text  description assigned to  the job entry.   If
                 specified, it must be declared as *CHAR LEN(50).

   JOBQSTS       The  status  of  the  job queue  assigned  to  the job
                 entry.   If specified, it  must be  declared as  *CHAR
                 LEN(10).

                 The  value  returned  will  be  blank  (unknown),  HLD
                 (held),   RLS  (released),   HLD/SBS  (job   queue  is
                 allocated to a  subsystem and  is held), RLS/SBS  (job
                 queue is  allocated to  a subsystem and  is released),
                 or LOCKED (job queue is locked).

   OMITDATE      The  specific dates  to be  omitted.   Up to  20 dates
                 may be  returned  with each  date  as 10  bytes.    If
                 specified,  it must  be  declared as  *CHAR  LEN(200).
                 The format of each date is CYYMMDD.

                 If  no  omit  dates  exist,  the first  date  will  be
                 *NONE.   Any unused date  positions are set to blanks.

   JOBD          The  job  description   assigned  to  the  job.     If
                 specified,  it  must  be  declared as  *CHAR  LEN(10).
                 Either  a specific job description  or *USRPRF will be
                 returned.

   JOBDLIB       The library  of the  job description  assigned to  the
                 job.   If  specified,  it must  be  declared as  *CHAR
                 LEN(10).   If JOBD(*USRPRF) is used,  the library will
                 be blank.

   USER          The user assigned to the  job.  If specified, it  must
                 be declared as *CHAR  LEN(10).  A value of  *JOBD or a
                 specific user name will be returned.

   MSGQ          The  message queue  assigned to  the  job for  the job
                 completion   message.    If   specified,  it  must  be
                 declared  as *CHAR  LEN(10).    A  value  of  *USRPRF,
                 *NONE,  or  a  specific  message queue  name  will  be
                 returned.

   MSGQLIB       The  library of the message queue  assigned to the job
                 for the  job  completion message.   If  specified,  it
                 must  be declared  as  *CHAR LEN(10).    If a  special
                 value  was  used  for  MSGQ,  a  blank value  will  be
                 returned for the library.

   SAVE          Whether the  entry should  be saved  if FRQ(*ONCE)  is
                 specified.   If  specified,  it  must be  declared  as
                 *CHAR  LEN(10).    A value  of  *NO  or  *YES will  be
                 returned.

   LSTSBMJOB     The  name of the job that  was last submitted from the
                 job entry.    If specified,  it  must be  declared  as
                 *CHAR LEN(10).

   LSTSBMUSR     The user of  the job that was last  submitted from the
                 job  entry.   If  specified,  it must  be  declared as
                 *CHAR LEN(10).

   LSTSBMNBR     The job  number of  the job  that  was last  submitted
                 from  the  job  entry.    If  specified,  it  must  be
                 declared as *CHAR LEN(6).

   LSTATTSBMD    The date  the job was last  attempted to be submitted.
                 If specified, it  must be declared  as *CHAR  LEN(10).
                 The date  will  be returned  in a  format of  CYYMMDD.
                 If  the job has  not been  attempted to  be submitted,
                 the value will be blank.

   LSTATTSBMT    The  time  of day  the job  was  last attempted  to be
                 submitted.   If  specified,  it must  be  declared  as
                 *CHAR LEN(6).   The date will be returned  in a format
                 of  HHMMSS.  If the  job has not  been attempted to be
                 submitted, the value will be blank.

   LSTATTSBMS    The status  of  the  job  when last  attempted  to  be
                 submitted.   If  specified,  it  must be  declared  as
                 *CHAR LEN(10).  The value returned will be:

                 0 = Job not previously submitted

                 1 = Job successfully submitted

                 2 = Last job submission failed

                 3 = Job not submitted due to held status

                 4 = Job submitted as specified by RCYACN.

                 5 = Job not submitted as specified by RCYACN.

   CMD           The command  to be run when the  job is scheduled.  If
                 specified, it must be declared as *CHAR LEN(512).

   JOBNAMCNT     The  number  of   jobs  with  the   same  name.     If
                 specified, it must be declared as *DEC LEN(7 0).

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

Because the  command returns  variables, it may  only be  used in  a CL
program.

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

The following TAA Tools must be on your system:

     CRTUSRSPC       Create user space
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   RTVJOBSCDE    *CMD                   TAAJBSA       QATTCMD
   TAAJBSAC      *PGM       CLP         TAAJBSAC      QATTCL
					

Added to TAA Productivity tools January 1, 1998


Home Page Up to Top