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

Chapter 22
SOMPATCH
178
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 users 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.