SELCOPY should never dump, but it is unrealistic to leave out this section. It is not intended
as a full reference for
In an abend situation, depending on the Operating System, the JCL used, and whether SELCOPY's Abend Trap is enabled (via CBLNAME setting or ABTRAP=YES/NO on an OPTION statement), a storage dump is produced on SYSLST or SYSUDUMP, or in a CMS environment you just return to CMS with a single line error message.
Any part of storage may have been overwritten so the information below is not always true. Also, the error may have occurred outside SELCOPY, in which case the registers displayed are not SELCOPY's.
All registers and displacements quoted below are release dependent, and subject therefore to change without prior notice. Every effort however will be made to avoid inconvenience to the user.
The Abend Trap option in SELCOPY will suppress the storage dump produced by the system in abend situations, and instead give the user more readable diagnostics, and it is recommended that this option is taken at install time, for all operating systems, by setting the appropriate "bit" in CBLNAME, because when the Abend Trap is enabled it is normally much easier to find the cause of the problem.
The Abend Trap should only be disabled when the problem is such that a conventional dump is needed by CBL for investigation.
Code ABTRAP=NO on an OPTION statement, in order to disable the Abend Trap on a temporary basis.
Program Check Interrupt handling for MVS, VSE and CMS is provided, but interrupts are only trapped and handled by SELCOPY if the CBLNAME option for Abend Trap is set ON.
Selected areas of storage are printed instead of the normal full dump of the whole of storage, which is not only wasteful of paper if it is printed, but is also wasteful of system resources, whether printed or not.
If an abend occurs on an IF arithmetic test, the Selection Id (SEL-ID) of the statement following the offending IF statement is displayed, prefixed with less than signs (<<<). This is because an IF statement does not have a Selection Id of its own.
SELCOPY ABEND PROCESSING.... PSW........ Addr. R1 |
| 8 bytes - | Character constant
|
|
| 8 bytes - | PSW at time of Interrupt. (Both VSE and MVS) | |
| 64 bytes - | Registers 0 through 15 at time of Interrupt. (Both) | |
| 8 bytes - | VSE PSW at time of Interrupt. (X'00's for MVS) | |
| 4 bytes - | Refer to IBM's manual "Supervisor and I/O Macros" (GC33-5373). Some
|
|
| 4 bytes - | Reserved. (X'00's) |
Finally, the Selection Summary is printed in full, as on an execution which completed normally.
See also:
ADD, SUB, MULT and DIV in section Operation Words, Parameters and Keywords.
The packed decimal arithmetic operations ADD, SUB,
DIV and MULT can go wrong for various reasons, giving a
Even if you have already located the selection-id, it may still be too much to believe that something is wrong. The following information may then be of assistance:
No INTO=n (i.e. no dest. field.) INTO=F3 (i.e. dest. field.)
|
Rn - Register n Fn - Field n A - Address * - A(result) |
The "machine" length is always 1 less
than the actual length, and is stored in a single hex digit.
i.e. it will only take up 4 "bits" (half a byte).
Thus together, the two lengths only take up 1 byte, the
junior (right most) byte of Register 8. The other
3 bytes of R8 will be zero.
Thus, in the operation:
ADD 4 AT 20 TO 6 AT 30 |
In the case of a DIVIDE INTO, SELCOPY will use its own work area of 16 bytes for the temporary destination, and the destination machine length in R8 will not be set.
When totally convinced that all data is valid and correct, remember that with decimal arithmetic, when a result is too large for the destination field, the decimal data exception does not occur until the destination field has overflowed. Thus the data in the dump will appear to be valid.
Decimal data exception may also occur on a MULT operation where the destination field is of insufficient length.
See also: Looping on GU in section IMS and DL/1 Processing.
The missed IF EOF statement can cause a loop.
EOF tests do not have to follow a READ operation.
They may go anywhere, but beware of a GOTO which can
cause SELCOPY to bypass the EOF test, resulting in an
infinite
Beware too of getting the
READ FILEA WRITE FILEB * Last record written ** TWICE ** IF EOF FILEA THEN PRINT * Print last record. THEN GOTO EOJ |
For safety and readability, EOF tests should be immediately after the READ operation.
Your installation's Technical Representative has access to the "SELCOPY Query Desk", so if the above information is insufficient, please pass the problem on, so that it may be referred to us by post, fax, e-mail or telephone as preferred.
| COMPUTE(Bridgend)Ltd UK Tel:+44(1656) 65 2222 Fx:2227 | |||
| 2003/07/31 | FUR - Debugging Aids | SELCOPY Rel 2.0x | |