TAA Tools
JOBTALK         JOB TALK                               TAAJOCK

The Job  Talk tool allows a  means of interrupting  a job to  execute a
command entered  from another job.  The job  to be interrupted must set
a  message  queue  to Break  Mode  and  use a  supplied  Break Handling
program.   The  technique  allows an  authorized  user to  display  the
contents  of objects  that  cannot  ordinarily be  seen  such as  *LDA,
*GDA,  and objects in  QTEMP.  The  same technique may also  be used to
assist in recovery.

The  tool  provides  security  and  integrity  controls  to  assist  in
preventing misuse.

While the intended use  of the tool is to  allow printing functions for
debugging  or  problem  determination  purposes,  any  command  may  be
executed and  will  operate  under  the  authority  of  the  job  being
interrupted.

Controls exist so that:

  **   Only  authorized users  (controlled  by an  Authorization  list)
       may use the function.

  **   Only  a list of  standard commands  that provide  printed output
       and  a  list  of  specified commands  (entered  by  the Security
       Officer) can be executed.

  **   The Security  Officer  may  enter a  list  of users  to  prevent
       their jobs from ever being operated on by the JOBTALK tool.

  **   Only  a   job  that  issues   the  command  STRJOBTALK   can  be
       interrupted   by  the   JOBTALK  function.     The  job   to  be
       interrupted may  also issue  a command  (ENDJOBTALK) to  prevent
       the use of the JOBTALK function.

  **   If  a request  is  made by  a  user who  does  not have  *ALLOBJ
       special  authority, the  user cannot  cause commands  to execute
       in another job where the user  of the job being interrupted  has
       significant special authority (such as *ALLOBJ).

The JOBTALK tool  commands are fairly  straightforward.  See  the later
section on Adding STRJOBTALK to Jobs.

But  first, to  familiarize yourself  with  the JOBTALK  functions, you
should try the demonstration described in the next section.

Demonstrating the function
--------------------------

The  demonstration  assumes  you  will be  operating  under  an *ALLOBJ
authorized user.   You  will be  termed  the 'requesting  user' or  the
user who will send requests to another job.

Use  a  different interactive  display  device  with  a different  user
profile  name for the job to be  interrupted (do not use System Request
or a Group Job).  Issue the command:

             STRJOBTALK

Note the name of the  message queue created in the completion  message.
It is  'TAAnnnnnn' where the number  (nnnnnn) is the unique  job number
assigned  by the  system.   This same  MSGQ  name must  be used  on the
SNDJOBTALK command.  Normally, you  would use a command like  WRKACTJOB
or DSPJOB to determine the job number assigned to the job.

STRJOBTALK creates a message  queue in the TAAWORK library  and sets it
to break mode  with a TAA Tool program  as the specified Break Handling
program.  The job is now ready to be interrupted.

When  any user  issues the  first STRJOBTALK command  for a  new day, a
batch job  is  submitted to  cleanup  old message  queues  that are  no
longer  needed  in the  TAAWORK  library.    The CLNJOBTALK  batch  job
should  have been submitted.   This command  may be issued  at any time
by any user.  See later discussion of the Cleanup function.

Create a data area  in QTEMP that will  be displayed by the  requesting
job.

             CRTDTAARA    DTAARA(QTEMP/TESTONE) TYPE(*CHAR) LEN(10)
                            VALUE(GOODJOB)

From the  'requesting users' job, name  the message queue  described in
the STRJOBTALK completion message in the following command:

             SNDJOBTALK   MSGQ(TAAnnnnnn)

A display  of the valid JOBTALK  commands appears.  At  this point, the
display includes only  the standard  commands provided  by the  JOBTALK
tool such as PRTDTAARA.

Select the  option for PRTQTEMP.   The command  prompt for the  command
will appear.   PRTQTEMP has no parameters.  It  will print a listing of
the  objects  from the  QTEMP  library of  the  job to  be interrupted.
PRTQTEMP is a simple front end for the command:

             DSPLIB       LIB(QTEMP) OUTPUT(*PRINT)

Use WRKOUTQ of your own output queue to display the spooled file:

             WRKOUTQ      OUTQ(xxx)

Note that  you cannot  use WRKSPLF of  the spooled  files created  your
profile because the spooled file was created in a different job.

SNDJOBTALK causes a  message to be sent to  the TAAnnnnnn message queue
in  TAAWORK.   If  the job  to be  interrupted is  active (such  as not
currently suspended by  a System  Request or Group  Job function),  the
Break Handling  program wakes  up and begins  processing.   The program
receives  the message, checks  that it is  a valid command  to execute,
ensures that the requesting user  is authorized, ensures that the  user
of the job being  interrupted is not on the 'invalid  list', and issues
the requested command.

Assuming  the command completes  successfully, a  message is  sent back
to  the requesting  user informing him  the request has  completed.  If
the command fails, a  different message is returned and a  'mini joblog
like' spooled file will be created with the pertinent messages.

Note  that  when  a  spooled  file  is  created  by  the  job  that  is
interrupted,  the  spooled file  will  be  placed in  the  output queue
identified by  the SNDJOBTALK  completion message.    This is  normally
the output queue of the requesting user.

Note that  the PRTQTEMP  command uses  DSPLIB and  OUTPUT(*PRINT).   If
you  sent  a  DSPLIB  request  to  a  job  to  be  interrupted  without
OUTPUT(*PRINT), you  would cause  the DSPLIB  display to  be  displayed
immediately and interrupt whatever the user was doing.

Because you will  want to print  most requests, simple front  end tools
are  provided  as  standard  commands.    For  example,  the  PRTDTAARA
command is a simple front end to DSPDTAARA with OUTPUT(*PRINT).

You  do not have to take the  default for the SNDJOBTALK CMD parameter.
Instead, you can enter a command directly such as:

             SNDJOBTALK   MSGQ(TAAnnnnnn)
                            CMD(PRTDTAARA DTAARA(QTEMP/TESTONE))

You should see the QPDSPDTA spooled file in your job.

You can also print the *LDA of the job to be interrupted with:

             SNDJOBTALK   MSGQ(TAAnnnnnn)
                            CMD(PRTDTAARA DTAARA(*LDA))

Now try a data area name that does not exist in QTEMP such as:

             SNDJOBTALK   MSGQ(TAAnnnnnn)

                            CMD(PRTDTAARA DTAARA(XXXX))

You should  see  the mini-job  log  spooled file  JOBTALK in  your  job
which contains the error information.

Another command to  try is the PRTDB3 command which allows  you to do a
simple  listing of  a data base  file.   Try it  on any  data base file
such as:

             SNDJOBTALK   MSGQ(TAAnnnnnn) CMD(PRTDB3 FILE(xxx))

Now try a  command that is not  included in the  standard list such  as
DSPLIB.

             SNDJOBTALK   MSGQ(TAAnnnnnn)
                            CMD(DSPLIB LIB(QTEMP) OUTPUT(*PRINT))

You should see an  error message stating the command  does not exist in
the  JOBTALKCMD data  area in  TAASECURE.   Some simple  print commands
are  provided   automatically  and   the  Security   Officer  may   add
additional commands.    You can  add a  new  command by  using the  TAA
command  EDTCONARR  (Edit  Constant  Array).    The  EDTCONARR  command
provides an editing function of a specially created data area.

             EDTCONARR    DTAARA(TAASECURE/JOBTALKCMD)

A  display appears with a column for  the command name and the library.
Qualified library names are used to assist in integrity.

Enter the DSPLIB command as:

                   Command           Library
                   -------           -------

                   DSPLIB            QSYS

End the EDTCONARR function and enter SNDJOBTALK as:

             SNDJOBTALK   MSGQ(TAAnnnnnn)

You  should see  the  DSPLIB command  added  to  the display  of  valid
JOBTALK  commands.   The  commands  are  sorted  in alphabetical  order
prior to being displayed.

Select the DSPLIB option and enter the command as:

                            CMD(DSPLIB LIB(QTEMP) OUTPUT(*PRINT))

You should see the QPDSPLIB spooled file in your job.

Now  try  the  DSPLIB  command and  take  the  default  for  the OUTPUT
parameter as:

             SNDJOBTALK   MSGQ(TAAnnnnnn)
                            CMD(DSPLIB LIB(QTEMP))

The job  to be  interrupted  should see  the display  library  display.
The command you enter  is being executed in the other job  and you must
be  sensitive to  functions which  will interrupt  what the  other user
sees.

At the  job  that  is  being interrupted,  enter  the  command  to  end
JOBTALK.

             ENDJOBTALK

This  will  delete  the  data area  and  make  it  impossible  for  the
SNDJOBTALK command to be used on the job to be interrupted.

As the requesting user, enter the previous SNDJOBTALK command again:

             SNDJOBTALK   MSGQ(TAAnnnnnn)
                            CMD(DSPLIB LIB(QTEMP))

This  should fail because  the message queue  no longer exists.   There
is  a way  to create the  message queue and  send requests  to it after
the job has  been submitted,  but before the  job has  started.  See  a
later section on how to do this.

Go back to the job that was being interrupted and re-enter:

             STRJOBTALK

Because  the same  job number  is still  being used,  the MSGQ  will be
created again with the same name.

There  is no harm in  issuing the STRJOBTALK command  again in the same
job.  The  function will just  reset the message  queue to Break  mode.
Try the command again:

             STRJOBTALK

Go  back to  the requesting  job  and try  naming  a user  to make  him
invalid for any requests from JOBTALK.  Enter the following command:

             EDTCONARR    DTAARA(TAASECURE/JOBTALKUSR)

Enter the name of the user who's job has been used to interrupt.

Now try using the PRTDTAARA command again:

             SNDJOBTALK   MSGQ(TAAnnnnnn)
                            CMD(PRTDTAARA DTAARA(*LDA))

Use WRKOUTQ  of your own output queue to see  the results.  They should
describe that the user is excluded from JOBTALK.

If you are  finished with  the demonstration, use  EDTCONARR and  blank
out the entries you have made to the data areas:

             EDTCONARR    DTAARA(TAASECURE/JOBTALKCMD)
             EDTCONARR    DTAARA(TAASECURE/JOBTALKUSR)

The TAAWORK library
-------------------

The TAAWORK  library is  installed automatically  when you install  the
TAA  Productivity Tools.    It is  designed to  contain  only temporary
work  objects.   There is no  requirement to back  up the  library on a
daily basis.

Only the STRJOBTALK  command creates objects  into the TAAWORK  library
for the  JOBTALK tool.   Other  TAA Tools may  also place  objects into
the  TAAWORK library.  You should avoid  using the library for your own
objects.

If you save the  TAAWORK library while other  users are on the  system,
the SAV  command may  fail because one  or more  message queues  may be
allocated.

Cleanup of the TAAWORK library is required.  See the next section.

Cleanup of the TAAWORK library
------------------------------

If you  are using STRJOBTALK in  several jobs you may  be creating many
message queues in the TAAWORK library.

There are two methods of cleaning this up.

  **   The default  is that  the first  user to  enter STRJOBTALK  each
       day will  cause a batch job  to be submitted.   The name  of the
       batch  job is  CLNJOBTALK and  it  runs the  CLNJOBTALK command.
       The  QBATCH  job queue  in QGPL  must be  assigned to  an active
       subsystem.  If  not, a message is  sent to QSYSOPR requesting  a
       manual   cleanup  (the   System   Operator   should  issue   the
       CLNJOBTALK command).

  **   You  may prevent  the automatic  function and schedule  your own
       cleanup.  To  prevent the  automatic function,  as the  Security
       Officer enter the command:

                 EDTAPPVAL    APPVAL(TAASECURE/JOBTALK)

       A display  will appear for the  Cleanup option.   Enter *MANUAL.

       You  must periodically  cleanup the message  queues that  are no
       longer in use in  the TAAWORK library.   Any user may issue  the
       command CLNJOBTALK.

CLNJOBTALK  is safe  to  use at  any  time as  it  will only  delete  a
message queue  that is not  allocated to another  job.  You  may use it
manually  as well  as the automatic  function.  The  command adopts the
QSECOFR  profile to  allow  it  to  delete message  queues  created  by
different users.   CLNJOBTALK  only perform safe  actions and  does not
compromise any security measures.

You  may want  to run  CLNJOBTALK  before you  run a  full save  of the
system.  If you save the  TAAWORK library while other users are on  the
system, the  SAV command may  fail because one  or more  message queues
may be allocated.

If the  JOBTALK *USRSPC object in TAASECURE  becomes damaged, delete it
and use CRTTAATOOL to  create JOBTALK.  This  will create the  *USRSPC.
Then use EDTAPPVALD for  TAASECURE/JOBTALK.  Use option 1  on the first
keyword.    Describe  the option  as  CLEANUP.    Make  it type  *CHAR,
LEN(10), with values of *AUTO and *MANUAL.

Handling of the assigned output queue
-------------------------------------

When  SNDJOBTALK is  run, the command  determines what  output queue is
assigned to  the requesting  job and  passes the  name as  part of  the
message  that  is  sent  to  the  message  queue  for  the  job  to  be
interrupted.   The Break Handling program of  the job to be interrupted
does OVRPRTF FILE(*PRTF)  with the  requesting jobs output  queue.   At
the  end  of  the  Break  Handling  program,  the  system  removes  the
override command.

The intent  is to cause the output to go  where the requesting user can
easily find  it rather  than the  output queue  used by  the job  being
interrupted.

Note that the SNDJOBTALK  user must use WRKOUTQ of his  output queue to
see  the  results  rather than  WRKSPLF  because  the  output has  been
created in another job.

Break handling programs
-----------------------

The  Break Handling program may not  instantly interrupt the job when a
message arrives on  the message queue.   Some system functions are  not
interruptible until  they complete such  as when creating a  program or
reorganizing a file.

The  supplied break handling  program (TAAJOCKC21)  handles one message
at a time.  It does not  wait for another message to be sent, but  just
ends  the program  normally.    As each  message  is  processed, it  is
removed from the message queue.

If multiple  messages are sent by SNDJOBTALK  before the Break Handling
program goes  active, it  processes the  first one  and  then lets  the
current job continue.   The job  would be interrupted again  if another
message existed.

Security considerations
-----------------------

While  the JOBTALK tool  can provide  some significant  added function,
there  are some  important security  considerations in  the use  of the
tool.

It is important  to note  that the requested  command will be  executed
under the  user profile of  the job being  interrupted and not  the job
sending the request.

Even  if   the  job  to  be  interrupted  is  signed  onto  by  a  user
LMTCPB(*YES), commands  sent by  SNDJOBTALK may  still  be executed  in
the job (they are executed using QCMDEXC).

When a Break  Handling program becomes active,  any adopted authorities
being used  at that point in the job to  be interrupted are ignored and
the Break Handling program runs  only under that job's user  authority.

During the  Break Handling program  operation, sub programs  are called
which adopt  the QSECOFR profile in order to  access the JOBTALKUSR and
JOBTALKCMD  data areas in TAASECURE.   These programs only perform safe
actions and do not compromise any security measures.

The following discusses the security considerations:

  **   Any user can use:

          - STRJOBTALK
          - ENDJOBTALK
          - CLNJOBTALK

       The   STRJOBTALK   and   ENDJOBTALK   commands   are    set   to
       ALWLMTUSR(*YES) which  means that even a limited  user may enter
       the command on a command line.

  **   Only    authorized   users   (controlled   by   the   TAAJOBTALK
       Authorization list or *ALLOBJ users) can use:

          - SNDJOBTALK

  **   Only a  command in  the standard  list of  commands provided  by
       the JOBTALK tool  and the commands found in a  list of specified
       commands (entered  by the Security Officer)  into the JOBTALKCMD
       data area  can  be  executed.   Use  the  EDTCONARR  command  on
       DTAARA(TAASECURE/JOBTALKCMD)  to  add or  remove  commands  (you
       cannot change  the standard commands).   The library  where each
       command  exists  must also  be  entered.   This  provides better
       integrity when  SNDJOBTALK is  used because  the qualified  name
       in the data area is used.

  **   The  Security  Officer  may  enter  a  list  of  users  (to  the
       JOBTALKUSR  data area)  to  prevent their  jobs from  ever being
       operated on by the JOBTALK  tool.  Use the EDTCONARR command  on
       DTAARA(TAASECURE/JOBTALKUSR).

       It is  important to  note that you  need to  periodically review
       the  profiles in  the data  area and keep  it up  to date.   For
       example, you may add a profile  that should be specified in  the
       data area.

  **   Only  a   job  that  issues   the  command  STRJOBTALK   can  be
       interrupted   by  the  JOBTALK   function.     The  job   to  be
       interrupted  may also  issue the  command ENDJOBTALK  to prevent
       the use of the JOBTALK function.

  **   If a  request  is made  by  a user  who  does not  have  *ALLOBJ
       special  authority, the  user cannot  cause commands  to execute
       in   a  job  to  be  interrupted   where  that  job's  user  has
       significant  special   authority.     The  significant   special
       authorities  checked for  are  *ALLOBJ,  *SERVICE, *SPLCTL,  and
       *IOSYSCFG.

       For  example,  assume  your  System  Operator  has only  *JOBCTL
       special authority  and  you  authorize the  System  Operator  to
       *USE  authority  of  the TAAJOBTALK  authorization  list.    The
       System Operator  can now use  SNDJOBTALK to request  commands be
       executed  in normal end user jobs,  but cannot request a command
       be run in a job where the user is the Security Officer.

  **   When  the Break  Handling  program  receives  the  message,  the
       SENDER  information on RCVMSG  is used  to identify  the program
       that  sent the message (it  must be TAAJOCKC4)  and the user who
       sent the message.

  **   The CLNJOBTALK command and some  sub programs used in the  other
       JOBTALK commands  use the  program adopt  function to  run under
       the  authority of QSECOFR.   This is required  to delete message
       queues created by  many users  or to access  the secure  library
       TAASECURE.    These  programs  are  carefully  written  so  that
       security cannot  be compromised (See the HELPTAA  option for TAA
       Tool Security to understand your responsibility).

Standard JOBTALK commands
-------------------------

The  following commands are standard and can  be issued by any user who
is authorized to SNDJOBTALK:

   PRTDTAARA     Allows any data area to be printed.

   PRTQTEMP      Provides a DSPLIB listing of QTEMP.

   PRTJOB        Provides  a   DSPJOB   listing.     The  same   OPTION
                 parameter  that  exists  on  DSPJOB  is  supported  on
                 PRTJOB.

   PRTDB3        The  command is part of the  PRTDB tool which allows a
                 file to be printed.

What commands should and should not be entered into JOBTALKCMD
--------------------------------------------------------------

The commands you would generally avoid are:

  **   Those you  consider  dangerous to  security.   For  example,  it
       would not  make any  sense to  include CRTUSRPRF  as a  command.
       CRTUSRPRF can be issued from a normal job.

  **   Those  commands  you  consider  dangerous  to  integrity.    For
       example, commands  like CHGLIBL,  DLCOBJ, DLTPGM  could be  run,
       but  could cause  the  application  to fail  in  the job  to  be
       interrupted.

  **   Commands like  CHGJOB can be  issued outside of a  job to impact
       a specific job and and therefore are not needed.

In  general, you will probably want  to include commands that allow you
to print items  that you cannot  do from outside of  the job to  assist
in problem determination.

There  may be  a need  for other  special commands  that you  will only
require  in unique  circumstances.   These could  be handled  by adding
them to the JOBTALKCMD data  area when required and then removing  them
when the function is complete.

For example,  you might want  to include  the CRTDTAARA command  to get
around  a  problem.    See  the  later  section  on Using  JOBTALK  for
Recovery.

Getting started
---------------

  **   The Security  Officer  should  provide  *USE  authority  to  any
       individuals  who do  not  have *ALLOBJ  authority  who will  use
       SNDJOBTALK.  Enter the command:

             EDTAUTL  AUTL(TAAJOBTALK)

       and add the required users with *USE authority.

  **   The  Security  Officer   may  optionally  enter  any  additional
       commands  (beyond the  standard commands provided)  that will be
       considered valid to be  used by SNDJOBTALK.  Use  the JOBTALKCMD
       data  area  in  the  TAASECURE  library.   Enter  the  following
       command:

             EDTCONARR   DTAARA(TAASECURE/JOBTALKCMD)

       An  interactive display will  appear that allows the  entry of a
       command and a library.   You may enter up  to 45 commands.   You
       must  enter the  library  name where  the  command exists  (this
       provides  better security  as the  commands are  always executed
       with the qualified  library name).   System  commands are  found
       in the QSYS library.

       For  example,  you  might enter  commands  that  would  look  as
       follows:

                   DSPLIB                QSYS

  **   The  Security  officer  may  optionally  enter  a list  of  user
       profile  names that cannot  be operated on  by the JOBTALK tool.
       To enter a  list of up  to 45 excluded  user profile names,  the
       Security Officer should enter the following command:

             EDTCONARR   DTAARA(TAASECURE/JOBTALKUSR)

       An interactive display  will appear and a typical  list of names
       might be entered such as:

                         QSECOFR
                         QSRV

Note  the  difference between  the  two data  areas.   In  the  case of
JOBTALKCMD you  must  enter  commands  that are  to  be  'included'  in
addition to  the standard  supplied commands.   All other  commands are
excluded by default.

In  the case  of JOBTALKUSR,  you  are entering  an 'exclude  list' The
default allows  all users  to be  capable of  being interrupted.    You
describe user profile names that you do not want to ever interrupt.

At this point, the  only remaining requirement to use  the JOBTALK tool
is  to run the  STRJOBTALK command in  the jobs  that require it.   See
the next section.

Adding STRJOBTALK to Jobs
-------------------------

The  advantage of the  JOBTALK tool cannot be  achieved unless the jobs
to be interrupted issue  the STRJOBTALK command.  You cannot  issue the
STRJOBTALK  tool for  another job.   The  command must  be  issued from
within the job to be interrupted.

Because  it is normally impossible to predict  which jobs will need the
function of  the JOBTALK  tool,  a typical  use will  be to  enter  the
function into all or most jobs that are being run on the system.

Adding  a new  function to  many  jobs on  the  system can  be a  risky
approach.   A more conservative approach  would be to change  a few end
user jobs  to  include  STRJOBTALK  until you  are  familiar  with  the
function.

The following are some different approaches that you can use:

  **   Enter  the STRJOBTALK  command  into  a users  initial  program.
       This provides specific control over certain users.

  **   Enter the  STRJOBTALK command into an application  that is being
       used.   For example, if you  have menu programs, a simple change
       will  provide the  JOBTALK  function  when  the  application  is
       selected from a  menu.  You may optionally  issue the ENDJOBTALK
       command  when the  user  exits the  application.   This provides
       the JOBTALK  function  for all  jobs  that invoke  the  specific
       application.

  **   Have the  user enter the STRJOBTALK  command on a  command line.
       The   commands  STRJOBTALK  and  ENDJOBTALK   are  specified  as
       ALWLMTUSR(*YES) to  allow limited  command  entry users  to  use
       them.

  **   Change the routing  step that is  being used for a  subsystem or
       all subsystems  that you start user jobs from.   For example, it
       could  be QBASE, or QINTER and QBATCH.   See the next section on
       Changing a Routing Step.

Changing a Routing Step
-----------------------

In order  to  ensure that  every  job has  the  STRJOBTALK function,  a
simple solution  is to change  the routing step  that is being  used to
invoke a special program that is provided by the JOBTALK tool.

The  special program (TAAJOBTALK)  causes the STRJOBTALK  command to be
executed when  a  routing step  starts.    The program  then  transfers
control to QCMD  in QSYS which is the standard  system supplied command
processing function.

Describing a  'one size fits all' approach  to changing a routing entry
cannot be done  because of  the variety  of solutions  that may  exist.
For example,

  **   Some systems  already use this  same type  of approach to  cause
       their own  function to occur  before QCMD is executed.   If this
       is  the case,  you can just  add the STRJOBTALK  command to your
       own program.

  **   Some systems have added  their own routing entries for  specific
       purposes.

  **   Some  application  packages  have  supplied  their  own  routing
       entry programs.

  **   Some  systems use QBASE  as the controlling  subsystem, some use
       QCTL, some  use their own  subsystem.   If other  than QBASE  is
       used, the  subsystems QINTER  and QBATCH  may be  used for  most
       production  work.  Some other  subsystems such as  QCMN may also
       start jobs that you want to use the JOBTALK function for.

Regardless of  which approach  you use,  the first  step should  be  to
capture your working environment by using:

            DSPSBSD  SBSD(xxx) OUTPUT(*PRINT)

of any subsystem you are  going to modify.  This will  provide you with
a hard copy version of your definition before any changes are made.

You may  also want to keep a  version on line.  For  example, you could
use  CPYSPLF to copy the QPRTSBSD spooled file  to a data base file (it
cannot be a source file).

The following  describes  how to  change  the typical  system  supplied
entry  for the  QCMD processing  program.   It may  not suffice  to get
STRJOBTALK  into every job that  is started on the  subsystem, but will
allow you to include STRJOBTALK into many production jobs.

  **   For any subsystem to be  changed, use DSPSBSD and the option  to
       display the Routing entries.

  **   Use  the  column  labeled  'Program'  to  identify  any  routing
       entries  that have  an entry of  QCMD.   Write down the  name of
       the corresponding sequence number from the 'Seq Nbr' column.

The number  of  routing  steps  that specify  QCMD  varies  per  system
supplied subsystem and  may also vary  per release.  Usually,  the last
(or only)  one in each  subsystem has a  sequence number of  9999 and a
Compare Value of *ANY.

  **   While  you can  add additional routing  entries in  front of the
       system supplied  entries  (by using  a lower  sequence  number),
       you can  only have one entry  that specifies a  Compare Value of
       *ANY.   Consequently, the easiest solution  is to just change an
       existing entry  (this is  why the  first step  is  to save  your
       current definition in case you need to refer to it again).

       To change the 9999 entry, you would issue the command:

              CHGRTGE  SBSD(xxx) SEQNBR(9999) PGM(TAATOOL/TAAJOBTALK)

       Then whenever  a job  is processed  by this  routing entry,  the
       TAAJOBTALK  program  would  be  invoked.    It would  issue  the
       STRJOBTALK command and  then transfer control  to QCMD in  QSYS.

  **   Some  subsystems have  specific  QCMD  entries that  occur  much
       earlier than  sequence number 9999  and these entries  must also
       be changed the same as the 9999 sequence number.

If  there are routing  entries that do  not use QCMD  as the processing
program that  you want to  change, you  would have  to supply a  simple
program that did the following:

             PGM
     TAATOOL/STRJOBTALK
             CALL         PGM(xxx)
             ENDPGM

where  the  program  name  to  be called  is  the  existing  processing
program for the routing entry.

Using JOBTALK for Recovery
--------------------------

Sometimes  a job  will  hang on  an inquiry  message stating  that some
problem exists.    Some  of  these  types of  problems  can  be  solved
without the  use of JOBTALK.   For example, if  a data area  is missing
in  a permanent library,  you can create  the data area  in another job
and then specify 'R' to retry.

However, if the  problem is  that the  data area is  missing in  QTEMP,
you cannot use  a system command to  create an object in  another job's
QTEMP library.

You  could use  SNDJOBTALK to create  the object  and then  specify 'R'
(retry)  to respond to the inquiry  message.  The inquiry message would
try the command  again, but before it  did, the Break Handling  program
would take over and create the data area.

Creating the Message Queue Before a Batch Job Starts
----------------------------------------------------

It is  possible to  submit a job  and use JOBTALK  before the  job goes
active  and issues the STRJOBTALK command.   For example, you could use
HOLD(*YES) on SBMJOB or hold a batch queue until you were ready.

Since STRJOBTALK  has not been  issued in  the job  to be  interrupted,
you  cannot use  SNDJOBTALK  because the  message  queue  has not  been
created.    However, because  you  can determine  the  unique  job name
assigned to the  batch job  (assigned on SBMJOB  and not  when the  job
goes active) you can create the message queue such as:

             CRTMSGQ    MSGQ(TAAJOBTALK/TAAnnnnnn)

Then you  can send requests  and have them  executed when the  job goes
active.  Because  you are sending a request to  a message queue that is
not  in  use,  you  must  specify  ACTIVEMSGQ(*NO)  on  the  SNDJOBTALK
command.

When the  STRJOBTALK command  executes,  it already  finds the  message
queue in existence and just sets it to Break Mode.

For example,  it is  possible to  debug a batch  job using  the JOBTALK
tool.   You should consider the TRACE command  which is part of the TAA
Tool BKP and then follow  it with DSPTRCDTA.  As  long as you get  your
request into  the message queue  before the job  starts, you  can cause
debug output to occur.

Debug  commands can also be  issued while the program  is in execution.
So if  the program  is hung  on an  inquiry message,  you  can go  into
debug mode and change a variable.

STRJOBTALK command                                    *CMD
------------------

No parameters exist.

ENDJOBTALK command                                    *CMD
------------------

No parameters exist.

SNDJOBTALK command                                    *CMD
------------------

   MSGQ          The  message  queue  to send  the  command  to.    The
                 message queues must be in the TAAWORK library.

                 The  message  queue  names  are  TAAnnnnnn  where  the
                 number  (nnnnnn) is the same  as the unique job number
                 assigned to  each  job.    You would  normally  use  a
                 command  like WRKACTJOB  or  DSPJOB  to determine  the
                 number.

   CMD           The   command  to  be  executed  by   the  job  to  be
                 interrupted.   The default  is DSPJOBTALK  which is  a
                 dummy  command  that  will  cause the  list  of  valid
                 commands to be displayed so you may select one.

                 Only  standard commands  supplied by the  JOBTALK tool
                 may be used  or the commands  entered by the  Security
                 Officer into  the JOBTALKCMD  data area in  TAASECURE.
                 Use the EDTCONARR command to enter the commands.

   OUTQ          The  output queue where  any spooled output  caused by
                 the  command to  be executed  (or the  error log) will
                 be placed.   The default is  *CURRENT which means  the
                 output queue  assigned to  the job  issuing SNDJOBTALK
                 (not the job being interrupted).

                 The  output  queue  must  allow  the  *PUBLIC user  to
                 place spooled  files  in  it  (it  cannot  be  *PUBLIC
                 *EXCLUDE).

   ACTIVEMSGQ    A *YES/*NO  parameter that  determines if  the command
                 may  only be sent to  a message queue  that is active.
                 *YES is  the default  and requires  the message  queue
                 to  be active  (in  use).    This means  it  has  been
                 allocated  by   another  job  which   has  issued  the
                 STRJOBTALK command.

                 *NO  may be  used when  the message  queue exists, but
                 the requesting  job  has  either not  started  or  has
                 deallocated the use of the message queue.

CLNJOBTALK command                                    *CMD
------------------

No parameters exist.

DSPJOBTALK command                                    *CMD
------------------

No  parameters exist.   The  command is  only intended  for use  on the
SNDJOBTALK  command CMD  parameter.  An  escape message  will be issued
if the command is executed.

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

Several restrictions are described throughout the documentation.

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

The following TAA Tools must be on your system:

     APPVAL          Application value
     CHKACTOBJ       Check active object
     CONARR          Constant array
     EDTVAR          Edit variable
     EXTCMD          Extract command
     FMTLIN          Format line
     PRTDB           Print data base file
     PRTDTAARA       Print data area
     PRTJOB          Print job
     PRTQTEMP        Print QTEMP
     RTVDIAGMSG      Retrieve diagnostic message
     RTVJOBQA        Retrieve job queue attributes
     RTVPUBAUT       Retrieve public authority
     RTVSPCAUT       Retrieve special authority
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCMSG       Send escape message

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

You must follow the instructions in the 'Getting Started' section.

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

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

   STRJOBTALK    *CMD                   TAAJOCK       QATTCMD
   ENDJOBTALK    *CMD                   TAAJOCK2      QATTCMD
   CLNJOBTALK    *CMD                   TAAJOCK3      QATTCMD
   SNDJOBTALK    *CMD                   TAAJOCK4      QATTCMD
   DSPJOBTALK    *CMD                   TAAJOCK5      QATTCMD
   TAAJOCKC      *PGM       CLP         TAAJOCKC      QATTCL
   TAAJOCKC2     *PGM       CLP         TAAJOCKC2     QATTCL
   TAAJOCKC3     *PGM       CLP         TAAJOCKC3     QATTCL
   TAAJOCKC4     *PGM       CLP         TAAJOCKC4     QATTCL
   TAAJOCKC5     *PGM       CLP         TAAJOCKC5     QATTCL
   TAAJOCKC11    *PGM       CLP         TAAJOCKC11    QATTCL
   TAAJOCKC14    *PGM       CLP         TAAJOCKC14    QATTCL
   TAAJOCKC21    *PGM       CLP         TAAJOCKC21    QATTCL
   TAAJOCKC22    *PGM       CLP         TAAJOCKC22    QATTCL
   TAAJOBTALK    *PGM       CLP         TAAJOCKC31    QATTCL
   TAAJOCKR5     *PGM       RPG         TAAJOCKR5     QATTRPG
   TAAJOCKR21    *PGM       RPG         TAAJOCKR21    QATTRPG
   TAAJOCKD      *FILE      DSPF        TAAJOCKD      QATTDDS
   JOBTALK       *USRSPC
   JOBTALKCMD    *DTAARA
   JOBTALKUSR    *DTAARA
   JOBTALK       *DTAARA

DSPJOBTALK is  a  dummy command  that is  used  as the  SNDJOBTALK  CMD
default.  The command will return an escape message if executed.

The  JOBTALK *USRSPC  is  in the  TAASECURE  library.   It  is used  to
determine the cleanup option.

The  JOBTALKCMD  and   JOBTALKUSR  data  areas  are  in  the  TAASECURE
library.

The JOBTALK data area  is in TAAWORK  and is used  to contain the  date
the last automatic cleanup was submitted.

The TAAJOCKC14 program  contains the standard commands  such PRTDTAARA.

Structure
---------

STRJOBTALK  Cmd
   TAAJOCKC   CL pgm
     TAAJOCKC11   CL pgm

ENDJOBTALK  Cmd
   TAAJOCKC2  CL pgm

CLNJOBTALK  Cmd
   TAAJOCKC3  CL pgm

SNDJOBTALK  Cmd
   TAAJOCKC4  CL pgm
     TAAJOCKC14  CL pgm
     TAAJOCKR5   RPG pgm
       TAAJOCKD   Display file

DSPJOBTALK  Cmd
   TAAJOCKC5  CL pgm

Break handling program is TAAJOCKC21
   TAAJOCKC11  CL pgm
   TAAJOCKC14  CL pgm
   TAAJOCKC22 CL pgm
   TAAJOCKR21 RPG pgm

Routing entry program is TAAJOBTALK
					

Added to TAA Productivity tools November 1, 1997


Home Page Up to Top