Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

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.

share|improve this answer
    
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 '12 at 6:05
    
@littleadv: Hollerith cards and feeders predate computers. I'm less certain about sorters, but I'm pretty sure they do too. –  Jerry Coffin Jun 8 '12 at 6:13
    
Punching your own cards? Egad. That's why we had the keypunch ladies. We handed them the coding sheets and they punched the cards. –  OldFart Jun 8 '12 at 15:01
    
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 '12 at 16:19
1  
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 '12 at 4:33

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.

share|improve this answer
    
On the other hand, there were probably a lot less parasites in the industry :) –  haylem Jun 8 '12 at 5:23
    
depends on how you define "parasite"....:) –  littleadv Jun 8 '12 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 '12 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 '12 at 6:06
    
Shhhh. Those were the days. That's all. (I actually don't know, I wasn't there.) –  haylem Jun 8 '12 at 6:07

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!)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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