TAA Tools

The Submit from  PDM with Overrides  function provides a  solution when
a file  name includes a  character (such as  the period in  'XX.1') and
the  file is to be used within most  of the high level languages.  Only
BASIC, and CL and support the period within a name.

The most typical case  where this problem occurs  is when the user  has
migrated  from  S/36  and  has  partially converted  to  native.    For
example, a  normal first step is to define  some of the data base files
using externally described data.  If  the file name has a period in  it
(e.g.   XX.1) and the user  wants a native  i5 System RPG III  or COBOL
program  to  use  the  externally  described  data, a  problem  occurs.
Because RPG  restricts  the use  of  a  period, the  actual  file  name
cannot be used in the program.

To operate  successfully, the  user must use  a fake  file name  in the
program  and issue  an override  at both  program creation  and program
execution.    During  execution,  overrides  are  very  normal  in many
applications.   However,  during compilation  time,  the user  normally
wants to  operate from  PDM.  There  is no direct  support from  PDM to
get  an  override  into  the submitted  batch  job  which  performs the
create operation.

SBMPDMOVR can  also be used  in any  case where  the file  name in  the
program differs from the file name in the data base.

The SBMPDMOVR  tool lets the  user operate from  PDM and  still perform
the  override.  Any  create function can  be performed by  entering the
special option 'CO'  meaning 'Create  with Override' (you  could use  a
different entry).   This option  submits a special  batch program.   In
batch,  the  special program  accesses  the file  PDMOVRP.   This  file
contains  the name of the program, the name  of the file in the program
and the file name  to be overridden to.   The batch program issues  the
proper overrides and  then issues the normal create  command.  If there
are  no overrides or a non-program object  was requested to be created,
the SBMPDMOVR tool creates the object normally.

A single program can have any combination of:

    - Files to be overridden.

    - Files which do not need overrides.

Therefore, the  user  who has  a  complex program  in  S/36E can  do  a
partial  conversion involving  some  files  using externally  described
data and some files left as program described data.

F4  for command prompting of  the CRTxxx command is  not supported when
a user  option is  used  with PDM.   However,  you  can store  the  CRT
command  parameters  in  the corresponding  source  member  as  comment
lines  with this same  tool.   For example,  assume you want  to always
create  an RPG  program with the  parameter USRPRF(*OWNER).   You would
enter the first, second or third source statement of the program as:


The  function   of  storing   the   CRT  command   parameters  in   the
corresponding  source  is  done  using  the SBMPARMS  TAA  Tool.    See
SBMPARMS  for a complete  discussion.  This  function can  be used even
if the  program  does not  have  any files  to  be overridden  or  when
creating a non-program object.

Unlike SBMPARMS,  SBMPDMOVR is limited to  PDM (the Programmer  Menu is
not supported)l.

An  option also  allows you  to  implicitly specify  REPLACE(*NO) which
will cause a  program object to  be deleted before  the create  command
is submitted  to batch.   See the later  discussion for how  to achieve

Use with PDM

PDM allows  an entry of a  user specified option.  When  the 'Work with
Members  using PDM'  display occurs, you  can use  the special function
keys to create your own option.

You must  first consider  where you  want to  place the  options.   The
default is  the QAUOOPT file in QGPL.   You can see  which options file
is  being used by specifying F18 'Change  defaults' from the 'Work with
Members Using PDM' display.

If you do not want  to use the default  file, you must create your  own
file.   A typical solution  would be to use  CPYF from file  QAUOOPT in
QGPL to  the same file name in  your library and specify CRTFILE(*YES).
Then use the 'Change Defaults' display  and modify the library for  the

After you  have selected  which file  to use, the  'Work With  Members'
display should  appear.  You  can use the  F16 key for  'User Options'.
This  will  display the  'Work with  User-Defined Options'  display and
you will see  the existing options.   To create  a new option,  specify

A display  will appear  named 'Create User-Defined  Options'.   You can
enter  a  2   character  ID  for  the  option.    You  may  choose  any
characters, but a typical entry  would be 'CO' (Create with  Override).
The command  you key  in should  be as  follows (the SBMPDMOVR  command
has already been created).


Be sure you put apostrophes around the JOBD value.

The variable  names (like &L) are used by  PDM to determine what should
be mapped into the command.

The job  description value  is passed  from  PDM.   It can  be  changed
using F18 (Change defaults).

The CO option can  be entered for any create.   It does not have  to be
a  program object  nor does a  file used  in the  program have  to have
overrides.   This  allows you to  consistently enter CO  instead of the
standard 14 entry to compile.

Batch program

The  TAASRCOC2 program  operates  in  batch.   It  calls  the  TAASRCOR
program  to determine  if  overrides exist  for  the program.   If  so,
OVRDBF commands are issued.

The  program then  calls the  TAASRCDC2 program (part  of the  TAA Tool
SBMPARMS tool)  to determine  if the  special form  of PARMS  statement
exists.    If  the  PARMS  statement   exists,  the  program  adds  the
parameters to  the CRT command.   The CRT command is  sent as a request
message to  the  external  message  queue  and  the  TAASRCDC2  program
transfers control to QCMD.

CRTPDMOVR Command                                      *CMD

The  CRTPDMOVR  command   creates  the  file  (PDMOVRP)  used   by  the
SBMPDMOVR tool in a named library.

   LIB           The library to create the files in.

   SRCLIB        The source  library to use for the  QATTDDS file.  The
                 default  is *TAAARC which  means to use  the source in
                 the TAA Archive.

SBMPDMOVR Command                                      *CMD

The SBMPDMOVR command is the command to be used as a PDM option.

   SRCFILE       The source file name.

   SRCLIB        The source file library name.

   MBR           The source file member name.

   OBJLIB        The object library to create the object in.

   MBRTYPE       The source member type.

   JOBD          The job description to be used.

REPLACE(*NO) option

In  the   i5/OS  environment,   the  CRTxxxPGM   commands  default   to
REPLACE(*YES).   This is a desirable default  when replacing production
programs.   However,  when in  a development mode,  the default  can be
very undesirable.

For example, if the  CRT command fails, the  programmer may not  notice
the failure  and call  the program.   This will  result in  calling the
old  version of the  program and the  programmer may waste  time before
he realizes what  has happened.   A  similar problem can  occur if  the
programmer calls the  program before it  has finished the  create step.

To  provide  a solution,  the  CL program  that  operates interactively
(the  CPP  for SBMPDMOVR),  checks  for the  existence  of a  data area
named SBMPDMOVR.    If it  exists  on the  library list,  the  existing
object will be deleted before the batch program is submitted.

To  make the  function operate  as REPLACE(*NO),  create  the following
data area in a library on your library list:

                   TEXT('Used by SBMPDMOVR to determine REPLACE(*NO)')

If   a   S/38   environment   CRTxxxPGM   command   is   executed,  the
REPLACE(*YES) option does not apply.  The program will be deleted.


  **   The F4  key  for prompting  for  additional parameters  for  the
       CRTxxx  commands  is  not  supported   when  a  user  option  is
       specified in  PDM.  However, you can  use the function described
       earlier to store the command parameters in the source.

  **   Only data  base  files can  be  overridden.   Other  file  types
       (such as Display files) cannot be overridden.


The following TAA Tools must be on your system:

      PMTOPR       Prompt operator
      SBMPARMS     Submit parms in source
      SNDCOMPMSG   Send completion message
      SNDESCMSG    Send escape message
      SNDSTSMSG    Send status message
      TAAARC       TAA Archive


The tool  is ready  to use,  but the  file needed must  be created  and
data entered into it for each program and file.

The file (PDMOVRP) used by SBMPDMOVR must be created:

           CRTPDMOVR   LIB(xxxx)

This file  will contain one record for each  program/file that needs to
be  overridden.   To maintain  this file,  a DFU  program may  be used.
The standard  DFU defaults  may be  taken for  the fields.   You  could
consider writing your own program to maintain the PDMOVRP file.

See the next section on how to enter data into the file.

See the  earlier discussion about to  create the user option  needed to
operate from PDM.

See  the earlier discussion about how to  create a data area to provide
the REPLACE(*NO) function for program re-creates.

Entering data into PDMOVRP

This file is created by the CRTPDMOVR command.

The tool  assumes that you  will use  DFU to  maintain the  file.   One
record  is  required for  each  file  within  a  program that  must  be
overridden.   For  example, if you  want to  make the same  override in
multiple programs, you must enter a  record for each program that  uses
the file.

The following fields are supported:

   PGM           The  program   name  that  contains   a  file   to  be
                 overridden.  This is the key to the file.

   FILE          The file name in the program to be overridden.

   TOFILE        The TOFILE name for the OVRDBF command.

   TOLIB         The library  name to be used for  the TOFILE parameter
                 on  the OVRDBF command.   If the  name is blank, *LIBL
                 will be assumed.

Compilation listing considerations

The compilers will print the file  name used in the program as  well as
the file found by the override.

DSPPGMREF considerations

The  Display Program  references  function will  show  the object  name
used  by  the program  as  the name  specified  on the  TOFILE  for the
override.  The program name will also be described if it differs.

Objects used by the tool

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

   SBMPDMOVR     *CMD                      TAASRCO        QATTCMD
   CRTPDMOVR     *CMD                      TAASRCO3       QATTCMD
   TAASRCOP      *FILE         PF          TAASRCOP       QATTDDS
   TAASRCOC      *PGM          CLP         TAASRCOC       QATTCL
   TAASRCOC2     *PGM          CLP         TAASRCOC2      QATTCL
   TAASRCOC3     *PGM          CLP         TAASRCOC3      QATTCL
   TAASRCOR      *PGM          RPG         TAASRCOR       QATTRPG

The TAASRCOP file is used as  a model file to create the PDMOVRP  file.

The SBMPDMOVR data  area is created by  you (if needed) to  achieve the
REPLACE(*NO)  function  for  program  re-creates.    See  the  previous


     TAASRCOC3   CL pgm

   SBMPDMOVR is the command specified for the PDM user option
     TAASRCOC    CL (Command processing program for SBMPDMOVR)
       It submits TAASRCOC2 which calls TAASRCOR and TAASRCDC2

Added to TAA Productivity tools April 1, 1995

Home Page Up to Top