Generate Recover and Bind Statements for Freed Packages

If a package is accidentally freed, use the DDL Activity Report to generate recover and bind statements for the freed package.
Information about packages is stored in several Db2 catalogs and directories. A package becomes invalid when any objects that the packages depend on are altered or dropped. When a package becomes invalid, Db2 retains the information about the package. To reduce the size of the Db2 directory and catalog, you can use DSN sub-command FREE PACKAGE to delete invalid or unused packages.
If you accidentally freed a package that is needed by application programs, you can use the DDL Activity Report to generate a BIND PACKAGE statement that has all the BIND/REBIND statements necessary to bind the freed package to the same state and the statements to rebind the plans which contained the freed packages.
  1. Follow these steps:
  2. Select
    Process Log
    from the CA Log Analyzer for DB2 for z/OS Main Menu.
    The
    Process Log - Report Specification
    panel (LAPRM) opens.
  3. Select
    DDL Activity
    and press
    Enter
    .
    The
    DDL Activity Report Options
    panel (LAPRDDL) opens.
  4. Complete the following fields:
    1. Specify
      U
      (to create UNDO DDL) in the
      Output Format
      field.
    2. Specify
      D
      (Detail) in the
      Level of Detail
      field.
    3. (Optional) Specify
      I
      (Include) in the
      Primary Authids
      field under
      Log Data Filter
      Options
      and enter the authorization ID of the person or process that freed the package.
    4. Specify
      X
      (Exclude) in the
      Grant/Revoke
      field to exclude records that are related to Grants and Revokes.
    5. Specify
      O
      (Only) in the
      Bind /Rebind
      field to exclude all except Bind and Rebind records.
    6. (Optional) Use other
      Miscellaneous Options
      to include or exclude other types of data from the DDL report.
  5. Press
    PF3
    until the
    Report Source Specification
    panel (LAPRLRNG) appears.
  6. Specify the approximate time range of when the package was freed in the
    Log Processing Range
    section.
  7. Press
    PF3
    (End).
    The
    Output Specification
    panel (LAPOS14) appears.
  8. Specify a data set name for the BIND statements in the
    Dataset Name
  9. Press
    PF3
    until the
    Report Submission Screen
    panel (LAPREPEX) opens.
  10. Specify
    B
    or
    O
    in
    Execution Mode
    and press
    Enter.
    CA Log Analyzer for DB2 for z/OS generates the BIND/REBIND statements based on the specified execution mode and saves to the specified destination.