Previous Topic: Using <<EMPTY>>Next Topic: Checking the Report Definition


Using <<ABORT>>

You can specify an <<ABORT>> group once on the Heading fill‑in. You can specify the data to print as a literal, variable (non‑sorted reports), or expression. It can be formatted using the tab field to print on multiple lines. If you do not specify an <<ABORT>> group, the final footings are suppressed and a standard CA Ideal supplied message prints at the end of the report.

For example, the following <<ABORT>> group specifies to print when the return code is 12 or greater than 12.

=> ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ IDEAL : RPT HEADING/FOOTING RPT CUSTRPT (001) TEST SYS: DOC DISP Field Name, Literal, Function, Column Command or Arithmetic Expression Wid Tab Edit Pattern ‑‑‑‑‑‑ ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ ‑‑ ‑‑‑ ‑‑‑‑‑‑‑‑‑‑‑‑‑ ====== ==================== T O P ===================== == === ============= 000300 <<ABORT>> RC 12 __ ___ _____________ 000400 'A fatal error has occurred.' __ ___ _____________ 000500 ________________________________________________ __ L01 _____________ 000600 'The return code is:' __ ___ _____________ 000700 $RC __ +02 99___________ ====== ===================== B O T T O M ============== == === =============

When the return code is set to 12 or greater, the output contains the following:

A fatal error has occurred.
The return code is:  12

When the report is released implicitly by program termination, the appropriate <<ABORT>> text prints.

You can use the <<ABORT>> group with user‑defined error procedures. Although you can code only one <<ABORT>> group, you can specify one or more working data variables to define the output, provided that the variables are current for the last PRODUCE REPORT statement executed. Variables set after the last PRODUCE REPORT statement was executed are not available for the <<ABORT>> group. For sorted reports, the variable is not available for the abort group.

When the return code is less than 12, a user‑written Error Procedure can often recover from the error. The program is not terminated, but you can explicitly terminate the report using the RELEASE statement:

RELEASE REPORT name WITH ABORT

Any specified <<ABORT>> text for that return code then prints to provide diagnostic or informational messages to the user. The program can resume processing. The resulting report prints using the same specifications as the previously released report.