1964–1990s

Abend

You wrote a program, punched it, and handed the deck over a counter. What came back the next day was either your report or a listing with a message on it. That is the whole feedback loop, once every twenty-four hours, and it is the reason the language you were writing in wrapped a loop of its own around your code so that you had less to get wrong.

The loop you did not write

RPG generates a program around your specifications. Its manual numbers the items of that cycle from 1 to 15. Three of them are yours. Step through a deck and watch which is which, and watch the indicators the cycle sets on your behalf.

item
1
whose
the compiler's
what it did
wrote the page heading before any record was read
indicators

The fifteen items

    What has come off the printer

    What you actually wrote

    You did not type a program. You wrote it on a pre-printed form, one line per card, and the compiler read each field out of its own columns. A name beginning one column too far left was a different field, or no field at all. Fill the boxes and watch the card underneath: that line of eighty characters is the whole of what the machine received.

    the card, as the compiler reads it

    column 1

    Where these column numbers come from

      What the compiler would say

      And what it cost to get wrong

      One submission a day. The compiler graded every diagnostic it found and returned the worst one: nothing, a warning it carried on past, or an error and no program. Faults of the same severity come back together, because one pass finds them all, so what costs you days is having faults of different kinds.

      These are the faults in the line you wrote above, nothing else. Change it and this changes.

      Each submission, one a day, and what came back
      dayreturn codewhat came back

      Three days.

      Why the final total appears at all

      Nothing in an RPG program tells it to print the grand total. Look for the instruction and it is not there. What happens is that item 4 notices end of file and branches to item 13; item 13 sets the Last Record indicator and every control-level indicator on, and then branches back to item 6, which is total time. Your total calculations and your total output run one more time, on a cycle that re-entered itself from its own end, and that is the final total.

      Step the deck above to the end and watch it happen. Item 4, then 13, then 6. Miss that path and RPG looks like magic; see it once and the language stops being mysterious.

      Three items out of fifteen

      The manual's own words bound the cycle: A program cycle begins with item 1 and continues through item 11. And it names the parts you write into: Steps 6 and 7 are referred to as total time. Steps 1 and 11 are referred to as detail time.

      Item 1 is the compiler's heading, so of the four named steps, three carry your code: total calculations, total output, and detail calculations. The other twelve read the file, identify the record, notice the control break, set the indicators, test for overflow, and decide when your three run. That is not a library you called. It is a loop wrapped around you, and on a machine you saw once a day it was the difference between a report and a wasted week.

      Which is what the name is about

      Abnormal end. The job stopped and the reason came back on paper. A modern editor tells you about a mistake while you are still making it; this told you tomorrow, and only about the first kind of mistake it found. The cycle above exists because the fewer decisions you had to encode by hand, the fewer of those days you spent.

      What is real here, and what is not

      The fifteen items are transcribed, and the test checks every one

      They are not a paraphrase. Each item's description is taken from the November 1968 RPG language manual, form C24-3337-3, which has a real text layer, so no OCR is involved. The test suite requires a distinctive clause from every one of the fifteen to appear in the archived copy, so a step reworded to read better would turn it red. Figure 31 in the manual is the flowchart these numbers refer to; this page does not reproduce the figure, only the numbered text beside it.

      Two control levels, where RPG had nine

      RPG supports control levels L1 through L9, nested, so a report can break on branch inside region inside division. This page drives two, L1 and L2, because one level never shows why they are numbered: it takes a second to see a group total print inside a division total, and to see that breaking at L2 turns L1 on with it. The engine carries all nine indicators and sets them all on at end of file, which is what the manual says happens; levels three to nine are simply never reached by this deck.

      The calculations are fixed; the sheet is a sheet, not a compiler

      The calculations the cycle runs at items 6, 7 and 11 are a fixed toy: accumulate a value, print a group total on a control break, print a final total at the end. The specification sheet lower down is a real sheet with the manual's real column numbers, and it is checked the way the compiler checked one, but it does not compile: editing it does not change what the cycle above computes. It changes how many days the deck took to come back, which is the other half of the subject.

      The day count is a model, not a log

      Real turnaround was not reliably a day. It was a day at a well-run shop with an overnight batch window, and it was two hours if you had the machine to yourself, and it was three days if the operator dropped your deck or the tape you needed was mounted on another job. The model here says one submission a day and that faults of one severity class come back together. The second half is a fact about how a compiler pass works; the first is a round number standing in for a range.

      A return code of 4 is the interesting one

      The compiler graded diagnostics and returned the worst severity it found. At 8 and above you got a listing and no program. At 4 you got a program, because the compiler had assumed something on your behalf and carried on, and its diagnostics say so in as many words. That is the failure this page would put first if it could only keep one: not the day you lost to an error, but the day you did not lose, because you got output back and it was the wrong output.

      The diagnostics are graded from the manual; their wording is ours

      Which faults are errors and which are warnings comes from the compiler's own return-code scale, and the column ranges every check works from are quoted on the sheet itself, out of the manual's prose. The sentences the page prints are not. The manual's diagnostic message text is in its Appendix G, and the scan's text layer is too damaged there to quote, so each message here is described in this page's own words. Nine checks, where a real compiler had hundreds: this one can see a missing operation, an operation code it does not know, a missing factor or result, a length or decimal position that is not a number, more decimals than the field has positions, a control level that is not one, a result field defined twice or not at all, and a name nothing defines. It cannot see anything about the other specification sheets, because they are not here.

      What is not modelled

      JCL, which was its own language and its own class of overnight failure. Matching and secondary files. Table lookup. Exception output. Halt indicators are here only as a switch to show the branch to item 12. And nothing about the machine underneath: no storage estimates, no core, no operator. The subject is one loop.

      Sources