MainframeMaster
Progress0 of 0 lessons

CICS Startup & Shutdown

Learn how a CICS region starts, shuts down, and restarts. Compare cold, warm, and emergency restarts, see typical startup JCL, and use PLTPI/PLTSD to run programs during initialization and shutdown.

Restart Types

Choose the appropriate restart type based on recovery needs and speed of availability. Each restart type has specific use cases and implications for your CICS region.

Cold Restart

What it does:

  • • Fresh start; completely rebuilds internal status
  • • Ignores all prior in-flight tasks and resources
  • • Clears all internal control blocks and storage
  • • Reinitializes all system tables from scratch

When to use:

  • • After significant configuration changes
  • • When internal state is corrupted
  • • During initial system setup
  • • When warm restart fails

⚠️ Impact: All active transactions are lost, longer startup time

Warm Restart

What it does:

  • • Attempts to recover in-flight tasks and resources
  • • Preserves user sessions where possible
  • • Restores internal state from logs
  • • Faster return to service

When to use:

  • • Routine maintenance restarts
  • • When state is consistent
  • • Planned outages
  • • After minor configuration changes

✅ Preferred: Minimal disruption, faster recovery

Emergency Restart

What it does:

  • • Automatic after abends or failures
  • • Focuses on quick availability
  • • May defer full recovery actions
  • • Minimal validation during startup

When it happens:

  • • System crashes or abends
  • • Storage corruption detected
  • • Critical system failures
  • • Automatic recovery scenarios

🚨 Automatic: System-initiated, prioritize availability

Restart Decision Tree

1

Is this a planned restart?

If YES → Consider Warm Restart

2

Are there configuration changes?

If YES → Use Cold Restart

3

Is the system in a failed state?

If YES → Emergency Restart (automatic)

JCL for CICS Startup

CICS startup requires specific JCL that invokes DFHSIP (CICS System Initialization Program) with proper parameters and datasets. Understanding this JCL is crucial for system administration.

Basic Startup JCL

jcl
1
2
3
4
5
6
7
8
9
//CICSPROC PROC CICSHLQ=DFH.V6R1M0 //CICS EXEC PGM=DFHSIP,REGION=0M, // PARM=('SIT=CICSSIT') //STEPLIB DD DISP=SHR,DSN=&CICSHLQ..SDFHLOAD //DFHCSD DD DISP=SHR,DSN=SYS1.CICSTS61.CICS.DFHCSD //SYSIN DD * * DFHSIP control statements or overrides here /*

//CICSPROC PROC CICSHLQ=DFH.V6R1M0 - Defines a JCL procedure with a parameter for the CICS high-level qualifier (version 6.1)

//CICS EXEC PGM=DFHSIP,REGION=0M, - Executes the CICS System Initialization Program with unlimited storage allocation

PARM=('SIT=CICSSIT') - Passes the SIT name as a parameter to DFHSIP

//STEPLIB DD DISP=SHR,DSN=&CICSHLQ..SDFHLOAD - Points to the CICS load library containing executable modules

//DFHCSD DD DISP=SHR,DSN=SYS1.CICSTS61.CICS.DFHCSD - Specifies the Resource Definition Online dataset

//SYSIN DD * - Provides inline control statements for DFHSIP processing

Enhanced JCL with Additional DD Statements

jcl
1
2
3
4
5
6
7
8
9
10
11
//CICSPROC PROC CICSHLQ=DFH.V6R1M0 //CICS EXEC PGM=DFHSIP,REGION=0M, // PARM=('SIT=CICSSIT') //STEPLIB DD DISP=SHR,DSN=&CICSHLQ..SDFHLOAD //DFHCSD DD DISP=SHR,DSN=SYS1.CICSTS61.CICS.DFHCSD //DFHLOG DD DISP=SHR,DSN=SYS1.CICSTS61.CICS.DFHLOG //DFHSNAP DD SYSOUT=* //SYSIN DD * * DFHSIP control statements /*

//DFHLOG DD DISP=SHR,DSN=SYS1.CICSTS61.CICS.DFHLOG - Specifies the CICS system log dataset for recording system events

//DFHSNAP DD SYSOUT=* - Directs CICS snap dumps to the system output for debugging purposes

Additional DD statements - These provide enhanced logging and debugging capabilities beyond the basic startup requirements

Key JCL Components Explained

EXEC Statement:

  • PGM=DFHSIP: The CICS System Initialization Program
  • REGION=0M: Allows unlimited storage allocation
  • PARM: Points to the SIT (System Initialization Table)

Required DD Statements:

  • STEPLIB: Contains CICS load modules
  • DFHCSD: Resource Definition Online dataset
  • DFHLOG: System log dataset (optional but recommended)

Common SIT Parameters

plaintext
1
2
3
4
5
6
7
8
9
APPLID=CICSAP01 * Unique application identifier SYSIDNT=CICSA * System identifier for messages PLTPI=DFHPLTPI * Program List Table for Initialization PLTSD=DFHPLTSD * Program List Table for Shutdown MN=YES, QR=YES * Dispatcher options (Main/Quasi-reentrant) TIMEOUT=300 * Default transaction timeout SECURITY=YES * Enable security checking JOURNAL=YES * Enable journaling

APPLID=CICSAP01 - Sets a unique 4-character identifier for this CICS region, used for system identification and routing

SYSIDNT=CICSA - Defines the system identifier that appears in CICS messages and logs for easy identification

PLTPI=DFHPLTPI - Specifies the Program List Table suffix for initialization programs that run during startup

PLTSD=DFHPLTSD - Specifies the Program List Table suffix for shutdown programs that run during region termination

MN=YES, QR=YES - Enables Main (MN) and Quasi-reentrant (QR) dispatcher options for program execution

TIMEOUT=300 - Sets the default transaction timeout to 300 seconds (5 minutes) for user sessions

SECURITY=YES - Enables CICS security checking for user authentication and resource access control

JOURNAL=YES - Enables CICS journaling for transaction logging and recovery purposes

SIT Parameter Categories

System Identification:

  • • APPLID
  • • SYSIDNT
  • • REGION

Program Control:

  • • PLTPI
  • • PLTSD
  • • PPT

Security & Performance:

  • • SECURITY
  • • TIMEOUT
  • • JOURNAL

PLTPI and PLTSD

Program List Tables for initialization (PLTPI) and shutdown (PLTSD) allow you to run custom programs during CICS startup and shutdown phases. This is essential for system customization and cleanup operations.

PLTPI (Initialization) Example

cobol
1
2
3
4
5
DFHPLT TYPE=INITIAL,SUFFIX=PI DFHPLT TYPE=ENTRY,PROGRAM=INITLOG DFHPLT TYPE=ENTRY,PROGRAM=CACHEWARM DFHPLT TYPE=ENTRY,PROGRAM=LOADCONF DFHPLT TYPE=FINAL

DFHPLT TYPE=INITIAL,SUFFIX=PI - Defines the start of a Program List Table with suffix 'PI' for initialization

DFHPLT TYPE=ENTRY,PROGRAM=INITLOG - Adds INITLOG program to the initialization sequence

DFHPLT TYPE=ENTRY,PROGRAM=CACHEWARM - Adds CACHEWARM program to pre-load frequently used data

DFHPLT TYPE=ENTRY,PROGRAM=LOADCONF - Adds LOADCONF program to load configuration parameters

DFHPLT TYPE=FINAL - Marks the end of the Program List Table definition

PLTSD (Shutdown) Example

cobol
1
2
3
4
5
DFHPLT TYPE=SHUT,SUFFIX=SD DFHPLT TYPE=ENTRY,PROGRAM=FLUSHBUFF DFHPLT TYPE=ENTRY,PROGRAM=LOGCLOSE DFHPLT TYPE=ENTRY,PROGRAM=CLEANUP DFHPLT TYPE=FINAL

DFHPLT TYPE=SHUT,SUFFIX=SD - Defines the start of a Program List Table with suffix 'SD' for shutdown

DFHPLT TYPE=ENTRY,PROGRAM=FLUSHBUFF - Adds FLUSHBUFF program to flush pending data to disk

DFHPLT TYPE=ENTRY,PROGRAM=LOGCLOSE - Adds LOGCLOSE program to properly close log files

DFHPLT TYPE=ENTRY,PROGRAM=CLEANUP - Adds CLEANUP program to remove temporary files and resources

DFHPLT TYPE=FINAL - Marks the end of the Program List Table definition

PLT Program Types and Phases

PLTPI Phases:

INITIAL Phase

Runs before CICS is fully initialized

ENTRY Phase

Runs during initialization, after basic setup

FINAL Phase

Runs after CICS is fully initialized

PLTSD Phases:

SHUT Phase

Runs during shutdown, before cleanup

ENTRY Phase

Runs during shutdown process

FINAL Phase

Runs after shutdown is complete

Common PLTPI Programs

INITLOG

Initialize logging systems and audit trails

CACHEWARM

Pre-load frequently used data into memory

LOADCONF

Load configuration parameters and settings

SECINIT

Initialize security subsystems and user profiles

Common PLTSD Programs

FLUSHBUFF

Flush buffers and write pending data

LOGCLOSE

Close log files and complete audit trails

CLEANUP

Clean up temporary files and resources

SAVESTAT

Save system statistics and performance data

PLT Program Best Practices

Design Principles:

  • • Keep programs short and focused on single purpose
  • • Make programs idempotent (safe to run multiple times)
  • • Use proper error handling and return codes
  • • Log all activities for auditability
  • • Avoid long-running operations that block startup

Implementation Guidelines:

  • • Use Language Environment (LE) for modern practices
  • • Implement threadsafe design where appropriate
  • • Test PLT programs thoroughly in lower environments
  • • Document dependencies and execution order
  • • Monitor execution time and resource usage

Sample PLT Program Structure (COBOL)

cobol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
IDENTIFICATION DIVISION. PROGRAM-ID. INITLOG. ENVIRONMENT DIVISION. DATA DIVISION. PROCEDURE DIVISION. * Initialize logging system PERFORM INITIALIZE-LOGGING * Set return code based on success/failure IF LOGGING-OK MOVE 0 TO RETURN-CODE ELSE MOVE 8 TO RETURN-CODE END-IF GOBACK. INITIALIZE-LOGGING. * Implementation details here .

IDENTIFICATION DIVISION. - Standard COBOL division that identifies the program

PROGRAM-ID. INITLOG. - Defines the program name as INITLOG, which will be referenced in the PLT

ENVIRONMENT DIVISION. - Defines the computing environment and external resources

DATA DIVISION. - Declares all data structures and variables used by the program

PROCEDURE DIVISION. - Contains the executable logic of the program

PERFORM INITIALIZE-LOGGING - Calls the paragraph that contains the actual logging initialization code

IF LOGGING-OK - Checks if the logging initialization was successful

MOVE 0 TO RETURN-CODE - Sets return code to 0 (success) if logging initialized properly

MOVE 8 TO RETURN-CODE - Sets return code to 8 (error) if logging initialization failed

GOBACK. - Returns control to CICS, passing the return code back to the system

INITIALIZE-LOGGING. - Paragraph containing the actual logging system initialization logic

Best Practices

  • Document restart procedures and decision trees
  • Test PLT sequences in a lower environment
  • Automate validation of critical resources post-startup
  • Keep SIT under version control and peer review
  • Monitor DFHSI, DFHAC, DFHME messages during startup
  • Prefer warm restart unless data integrity is in doubt

Quick Quiz

Question 1:

Which restart type attempts to recover in-flight tasks?

Question 2:

What tables run programs at initialization and shutdown?

Question 3:

Name two common SIT parameters related to startup.