Progress0 of 0 lessons

CICS RESET - Reset

CICS RESET provides reset management capabilities, enabling reset processing and output processing in CICS environments. It provides efficient reset capabilities for CICS applications.

What is CICS RESET?

CICS RESET provides reset management capabilities, enabling reset processing and output processing. It provides efficient reset capabilities, allowing applications to manage reset operations.

Command Syntax

cobol
1
2
3
4
EXEC CICS RESET [RESP(response-code)] [RESP2(response-code-2)] END-EXEC.

Parameters Explained

RESP Parameters

Response codes returned by the command:

  • RESP: Primary response code - indicates the success or failure of the reset operation
  • RESP2: Secondary response code - provides additional error information when RESP indicates failure
  • Always check these codes for command success before proceeding with data processing
  • Handle command failures appropriately to prevent application errors

Reset Types

1. Basic Resets

  • Basic resets: Standard reset operations that handle simple resetting without special formatting
  • Mapped resets: Reset operations that use predefined field mappings to structure reset data
  • Unmapped resets: Raw reset operations that handle unstructured resetting without predefined field mappings
  • Custom resets: Specialized reset operations designed for specific application requirements

2. Advanced Resets

  • Advanced resets: Complex reset operations that handle sophisticated resetting processing and validation
  • Secure resets: Reset operations that include encryption and security features for sensitive resetting
  • Encrypted resets: Reset operations that automatically encrypt reset data
  • Compressed resets: Reset operations that handle compressed resetting streams and automatically compress reset data

3. Specialized Resets

  • Specialized resets: Reset operations tailored for specific protocols or communication methods
  • High-performance resets: Optimized reset operations designed for maximum throughput and efficiency
  • Low-latency resets: Reset operations optimized for minimal delay and real-time processing requirements
  • High-throughput resets: Reset operations designed to handle large volumes of resetting efficiently

Implementation Example

cobol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
WORKING-STORAGE SECTION. 01 WS-RESPONSE PIC S9(8) COMP. 01 WS-RESPONSE2 PIC S9(8) COMP. PROCEDURE DIVISION. * Reset operation EXEC CICS RESET RESP(WS-RESPONSE) RESP2(WS-RESPONSE2) END-EXEC. IF WS-RESPONSE NOT EQUAL DFHRESP(NORMAL) EXEC CICS WRITE OPERATOR TEXT('RESET command failed') END-EXEC EXEC CICS RETURN END-EXEC END-IF. * Reset operation completed successfully * Continue processing

Reset Processing

1. Reset Preparation

Reset preparation includes:

  • Reset validation - ensuring the reset operation is properly configured and authorized
  • Reset formatting - preparing data structures and buffers for reset data
  • Reset encoding - setting up proper character encoding and data transformation
  • Reset processing - initializing the reset operation and preparing for resetting

2. Reset Transmission

Reset transmission includes:

  • Reset routing - directing reset data to the appropriate processing location
  • Reset delivery - ensuring reset data reaches the correct destination within the application
  • Transmission confirmation - verifying that reset was completed successfully
  • Error handling - managing transmission failures and implementing retry mechanisms

3. Output Management

Output management includes:

  • User management - handling user sessions and maintaining connection state
  • Output formatting - structuring reset data for presentation or further processing
  • User experience - ensuring smooth data flow and responsive application behavior
  • Performance optimization - maximizing reset efficiency and minimizing resource usage

Common Response Codes

Success Response Codes

  • NORMAL (0): Reset operation completed successfully - resetting was completed without errors
  • RESET (4): Reset operation completed - operation completed with reset-specific status

Error Response Codes

  • INVREQ (16): Invalid request - the reset operation parameters are incorrect or unauthorized
  • NOTFND (20): Resource not found - the specified reset resource does not exist
  • LENGERR (22): Length error - the reset data length exceeds expected limits
  • RESET (24): Reset error - a reset-specific error occurred during the operation

Best Practices

1. Reset Preparation

  • Prepare reset appropriately - ensure all necessary resources and configurations are in place
  • Validate reset content - verify that reset data meets expected format and quality standards
  • Handle different reset types - implement flexible processing to accommodate various resetting formats
  • Ensure reset integrity - maintain data consistency and prevent corruption during resetting

2. Error Handling

  • Check all response codes - always examine both RESP and RESP2 for complete error information
  • Handle reset failures - implement appropriate recovery mechanisms for failed reset operations
  • Implement retry logic - provide automatic retry capabilities for transient failures
  • Log error conditions - maintain detailed logs for troubleshooting and monitoring purposes

3. Performance Optimization

  • Minimize reset operations - reduce unnecessary reset calls to improve overall performance
  • Use efficient reset formats - choose appropriate data formats to minimize processing overhead
  • Optimize user updates - streamline user interface updates to reduce response time
  • Manage user resources - efficiently allocate and manage system resources for reset operations

Explain It Like I'm 5 Years Old

Imagine you're starting over with a game:

When you want to start over with a game, you press the reset button and everything goes back to the beginning. If you press the reset button, the game starts over. If you don't press the reset button, the game stays where it is.

CICS RESET is like pressing the reset button on a game. The computer program presses the reset button and everything goes back to the beginning. If it presses the reset button, everything starts over. If it doesn't press the reset button, everything stays where it is.

Just like you press the reset button on games, the computer program presses the reset button on data!

Exercises

Exercise 1: Reset Operation

Write a CICS RESET command to perform a reset operation.

cobol
1
2
3
4
EXEC CICS RESET RESP(WS-RESPONSE) RESP2(WS-RESPONSE2) END-EXEC.

Exercise 2: Reset Processing

How would you implement comprehensive reset processing that handles different reset types and requirements?

Answer: Identify different reset types and appropriate handling, implement reset validation and encoding, handle different reset types and capabilities, implement proper error handling for reset failures, optimize reset operations for performance, and maintain reset integrity throughout the process.

Quiz

Question 1

What is the primary purpose of CICS RESET?

Answer: B) To provide reset management capabilities

Question 2

Which parameter specifies the response code?

Answer: A) RESP