The calibration record that refuses to guess

Jack Buffet follows his Fortran CMS with a small COBOL program for checking an engineering instrument against a known reference.

For: A practical builder who wants measurement records to be boring, legible, and difficult to misunderstand.

I still have the Americano. I have changed languages.

In the Fortran article, I used a tiny fixed content system to make a point about schema: a field should have a meaning before it has a value. COBOL makes a fine follow-up because it is unusually good at putting the shape of a business record directly on the page.

That discipline belongs in engineering too.

Suppose a pressure transmitter is expected to report 100 pounds per square inch. A technician applies a known reference, records what the instrument reports, and compares the difference with an approved tolerance. The important part is not merely whether the device passes. The record must also say which device was checked, what reference was applied, what was observed, and what happens when the result falls outside the limit.

A small calibration check

This is an educational model, not software for operating safety-critical equipment. It does not replace a calibration procedure, a traceable reference standard, a qualified technician, or the device manufacturer’s instructions. It simply makes the decision legible. The leading spaces are intentional: this example uses COBOL’s traditional fixed-column layout, with program text beginning in Area A.

       IDENTIFICATION DIVISION.
       PROGRAM-ID. CALIBRATION-CHECK.

       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  DEVICE-ID       PIC X(12)     VALUE "PT-204".
       01  EXPECTED-PSI    PIC 9(4)V99   VALUE 100.00.
       01  OBSERVED-PSI    PIC 9(4)V99   VALUE 100.38.
       01  TOLERANCE-PSI   PIC 9V99      VALUE 0.50.
       01  DEVIATION-PSI   PIC S9(4)V99  VALUE ZERO.

       PROCEDURE DIVISION.
           COMPUTE DEVIATION-PSI = OBSERVED-PSI - EXPECTED-PSI

           IF FUNCTION ABS(DEVIATION-PSI) <= TOLERANCE-PSI
               DISPLAY DEVICE-ID " PASS"
           ELSE
               DISPLAY DEVICE-ID " HOLD FOR CALIBRATION"
           END-IF

           STOP RUN.

The result is not glamorous. That is a compliment.

PT-204 identifies the instrument. EXPECTED-PSI is the value applied by the reference. OBSERVED-PSI is what the device reported. TOLERANCE-PSI is the acceptance limit. The program calculates the deviation and produces one of two unambiguous dispositions: PASS or HOLD FOR CALIBRATION.

The number needs a trail

A real calibration record needs more than this snippet: the reference standard and its traceability, the technician, procedure revision, environmental conditions when relevant, date and time, uncertainty where the method requires it, and the next due date. A failed instrument may also trigger an impact review for measurements taken since its last known acceptable check.

That is where the old business-language instinct helps. Do not let an important number float around without its identity and rules attached. Do not silently round a miss into a pass. Do not overwrite the as-found reading with the adjusted reading. Preserve both.

My preferred system is one where a tired person can look at the record six months later and reconstruct the decision without telepathy.

The Fortran model asked whether a content field had been defined precisely enough to support a report. This COBOL model asks the same question of a measuring device. Different machine, same standard: define the record, preserve the evidence, and make ambiguity do the walking.

Americano still warm. Pressure transmitter held to account.