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

    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.

    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.

    One control level, 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 uses one, L1, because the mechanism is identical at every level and nine of them on screen would obscure the thing worth seeing. The engine carries all nine indicators and sets them all on at end of file, which is what the manual says happens, but only L1 is ever driven by the data here.

    The program is fixed; the deck is yours

    You are not writing RPG specifications on this page. The calculations 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. What you change is the deck. That is a real limitation and it is deliberate, because the subject is the cycle rather than the syntax, and a specification sheet with its column numbers would be a different machine.

    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.

    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