Google
 

Trailing-Edge - PDP-10 Archives - BB-L054E-RK - pep.plm
There are no other files named pep.plm in the archive.


                        PEP Program Logic Manual

                             Eric S. Bloom

                                8-Jun-82











                               CHAPTER 1

                              INTRODUCTION



     PEP is the user interface program to  Autopatch.   PEP  stands  for
Patch Executive Program.

     PEP is written in BLISS 36, for TOPS-10 and  TOPS-20.   The  source
code  is the same for both systems.  The Galaxy library, GLXLIB, is used
for command parsing and file I/O.

     PEP is maintained on system KL2137::BASIC:<PEP>.

     PEP is actually two programs, PEP and PEPB.

     PEP is the user interface to Autopatch.  This is the  program  that
the  user  runs  in  order  to  Autopatch his software.  PEP maintains a
database file, called PEPCKP.PDB, which keeps track of all the  products
being  patched,  and  the  state  of  each  patch  to each product.  The
database file is re-written after any information is  updated.   If  the
system crashes during any part of Autopatching, the user simply needs to
re-issue the last command that was executing when  the  system  crashed.
PEP will read the database and know where to pick up.

     PEPB is the batch component of the Autopatching Exec.  It  runs  as
part  of  the  control  file  that  applies  the patches and rebuilds an
autopatchable product.  PEPB can access the  database  file  created  by
PEP.   It  therefore  can determine the status, files, and logical names
associated with each autopatchable product.  PEPB is run to perform  the
initialization  required  by the batch job.  During this initialization,
logical names are defined and the required files are verified.  PEPB  is
also  run at the termination of the batch job.  At this time it writes a
status file (to be read by PEP) containing information about the results
of the batch job.











                               CHAPTER 2

                        FILES USED TO BUILD PEP



2.1  FILES FOR PEP

2.1.1  Library And Require Files


     1.  APEX.R36 contains data  structure  definitions,  literals,  and
         some macros.

     2.  DEBUG.R36 defines the $TRACE macro used in debugging PEP.

     3.  FILES.10 contains the filenames and logical names  for  PEP  on
         TOPS-10.

     4.  FILES.20 contains the filenames and logical names  for  PEP  on
         TOPS-20.

     5.  FILES.REQ is always a copy of FILES.10 or  FILES.20,  depending
         on which operating system is being used.




2.1.2  Source Files


     1.  APXBAT.B36 is the main module for PEPB.  It is not  needed  for
         PEP.

     2.  APXCHK.B36 has routines that check the various files needed  in
         the Autopatching process.

     3.  APXCKP.B36 contains the database checkpointing routines.

     4.  APXCMD.B36 contains routines for parsing  interactive  commands
         and data read from a file.

     5.  APXERR.B36 contains the error messages.
FILES USED TO BUILD PEP                                         Page 2-2


     6.  APXFIL.B36 contains various file handling routines.

     7.  APXINI.B36 is the main module for PEP.  It is  not  needed  for
         PEPB.

     8.  APXPAT.B36 contains  routines  for  manipulating  patches.   It
         generates the command files that MAKLIB or UPDATE reads.

     9.  APXPSI.B36 contains product specific routines  to  be  executed
         when the product is SELECTed.

    10.  APXTBL.B36 contains routines to  lookup  and  enter  data  into
         tables.

    11.  APXVER.MAC is the global edit history for  PEP  and  PEPB.   It
         also defines the version number.




2.2  GLXLIB

2.2.1  Library And Require Files


     1.  BLSGLX.R36 contains data structures for the  I/O  interface  to
         GLXLIB.

     2.  BLSPAR.R36  contains  definitions  for  the   command   parsing
         interface to GLXLIB.




2.2.2  Source Files


     1.  BLSGLX.B36 is the interface between  the  BLISS  code  and  the
         GLXLIB routines.

     2.  BLSPAR.B36 is the interface between  the  BLISS  code  and  the
         parsing routines.

     3.  GLXEXT.MAC contains additional GLXLIB routines.

     4.  OPRPAR.REL contains the parsing routines.












                               CHAPTER 3

                            DATA STRUCTURES



     Module APEX.R36 contains the definitions of all the data structures
and constants used.











                               CHAPTER 4

                             MODULE APXBAT




     1.  PEPB  is  the  main  routine.    It   performs   the   required
         initialization of the GLXLIB object time system.  It then reads
         the patch database (PEPCKP.PDB).  It enters an infinite loop to
         process commands.

     2.  COMMAND_DISPATCH is called by GET_COMMAND, which is  called  by
         PEPB.  It gets the values stored during parsing, and dispatches
         to another routine to execute the command given.

     3.  HELP gets help for PEPB commands.  It should never  be  called,
         since the batch control files don't need to ask for help.

     4.  INIT is called before the patch and rebuild of the product.  It
         verifies  that  the product has been SETUP by PEP, and that all
         the needed files are available.  It then displays the files and
         logical  names  that will be used, and the patches that will be
         applied.

     5.  SIGNAL_FAILURE writes 'BAD' in the batch communication file  so
         that PEP will know that the batch job failed.

     6.  SIGNAL_SUCCESS writes 'GOOD' in the batch communication file so
         that PEP will know that the batch job completed successfully.

     7.  WRITE_BCF writes the batch communication file.












                               CHAPTER 5

                             MODULE APXCHK




     1.  INS_INIT_FILES sets the status of files to be installed.

     2.  RES_INIT_FILES sets the status of files to be restored.

     3.  BACKUP does the backup part of INSTALL processing.  It  creates
         backup  copies of the library and component output files in the
         backup directory.

     4.  REPLACE does the  replace  part  of  INSTALL  processing.   The
         library   and   component   output  files  are  copied  to  the
         installation directory.

     5.  REVERT does part of the the RESTORE processing.  It copies  the
         library and component output files from the backup directory to
         the installation directory.

     6.  BCHECK checks the files required for patching and rebuilding.

     7.  ICHECK checks the files required to INSTALL a product.

     8.  RCHECK checks the files required to RESTORE a product.

     9.  SCHECK checks the files required to SELECT a product.

    10.  CK_BATCH checks the  batch  communication  file  and  sets  the
         status of the product accordingly.

    11.  UPDATE updates the status of patches that  have  been  applied.
         It  also  updates the FILE$$ descriptors of the files that were
         patched and rebuilt.












                               CHAPTER 6

                             MODULE APXCKP




     1.  DB_READ reads the checkpointed database file.

     2.  DB_WRITE writes a checkpoint database file.

     3.  RELOC

     4.  RELOCATE

     5.  SAVE_OBJ enters an object into the list of objects to be saved.












                               CHAPTER 7

                             MODULE APXCMD




     1.  GET_COMMAND gets a command, parses it,  and  then  invokes  any
         processing  associated  with the command.  The command can be a
         string already stored in memory, or it can be  input  from  the
         terminal.   A  syntax  tree must be supplied that describes the
         syntax for all valid commands.  This routine first invokes  the
         GALAXY  parser which parses the command using this syntax tree.
         Following a successful parse, a list of values corresponding to
         the various command parameters is available.  This routine then
         invokes a command processing routine  to  pick  up  the  parsed
         items and process them accordingly.

     2.  GET_YES_NO accepts a YES or NO response.

     3.  SET_LN accepts a logical name defintion.

     4.  READ_FILE reads and parses a file.  It works like GET_COMMAND.












                               CHAPTER 8

                             MODULE APXERR



     Modules APXERR contains the table of error messages.











                               CHAPTER 9

                             MODULE APXFIL




     1.  BUF_READ inputs a buffer of data from a file.

     2.  BUF_WRITE writes a buffer of data to a file.

     3.  CK_FILE checks the checksum and version of a file.

     4.  CKW_FILE checks that the specified file can be written.

     5.  SCK_FILE sees if a file exists.  It does not issue any errors.

     6.  CLOSE closes a file.

     7.  DEF_LN defines logical names for a product.  BAK:, INS:,  PAT:,
         DIS:, and ASL:  are defined.

     8.  DELETE deletes an unopened file.

     9.  DISPLAY_FILES displays the name, version, and checksum  of  the
         component output files for a product.

    10.  DISP_BUILD_FILES displays the name, version,  and  checksum  of
         the files needed to build a product.

    11.  DISP_NEW_FILES displays the name, version, and checksum of  the
         files  created  by  the  patch  and  build  control  file for a
         product.

    12.  DISP_FILE displays the name, version, and checksum of a file.

    13.  DISP_LN_DEFS  displays  the  logical   name   definitions   for
         Autopatch.

    14.  FILE_COPY copies a FILES$$ descriptor and the associated file.

    15.  F_COPY copies a file.

    16.  GET_BYTES reads a specified number of bytes from a file.
MODULE APXFIL                                                   Page 9-2


    17.  OPEN_I opens a file for input.

    18.  OPEN_O opens a file for output.

    19.  R_REL resets and releases a file.

    20.  UPD_FILE gets the version and checksum of a  file  and  updates
         the FILE$$ descriptor.












                               CHAPTER 10

                             MODULE APXINI




     1.  APEX is the main routine of PEP.  It enters an infinite loop to
         process commands.  First, it does the following initialization:

         1.  Init GLXLIB.

         2.  Make sure PEP isn't being re-started.

         3.  Get the logical name definition of PAT:.

         4.  Read the checkpointed database, if it can be found.

         5.  Build the Master Product list by  reading  the  master  PDF
             file.

         6.  Update utility file entries if UTILTY.UPD is around.

         7.  Build the master patch list.

         8.  Check the status of any batch jobs that may have completed.


     2.  COMMAND_DISPATCH is called by GET_COMMAND, which is  called  by
         APEX.  It gets the values stored during parsing, and dispatches
         to another routine to execute the command given.

     3.  AUTOPATCH does RETRIEVE, SETUP,  and  BUILD  processing  for  a
         product.

     4.  BUILD does BUILD processing for a product.

     5.  DESELECT deselects a product.

     6.  EXCLUDE is not implimented.

     7.  HELP gives help about PEP commands.

     8.  INCLUDE is not implimented.
MODULE APXINI                                                  Page 10-2


     9.  INSTALL installs a product.

    10.  RESTORE restores a product.

    11.  RETRIEVE reads any  new  patch  files  (.DPD)  and  enters  the
         patches  in  the  database.   RETRIEVE  reads  patches  for all
         selected products.

    12.  SELECT_ selects a product for Autopatching.  It  verifies  that
         the necessary components of the product are in place.

    13.  SETUP does SETUP processing.

    14.  STATUS gives information  about  a  product.   The  INFORMATION
         command calls STATUS.

    15.  SUMMARY gives  information  about  the  patches  applied  to  a
         product.

    16.  BUILD_MP_LIST is the command processing routine for the  master
         Product  Description  File (PDF).  It builds the master list of
         all known Autopatchable products.

    17.  SEL_BUILD is the command processing  routine  for  the  product
         specific  Product Description file (PDF).  It is used to select
         the product.

    18.  PAT_BUILD is the  command  processing  routine  for  the  patch
         directory file (DPD).  It is called by RETRIEVE.

    19.  UTL_UPDATE is the command processing routine  for  the  utility
         update   file  (UTILTY.UPD).   It  is  called  by  APEX  before
         interactive commands are accepted.

    20.  MP_ERROR handles errors from BUILD_MP_LIST and UTL_UPDATE.

    21.  SEL_ERROR handles errors from SEL_BUILD.

    22.  PAT_ERROR handles errors from PAT_BUILD.

    23.  DISP_PAT_LIST displays patches for a product.












                               CHAPTER 11

                             MODULE APXPAT




     1.  BLD_MAST_PAT_LIST returns a list of all patches for a product.

     2.  BLD_PAT_LIST  returns  a  list  of  selectable  patches  for  a
         product.

     3.  BLD_PROD_LIST  returns  a  list  of  products  that  are  at  a
         specified patch level.

     4.  CHANGE_PS changes the status of  all  patches  at  a  specified
         status, for a product.

     5.  DISP_PAT_LIST displays the status of all patches for a product.

     6.  DISP_SP_LIST displays all selected patches for a product.

     7.  GENCCL generates  an  indirect  command  file  for  patching  a
         product.

     8.  GEN_FIXCMD generates MAKLIB FIX file commands for FIX patches.

     9.  GEN_LIBCPY generates MAKLIB copy commands for REL patches.

    10.  GEN_REPCMD generates MAKLIB replace commands for REL patches.

    11.  GEN_SRCCMD generates UPDATE commands for SRC patches.

    12.  GEN_TRACE generates MAKLIB trace commands for REL patches.

    13.  GET_PAT_DIR returns a FILE$$ descriptor for the patch directory
         file for a specified patch tape number.

    14.  SEL_PAT sets the status of patches for a product to selected.












                               CHAPTER 12

                             MODULE APXPSI




     1.  PS_INIT determines if any product specific processing is needed
         for a product.  It is invoked after any product is SELECTed.

     2.  xxxxxx_INI does product specific processing for product xxxxxx.
         This is usually to find out which components of the product the
         user has.  For example, if the user is SELECTing  FORTRAN,  but
         does  not  have  DBMS,  the components for DBMS will have to be
         removed from PEP's internal database.












                               CHAPTER 13

                             MODULE APXTBL




     1.  GET_VALUE gets the value of an item in a table.

     2.  GET_KEY gets the key field of a specified item in a table.

     3.  T_DELETE deletes an entry in a table.

     4.  T_ENTER enters an item into a table.

     5.  T_LOOKUP looks up an entry in a table.

     6.  A_LOOKUP looks up an address in the address field of a table.

     7.  A_ENTER enters an address and a value.












                               CHAPTER 14

                             MODULE APXVER



     APXVER contains the global edit history for PEP and PEPB,  and  the
version  number.   The  version number should always be same for PEP and
PEPB.











                               CHAPTER 15

                             MODULE BLSGLX














                               CHAPTER 16

                             MODULE BLSPAR














                               CHAPTER 17

                             MODULE GLXEXT