👨💻 Technical ACs (Gherkin)
Context: ISCOM structure exists with a SIT version field and CCCOM structure contains common area data
GIVEN
ISCOM structure exists with a SIT version field and CCCOM structure contains common area data
Applied to: 1:Version Check and Data Transfer
WHEN
The SIT version in ISCOM matches the working storage ISCOM version
THEN
Copy common area from CCCOM to ISCOM and update ISCOM SIT version to working storage version
Context: ISCOM structure exists with incompatible SIT version and CCCOM structure contains source data
GIVEN
ISCOM structure exists with incompatible SIT version and CCCOM structure contains source data
Applied to: 2:ISCOM Initialization
WHEN
The SIT version in ISCOM does not match the working storage ISCOM version
THEN
Initialize ISCOM with default values from ISCOMVAL, copy common area from CCCOM, and update SIT version
Context: CCCOM and ISCOM structures require cross-referencing for communication
GIVEN
CCCOM and ISCOM structures require cross-referencing for communication
Applied to: 3:Cross-Reference Address Setup
WHEN
ISCOM version mismatch triggers full initialization process
THEN
Set CCCOM address in ISCOM structure and set ISCOM address in CCCOM structure
Context: CCCOM contains LT-PCBS information and ISCOM requires PCB data
GIVEN
CCCOM contains LT-PCBS information and ISCOM requires PCB data
Applied to: 4:PCB Transfer
WHEN
Full ISCOM initialization is required due to version mismatch
THEN
Copy LT-PCBS data from CCCOM to ISCOM structure
Context: CCCOM table contains database entries with names and CCCOM-TABLE-SIZE defines maximum entries
GIVEN
CCCOM table contains database entries with names and CCCOM-TABLE-SIZE defines maximum entries
Applied to: 5:Database Name Scanning
WHEN
Database address scanning is initiated during ISCOM initialization
THEN
Process each CCCOM entry from position 1 until reaching table size limit or finding empty database name
Context: CCCOM entry contains database number field that may be empty or contain spaces
GIVEN
CCCOM entry contains database number field that may be empty or contain spaces
Applied to: 6:PCB Number Processing
WHEN
Processing a CCCOM database entry during scanning
THEN
Initialize ISCOM PCB number to zero, copy database number from CCCOM, and if database number is spaces then set CCCOM PCB number to '1'
Context: CCCOM entry has database name and ISCOM table contains database entries with names
GIVEN
CCCOM entry has database name and ISCOM table contains database entries with names
Applied to: 7:Database Name Matching
WHEN
Scanning ISCOM table for matching database names during address mapping
THEN
Process each ISCOM entry from position 1 until reaching table size limit or finding empty database name
Context: CCCOM database name matches ISCOM database name during scanning process
GIVEN
CCCOM database name matches ISCOM database name during scanning process
Applied to: 8:PCB Counter Management
WHEN
Database names are identical between CCCOM entry and ISCOM entry
THEN
Increment ISCOM PCB number by 1
Context: ISCOM PCB number equals CCCOM PCB number for matching database names
GIVEN
ISCOM PCB number equals CCCOM PCB number for matching database names
Applied to: 9:PCB Address Mapping
WHEN
PCB numbers match after incrementing ISCOM PCB counter
THEN
Set PCB address in ISCOM entry to match PCB address from corresponding CCCOM entry
Context: CCCOM structure exists with SIT version field and ISCOM structure contains source data
GIVEN
CCCOM structure exists with SIT version field and ISCOM structure contains source data
Applied to: 10:Reverse Conversion Version Check
WHEN
Reverse conversion entry point is accessed and CCCOM SIT version matches working storage CCCOM version
THEN
Copy common area from ISCOM to CCCOM and update CCCOM SIT version to working storage version
Context: CCCOM SIT version does not match working storage version and ISCOM contains source data
GIVEN
CCCOM SIT version does not match working storage version and ISCOM contains source data
Applied to: 11:Reverse Data Transfer
WHEN
Reverse conversion is initiated with version mismatch
THEN
Copy common area from ISCOM to CCCOM and update CCCOM SIT version to working storage version
Context: ISCOM contains LT-PCBS information and CCCOM requires PCB data during reverse conversion
GIVEN
ISCOM contains LT-PCBS information and CCCOM requires PCB data during reverse conversion
Applied to: 12:Reverse PCB Transfer
WHEN
CCCOM version mismatch triggers full reverse initialization
THEN
Copy LT-PCBS data from ISCOM to CCCOM structure and set up cross-reference addresses
Context: ISCOM table contains entries with PCB address fields that may be zero or non-zero
GIVEN
ISCOM table contains entries with PCB address fields that may be zero or non-zero
Applied to: 13:Active PCB Identification
WHEN
Scanning ISCOM entries during reverse conversion process
THEN
Process only entries where PCB address is not equal to zero
Context: ISCOM entry has non-zero PCB address and database name
GIVEN
ISCOM entry has non-zero PCB address and database name
Applied to: 14:PCB Sequence Numbering
WHEN
Processing active ISCOM entry during reverse conversion
THEN
Initialize ISCOM PCB number to 1 and count matching database names in previous entries to determine sequence number
Context: Active ISCOM entry contains database name and PCB information
GIVEN
Active ISCOM entry contains database name and PCB information
Applied to: 15:Database Entry Creation
WHEN
Processing ISCOM entry with non-zero PCB address during reverse conversion
THEN
Increment CCCOM entry counter and copy database name from ISCOM to CCCOM entry
Context: ISCOM entry contains PCB address and corresponding CCCOM entry has been created
GIVEN
ISCOM entry contains PCB address and corresponding CCCOM entry has been created
Applied to: 16:Reverse PCB Address Mapping
WHEN
Creating CCCOM database entry from active ISCOM entry
THEN
Set PCB address in CCCOM entry to match PCB address from ISCOM entry
Context: ISCOM PCB number has been calculated for database entry and CCCOM entry requires database number
GIVEN
ISCOM PCB number has been calculated for database entry and CCCOM entry requires database number
Applied to: 17:Database Number Assignment
WHEN
Finalizing CCCOM database entry creation during reverse conversion
THEN
If ISCOM PCB number equals '1' then set CCCOM database number to spaces, otherwise set CCCOM database number to ISCOM PCB number value
Context: The error processing program starts execution
GIVEN
The error processing program starts execution
Applied to: 4:Common Error Processing - Call DCCCOM
WHEN
The program begins error handling workflow
THEN
The common communication area CCCOM is initialized through DCCCOM service
Context: The common communication area has been initialized
GIVEN
The common communication area has been initialized
Applied to: 3:Dump Only Check - WS-DUMP-ONLY?
WHEN
The system checks the dump-only mode flag WS-DUMP-ONLY
THEN
If WS-DUMP-ONLY is true, skip environment-specific error handling and proceed directly to error notification; if WS-DUMP-ONLY is false, continue with environment detection
Context: The system is not in dump-only mode and environment detection is required
GIVEN
The system is not in dump-only mode and environment detection is required
Applied to: 2:Environment Detection - CC-PROD-TEST-IMS = WS-PROD?
WHEN
The system compares CC-PROD-TEST-IMS with WS-PROD value
THEN
If CC-PROD-TEST-IMS equals WS-PROD, route to production error handling; otherwise route to test error handling
Context: The system has detected production environment (CC-PROD-TEST-IMS equals WS-PROD)
GIVEN
The system has detected production environment (CC-PROD-TEST-IMS equals WS-PROD)
Applied to: 5:Production Error Handling - Call CERRPROD
WHEN
Production error handling is required
THEN
The CERRPROD service is invoked with CCCOM communication area to handle production-specific error processing
Context: The system has detected test environment (CC-PROD-TEST-IMS does not equal WS-PROD)
GIVEN
The system has detected test environment (CC-PROD-TEST-IMS does not equal WS-PROD)
Applied to: 6:Test Error Handling - Call CERRTEST
WHEN
Test error handling is required
THEN
The CERRTEST service is invoked with CCCOM communication area to handle test-specific error processing
Context: Error processing has completed (either environment-specific handling or dump-only mode)
GIVEN
Error processing has completed (either environment-specific handling or dump-only mode)
Applied to: 7:Error Notification Display - Display blocking error message
WHEN
Error notification is required
THEN
Display blocking error message with header and footer delimiters to system error output (SYSERR)
Context: All error processing steps and notifications have been completed
GIVEN
All error processing steps and notifications have been completed
Applied to: 8:Program Termination - Return control
WHEN
The error processing workflow reaches completion
THEN
Return control to the calling program using GOBACK statement
Context: A CIMS program is invoked with linkage parameters
GIVEN
A CIMS program is invoked with linkage parameters
Applied to: 1:Parameter Address Linkage Setup
WHEN
The system processes the parameter count and argument addresses
THEN
Memory addresses are established for CCCOM, FUNC, and ADDR-AREA parameters and the argument count is stored for subsequent processing
Context: Parameter addresses are established and argument count is available
GIVEN
Parameter addresses are established and argument count is available
Applied to: 2:Function and SSA Parameter Processing
WHEN
The system processes parameters 4 through 10 representing IO-AREA and SSA1 through SSA6
THEN
Function code is stored in CCCOM last IMS function, SSA parameters are mapped to their respective addresses and stored in CCCOM last SSA fields, and IO-AREA address is established when 4 or more arguments are provided
Context: CCCOM ISCOM address is not null and not blank pointer
GIVEN
CCCOM ISCOM address is not null and not blank pointer
Applied to: 3:ISCOM Address Validation
WHEN
The system checks ISCOM address availability
THEN
ISCOM address is established for subsequent processing
Context: CCCOM structure is available with version information
GIVEN
CCCOM structure is available with version information
Applied to: 4:CCCOM Version Compatibility Check
WHEN
The system compares CCCOM SIT version with working storage CCCOM version
THEN
ISCOM compatibility check is performed only when versions match
Context: ADDR-AREA is not null, PCB address is valid, CCCOM version is compatible, and PCB copy is available
GIVEN
ADDR-AREA is not null, PCB address is valid, CCCOM version is compatible, and PCB copy is available
Applied to: 5:PCB Address Reset Logic
WHEN
Segment level is not '98' or '99' OR force reset flag is true
THEN
First 8 positions of ADDR-AREA are cleared with spaces
Context: PCB address is null or blank pointer
GIVEN
PCB address is null or blank pointer
Applied to: 6:PCB Address Resolution
WHEN
The system searches through up to 249 database name entries
THEN
Search continues until valid PCB address is found, maximum entries reached, or database name entry is spaces, and matching PCB address is retrieved when database name matches table entry
Context: PCB address resolution process is completed
GIVEN
PCB address resolution process is completed
Applied to: 7:PCB Address Validation
WHEN
PCB address remains null after resolution attempts
THEN
Error message is generated with PCB name and number information and error handling routine CERR is invoked
Context: Valid PCB address exists, function code is available, and all SSA parameters are processed
GIVEN
Valid PCB address exists, function code is available, and all SSA parameters are processed
Applied to: 8:IMS Function Call Execution
WHEN
The system invokes CBLTDLI with function, PCB copy, IO area, and SSA parameters
THEN
IMS database operation is executed and control returns with status information in PCB
Context: IMS function call is completed
GIVEN
IMS function call is completed
Applied to: 9:IO PCB Date Time Refresh
WHEN
Function is 'GU' (Get Unique) AND PCB address equals CCCOM IO PCB address
THEN
IMS call counter is reset to zero, current system date is obtained and stored in CCCOM machine century and date fields, and current system time is captured and stored in CCCOM machine time field
Context: IMS function call is executed
GIVEN
IMS function call is executed
Applied to: 10:IMS Call Counter Management
WHEN
Any IMS database operation is performed
THEN
IMS call counter in CCCOM is incremented by 1
Context: IMS call counter is updated and PCB copy is available
GIVEN
IMS call counter is updated and PCB copy is available
Applied to: 11:PCB Status Information Update
WHEN
PCB information needs to be synchronized with CCCOM
THEN
PCB copy is moved to CCCOM copy of PCB field and feedback key length is updated in CCCOM when segment level is not '98' or '99'
Context: PCB status information is updated
GIVEN
PCB status information is updated
Applied to: 12:Terminal and User Information Capture
WHEN
Function is 'GU' (Get Unique) OR 'CHKP' (Checkpoint) AND PCB address equals CCCOM IO PCB address
THEN
CCCOM LTERM name is copied to CCCOM original LTERM field and CCCOM user ID is copied to CCCOM ACF2 user ID field
Context: IMS operation is completed with status code in CCCOM
GIVEN
IMS operation is completed with status code in CCCOM
Applied to: 13:Status Code Validation
WHEN
Status code is not blank (spaces)
THEN
Status code is compared against up to 12 acceptable status codes in CCCOM acceptable status table
Context: Status code validation is completed
GIVEN
Status code validation is completed
Applied to: 14:Error Message Generation
WHEN
Status code is not found in acceptable status code table after checking all 12 entries
THEN
Error message is constructed with status code and 'IMS RC CODE NOT IN ACCEPTABLE LIST' text, error message is stored in CCCOM error message field, and error handling routine CERR is invoked
Context: IMS operation completed successfully with blank status code OR acceptable status code found
GIVEN
IMS operation completed successfully with blank status code OR acceptable status code found
Applied to: 18:Common Area Synchronization
WHEN
CCCOM ISCOM address is not null and not blank pointer
THEN
CCCOM common area is copied to ISCOM common area to maintain data consistency
Context: The program has started execution
GIVEN
The program has started execution
Applied to: 1:Message Writing Initialization
WHEN
The message writing initialization is triggered
THEN
The basic message writing function WRITMSG is invoked
Context: The basic message writing has been completed and six parameters P1, P2, P3, P4, P5, P6 are available
GIVEN
The basic message writing has been completed and six parameters P1, P2, P3, P4, P5, P6 are available
Applied to: 2:Parameterized Message Writing
WHEN
The parameterized message writing is triggered
THEN
The extended message writing function WRITMSGX is invoked with parameters P1, P2, P3, P4, P5, P6
Context: The program execution begins
GIVEN
The program execution begins
Applied to: Program Start to Program End
WHEN
Message processing workflow is initiated
THEN
Basic message writing must be completed before parameterized message writing, and program terminates after both operations complete
Context: An input error number is provided and an error table exists with error numbers and corresponding text messages
GIVEN
An input error number is provided and an error table exists with error numbers and corresponding text messages
Applied to: Error Code Lookup
WHEN
The system performs a sequential search through the error table starting from index 1 and incrementing by 1
THEN
The search continues until either the input error number matches an error number in the table OR an empty entry (spaces) is encountered indicating end of table
Context: The error table search has completed and the input error number was found in the table
GIVEN
The error table search has completed and the input error number was found in the table
Applied to: Error Message Retrieval
WHEN
The error number at the current index position matches the input error number
THEN
The system moves the corresponding error text from the table to the output message text field
Context: The error table search has completed and the input error number was not found in the table
GIVEN
The error table search has completed and the input error number was not found in the table
Applied to: Unknown Error Handling
WHEN
The error number at the current index position does not match the input error number
THEN
The system moves the input error number to the unknown number field AND moves the unknown message to the output message text field