TAA Tools
SQZPGMSIZ       SQUEEZE PROGRAM SIZE                   TAAPGMI

The Squeeze  Program Size  command allows  you to squeeze  the size  of
programs by doing the following:

  **   Remove the CL source that is stored in CL object programs

         --   Prevents RTVCLSRC from functioning

  **   Compress observability

         --   No  loss  of debug  function  (somewhat  slower to  start
              debug)

  **   Delete observability

         --   Loss of debug function

The  typical command  to squeeze a  library by removing  CL source from
the object programs and compressing observability would be:

        SQZPGMSIZ   LIB(xxx) ALWRTVCL(*NO) OBSERVE(*COMPRESS)

If you are the  owner of all the programs  in the library, you can  use
SQZPGMSIZ.

If  you are  not  the owner,  you  must have  *ALLOBJ  authority.   The
program name will remain the same.

The  CHGPGM  command  will let  you  compress  or  remove observability
without re-creating the program.   It has  no impact on the  retrieving
of  CL source.    You can  use  it directly  or  the SQZPGMSIZ  command
without changing  the CL source retrieval option.   The typical command
to squeeze a library by just compressing observability would be:

        SQZPGMSIZ   LIB(xxx) ALWRTVCL(*SAME) OBSERVE(*COMPRESS)

The companion  command  is DSQPGMSIZ  (De-Squeeze  Program Size).    It
will cause all  programs to be  re-created (whether they are  CLP types
or  not) and  makes the programs  observable.   It is  a way  to 'bring
back'  observability.    You get  to  control whether  the  CL programs
should  be created  with  CL  source  included  or not.    The  typical
command to 'bring  back' observability and create all  CL programs with
CL source included would be:

        DSQPGMSIZ   LIB(xxx) ALWRTVCL(*YES)

After  the programs are created with  observability, you can use either
CHGPGM or SQZPGMSIZ to compress the observability.

When either  SQZPGMSIZ  or DSQPGMSIZ  is  used,  a report  is  prepared
listing each program with  its old and new size.  A  total is shown and
the  storage difference  and percentage  change.   If any  error occurs
(e.g.  the  source member does not  exist), it is  noted on the  report
and the command will send an escape message.

Programs  that are  successfully  compiled  have the  compiler  listing
automatically deleted.

Program structure
-----------------

When  you create  a  program, the  conceptual  view is  (the  CL source
piece is only applicable to CL programs):

             **********************
             *                    *       CPROBJ
             *    Object code     *     can compress
             *                    *
             **********************
             *                    *       CPROBJ
             *                    *    can compress
             *  Program template  *
             *   (observability)  *       CHGPGM
             *                    *     can delete
             **********************
             *                    *      CRTCLPGM
             *     CL source      *    ALWRTVSRC option
             *                    *   controls existence
             **********************

The  program object code is what the  system executes when a program is
run.   The  object  code can  be  compressed  by CPROBJ,  but  will  be
automatically  decompressed if  you  use the  program.   The  SQZPGMSIZ
command does not operate on the object code.

If  an object  is  compressed, it  is automatically  de-compressed when
you use it.   Some object types  are temporarily de-compressed (at  the
next  IPL they  will  still be  compressed),  but  program objects  are
always permanently de-compressed.

The 'program  template' is an intermediate form  of object code that is
produced by the compilers and acts  as input to the 'translator'  which
creates the object  code.  The  'program template' is  externally known
as  'observability' because it  allows the  program to  be 'observable'
or 'debug capable'.

The  CHGPGM  command can  be used  to 're-translate'  a program  if the
'program template'  still exists.   This can  be used  to change a  few
options  like USRPRF and  USEADPAUT without  using the  original source
of the program.

The  CHGPGM command can also be used  to remove the 'program template'.
If you remove it, you save space, but you lose the following:

  **   The ability to debug any program.

  **   The formatted dump of variables  of any program.  You can  still
       get a  formatted dump  and DMPCLPGM  still works,  but the  only
       thing  you  get  is  the  program  message  queue  and  not  the
       important information  of  what was  in  your variables  at  the
       time the dump occurred.

  **   The ability of the  CL compiler to pinpoint the  error.  Instead
       of  saying 'You  blew up at  statement 6500'  it would  say 'You
       blew up a statement *N'.

  **   The  ability  of the  program to  display the  current statement
       number when the DSPJOB Program Stack option is used.

  **   The ability  to  use  CHGPGM to  re-create  the program  if  you
       wanted to change an attribute like USRPRF or USEADPAUT.

  **   The ability  for the system  to re-translate your program.   the
       system   to   re-translate  your   program.     This   was  done
       automatically when  S/38 users  restored object  programs to  an
       i5 System.   They did not have  to recompile from source  if the
       'program template' was still in existence.

CL Source stored with the program object
----------------------------------------

The  CRTCLPGM command  supports the  ALWRTVCL parameter  which controls
whether the source is stored with  the object program.  The default  is
*YES which  allows the RTVCLSRC  command to function  if you ever  need
to retrieve the source.

Comments  are  never  stored with  the  source  and  are therefore  not
retrievable.   If RTVCLSRC  is used, a  standard format is  used.  This
is probably not  the way you keyed  the source statements (it  does not
look as if it has been prompted for).

Because of  the loss of  comments and different formatting,  relying on
RTVCLSRC  is not  necessarily a  good thing.   In addition,  you always
run the  risk of  damage or  accidental deletion  of your  program.   A
better solution is available with the Source Archive TAA Tool.

The only  way to  change the  ALWRTVSRC attribute  is to re-create  the
program from source.

What should you do if you want to save space
--------------------------------------------

If  you do not need  to rely on  RTVCLSRC to be able  to re-create from
source, you can  remove the  CL source and  compress the  observability
with the command:

        SQZPGMSIZ   LIB(xxx) ALWRTVCL(*NO) OBSERVE(*COMPRESS)

You do not give up any debug function with this approach.

Users  who develop  'packages'  often  want to  delete  'observability'
because it  significantly reduces the size of the  program and makes it
much more difficult to 'steal' the logic of the program.

SQZPGMSIZ (Squeeze Program Size) Command              *CMD
----------------------------------------

The  SQZPGMSIZ  command  will  squeeze the  size  of  the  programs you
specify.   It  can  re-create  CL  programs from  the  original  source
member and  allow you to change the  option to retain CL  source in the
object  program.   It will  use the  CHGPGM or  CPROBJ commands  on all
programs (not just CL) if requested.

A program  is not re-created  unless there  is a  need to  do so  (i.e.
the  CL  source exists  and  has  been  requested  to be  removed,  the
program is decompressed and has been requested to be compressed).

The command parameters are:

   LIB           The library that you want squeezed.

   ALWRTVCL      Allow  RTVCLSRC  to be  used  on a  CL  program.   The
                 option is  ignored for  non-CLP  programs.   You  must
                 specify a value.  The options are:

   ALWRTVCL      *SAME.  The  program is not re-created.   The previous
                 setting is retained.

                 *YES  means a CL  program will  be re-created  and the
                 source will be stored with the program object.

                 *NO  means  a CL  program will  be re-created  and the
                 source will not be stored with the object.

   OBSERVE       The   action    to    perform   on    the    program's
                 observability.    The  default  is  *COMPRESS.    This
                 causes   the   CPROBJ  command   with   the  parameter
                 PGMOPT(*OBS) to  be  used.   No  error occurs  if  the
                 observability  does   not  exist  or  it   is  already
                 compressed.

                 *DELETE.   This causes  the CHGPGM command  to be used
                 with  RMVOBS(*ALL).      No  error   occurs   if   the
                 observability does not exist or is compressed.

                 *SAME.    This  does  not  cause  any  action  on  the
                 observable information.   You cannot  specify *SAME if
                 ALWRTVCL(*SAME)  is also used (you  are not asking for
                 any work to be performed).

   PGM           The program to be  squeezed.  The default is  for *ALL
                 programs  in  the library  you  specified  in the  LIB
                 parameter  to be squeezed.  A  specific program may be
                 named or a generic name.

DSQPGMSIZ (De-Squeeze Program Size) Command           *CMD
-------------------------------------------

DSQPGMSIZ will  attempt  to re-create  all  programs you  specify  (not
just CL  programs) from the original  source member.  The  programs are
always  created   with  observability  (full  debug  function).    This
provides a way to 'bring back'  observability for many programs with  a
single command.

All program objects are attempted to be re-created.

The command parameters are:

   LIB           The library that you want de-squeezed.

   ALWRTVCL      Allow  RTVCLSRC to  be  used on  a  CL program.    The
                 option  is ignored  for  non-CLP programs.    You must
                 specify a value.  The options are:

                 *SAME.   The  program is re-created  with the previous
                 setting.

                 *YES means  a CL  program will be  re-created and  the
                 source will be stored with the program object.

                 *NO  means a  CL program  will be  re-created  and the
                 source will not be stored with the object.

   PGM           The  program to  be de-squeezed.   The default  is for
                 *ALL programs  in the  library  you specified  in  the
                 LIB parameter to  be de-squeezed.  A  specific program
                 may be named or a generic name.

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

To change  a program requires special authority.   You must have object
management and  use  authority.    To  change  a  program  that  adopts
authority, you must be the owner or have *ALLOBJ authority.

To  recreate  a  program  you  do  not   own,  you  must  have  *ALLOBJ
authority.

ILE programs are not supported.

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

The following TAA Tools must be on your system:

     ALCTMPMBR    Allocate temporary member
     CHKALLOBJ    Check all object authority
     RPLPGM       Replace program
     RTVPGMA      Retrieve program attributes
     RTVSYSVAL3   Retrieve system value 3
     SNDCOMPMSG   Send completion message
     SNDESCMSG    Send escape message
     SNDSTSMSG    Send status message

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

None, the tool is ready to use.

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

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

   SQZPGMSIZ     *CMD                       TAAPGMI       QATTCMD
   DSQPGMSIZ     *CMD                       TAAPGMI2      QATTCMD
   TAAPGMIC      *PGM           CLP         TAAPGMIC      QATTCL
   TAAPGMIC2     *PGM           CLP         TAAPGMIC2     QATTCL
   TAAPGMIR      *PGM           RPG         TAAPGMIR      QATTRPG
   TAAPGMIR2     *PGM           RPG         TAAPGMIR2     QATTRPG

Structure
---------

SQZPGMSIZ command
    TAAPGMIC   CLP
      TAAPGMIR    RPG

DSQPGMSIZ command
    TAAPGMIC2  CLP
      TAAPGMIR2   RPG
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top