I saw this: Learning to program on punchcards

and I've seen this: http://en.wikipedia.org/wiki/Computer_programming_in_the_punched_card_era

but they leave much to be desired.

Can anyone explain to me how programmers programmed when they used punchcards? Specifically, the system of input computers used to derive instructions from the punched card itself.

I do not know much about retrocomputers, so any one system of input you are familiar with would be fine. More general answers are also appreciated.


4 Answers 4


In a word, poorly.

At least on any machine I ever used or heard of, you did not feed cards one at a time though. There were automated card readers that would feed and read hundreds of cards a minute (probably around 1000/minute, but I'm not sure of the exact specs).

In a typical case you wrote the code by hand, then punched it onto cards. Each card holds one line of code (up to 80 columns). You took the card deck to be executed. Depending on backlog, anywhere from an hour or so to a day or so later, you got your deck back along with a printout of the results.

I should probably add: since your card deck ran as a job, you didn't just submit the code for the program itself -- you had to write something vaguely similar to a batch file/shell script with the directions to compile and execute your code. IBM JCL (for one example) remains heavily influenced by its Hollerith-card origins.

Another minor point: on most systems I remember, you normally included a line number on each punch card. You obviously avoided dropping a deck if you could, but when (not if) one got dropped, it wasn't really nearly the tragedy many imagine. Interesting side point: at least the card sorters I saw used a radix sort -- they'd separate the cards into 10 bins, based on one digit of the line number, then "merge" those together (drop all the cards into a single bin in order) then repeat as many times as you had digits in the line numbers.

Hollerith cards were extremely influential -- 80 columns as a limit still survives to an almost disturbing degree. At least on the Control Data mainframes, things like the file system were influenced quite heavily as well. Well after Hollerith cards were mostly gone, remnants of them were visible in the OS -- for example, text files were often stored as a series of 80-character records, regardless of how few/many characters a line actually contained. I can still remember my surprise at the "backwardness" of a system like Unix where you had to read all the preceding lines to find line N of a text file, instead of just being able to seek to it directly.

  • I think that what you describe is a much more modern way of doing things. Card sorter and feeder? Goodness, my Mom would have killed for that...:-D
    – littleadv
    Jun 8, 2012 at 6:05
  • @littleadv: Hollerith cards and feeders predate computers. I'm less certain about sorters, but I'm pretty sure they do too. Jun 8, 2012 at 6:13
  • 1
    We used to write our COBOL and RPGIII on paper by hand then punched the cards ourselves. The right 4 chars on the card were used for the "line number" of the program. Yes, I have dropped a tray of cards before, we had a card sorter in the same room as the key punch. Remember, COBOL and RPGIII were VERY strictly formatted languages. Your code had to be in certain orders to run. Then the tray(s) of cards were taken to be run and the operator ran the job, giving you your printout along with your trays of cards. Hopefully, you didn't have mistakes.
    – MB34
    Jun 8, 2012 at 16:19
  • 4
    We had a room with two 029 keypunch machines, but no sorter. So even though the cards were numbered, we used to draw diagonal lines across the tops like this. If you did drop a box of cars, usually they would end up on the floor in several groups, which you could piece together pretty well based on these lines to start with, and then finish the job by verifying the card numbers were in order.
    – tcrosley
    Jun 11, 2012 at 4:33
  • 2
    Not only were the programs punched on cards, the input data and output data was punched on cards. Cards were the primary form of storage in the late 70's and early 80's. Disk space was too expensive to be used for anything other than the compiler and loader. Dec 26, 2014 at 22:52

You used the card punch as an editor.

  • Insert == punch a new card.
  • Move == pick up the card and move it to the right spot.
  • Delete == take out the card and throw it in the bin
  • Copy -- better card punches had a copy function which could copy another card column by column.
  • Repace a character -- use the copy function but type in the replacement characters when you reach the character you need to replace.
  • Delete a character -- use the copy function but hold the copied card to stop it moving and hit space for each character you want to "delete"
  • Insert characters -- use the copy function but hold the original card immobile while typing in the new text.

For the most part cards were "immutable" but you could remove characters by taping over the holes with thin opaque sticky tape.

You read in your program surrounded by the appropriate JCL and waited for the printer to spit out the results. (Could be hours!)


Very slowly.

My mother was such a programmer, so I had tons of these cards at home while growing up. What they would do was encoding the program on the cards, and then feeding the cards into the card reader one by one (similar to how the voting machines work now). If you dropped the cards - you would be in a lot of trouble, because you only have X machine time allocated for you and you'd have to get them arranged in the right order and restart feeding the machine all over again and try to make it on time before the next programmer kicks you out. A trivial (in our current standards) program might have required hundreds, if not thousands, of such cards, and hours of machine time to load it and run it.

Very tedious.

  • On the other hand, there were probably a lot less parasites in the industry :)
    – haylem
    Jun 8, 2012 at 5:23
  • depends on how you define "parasite"....:)
    – littleadv
    Jun 8, 2012 at 6:02
  • Unfortunately I didn't mean the famous "bugs" from back then, but the hordes of people who have now jumped on the IT bandwagon.
    – haylem
    Jun 8, 2012 at 6:03
  • Oh the nostalgia... the world was such a better place in the old times! But really, it's mostly because we tend to forget the bad stuff. There were all the hordes of people jumping on all kinds of bandwagons, always have been and always will be.
    – littleadv
    Jun 8, 2012 at 6:06
  • Shhhh. Those were the days. That's all. (I actually don't know, I wasn't there.)
    – haylem
    Jun 8, 2012 at 6:07

In some ways "not too different", in some ways "very different".

They wrote source code, usually on paper. This was then re-typed onto punch cards (one line of source code per card, usually with line numbers, so you could easily fix up your source code when it ended up in the wrong order).

The program was then prefixed with cards having instructions for how to compile the program and suffixed with instructions for how to run it and what data file(s) to use (or tapes to mount, etc, etc).

This as then submitted to the operators, who would load the cards into a speed-reader, run the job and return the results on print-outs.

With a typical edit/compile/results cycle being on the order of "tomorrow", people tended towards being more paranoid bench-checking their code for syntax errors.

With no possibility of interactive debugging, the only way to trace the execution would be debug lines printed during the execution.

In some places, the code would be on punch tape rather than on punch cards.

Not the answer you're looking for? Browse other questions tagged or ask your own question.