The trap facility was added to CMS Pipelines in 1.1.11 sublevel 1A. It is not available for TSO Pipelines.
A trap facility is implemented to allow the user to specify CP commands to issue when a particular message is issued.
The facility is designed to allow the user to obtain a dump of the virtual machine when a transient error has occurred, but other uses are possible, as it is a generalised way to issue a CP command.
CMS Pipelines is built with the trap facility is enabled for messages FPLDSK124E and FPLDSK129E.
There is no user interface to enable other messages, but it is possible to write a REXX program to do this in the field, should it be necessary.
The trap facility uses the GLOBALV group FPLTRAP. Specify trap actions by defining variables in this group.
The variable must have a name corresponding to the module, message number, and severity of the message to trap, e.g., DSK124E. That is, the component ID, FPL, is omitted to make the variable names seven or eight characters long. Here is an example:
GLOBALV SELECT FPLTRAP SETL DSK124E VMDUMP#MSG JOHN Your trap sprang!
You may specify several commands by separating them with the line end character (this is best done in XEDIT) as shown in the example above, where the default line end character is assumed. The line end character is specified by CP TERMINAL LINEND.
CP restricts (truncates) the command line after 240 characters; CMS Piplines strips leading blanks before issuing the command.
The command verb must be in uppercase; specify only data you want mixed-case as such. That is, CMS Pipelines trap processing does not perform the processing done in the cp device driver.
The CP commands are issued while general registers 0 through 12 contain the values when the message is issued, though issuing the message alters general registers 0, 1, 4, and 5. That is in general, the register set of the stage that issues the message.
Assuming you create a VMDUMP SPOOL file, you can use the DUMPLOAD command to read it in, then access MAINT's 193 minidisk and inspect the dump with the VM Dump Tool, VMDUMPTL. Use the appropriate VMDT macro to obtain information about the particular trap.
Messages 124 and 129 are trap-enabled. They are issued while processing files that contain variable-length records and are read through an undocumented, but widely known, CMS interface. The interesting general registers at the trap points are:
3 | The length of the record in error. This is zero for message 129 and larger than the FSTLRECL field for message 124. It is the contents of the halfword pointed to by register 8. |
7 | A copy of the File Status Table for the file. |
8 | The base address of the record in error. This points to the halfword length record descritor word in front of the actual data. |
11 | The work area base register. The FSCB is at offset X'B8'. |
Sample VMDT macros are available for the messages that are trap-enabled when CMS Pipelines is built. The file name of each macro is the name of the module that issues the corresponding message. These macros are available: