From what my mum told me about the mainframe she used in the 60's they would select the punch cards needed to retrieve specific records (she worked in the ordering department of a part of Philips) and the computer would then sort the records and print the results onto that whole punched continuous paper. They would then have to go through the printouts to check the records. She didn't actually code and create the punch cards, just use the premade programs to obtain the records needed.