Batch and online: the two shapes of work
Nearly everything on a mainframe is either a batch job (submit it, walk away, read the output later) or an online transaction (a person or system asks, and gets an answer in milliseconds). Almost every mainframe role sits on one side of this line or spans both.
Batch, concretely
A batch job is a unit of work you describe in JCL and hand to the system. The system queues it, runs its steps in order, and keeps the output for you to read. Classic examples: apply today's transactions to the account master file, produce statements, calculate interest, load a data warehouse extract.
//PAYRUN01 JOB (ACCT),'MONTHLY PAY',CLASS=A,MSGCLASS=X //STEP010 EXEC PGM=PAYCALC //INFILE DD DSN=PROD.PAY.MASTER,DISP=SHR //OUTFILE DD DSN=PROD.PAY.RESULT,DISP=(NEW,CATLG,DELETE) //SYSOUT DD SYSOUT=*
That is five lines saying: run the program PAYCALC, give it this input file and that output file, and put its printed messages where I can read them. Everything else in JCL is elaboration on this idea.
Online, concretely
An online transaction is identified by a short transaction ID — usually four characters. A user types it, or another system sends it, and CICS starts a program to handle it. The program must answer quickly and must not hold resources while a human thinks.
Common mistakes
Reading a million rows is fine in batch and fatal online. Online programs must do a small, bounded amount of work per call.
Batch means unattended and scheduled. A well-tuned batch job processing 200 million records is an extremely efficient piece of engineering.
Batch jobs have predecessors and successors. Making one job slower can push a chain past the window even if the job itself still works.
What you will see at work
- Your team will have a scheduler (Control-M, CA-7, TWS/OPC or similar) holding the dependency chart for thousands of jobs. That chart, not the JCL, is the real map of the overnight.
- 'What is the critical path tonight?' is a question you will hear often. It means: which chain of jobs decides whether we finish on time?
- Online and batch usually touch the same data at different times of day. That is why cutoffs exist and why they are enforced firmly.
Key terms
Check your understanding.
Take this lesson's quiz and save your progress. Free.