Module 1: CICS Introduction
CICS vs Batch Processing
Mainframes do two kinds of work - online work through CICS while users wait, and batch work through JCL jobs that run without users. Knowing the difference is fundamental.
What is batch processing
- In batch processing, work is submitted as JCL jobs and runs without any user interaction.
- The job reads input files, processes records one by one, and writes output files or reports.
- Results are available later - after minutes or hours - not while anyone waits.
- Typical batch work: payroll runs, monthly statements, backups, bulk file updates.
Key differences
- User interaction - CICS is interactive (user at a terminal); batch has no user while it runs.
- Response time - CICS answers in seconds; batch delivers results after the job ends.
- Input - CICS takes input from terminals and networks; batch takes input from files.
- Scheduling - CICS transactions start on demand when users need them; batch jobs run on a fixed schedule.
- Concurrency - CICS serves thousands of users at once; a batch job normally processes one stream of records.
- Resource usage - CICS shares programs and files among many tasks; batch jobs often need exclusive access to files.
- Failure impact - one bad CICS transaction affects one user; one bad batch job can delay the whole nightly cycle.
When to use which
- Use CICS when a user is waiting for an answer - enquiries, bookings, ATM, order entry.
- Use batch for bulk work with no waiting user - payroll, interest calculation, report generation, backups.
- The two work together: CICS transactions collect data during the day, and batch jobs process it at night.
- Example - a simple batch job that sorts a file (compare this with the interactive CICS style):-//SORTJOB JOB (ACCT),'SORT FILE',CLASS=A,MSGCLASS=X //STEP1 EXEC PGM=SORT //SORTIN DD DSN=USER.INPUT.FILE,DISP=SHR //SORTOUT DD DSN=USER.OUTPUT.FILE, // DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(10,5)) //SYSIN DD * SORT FIELDS=(1,10,CH,A) /*
