MPE/iX System Utilities Reference Manual (32650-90882)

190 Chapter22
SOMPATCH
possibly modified file and start over with a backup. If no backup is available, redo all
patches on the possibly modified input file. (This may cause the oval/verify option on the
modify command to generate false error messages). As long as the ypatch file was used, all
old patches can be backed out.
Output File
The user can optionally specify an output list file containing all patch instructions issued,
any error messages, and any displays. This is saved as a permanent disk file, unless
overridden by a user-specified file equation.
The SOMPATCH utility writes to the primary file all patches that did not contain errors. If a
patch has several modify instructions, or the count is greater than one for one modify, and
one or more generated errors, none of the modifies for that patch are applied. Patches are
broken up by LOG commands.
JCW Handling
The SOMPATCH utility sets two JCWs: the system JCW and a private JCW, PATCHJCW.
PATCHJCW is set as follows:
No error -- value of 0
Nonfatal error -- value of 1
Fatal error -- value of 2
Really fatal -- value of 3 (Program will gracefully abort.)
Under these error conditions, the SOMPATCH utility also sets the system JCW to the
standard MPE values, OKAY, WARN, and FATAL.
Preparation for Use
Patching modifies object code when a problem cannot be easily or conveniently fixed in
source code. The SOMPATCH utility is used to fix a software problem without recompiling or
relinking. A patch is usually developed using the symbolic debugger, with the patch applier
using the SOMPATCH utility to permanently install a modification in the defective software.
You should link in one of two available ypatch files when you build the product that you
are patching. Which one you link depends on how much the product is patched.
When linking a single-SOM library, or a program file, specify the ypatch file you want to
use at the end of the source object files for the user's executable SOM. For example:
link>LINK from=mysomfile,ypatch4.lib.sys; to=myprogfile
When linking a multi-SOM library, specify the desired ypatch file at the end of the source
object files for each SOM. For example:
link>LINK from=mymod1,mymod2,mymod3,ypatch4.lib.sys; to=myint1
link>LINK from=mymod4,mymod5,mymod6,ypatch4.lib.sys; to=myint2
link>BUILDXL mynl
link>LINK from=myint1,myint2; to=mynl
HP product files should contain a minimum of 300 bytes of storage for each anticipated
patch. Refer to "Error Handling" in this chapter for information of how to handle errors
when this storage area overflows.