TAA Tools
DSPRCDLCK2      DISPLAY RECORD LOCKS 2                 TAADBJN

The  Display Record  Locks  2 command  displays  or prints  the  record
locks  held  or  waiting for  a  job.    The  system DSPRCDLCK  command
displays  record  locks for  a physical  file.   DSPRCDLCK2  provides a
simple means of display in the same or a different job.

The API QDBRJBRL is used.

The command  is  public.   Any  user  can  display the  locks  held  by
another job.

A typical command would be:

             DSPRCDLCK2   JOB(xxx)

The  record  locks that  the  job  holds or  is  waiting  for would  be
displayed.

If no record locks exist, the command completes normally:

  **   If printing, a simple spooled file will exist.

  **   If displaying, an appropriate message appears.

Considerations
--------------

There  are exceptions where the API may  be unable to return the proper
information.

The API has a limit (as of  V4R5) of 32,767 locks.  A program may  lock
more  than this,  but the  API will  make  it appear  that only  32,767
exist.

DSPRCDLCK2 escape messages you can monitor for
----------------------------------------------

      TAA9894    No jobs exist for the qualified job name.
      TAA9895    Duplicate job names exist.
      TAA9896    The job is not active.

Escape messages from based on functions will be re-sent.

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

   JOB           The  qualified  name  of  the  job  to display  record
                 locks for.    The default  is  * meaning  the  current
                 job.   A specific  job, user,  and job  number may  be
                 entered.

   OUTPUT        How  to  output the  results.   *  is  the default  to
                 display   the  results  if   the  command  is  entered
                 interactively.

                 If  the command  is  entered  in batch  or  *PRINT  is
                 specified, the results are printed.

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

See  the  previous  comments  about exceptions  in  the  Considerations
section.

A maximum of 9998 locks may be displayed for a job.

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

The following TAA Tools must be on your system:

     ADJVAR          Adjust variable
     CVTRCDLCK2      Convert record locks 2
     FILEFDBCK       File feedback
     RTVJOBSTS       Retrieve job status
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   DSPRCDLCK2    *CMD                   TAADBJN       QATTCMD
   TAADBJNC      *PGM       CLP         TAADBJNC      QATTCL
   TAADBJNR      *PGM       RPG         TAADBJNR      QATTRPG
   TAADBJNR2     *PGM       RPG         TAADBJNR2     QATTRPG
   TAADBJND      *FILE      DSPF        TAADBJND      QATTDDS

Structure
---------

DSPRCDLCK2  Cmd
   TAADBJNC   CL pgm
     TAADBJNR   RPG Pgm - Print program
     TAADBJNR2  RPG Pgm - Display program
       TAADBJND   Display file
					

Added to TAA Productivity tools February 1, 2001


Home Page Up to Top