TAA Tools
CHGBIGPARM      CHANGE BIG PARAMETER                   TAATMPA

The Change  Big Parameter command  is designed to  allow you to  submit
multiple 2000  byte variables into batch.   SBMJOB supports 3000 bytes.
CHGBIGPARM allows essentially an unlimited value.

A  data base file is used to pass the  large parameter.  The key to the
file by default is the qualified  job name, but you may use  any unique
32 byte value.

A qualified  job name is  26 characters.   The extra 6 bytes  allow you
to  have  multiple 2000  byte  values passed  to  the batch  job.   The
number of bytes that one job  can submit for another job is  unlimited.

The following examples  show an interactive job  passing big parameters
to a batch job.  Any type of job could use the same function.

A typical use would be as follows:

  **   Interactively,  you would use  CHGBIGPARM to enter  the data and
       receive back  the  key assigned  by  default.   Then  you  would
       enter submit job and pass the key into batch as a parameter.

         DCL             &DATA *CHAR LEN(2000)
         DCL             &QLFJOB *CHAR LEN(32)
          .
         CHGVAR          &DATA 'Just enter a long string ....')
         CHGBIGPARM      DATA(&DATA) RTNJOB(&QLFJOB)
         SBMJOB          CMD((CALL xxxx) PARM(&QLFJOB))

       The value  for the  DATA parameter  would be stored  in a  file.
       The  key  assigned  would  be  the  qualified job  name  of  the
       current  job.   It is  returned in  the RTNJOB  return variable.
       The key  value is submitted  as a parameter  which will be  used
       in batch to retrieve the data.

  **   In batch, you would specify:

         PGM             PARM(&QLFJOB)
         DCL             &QLFJOB *CHAR LEN(32)
         DCL             &DATA *CHAR LEN(2000)
          .
         RTVBIGPARM      KEY(&QLFJOB) RTNDATA(&DATA)

Assume you want  to pass 4000 bytes  to a batch program.   You can only
enter  2000 bytes on  each use of CHGBIGPARM/RTVBIGPARM.   However, you
can use the  commands multiple  times as  long as you  assign a  unique
key.  A  typical method of assigning a  unique key would be to  use the
qualified  job number  and concatenate a  number to  it.   For example,
you could use the  qualified job number for  the first 2000 byte  value
and (&QLFJOB *TCAT '2') for the second etc.

  **   Interactively, you  would use CHGBIGPARM  to enter the  data and
       receive  back  the  key  assigned  by  default.    The  returned
       qualified  job name  is than used  with concatenation  to make a
       unique key for  the second  use of CHGBIGPARM.   Then you  would
       enter submit job  and pass the qualified job  name into batch as
       a parameter.

         DCL             &DATA *CHAR LEN(2000)
         DCL             &QLFJOB *CHAR LEN(32)
         DCL             &NEWKEY *CHAR LEN(32)
          .
         CHGVAR          &DATA 'Just enter a long string ....')
         CHGBIGPARM      DATA(&DATA) RTNJOB(&QLFJOB)
         CHGVAR          &DATA 'Here is the 2nd 2000 byte chunk ...')
         CHGVAR          &NEWKEY (&QLFJOB *TCAT '2')
         CHGBIGPARM      DATA(&DATA) RTNJOB(&QLFJOB) KEY(&NEWKEY)
         SBMJOB          CMD((CALL xxxx) PARM(&QLFJOB))

       After  the  first  use  of  CHGBIGPARM,  the  &QLFJOB  parameter
       contains the qualified  job name.   A new key  is created  using
       the  qualified job  name and  concatenating  a '2'  to the  end.
       Note  that  the  second  use  of  CHGBIGPARM specifies  the  KEY
       parameter rather than taking  the default of *JOB.   On the  2nd
       CHGBIGPARM command, you  must specify the RTNJOB  parameter even
       though the value is not needed.

  **   In batch, you would specify:

         PGM             PARM(&QLFJOB)
         DCL             &QLFJOB *CHAR LEN(32)
         DCL             &NEWKEY *CHAR LEN(32)
         DCL             &DATA *CHAR LEN(2000)
          .
         RTVBIGPARM      KEY(&QLFJOB) RTNDATA(&DATA)
                         /* Do something with the first 2000 bytes */
         CHGVAR          &NEWKEY (&QLFJOB *TCAT '2')
         RTVBIGPARM      KEY(&NEWKEY) RTNDATA(&DATA)
                         /* Do something with the 2nd 2000 bytes */

       Note  the  first  use  of  RTVBIGPARM uses  the  qualified  name
       passed  as a  parameter.  The  second use  uses the concatenated
       name.   The  same technique  could be  used  to pass  additional
       2000 byte areas.

The data  is placed as  a record in the  BIGPARM file in  TAATOOL.  The
file  is cleaned  up by  the CLNTAATEMP  command.   This should  be run
periodically.  The  file is created with  REUSEDLT(*YES).  Each  record
is  written to  the file  with a  date.   The  CLNTAATEMP command  will
delete any records that are older than two days.

If  you specify CHGBIGPARM  again with the  same key value,  the record
is updated.

The BIGPARM file in TAATOOL is  created with the public excluded.   The
tool must be created  by a user with Security Officer  authority.  When
the   command  processing  programs   run,  they  adopt   their  owners
authority  so that  any user  may use  the CHGBIGPARM tool,  but cannot
access the file outside of the provided commands.

The  commands   and   programs  are   authorized  by   the   TAACHGBIGP
authorization list.   A  user must  be authorized to  this list  to use
the tool.

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

   DATA          The  data to be  made available to  the batch program.
                 Up to 2000 bytes may exist.

   RTNJOB        The qualified job  name of the current  job.  It  must
                 be  declared as  *CHAR LEN(32).   The  intent of  this
                 parameter is  to make it simple to  have a unique name
                 you can use as a parameter  to pass into batch to  use
                 as a key to  retrieve the data that was  stored.  This
                 is a  required parameter on  each use of  the command.

   KEY           The  key assigned  to the data.   The  default is *JOB
                 meaning  to use  the  qualified  job name.    You  can
                 assign your own  key.  It should be  declared as *CHAR
                 LEN(32).   The typical  use of assigning  your own key
                 would be  if  you  had  more than  2000  bytes  to  be
                 passed (See the previous example).

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

   KEY           The  key   that  you  assigned   for  the   data  when
                 CHGBIGPARM was  used.  It should  be declared as *CHAR
                 LEN(32).

   RTNDATA       The data to  be returned  based on  the key  assigned.
                 The parameter must be declared as *CHAR LEN(2000).

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

  **   The commands  use  return variables  and therefore  can only  be
       used in a CL program.

  **   The  BIGPARM file in  TAATOOL must  be periodically  cleaned out
       using the CLNTAATEMP command.

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

You  must be the  Security Officer or  a member of  his group to create
the CHGBIGPARM tool.

The following TAA Tools must be on your system:

          SNDESCMSG    Send escape message

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

The tool  is ready  to use,  but the  user  must be  authorized to  the
TAACHGBIGP authorization list.

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

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

   CHGBIGPARM    *CMD                       TAATMPA       QATTCMD
   RTVBIGPARM    *CMD                       TAATMPA2      QATTCMD
   TAATMPAC      *PGM           CLP         TAATMPAC      QATTCL
   TAATMPAC2     *PGM           CLP         TAATMPAC2     QATTCL
   TAATMPAR      *PGM           RPG         TAATMPAR      QATTRPG
   TAATMPAP      *FILE          PF          TAATMPAP      QATTDDS

Structure
---------

CHGBIGPARM
   TAATMPAC   CL pgm
      TAATMPAR   RPG pgm
         TAATMPAP   Physical file

RTVBIGPARM
   TAATMPAC2  CL pgm
      TAATMPAR   RPG pgm
         TAATMPAP  Physical file

Note that the same RPG program is used by both commands.
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top