zap To modify, usually to correct; especially used when the action is performed with a debugger or binary patching tool.  Also implies surgical precision. "Zap the debug level to 6 and run it again."  In the IBM mainframe world, binary patches are applied to programs or to the operating system with a program called superzap, whose file name is "IMASPZAP" (possibly an acronym contrived from I M A SuPerZAP).

(definition from an Internet dictionary)

IMASPZAP (or, more correctly, AMASPZAP, as IMASPZAP is actually an alias for the load module stored under the name AMASPZAP) is the IBM supplied utility for applying patches to object modules.  The load module resides in SYS1.LINKLIB and is installed during System Generation.

IMASPZAP frequently drives auditors into a frenzy, because it may be used to indiscriminately alter instructions in load modules without leaving any audit trail.  However, the functions it provides to the toolbox of the system programmer are irreplaceable and the load module for the utility generally resides in some (or several) library on any IBM system, regardless of the dictates of whatever team of auditors recently paraded through the installation.  



The functions provided by IMASPZAP are:

  1. Inspect and modify instructions and data in any load module that exists as a member of a partitioned dataset.

  2. Inspect and modify data in a specific data record that exists in a direct access dataset.

  3. Dump an entire Direct Access dataset, a specific member of a partitioned dataset, or any portion of a dataset on a Direct Access device.

  4. Update the System Status Information (SSI) in the directory entry for a load module.

  5. Updates the IMASPZAP CSECT Identification Record (IDR) in the load module.


Control Statements

Control statements are used to control the functions of IMASPZAP.  They are read from SYSIN, or from the MVS Operator's console if a CONSOLE control statement is included in the SYSIN input.  The acceptable control statements are:

Keyword Parameter 1 Parameter 2 Function
NAME member name csect name identifies a CSECT
VERIFY offset in hex data in hex inspects data
REP offset in hex data in hex modifies data
SETSSI data (4 bytes) updates SSI information
IDRDATA data (8 bytes) supplies IDR data
DUMP member name csect name or ALL dumps CSECT(s)

----- same parameters as DUMP -----

translated DUMP
CCHHR disk address in hex identifies a record
ABSDUMP start CCHHR stop CCHHR dumps data record(s)
or ALL
or member name

----- same parameters as DUMP -----

translated ABSDUMP
BASE offset in hex specifies CSECT start
CONSOLE accept input from console
* (asterisk) no operation

As each control statement is read it is written to the SYSPRINT dataset and then the operation is performed before obtaining the next control statement.  When an error occurs during an operation, an error message is written to the SYSPRINT device immediately below the control statement in error.  If the console option is in effect, error messages are written to the console as well as the SYSPRINT dataset.

All data that is dumped is written to the SYSPRINT dataset in hexadecimal.  If translation was specified, the mnemonic representation of each halfword of data is printed below the respective two bytes of hex data and the EBCDIC representation of the hex data is translated to the right of the hex data in the dump.

If a REPlace operation is performed on a load module, the SSI and IDR information are updated automatically.


Library Restrictions

IMASPZAP utilizes system open.  Hence, IMASPZAP cannot modify read only or inspect write only password protected datasets unless the correct password is provided at the time the dataset is opened.  Also, unexpired datasets cannot be modified unless the operator replies R 00,'U' to the expiration message that is issued when the dataset is opened.

The SYSLIB DD cannot specify a concatenated dataset.

The SYSLIB DD must specify DSN=FORMAT4.DSCB if operations are to be performed on a Volume Table of Contents (VTOC).                                                            


Jobstream Examples

Replace SVC 14 (0A0E) instruction in load module with SLR 15,15 (1FFF):

  VER 0272 0A0E
  REP 0272 1FFF

Print formatted dump of all CSECTs of a load module:


Print dump of all records in an Indexed-Sequential Organization dataset:


I hope that you have found my instructions useful.  If you have questions that I can answer to help expand upon my explanations and examples shown here, please don't hesitate to send them to me:

Return to Site Home Page 

This page was last updated on January 17, 2015 .