Bits In Glass
BIG Pega COE Team

Detailed Acceptance Criteria (ACs)

Category: US Train

This report presents the exact business rules dynamically extracted from the legacy system. Rules are formatted in an Agile/BDD Given/When/Then structure, offering a bridge between business requirements and technical implementation constraints. Component rules have been logically grouped into feature sets.

🎯 US Train Scope Detected: Extracted 259 rules, Optimally Merged into 59 Feature Scenarios.
R-CCISCOM-cbl-00001 (+44) File: CCISCOM.cblFile: CERR.cblFile: CIMS.cblFile: GCCMQERR.cblFile: WRITMSGL.cbl Overview Rules Merged 45 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Overview Rules':
  • Context - iscom structure exists with a sit version field and cccom structure contains common area data:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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):
    For 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):
    For 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):
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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:
    For 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.
👨‍💻 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
R-WRITMSGL-cbl-00004 (+2) File: WRITMSGL.cbl Message Writing Initialization Merged 3 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Message Writing Initialization':
  • Context - the message writing system needs to be initialized:
    For Message Writing Initialization - Calls the WRITMSG program to initialize message writing functionality:
    When the program execution begins, then the writmsg program is called to initialize message writing functionality.
  • Context - the message writing system is initialized and six parameters p1, p2, p3, p4, p5, p6 are available:
    For Message Writing Initialization - Calls the WRITMSG program to initialize message writing functionality:
    When extended message writing is required, then the writmsgx program is called with parameters p1, p2, p3, p4, p5, p6.
  • Context - both basic and extended message writing operations are required:
    For Message Writing Initialization - Calls the WRITMSG program to initialize message writing functionality:
    When message processing is initiated, then writmsg is called first, followed by writmsgx with parameters.
👨‍💻 Technical ACs (Gherkin)
Context: The message writing system needs to be initialized
GIVEN
The message writing system needs to be initialized
Applied to: Message Writing Initialization - Calls the WRITMSG program to initialize message writing functionality
WHEN
The program execution begins
THEN
The WRITMSG program is called to initialize message writing functionality
Context: The message writing system is initialized and six parameters P1, P2, P3, P4, P5, P6 are available
GIVEN
The message writing system is initialized and six parameters P1, P2, P3, P4, P5, P6 are available
Applied to: Message Writing Initialization - Calls the WRITMSG program to initialize message writing functionality
WHEN
Extended message writing is required
THEN
The WRITMSGX program is called with parameters P1, P2, P3, P4, P5, P6
Context: Both basic and extended message writing operations are required
GIVEN
Both basic and extended message writing operations are required
Applied to: Message Writing Initialization - Calls the WRITMSG program to initialize message writing functionality
WHEN
Message processing is initiated
THEN
WRITMSG is called first, followed by WRITMSGX with parameters
R-GCCMQERR-cbl-00004 (+5) File: GCCMQERR.cbl Error Code Lookup Merged 6 Rules
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Error Code Lookup':
  • Context - an error number needs to be looked up in the error message table:
    For Initialize Search Index to 1:
    When the error lookup process begins, then the search index is set to position 1 to start searching from the beginning of the error table.
  • Context - the system is examining an error number at the current table position:
    For Does Error Number Match Input?:
    When the error number at the current index is compared with the input error number, then if the error numbers match exactly, the search is successful and the corresponding error message is identified.
  • Context - the system is examining an error number at the current table position and no match was found:
    For Is Error Number Empty/Spaces?:
    When the error number at the current index contains spaces or is empty, then the search process recognizes that the end of the error table has been reached.
  • Context - the current error number does not match the input and the end of table has not been reached:
    For Increment Index by 1:
    When the system needs to continue searching the error table, then the search index is incremented by 1 to examine the next error number in the table.
  • Context - a matching error number has been found in the error table:
    For Search Complete - Match Found:
    When the search process completes successfully, then the corresponding error message text is moved to the output message field.
  • Context - the end of the error table has been reached without finding a matching error number:
    For Search Complete - End of Table Reached:
    When the search process completes without success, then the input error number is stored in the unknown number field and a default unknown error message is moved to the output message field.
👨‍💻 Technical ACs (Gherkin)
Context: An error number needs to be looked up in the error message table
GIVEN
An error number needs to be looked up in the error message table
Applied to: Initialize Search Index to 1
WHEN
The error lookup process begins
THEN
The search index is set to position 1 to start searching from the beginning of the error table
Context: The system is examining an error number at the current table position
GIVEN
The system is examining an error number at the current table position
Applied to: Does Error Number Match Input?
WHEN
The error number at the current index is compared with the input error number
THEN
If the error numbers match exactly, the search is successful and the corresponding error message is identified
Context: The system is examining an error number at the current table position and no match was found
GIVEN
The system is examining an error number at the current table position and no match was found
Applied to: Is Error Number Empty/Spaces?
WHEN
The error number at the current index contains spaces or is empty
THEN
The search process recognizes that the end of the error table has been reached
Context: The current error number does not match the input and the end of table has not been reached
GIVEN
The current error number does not match the input and the end of table has not been reached
Applied to: Increment Index by 1
WHEN
The system needs to continue searching the error table
THEN
The search index is incremented by 1 to examine the next error number in the table
Context: A matching error number has been found in the error table
GIVEN
A matching error number has been found in the error table
Applied to: Search Complete - Match Found
WHEN
The search process completes successfully
THEN
The corresponding error message text is moved to the output message field
Context: The end of the error table has been reached without finding a matching error number
GIVEN
The end of the error table has been reached without finding a matching error number
Applied to: Search Complete - End of Table Reached
WHEN
The search process completes without success
THEN
The input error number is stored in the unknown number field and a default unknown error message is moved to the output message field
R-WRITMSGL-cbl-00007 File: WRITMSGL.cbl Parameterized Message Writing
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Parameterized Message Writing':
  • Context - six input parameters p1, p2, p3, p4, p5, p6 are available:
    For Call WRITMSGX Program with Parameters:
    When the system needs to write a formatted message, then the writmsgx program is called with all six parameters to produce the formatted message output.
👨‍💻 Technical ACs (Gherkin)
Context: Six input parameters P1, P2, P3, P4, P5, P6 are available
GIVEN
Six input parameters P1, P2, P3, P4, P5, P6 are available
Applied to: Call WRITMSGX Program with Parameters
WHEN
The system needs to write a formatted message
THEN
The WRITMSGX program is called with all six parameters to produce the formatted message output
R-CERR-cbl-00008 (+4) File: CERR.cbl Error Handler Initialization Merged 5 Rules
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Error Handler Initialization':
  • Context - the error handling process is starting:
    For No explicit initialization code found in provided COBOL snippet:
    When the main procedure begins execution, then the communication area cccom is initialized through the dcccom module.
  • Context - the system has a dump-only mode flag ws-dump-only:
    For No explicit initialization code found in provided COBOL snippet:
    When the dump-only mode is active (ws-dump-only is true), then error processing is bypassed and control proceeds to program termination.
  • Context - the system is not in dump-only mode and environment indicator cc-prod-test-ims is available:
    For No explicit initialization code found in provided COBOL snippet:
    When the environment indicator cc-prod-test-ims equals the production value ws-prod, then the production error handler cerrprod is invoked with cccom parameters.
    For No explicit initialization code found in provided COBOL snippet:
    When the environment indicator cc-prod-test-ims does not equal the production value ws-prod, then the test error handler cerrtest is invoked with cccom parameters.
  • Context - the error handling process has completed initialization and conditional processing:
    For No explicit initialization code found in provided COBOL snippet:
    When the program reaches the notification phase, then a blocking error message is displayed to the system error output.
👨‍💻 Technical ACs (Gherkin)
Context: The error handling process is starting
GIVEN
The error handling process is starting
Applied to: No explicit initialization code found in provided COBOL snippet
WHEN
The main procedure begins execution
THEN
The communication area CCCOM is initialized through the DCCCOM module
Context: The system has a dump-only mode flag WS-DUMP-ONLY
GIVEN
The system has a dump-only mode flag WS-DUMP-ONLY
Applied to: No explicit initialization code found in provided COBOL snippet
WHEN
The dump-only mode is active (WS-DUMP-ONLY is true)
THEN
Error processing is bypassed and control proceeds to program termination
Context: The system is not in dump-only mode and environment indicator CC-PROD-TEST-IMS is available
GIVEN
The system is not in dump-only mode and environment indicator CC-PROD-TEST-IMS is available
Applied to: No explicit initialization code found in provided COBOL snippet
WHEN
The environment indicator CC-PROD-TEST-IMS equals the production value WS-PROD
THEN
The production error handler CERRPROD is invoked with CCCOM parameters
Applied to: No explicit initialization code found in provided COBOL snippet
WHEN
The environment indicator CC-PROD-TEST-IMS does not equal the production value WS-PROD
THEN
The test error handler CERRTEST is invoked with CCCOM parameters
Context: The error handling process has completed initialization and conditional processing
GIVEN
The error handling process has completed initialization and conditional processing
Applied to: No explicit initialization code found in provided COBOL snippet
WHEN
The program reaches the notification phase
THEN
A blocking error message is displayed to the system error output
R-GCCMQERR-cbl-00010 File: GCCMQERR.cbl Error Message Retrieval
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Error Message Retrieval':
  • Context - an error code has been found in the error message table at a specific index position:
    For Retrieve Error Message Text from Table:
    When the error code at the current index position equals the input error number, then the corresponding error message text at that same index position is moved to the output message field.
👨‍💻 Technical ACs (Gherkin)
Context: An error code has been found in the error message table at a specific index position
GIVEN
An error code has been found in the error message table at a specific index position
Applied to: Retrieve Error Message Text from Table
WHEN
The error code at the current index position equals the input error number
THEN
The corresponding error message text at that same index position is moved to the output message field
R-GCCMQERR-cbl-00011 (+1) File: GCCMQERR.cbl Unknown Error Handling Merged 2 Rules
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Unknown Error Handling':
  • Context - an error code has been searched in the error message table and error-number (error-index) does not equal input-error-number:
    For Move Input Error Number to Unknown Number Field:
    When the system determines the error code is not found in the table, then the input error number is moved to the unknown number field for inclusion in the default message.
  • Context - an error code is not found in the error message table and the unknown number field has been populated:
    For Move Unknown Message Template to Output:
    When the system needs to provide an error message for an unrecognized error code, then the unknown message template is moved to the output message text field.
👨‍💻 Technical ACs (Gherkin)
Context: An error code has been searched in the error message table and ERROR-NUMBER (ERROR-INDEX) does not equal INPUT-ERROR-NUMBER
GIVEN
An error code has been searched in the error message table and ERROR-NUMBER (ERROR-INDEX) does not equal INPUT-ERROR-NUMBER
Applied to: Move Input Error Number to Unknown Number Field
WHEN
The system determines the error code is not found in the table
THEN
The input error number is moved to the unknown number field for inclusion in the default message
Context: An error code is not found in the error message table and the unknown number field has been populated
GIVEN
An error code is not found in the error message table and the unknown number field has been populated
Applied to: Move Unknown Message Template to Output
WHEN
The system needs to provide an error message for an unrecognized error code
THEN
The unknown message template is moved to the output message text field
R-CERR-cbl-00013 File: CERR.cbl Environment Detection
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Environment Detection':
  • Context - the system has access to cc-prod-test-ims environment flag and ws-prod production environment value:
    For Compare CC-PROD-TEST-IMS with WS-PROD Value:
    When the system compares cc-prod-test-ims with ws-prod value, then if cc-prod-test-ims equals ws-prod then environment is identified as production, otherwise environment is identified as test.
👨‍💻 Technical ACs (Gherkin)
Context: The system has access to CC-PROD-TEST-IMS environment flag and WS-PROD production environment value
GIVEN
The system has access to CC-PROD-TEST-IMS environment flag and WS-PROD production environment value
Applied to: Compare CC-PROD-TEST-IMS with WS-PROD Value
WHEN
The system compares CC-PROD-TEST-IMS with WS-PROD value
THEN
If CC-PROD-TEST-IMS equals WS-PROD then environment is identified as Production, otherwise environment is identified as Test
R-CERR-cbl-00014 File: CERR.cbl Dump Only Check
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Dump Only Check':
  • Context - the system has initialized communication area and ws-dump-only flag is available:
    For Check WS-DUMP-ONLY Flag:
    When the system checks the ws-dump-only flag status, then if ws-dump-only is set to true, skip all further error processing and proceed to program termination; if ws-dump-only is false, continue to environment detection for error processing.
👨‍💻 Technical ACs (Gherkin)
Context: The system has initialized communication area and WS-DUMP-ONLY flag is available
GIVEN
The system has initialized communication area and WS-DUMP-ONLY flag is available
Applied to: Check WS-DUMP-ONLY Flag
WHEN
The system checks the WS-DUMP-ONLY flag status
THEN
If WS-DUMP-ONLY is set to true, skip all further error processing and proceed to program termination; If WS-DUMP-ONLY is false, continue to environment detection for error processing
R-CERR-cbl-00015 File: CERR.cbl Common Error Processing
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Common Error Processing':
  • Context - the system needs to perform error processing:
    For Call DCCCOM Program:
    When the main error processing procedure is executed, then the system calls dcccom program using cccom communication area to perform standard error processing initialization.
👨‍💻 Technical ACs (Gherkin)
Context: The system needs to perform error processing
GIVEN
The system needs to perform error processing
Applied to: Call DCCCOM Program
WHEN
The main error processing procedure is executed
THEN
The system calls DCCCOM program using CCCOM communication area to perform standard error processing initialization
R-CERR-cbl-00016 File: CERR.cbl Production Error Handling
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Production Error Handling':
  • Context - the system is running in production environment (cc-prod-test-ims equals ws-prod) and dump-only mode is disabled (not ws-dump-only is true) and communication area cccom is available:
    For Call CERRPROD with Communication Area:
    When an error condition requires processing through the production error handler, then the system invokes the production error handler cerrprod with the communication area cccom to process the error according to production standards.
👨‍💻 Technical ACs (Gherkin)
Context: The system is running in production environment (CC-PROD-TEST-IMS equals WS-PROD) and dump-only mode is disabled (NOT WS-DUMP-ONLY is true) and communication area CCCOM is available
GIVEN
The system is running in production environment (CC-PROD-TEST-IMS equals WS-PROD) and dump-only mode is disabled (NOT WS-DUMP-ONLY is true) and communication area CCCOM is available
Applied to: Call CERRPROD with Communication Area
WHEN
An error condition requires processing through the production error handler
THEN
The system invokes the production error handler CERRPROD with the communication area CCCOM to process the error according to production standards
R-CIMS-cbl-00016 (+5) File: CIMS.cbl Parameter Address Linkage Setup Merged 6 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Parameter Address Linkage Setup':
  • Context - the cims program is starting parameter linkage setup:
    For Set No Force Reset Flag:
    When the system begins parameter processing initialization, then the no-force-reset flag is set to true to control reset behavior.
  • Context - the no-force-reset flag has been set:
    For Execute Address Linkage Parameters Routine:
    When the system needs to establish parameter address linkage, then the address-linkage-parameters routine is performed to set up parameter addressing.
  • Context - the address linkage parameters routine has been executed:
    For Get Parameter Count from Linkage:
    When the system needs to determine the number of parameters passed, then the parameter count is moved from csilkcrd-parms-count to arg-count.
  • Context - the parameter count has been retrieved from linkage data:
    For Set CCCOM Address from Parameter 1:
    When the system needs to access the cccom control block, then the address of cccom is set to the address stored in arg-addr position 1.
  • Context - the cccom control block address has been established:
    For Set Function Code Address from Parameter 2:
    When the system needs to access the function code for database operations, then the address of func is set to the address stored in arg-addr position 2.
  • Context - the function code address has been established:
    For Set PCB Address Area from Parameter 3:
    When the system needs to access the pcb address area for database operations, then the address of addr-area is set to the address stored in arg-addr position 3.
👨‍💻 Technical ACs (Gherkin)
Context: The CIMS program is starting parameter linkage setup
GIVEN
The CIMS program is starting parameter linkage setup
Applied to: Set No Force Reset Flag
WHEN
The system begins parameter processing initialization
THEN
The NO-FORCE-RESET flag is set to TRUE to control reset behavior
Context: The NO-FORCE-RESET flag has been set
GIVEN
The NO-FORCE-RESET flag has been set
Applied to: Execute Address Linkage Parameters Routine
WHEN
The system needs to establish parameter address linkage
THEN
The ADDRESS-LINKAGE-PARAMETERS routine is performed to set up parameter addressing
Context: The address linkage parameters routine has been executed
GIVEN
The address linkage parameters routine has been executed
Applied to: Get Parameter Count from Linkage
WHEN
The system needs to determine the number of parameters passed
THEN
The parameter count is moved from CSILKCRD-PARMS-COUNT to ARG-COUNT
Context: The parameter count has been retrieved from linkage data
GIVEN
The parameter count has been retrieved from linkage data
Applied to: Set CCCOM Address from Parameter 1
WHEN
The system needs to access the CCCOM control block
THEN
The address of CCCOM is set to the address stored in ARG-ADDR position 1
Context: The CCCOM control block address has been established
GIVEN
The CCCOM control block address has been established
Applied to: Set Function Code Address from Parameter 2
WHEN
The system needs to access the function code for database operations
THEN
The address of FUNC is set to the address stored in ARG-ADDR position 2
Context: The function code address has been established
GIVEN
The function code address has been established
Applied to: Set PCB Address Area from Parameter 3
WHEN
The system needs to access the PCB address area for database operations
THEN
The address of ADDR-AREA is set to the address stored in ARG-ADDR position 3
R-CERR-cbl-00017 (+2) File: CERR.cbl Test Error Handling Merged 3 Rules
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Test Error Handling':
  • Context - the system is running in test environment (cc-prod-test-ims is not equal to ws-prod) and dump-only mode is disabled (ws-dump-only is false):
    For Test Environment Detected:
    When an error condition occurs requiring error processing, then the system routes the error to the test error handler (cerrtest) and passes error information through the communication area (cccom).
  • Context - the system is operating in dump-only mode (ws-dump-only is true):
    For Route Error to Test Handler:
    When an error condition occurs, then the system bypasses all error processing routines and skips calling any error handlers.
  • Context - error processing is required for test environment and dump mode is not active:
    For Call CERRTEST Program:
    When the system determines test environment error handling is needed, then the system calls the cerrtest program and passes the communication area (cccom) containing error details.
👨‍💻 Technical ACs (Gherkin)
Context: The system is running in test environment (CC-PROD-TEST-IMS is not equal to WS-PROD) and dump-only mode is disabled (WS-DUMP-ONLY is false)
GIVEN
The system is running in test environment (CC-PROD-TEST-IMS is not equal to WS-PROD) and dump-only mode is disabled (WS-DUMP-ONLY is false)
Applied to: Test Environment Detected
WHEN
An error condition occurs requiring error processing
THEN
The system routes the error to the test error handler (CERRTEST) and passes error information through the communication area (CCCOM)
Context: The system is operating in dump-only mode (WS-DUMP-ONLY is true)
GIVEN
The system is operating in dump-only mode (WS-DUMP-ONLY is true)
Applied to: Route Error to Test Handler
WHEN
An error condition occurs
THEN
The system bypasses all error processing routines and skips calling any error handlers
Context: Error processing is required for test environment and dump mode is not active
GIVEN
Error processing is required for test environment and dump mode is not active
Applied to: Call CERRTEST Program
WHEN
The system determines test environment error handling is needed
THEN
The system calls the CERRTEST program and passes the communication area (CCCOM) containing error details
R-CCISCOM-cbl-00018 (+2) File: CCISCOM.cbl Version Check and Data Transfer Merged 3 Rules
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Version Check and Data Transfer':
  • Context - iscom communication area exists with a sit version field and ws-iscom-version contains the expected version:
    For Is ISCOM Version Already Set?:
    When the system compares cc-sit-version of iscom with ws-iscom-version, then if versions match, proceed with simple data transfer; if versions don't match, proceed with full initialization.
  • Context - cccom and iscom communication areas exist with cc-common-area fields:
    For Transfer Common Area Data from CCCOM to ISCOM:
    When version compatibility check passes, then copy cc-common-area from cccom to cc-common-area of iscom.
  • Context - ws-iscom-version contains the current version and iscom has cc-sit-version field:
    For Set ISCOM Version:
    When common area data transfer is completed, then set cc-sit-version of iscom to ws-iscom-version.
👨‍💻 Technical ACs (Gherkin)
Context: ISCOM communication area exists with a SIT version field and WS-ISCOM-VERSION contains the expected version
GIVEN
ISCOM communication area exists with a SIT version field and WS-ISCOM-VERSION contains the expected version
Applied to: Is ISCOM Version Already Set?
WHEN
The system compares CC-SIT-VERSION of ISCOM with WS-ISCOM-VERSION
THEN
If versions match, proceed with simple data transfer; if versions don't match, proceed with full initialization
Context: CCCOM and ISCOM communication areas exist with CC-COMMON-AREA fields
GIVEN
CCCOM and ISCOM communication areas exist with CC-COMMON-AREA fields
Applied to: Transfer Common Area Data from CCCOM to ISCOM
WHEN
Version compatibility check passes
THEN
Copy CC-COMMON-AREA from CCCOM to CC-COMMON-AREA of ISCOM
Context: WS-ISCOM-VERSION contains the current version and ISCOM has CC-SIT-VERSION field
GIVEN
WS-ISCOM-VERSION contains the current version and ISCOM has CC-SIT-VERSION field
Applied to: Set ISCOM Version
WHEN
Common area data transfer is completed
THEN
Set CC-SIT-VERSION of ISCOM to WS-ISCOM-VERSION
R-CERR-cbl-00020 File: CERR.cbl Error Notification Display
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Error Notification Display':
  • Context - a blocking error condition has occurred in the cims system:
    For Display blocking error message to system error output:
    When the error notification display process is executed, then display a top border line of hash symbols to system error output and display the blocking error message 'cims: blocking error.' to system error output and display a bottom border line of hash symbols to system error output.
👨‍💻 Technical ACs (Gherkin)
Context: A blocking error condition has occurred in the CIMS system
GIVEN
A blocking error condition has occurred in the CIMS system
Applied to: Display blocking error message to system error output
WHEN
The error notification display process is executed
THEN
Display a top border line of hash symbols to system error output AND display the blocking error message 'CIMS: BLOCKING ERROR.' to system error output AND display a bottom border line of hash symbols to system error output
R-CCISCOM-cbl-00021 (+3) File: CCISCOM.cbl ISCOM Initialization Merged 4 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'ISCOM Initialization':
  • Context - iscom version (cc-sit-version of iscom) does not equal the working storage iscom version (ws-iscom-version):
    For Initialize ISCOM with Default Values:
    When the system processes iscom initialization, then iscom structure is populated with default values from iscomval.
  • Context - iscom version does not match expected version and iscom has been initialized with default values:
    For Copy Common Area Data from CCCOM:
    When the system processes common area data transfer, then common area data (cc-common-area) is copied from cccom to iscom.
  • Context - iscom has been initialized and common area data has been copied:
    For Set ISCOM Version Number:
    When the system finalizes iscom structure setup, then iscom version (cc-sit-version of iscom) is set to the working storage iscom version (ws-iscom-version).
  • Context - iscom version does not match expected version and initialization is in progress:
    For Initialize ISCOM with Default Values:
    When the system processes lt-pcbs data transfer, then lt-pcbs data (cc-lt-pcbs) is copied from cccom to iscom.
👨‍💻 Technical ACs (Gherkin)
Context: ISCOM version (CC-SIT-VERSION OF ISCOM) does not equal the working storage ISCOM version (WS-ISCOM-VERSION)
GIVEN
ISCOM version (CC-SIT-VERSION OF ISCOM) does not equal the working storage ISCOM version (WS-ISCOM-VERSION)
Applied to: Initialize ISCOM with Default Values
WHEN
The system processes ISCOM initialization
THEN
ISCOM structure is populated with default values from ISCOMVAL
Context: ISCOM version does not match expected version and ISCOM has been initialized with default values
GIVEN
ISCOM version does not match expected version and ISCOM has been initialized with default values
Applied to: Copy Common Area Data from CCCOM
WHEN
The system processes common area data transfer
THEN
Common area data (CC-COMMON-AREA) is copied from CCCOM to ISCOM
Context: ISCOM has been initialized and common area data has been copied
GIVEN
ISCOM has been initialized and common area data has been copied
Applied to: Set ISCOM Version Number
WHEN
The system finalizes ISCOM structure setup
THEN
ISCOM version (CC-SIT-VERSION OF ISCOM) is set to the working storage ISCOM version (WS-ISCOM-VERSION)
Context: ISCOM version does not match expected version and initialization is in progress
GIVEN
ISCOM version does not match expected version and initialization is in progress
Applied to: Initialize ISCOM with Default Values
WHEN
The system processes LT-PCBS data transfer
THEN
LT-PCBS data (CC-LT-PCBS) is copied from CCCOM to ISCOM
R-CERR-cbl-00021 File: CERR.cbl Program Termination
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Program Termination':
  • Context - error processing activities have been completed including communication setup, environment-based error handler execution, and blocking error message display:
    For Program Termination - Return control to calling program after error processing completion:
    When the program reaches the termination point, then the system executes program termination and returns control to the calling program.
👨‍💻 Technical ACs (Gherkin)
Context: Error processing activities have been completed including communication setup, environment-based error handler execution, and blocking error message display
GIVEN
Error processing activities have been completed including communication setup, environment-based error handler execution, and blocking error message display
Applied to: Program Termination - Return control to calling program after error processing completion
WHEN
The program reaches the termination point
THEN
The system executes program termination and returns control to the calling program
R-CIMS-cbl-00022 (+8) File: CIMS.cbl Function and SSA Parameter Processing Merged 9 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Function and SSA Parameter Processing':
  • Context - an ims function code is provided as input parameter:
    For Store IMS Function Code:
    When the function parameter processing begins, then the function code is stored in the last ims function field of the common control area.
  • Context - ssa parameter processing is initiated:
    For Clear Previous SSA Data:
    When before capturing new ssa parameters, then the last ssa field in the common control area is cleared to spaces.
  • Context - parameter count and argument addresses are available:
    For Parameter Count >= 4?:
    When parameter count is 4 or greater, then io area address is set from the 4th argument and stored in the common control area.
    For Parameter Count >= 5?:
    When parameter count is 5 or greater, then ssa1 address is set from the 5th argument and ssa1 content is stored in the last ssa1 field of the common control area.
    For Parameter Count >= 6?:
    When parameter count is 6 or greater, then ssa2 address is set from the 6th argument and ssa2 content is stored in the last ssa2 field of the common control area.
    For Parameter Count >= 7?:
    When parameter count is 7 or greater, then ssa3 address is set from the 7th argument and ssa3 content is stored in the last ssa3 field of the common control area.
    For Parameter Count >= 8?:
    When parameter count is 8 or greater, then ssa4 address is set from the 8th argument and ssa4 content is stored in the last ssa4 field of the common control area.
    For Parameter Count >= 9?:
    When parameter count is 9 or greater, then ssa5 address is set from the 9th argument and ssa5 content is stored in the last ssa5 field of the common control area.
    For Parameter Count >= 10?:
    When parameter count is 10 or greater, then ssa6 address is set from the 10th argument and ssa6 content is stored in the last ssa6 field of the common control area.
👨‍💻 Technical ACs (Gherkin)
Context: An IMS function code is provided as input parameter
GIVEN
An IMS function code is provided as input parameter
Applied to: Store IMS Function Code
WHEN
The function parameter processing begins
THEN
The function code is stored in the last IMS function field of the common control area
Context: SSA parameter processing is initiated
GIVEN
SSA parameter processing is initiated
Applied to: Clear Previous SSA Data
WHEN
Before capturing new SSA parameters
THEN
The last SSA field in the common control area is cleared to spaces
Context: Parameter count and argument addresses are available
GIVEN
Parameter count and argument addresses are available
Applied to: Parameter Count >= 4?
WHEN
Parameter count is 4 or greater
THEN
IO area address is set from the 4th argument and stored in the common control area
Applied to: Parameter Count >= 5?
WHEN
Parameter count is 5 or greater
THEN
SSA1 address is set from the 5th argument and SSA1 content is stored in the last SSA1 field of the common control area
Applied to: Parameter Count >= 6?
WHEN
Parameter count is 6 or greater
THEN
SSA2 address is set from the 6th argument and SSA2 content is stored in the last SSA2 field of the common control area
Applied to: Parameter Count >= 7?
WHEN
Parameter count is 7 or greater
THEN
SSA3 address is set from the 7th argument and SSA3 content is stored in the last SSA3 field of the common control area
Applied to: Parameter Count >= 8?
WHEN
Parameter count is 8 or greater
THEN
SSA4 address is set from the 8th argument and SSA4 content is stored in the last SSA4 field of the common control area
Applied to: Parameter Count >= 9?
WHEN
Parameter count is 9 or greater
THEN
SSA5 address is set from the 9th argument and SSA5 content is stored in the last SSA5 field of the common control area
Applied to: Parameter Count >= 10?
WHEN
Parameter count is 10 or greater
THEN
SSA6 address is set from the 10th argument and SSA6 content is stored in the last SSA6 field of the common control area
R-CCISCOM-cbl-00025 File: CCISCOM.cbl Cross
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Cross':
  • Context - cccom and iscom communication structures exist and need to reference each other:
    For Cross-Reference Address Setup - Set up bidirectional address references between CCCOM and ISCOM structures:
    When cross-reference setup is initiated, then cccom address reference is stored in iscom structure and iscom address reference is stored in cccom structure and bidirectional references are established.
👨‍💻 Technical ACs (Gherkin)
Context: CCCOM and ISCOM communication structures exist and need to reference each other
GIVEN
CCCOM and ISCOM communication structures exist and need to reference each other
Applied to: Cross-Reference Address Setup - Set up bidirectional address references between CCCOM and ISCOM structures
WHEN
Cross-reference setup is initiated
THEN
CCCOM address reference is stored in ISCOM structure AND ISCOM address reference is stored in CCCOM structure AND bidirectional references are established
R-CCISCOM-cbl-00026 (+1) File: CCISCOM.cbl PCB Transfer Merged 2 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'PCB Transfer':
  • Context - cccom and iscom structures exist and cc-sit-version of iscom does not equal ws-iscom-version:
    For Transfer PCB Data to ISCOM Structure:
    When the system performs version compatibility processing, then cc-lt-pcbs data from cccom structure is copied to cc-lt-pcbs field in iscom structure.
  • Context - iscom and cccom structures exist and cc-sit-version of cccom does not equal ws-cccom-version:
    For Transfer PCB Data to ISCOM Structure:
    When the system performs reverse version compatibility processing via iscccom entry point, then cc-lt-pcbs data from iscom structure is copied to cc-lt-pcbs field in cccom structure.
👨‍💻 Technical ACs (Gherkin)
Context: CCCOM and ISCOM structures exist and CC-SIT-VERSION of ISCOM does not equal WS-ISCOM-VERSION
GIVEN
CCCOM and ISCOM structures exist and CC-SIT-VERSION of ISCOM does not equal WS-ISCOM-VERSION
Applied to: Transfer PCB Data to ISCOM Structure
WHEN
The system performs version compatibility processing
THEN
CC-LT-PCBS data from CCCOM structure is copied to CC-LT-PCBS field in ISCOM structure
Context: ISCOM and CCCOM structures exist and CC-SIT-VERSION of CCCOM does not equal WS-CCCOM-VERSION
GIVEN
ISCOM and CCCOM structures exist and CC-SIT-VERSION of CCCOM does not equal WS-CCCOM-VERSION
Applied to: Transfer PCB Data to ISCOM Structure
WHEN
The system performs reverse version compatibility processing via ISCCCOM entry point
THEN
CC-LT-PCBS data from ISCOM structure is copied to CC-LT-PCBS field in CCCOM structure
R-CCISCOM-cbl-00028 (+4) File: CCISCOM.cbl Database Name Scanning Merged 5 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Database Name Scanning':
  • Context - a database scanning operation needs to begin:
    For Initialize Index I = 1:
    When the system starts processing database entries, then the index counter is set to position 1 to begin scanning from the first entry.
  • Context - a database entry scanning operation is in progress with current index position i:
    For Index I > CCCOM Table Size?:
    When the system checks if the current index exceeds the cccom table size limit, then if index i is greater than cccom table size, terminate the scanning process, otherwise continue to next validation.
  • Context - a database entry at position i within the valid table range:
    For Database Name at Position I = SPACES?:
    When the system examines the database name field at the current position, then if the database name contains only spaces (empty), terminate the scanning process, otherwise proceed to process the current entry.
  • Context - a valid database entry at position i with a non-empty database name:
    For Process Current Database Entry:
    When the system needs to process the database entry for address mapping, then invoke the database address scanning procedure (100-scan-cc-db-addr) to handle pcb number processing and database name matching.
  • Context - a database entry has been successfully processed at position i:
    For Increment Index I by 1:
    When the system completes processing the current database entry, then increment the index i by 1 to move to the next database entry position for continued scanning.
👨‍💻 Technical ACs (Gherkin)
Context: A database scanning operation needs to begin
GIVEN
A database scanning operation needs to begin
Applied to: Initialize Index I = 1
WHEN
The system starts processing database entries
THEN
The index counter is set to position 1 to begin scanning from the first entry
Context: A database entry scanning operation is in progress with current index position I
GIVEN
A database entry scanning operation is in progress with current index position I
Applied to: Index I > CCCOM Table Size?
WHEN
The system checks if the current index exceeds the CCCOM table size limit
THEN
If index I is greater than CCCOM table size, terminate the scanning process, otherwise continue to next validation
Context: A database entry at position I within the valid table range
GIVEN
A database entry at position I within the valid table range
Applied to: Database Name at Position I = SPACES?
WHEN
The system examines the database name field at the current position
THEN
If the database name contains only spaces (empty), terminate the scanning process, otherwise proceed to process the current entry
Context: A valid database entry at position I with a non-empty database name
GIVEN
A valid database entry at position I with a non-empty database name
Applied to: Process Current Database Entry
WHEN
The system needs to process the database entry for address mapping
THEN
Invoke the database address scanning procedure (100-SCAN-CC-DB-ADDR) to handle PCB number processing and database name matching
Context: A database entry has been successfully processed at position I
GIVEN
A database entry has been successfully processed at position I
Applied to: Increment Index I by 1
WHEN
The system completes processing the current database entry
THEN
Increment the index I by 1 to move to the next database entry position for continued scanning
R-CIMS-cbl-00031 (+1) File: CIMS.cbl ISCOM Address Validation Merged 2 Rules
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'ISCOM Address Validation':
  • Context - the system has a common control area (cccom) that may contain an iscom address and the system version matches the expected cccom version:
    For Check ISCOM Address in CCCOM:
    When the system checks for iscom address availability during communication setup, then if iscom address is not null and not blank, the system establishes the iscom communication channel, otherwise it continues processing without iscom communication.
  • Context - a valid iscom address exists in cccom that is not null and not blank:
    For Set ISCOM Address for Communication:
    When the system needs to establish iscom communication, then the system sets the address of iscom to the cccom iscom address to enable communication.
👨‍💻 Technical ACs (Gherkin)
Context: The system has a common control area (CCCOM) that may contain an ISCOM address and the system version matches the expected CCCOM version
GIVEN
The system has a common control area (CCCOM) that may contain an ISCOM address and the system version matches the expected CCCOM version
Applied to: Check ISCOM Address in CCCOM
WHEN
The system checks for ISCOM address availability during communication setup
THEN
If ISCOM address is not null and not blank, the system establishes the ISCOM communication channel, otherwise it continues processing without ISCOM communication
Context: A valid ISCOM address exists in CCCOM that is not null and not blank
GIVEN
A valid ISCOM address exists in CCCOM that is not null and not blank
Applied to: Set ISCOM Address for Communication
WHEN
The system needs to establish ISCOM communication
THEN
The system sets the address of ISCOM to the CCCOM ISCOM address to enable communication
R-CCISCOM-cbl-00033 (+1) File: CCISCOM.cbl PCB Number Processing Merged 2 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'PCB Number Processing':
  • Context - a database entry from cccom table with pcb number field that may be empty or contain spaces:
    For PCB Number Processing - Process and validate PCB numbers, defaulting to '1' when spaces are found:
    When the pcb number field contains spaces or is empty, then the system assigns default pcb number '1' to the cccom pcb number field.
  • Context - a database entry from cccom table with a valid pcb number that is not spaces:
    For PCB Number Processing - Process and validate PCB numbers, defaulting to '1' when spaces are found:
    When the pcb number field contains a valid non-space value, then the system preserves the existing pcb number value without modification.
👨‍💻 Technical ACs (Gherkin)
Context: A database entry from CCCOM table with PCB number field that may be empty or contain spaces
GIVEN
A database entry from CCCOM table with PCB number field that may be empty or contain spaces
Applied to: PCB Number Processing - Process and validate PCB numbers, defaulting to '1' when spaces are found
WHEN
The PCB number field contains spaces or is empty
THEN
The system assigns default PCB number '1' to the CCCOM PCB number field
Context: A database entry from CCCOM table with a valid PCB number that is not spaces
GIVEN
A database entry from CCCOM table with a valid PCB number that is not spaces
Applied to: PCB Number Processing - Process and validate PCB numbers, defaulting to '1' when spaces are found
WHEN
The PCB number field contains a valid non-space value
THEN
The system preserves the existing PCB number value without modification
R-CIMS-cbl-00033 (+8) File: CIMS.cbl CCCOM Version Compatibility Check Merged 9 Rules
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'CCCOM Version Compatibility Check':
  • Context - a cccom control block with a version identifier and a system with an expected cccom version:
    For Check CCCOM Version:
    When the system checks cccom version compatibility, then the system compares cccom version against expected version and determines whether to proceed with iscom checks.
  • Context - cccom version has been validated against expected system version:
    For CCCOM Version = Expected Version?:
    When cccom version equals the expected system version, then system proceeds with iscom compatibility checks, otherwise skips iscom processing.
  • Context - cccom version compatibility has been confirmed and cccom contains database pcb area:
    For Set Base Address to CCCOM DB PCBs:
    When system needs to perform iscom address calculations, then system sets the base address pointer to the cccom database pcbs area.
  • Context - base address has been set to cccom database pcbs and an address area is available:
    For Set Offset Address to Address Area:
    When system needs to calculate iscom address offset, then system sets the offset address pointer to the provided address area.
  • Context - iscom structure is available with database pcbs area:
    For Calculate ISCOM Table Size:
    When system needs to determine iscom table boundaries, then system computes the length of iscom database pcbs area and stores as table size.
  • Context - base address and offset address have been established for iscom calculations:
    For Base Address > Zero?:
    When base address value is greater than zero, then system uses method 1 for address calculation, otherwise uses method 2.
  • Context - base address is greater than zero and offset address is available:
    For Calculate Address Offset Method 1:
    When system applies address calculation method 1, then system assigns offset address to address-1 and base address to address-2 for final offset computation.
  • Context - base address is not greater than zero and offset address is available:
    For Calculate Address Offset Method 2:
    When system applies address calculation method 2, then system assigns base address to address-1 and offset address to address-2 for final offset computation.
  • Context - address-1 and address-2 have been assigned based on selected calculation method:
    For Compute Final Address Offset:
    When system performs final address offset calculation, then system computes address offset as the difference between address-1 and address-2.
👨‍💻 Technical ACs (Gherkin)
Context: A CCCOM control block with a version identifier and a system with an expected CCCOM version
GIVEN
A CCCOM control block with a version identifier and a system with an expected CCCOM version
Applied to: Check CCCOM Version
WHEN
The system checks CCCOM version compatibility
THEN
The system compares CCCOM version against expected version and determines whether to proceed with ISCOM checks
Context: CCCOM version has been validated against expected system version
GIVEN
CCCOM version has been validated against expected system version
Applied to: CCCOM Version = Expected Version?
WHEN
CCCOM version equals the expected system version
THEN
System proceeds with ISCOM compatibility checks, otherwise skips ISCOM processing
Context: CCCOM version compatibility has been confirmed and CCCOM contains database PCB area
GIVEN
CCCOM version compatibility has been confirmed and CCCOM contains database PCB area
Applied to: Set Base Address to CCCOM DB PCBs
WHEN
System needs to perform ISCOM address calculations
THEN
System sets the base address pointer to the CCCOM database PCBs area
Context: Base address has been set to CCCOM database PCBs and an address area is available
GIVEN
Base address has been set to CCCOM database PCBs and an address area is available
Applied to: Set Offset Address to Address Area
WHEN
System needs to calculate ISCOM address offset
THEN
System sets the offset address pointer to the provided address area
Context: ISCOM structure is available with database PCBs area
GIVEN
ISCOM structure is available with database PCBs area
Applied to: Calculate ISCOM Table Size
WHEN
System needs to determine ISCOM table boundaries
THEN
System computes the length of ISCOM database PCBs area and stores as table size
Context: Base address and offset address have been established for ISCOM calculations
GIVEN
Base address and offset address have been established for ISCOM calculations
Applied to: Base Address > Zero?
WHEN
Base address value is greater than zero
THEN
System uses method 1 for address calculation, otherwise uses method 2
Context: Base address is greater than zero and offset address is available
GIVEN
Base address is greater than zero and offset address is available
Applied to: Calculate Address Offset Method 1
WHEN
System applies address calculation method 1
THEN
System assigns offset address to address-1 and base address to address-2 for final offset computation
Context: Base address is not greater than zero and offset address is available
GIVEN
Base address is not greater than zero and offset address is available
Applied to: Calculate Address Offset Method 2
WHEN
System applies address calculation method 2
THEN
System assigns base address to address-1 and offset address to address-2 for final offset computation
Context: Address-1 and address-2 have been assigned based on selected calculation method
GIVEN
Address-1 and address-2 have been assigned based on selected calculation method
Applied to: Compute Final Address Offset
WHEN
System performs final address offset calculation
THEN
System computes address offset as the difference between address-1 and address-2
R-CCISCOM-cbl-00035 (+2) File: CCISCOM.cbl Database Name Matching Merged 3 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Database Name Matching':
  • Context - a cccom database entry at position i and an iscom database entry at position j are being compared:
    For Do Database Names Match?:
    When the database name in cccom entry matches the database name in iscom entry, then the system identifies this as a matching database pair and proceeds with pcb number increment and address mapping operations.
  • Context - database names between cccom and iscom entries have been confirmed as matching:
    For Names Match - Proceed with Processing:
    When the matching database names are identified, then the iscom pcb number is incremented by 1 to maintain proper sequencing.
  • Context - database names match and iscom pcb number has been incremented:
    For Names Match - Proceed with Processing:
    When the current iscom pcb number equals the cccom pcb number for the matched database, then the pcb address from cccom entry is assigned to the corresponding iscom entry.
👨‍💻 Technical ACs (Gherkin)
Context: A CCCOM database entry at position I and an ISCOM database entry at position J are being compared
GIVEN
A CCCOM database entry at position I and an ISCOM database entry at position J are being compared
Applied to: Do Database Names Match?
WHEN
The database name in CCCOM entry matches the database name in ISCOM entry
THEN
The system identifies this as a matching database pair and proceeds with PCB number increment and address mapping operations
Context: Database names between CCCOM and ISCOM entries have been confirmed as matching
GIVEN
Database names between CCCOM and ISCOM entries have been confirmed as matching
Applied to: Names Match - Proceed with Processing
WHEN
The matching database names are identified
THEN
The ISCOM PCB number is incremented by 1 to maintain proper sequencing
Context: Database names match and ISCOM PCB number has been incremented
GIVEN
Database names match and ISCOM PCB number has been incremented
Applied to: Names Match - Proceed with Processing
WHEN
The current ISCOM PCB number equals the CCCOM PCB number for the matched database
THEN
The PCB address from CCCOM entry is assigned to the corresponding ISCOM entry
R-CCISCOM-cbl-00038 (+2) File: CCISCOM.cbl PCB Counter Management Merged 3 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'PCB Counter Management':
  • Context - a database name from cccom entry (i) and a database name from iscom entry (j) are being compared:
    For Increment PCB Counter by 1:
    When the database name from cccom matches the database name from iscom, then the iscom pcb number counter is incremented by 1.
  • Context - a database name from cccom entry at position i and a database name from iscom entry at position j:
    For Database Names Match?:
    When the system compares the two database names, then if the names are identical, proceed to increment pcb counter; otherwise continue to next database entry.
  • Context - two iscom database entries at positions i and k are being compared during reverse processing:
    For Increment PCB Counter by 1:
    When the database name at position i matches the database name at position k, then the iscom pcb number counter is incremented by 1.
👨‍💻 Technical ACs (Gherkin)
Context: A database name from CCCOM entry (I) and a database name from ISCOM entry (J) are being compared
GIVEN
A database name from CCCOM entry (I) and a database name from ISCOM entry (J) are being compared
Applied to: Increment PCB Counter by 1
WHEN
The database name from CCCOM matches the database name from ISCOM
THEN
The ISCOM PCB number counter is incremented by 1
Context: A database name from CCCOM entry at position I and a database name from ISCOM entry at position J
GIVEN
A database name from CCCOM entry at position I and a database name from ISCOM entry at position J
Applied to: Database Names Match?
WHEN
The system compares the two database names
THEN
If the names are identical, proceed to increment PCB counter; otherwise continue to next database entry
Context: Two ISCOM database entries at positions I and K are being compared during reverse processing
GIVEN
Two ISCOM database entries at positions I and K are being compared during reverse processing
Applied to: Increment PCB Counter by 1
WHEN
The database name at position I matches the database name at position K
THEN
The ISCOM PCB number counter is incremented by 1
R-CCISCOM-cbl-00041 (+3) File: CCISCOM.cbl PCB Address Mapping Merged 4 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'PCB Address Mapping':
  • Context - a cccom entry at position i and an iscom entry at position j both contain database names:
    For Database Names Match Between CCCOM and ISCOM?:
    When the system compares the database name from cccom entry i with the database name from iscom entry j, then if the database names are identical, the system proceeds with pcb counter increment; otherwise, it continues to the next entry.
  • Context - database names match between cccom entry i and iscom entry j:
    For Increment ISCOM PCB Counter:
    When the system processes the matching database entries, then the iscom pcb number counter is incremented by 1.
  • Context - the iscom pcb number has been incremented and the cccom pcb number is available:
    For PCB Numbers Match?:
    When the system compares the iscom pcb number with the cccom pcb number, then if the pcb numbers are equal, the system proceeds with pcb address mapping; otherwise, it continues processing.
  • Context - database names match and pcb numbers are equal between cccom entry i and iscom entry j:
    For Map PCB Address from CCCOM to ISCOM:
    When the system performs pcb address mapping, then the pcb address from cccom entry i is assigned to iscom entry j.
👨‍💻 Technical ACs (Gherkin)
Context: A CCCOM entry at position I and an ISCOM entry at position J both contain database names
GIVEN
A CCCOM entry at position I and an ISCOM entry at position J both contain database names
Applied to: Database Names Match Between CCCOM and ISCOM?
WHEN
The system compares the database name from CCCOM entry I with the database name from ISCOM entry J
THEN
If the database names are identical, the system proceeds with PCB counter increment; otherwise, it continues to the next entry
Context: Database names match between CCCOM entry I and ISCOM entry J
GIVEN
Database names match between CCCOM entry I and ISCOM entry J
Applied to: Increment ISCOM PCB Counter
WHEN
The system processes the matching database entries
THEN
The ISCOM PCB number counter is incremented by 1
Context: The ISCOM PCB number has been incremented and the CCCOM PCB number is available
GIVEN
The ISCOM PCB number has been incremented and the CCCOM PCB number is available
Applied to: PCB Numbers Match?
WHEN
The system compares the ISCOM PCB number with the CCCOM PCB number
THEN
If the PCB numbers are equal, the system proceeds with PCB address mapping; otherwise, it continues processing
Context: Database names match and PCB numbers are equal between CCCOM entry I and ISCOM entry J
GIVEN
Database names match and PCB numbers are equal between CCCOM entry I and ISCOM entry J
Applied to: Map PCB Address from CCCOM to ISCOM
WHEN
The system performs PCB address mapping
THEN
The PCB address from CCCOM entry I is assigned to ISCOM entry J
R-CIMS-cbl-00042 (+7) File: CIMS.cbl PCB Address Reset Logic Merged 8 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'PCB Address Reset Logic':
  • Context - a pcb address reset operation is initiated:
    For Check Address Area Availability:
    When the system checks if the address area is not null, then the system proceeds with pcb address validation if address area is available, otherwise uses default csi address area.
  • Context - an address area is available for processing:
    For PCB Address Valid and Not Blank?:
    When the system evaluates if pcb address is not null and not blank pointer, then the system continues with version compatibility check if pcb address is valid, otherwise skips pcb reset logic.
  • Context - a valid pcb address exists:
    For CCCOM Version Compatible?:
    When the system compares cc-sit-version of cccom with ws-cccom-version, then the system proceeds with pcb copy address setup if versions match, otherwise skips pcb reset processing.
  • Context - cccom version is compatible with system version:
    For Set PCB Copy Address:
    When the system sets the address of lk-copy-of-pcb to pcb-addr, then the pcb copy address is established for subsequent segment level validation.
  • Context - pcb copy address is established:
    For Segment Level Valid?:
    When the system checks if lk-seg-level is not equal to '98' and not equal to '99', then the system identifies invalid segment level requiring address reset if condition is true, otherwise checks for force reset requirement.
  • Context - segment level is valid (98 or 99):
    For Force Reset Required?:
    When the system evaluates the force-reset flag, then the system proceeds with address reset if force reset is required, otherwise continues normal processing.
  • Context - either segment level is invalid or force reset is required:
    For Reset PCB Address Area to Spaces:
    When the system executes the address area reset operation, then the first 8 positions of the address area are set to spaces to clear the pcb address.
  • Context - the address area is null or not available:
    For Continue Processing:
    When the system needs to continue processing without a valid address area, then the system sets the address area to csi-addr-area and generates a zero pcb address error message.
👨‍💻 Technical ACs (Gherkin)
Context: A PCB address reset operation is initiated
GIVEN
A PCB address reset operation is initiated
Applied to: Check Address Area Availability
WHEN
The system checks if the address area is not null
THEN
The system proceeds with PCB address validation if address area is available, otherwise uses default CSI address area
Context: An address area is available for processing
GIVEN
An address area is available for processing
Applied to: PCB Address Valid and Not Blank?
WHEN
The system evaluates if PCB address is not null and not blank pointer
THEN
The system continues with version compatibility check if PCB address is valid, otherwise skips PCB reset logic
Context: A valid PCB address exists
GIVEN
A valid PCB address exists
Applied to: CCCOM Version Compatible?
WHEN
The system compares CC-SIT-VERSION of CCCOM with WS-CCCOM-VERSION
THEN
The system proceeds with PCB copy address setup if versions match, otherwise skips PCB reset processing
Context: CCCOM version is compatible with system version
GIVEN
CCCOM version is compatible with system version
Applied to: Set PCB Copy Address
WHEN
The system sets the address of LK-COPY-OF-PCB to PCB-ADDR
THEN
The PCB copy address is established for subsequent segment level validation
Context: PCB copy address is established
GIVEN
PCB copy address is established
Applied to: Segment Level Valid?
WHEN
The system checks if LK-SEG-LEVEL is not equal to '98' and not equal to '99'
THEN
The system identifies invalid segment level requiring address reset if condition is true, otherwise checks for force reset requirement
Context: Segment level is valid (98 or 99)
GIVEN
Segment level is valid (98 or 99)
Applied to: Force Reset Required?
WHEN
The system evaluates the FORCE-RESET flag
THEN
The system proceeds with address reset if force reset is required, otherwise continues normal processing
Context: Either segment level is invalid or force reset is required
GIVEN
Either segment level is invalid or force reset is required
Applied to: Reset PCB Address Area to Spaces
WHEN
The system executes the address area reset operation
THEN
The first 8 positions of the address area are set to spaces to clear the PCB address
Context: The address area is null or not available
GIVEN
The address area is null or not available
Applied to: Continue Processing
WHEN
The system needs to continue processing without a valid address area
THEN
The system sets the address area to CSI-ADDR-AREA and generates a zero PCB address error message
R-CCISCOM-cbl-00045 (+3) File: CCISCOM.cbl Reverse Conversion Version Check Merged 4 Rules
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Reverse Conversion Version Check':
  • Context - a reverse conversion process is initiated with iscom and cccom communication areas:
    For Reverse Conversion Version Check - Check if CCCOM version is already set for reverse conversion from ISCOM to CCCOM:
    When the system checks the cccom sit version against the expected cccom version, then if versions match, only common area data is transferred and cccom version is updated; if versions don't match, full initialization including common area, version update, lt-pcbs transfer, cross-references setup, and database scanning is performed.
  • Context - cccom sit version equals the working storage cccom version:
    For Version Already Set - Transfer Common Area Data Only:
    When reverse conversion is performed, then common area data is copied from iscom to cccom and cccom sit version is set to working storage cccom version.
  • Context - cccom sit version does not equal the working storage cccom version:
    For Version Not Set - Proceed with Full Initialization:
    When reverse conversion is performed, then common area is copied from iscom to cccom, cccom sit version is updated, lt-pcbs are transferred from iscom to cccom, cross-reference addresses are established, and database address scanning is initiated.
  • Context - reverse conversion process is in progress:
    For Set CCCOM Version to Expected Value:
    When version update is required, then cccom sit version is set to the working storage cccom version value.
👨‍💻 Technical ACs (Gherkin)
Context: A reverse conversion process is initiated with ISCOM and CCCOM communication areas
GIVEN
A reverse conversion process is initiated with ISCOM and CCCOM communication areas
Applied to: Reverse Conversion Version Check - Check if CCCOM version is already set for reverse conversion from ISCOM to CCCOM
WHEN
The system checks the CCCOM SIT version against the expected CCCOM version
THEN
If versions match, only common area data is transferred and CCCOM version is updated; if versions don't match, full initialization including common area, version update, LT-PCBS transfer, cross-references setup, and database scanning is performed
Context: CCCOM SIT version equals the working storage CCCOM version
GIVEN
CCCOM SIT version equals the working storage CCCOM version
Applied to: Version Already Set - Transfer Common Area Data Only
WHEN
Reverse conversion is performed
THEN
Common area data is copied from ISCOM to CCCOM and CCCOM SIT version is set to working storage CCCOM version
Context: CCCOM SIT version does not equal the working storage CCCOM version
GIVEN
CCCOM SIT version does not equal the working storage CCCOM version
Applied to: Version Not Set - Proceed with Full Initialization
WHEN
Reverse conversion is performed
THEN
Common area is copied from ISCOM to CCCOM, CCCOM SIT version is updated, LT-PCBS are transferred from ISCOM to CCCOM, cross-reference addresses are established, and database address scanning is initiated
Context: Reverse conversion process is in progress
GIVEN
Reverse conversion process is in progress
Applied to: Set CCCOM Version to Expected Value
WHEN
Version update is required
THEN
CCCOM SIT version is set to the working storage CCCOM version value
R-CCISCOM-cbl-00049 (+1) File: CCISCOM.cbl Reverse Data Transfer Merged 2 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Reverse Data Transfer':
  • Context - iscom structure contains common area data and cccom structure is available for data transfer:
    For Transfer Common Area Data from ISCOM to CCCOM:
    When reverse conversion process is initiated from iscom to cccom, then common area data from iscom is copied to cccom structure.
  • Context - cccom structure is being updated during reverse conversion and working storage contains cccom version number:
    For Set CCCOM Version Number:
    When common area data transfer is completed, then cccom sit version is set to the working storage cccom version number.
👨‍💻 Technical ACs (Gherkin)
Context: ISCOM structure contains common area data and CCCOM structure is available for data transfer
GIVEN
ISCOM structure contains common area data and CCCOM structure is available for data transfer
Applied to: Transfer Common Area Data from ISCOM to CCCOM
WHEN
Reverse conversion process is initiated from ISCOM to CCCOM
THEN
Common area data from ISCOM is copied to CCCOM structure
Context: CCCOM structure is being updated during reverse conversion and working storage contains CCCOM version number
GIVEN
CCCOM structure is being updated during reverse conversion and working storage contains CCCOM version number
Applied to: Set CCCOM Version Number
WHEN
Common area data transfer is completed
THEN
CCCOM SIT version is set to the working storage CCCOM version number
R-CIMS-cbl-00050 (+12) File: CIMS.cbl PCB Address Resolution Merged 13 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'PCB Address Resolution':
  • Context - a pcb address value exists in the system:
    For PCB Address is Null or Blank:
    When the pcb address equals null or blank pointer, then the system identifies that pcb address resolution is required.
  • Context - pcb address resolution process is initiated:
    For Reset PCB Address to Null:
    When the system prepares to search for valid pcb address, then the pcb address is set to null value.
  • Context - pcb address table search is about to begin:
    For Initialize Table Search Counter to 1:
    When the system initializes the search process, then the table counter is set to 1 to start from first entry.
  • Context - a table counter value during pcb address search:
    For Counter <= 249?:
    When the counter is evaluated against the maximum table size, then if counter is less than or equal to 249, continue search; otherwise terminate search.
  • Context - a pcb name value during address resolution:
    For PCB Name Equals '1'?:
    When the pcb name equals '1', then the system identifies this as a special case requiring name clearing.
  • Context - pcb name has value '1':
    For Clear PCB Name to Spaces:
    When special case processing is applied, then the pcb name is set to spaces.
  • Context - a pcb name and current table entry during search:
    For PCB Name Matches Table Entry?:
    When the pcb name is compared with the database name table entry, then if names match, proceed to address assignment; otherwise continue search.
  • Context - a matching pcb name found in database name table:
    For Set PCB Address from Table Entry:
    When the system locates the corresponding table entry, then the pcb address is set to the address value from the matching table entry.
  • Context - pcb address after table lookup attempt:
    For PCB Address Found?:
    When the system checks if address resolution was successful, then if pcb address is not null, resolution is complete; otherwise continue search.
  • Context - current database name table entry during search:
    For Table Entry Empty?:
    When the table entry is evaluated for content, then if entry contains spaces, terminate search; otherwise increment counter and continue.
  • Context - current search counter value during table iteration:
    For Increment Counter:
    When no match found and table entry is not empty, then the counter is incremented by 1 to move to next table entry.
  • Context - valid pcb address located through table search:
    For PCB Address Resolution Complete:
    When address resolution process concludes successfully, then the system has valid pcb address available for database operations.
  • Context - completed search through all available table entries:
    For Search Failed - No More Entries:
    When no matching pcb name found or table boundary exceeded, then the system recognizes pcb address resolution has failed.
👨‍💻 Technical ACs (Gherkin)
Context: A PCB address value exists in the system
GIVEN
A PCB address value exists in the system
Applied to: PCB Address is Null or Blank
WHEN
The PCB address equals null or blank pointer
THEN
The system identifies that PCB address resolution is required
Context: PCB address resolution process is initiated
GIVEN
PCB address resolution process is initiated
Applied to: Reset PCB Address to Null
WHEN
The system prepares to search for valid PCB address
THEN
The PCB address is set to null value
Context: PCB address table search is about to begin
GIVEN
PCB address table search is about to begin
Applied to: Initialize Table Search Counter to 1
WHEN
The system initializes the search process
THEN
The table counter is set to 1 to start from first entry
Context: A table counter value during PCB address search
GIVEN
A table counter value during PCB address search
Applied to: Counter <= 249?
WHEN
The counter is evaluated against the maximum table size
THEN
If counter is less than or equal to 249, continue search; otherwise terminate search
Context: A PCB name value during address resolution
GIVEN
A PCB name value during address resolution
Applied to: PCB Name Equals '1'?
WHEN
The PCB name equals '1'
THEN
The system identifies this as a special case requiring name clearing
Context: PCB name has value '1'
GIVEN
PCB name has value '1'
Applied to: Clear PCB Name to Spaces
WHEN
Special case processing is applied
THEN
The PCB name is set to spaces
Context: A PCB name and current table entry during search
GIVEN
A PCB name and current table entry during search
Applied to: PCB Name Matches Table Entry?
WHEN
The PCB name is compared with the database name table entry
THEN
If names match, proceed to address assignment; otherwise continue search
Context: A matching PCB name found in database name table
GIVEN
A matching PCB name found in database name table
Applied to: Set PCB Address from Table Entry
WHEN
The system locates the corresponding table entry
THEN
The PCB address is set to the address value from the matching table entry
Context: PCB address after table lookup attempt
GIVEN
PCB address after table lookup attempt
Applied to: PCB Address Found?
WHEN
The system checks if address resolution was successful
THEN
If PCB address is not null, resolution is complete; otherwise continue search
Context: Current database name table entry during search
GIVEN
Current database name table entry during search
Applied to: Table Entry Empty?
WHEN
The table entry is evaluated for content
THEN
If entry contains spaces, terminate search; otherwise increment counter and continue
Context: Current search counter value during table iteration
GIVEN
Current search counter value during table iteration
Applied to: Increment Counter
WHEN
No match found and table entry is not empty
THEN
The counter is incremented by 1 to move to next table entry
Context: Valid PCB address located through table search
GIVEN
Valid PCB address located through table search
Applied to: PCB Address Resolution Complete
WHEN
Address resolution process concludes successfully
THEN
The system has valid PCB address available for database operations
Context: Completed search through all available table entries
GIVEN
Completed search through all available table entries
Applied to: Search Failed - No More Entries
WHEN
No matching PCB name found or table boundary exceeded
THEN
The system recognizes PCB address resolution has failed
R-CCISCOM-cbl-00051 File: CCISCOM.cbl Reverse PCB Transfer
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Reverse PCB Transfer':
  • Context - iscom structure contains pcb information in cc-lt-pcbs field and cccom structure is available for data transfer:
    For Transfer PCB Data to CCCOM Structure:
    When reverse conversion process is initiated and version compatibility requires pcb data synchronization, then pcb information from iscom cc-lt-pcbs field is copied to cccom cc-lt-pcbs field.
👨‍💻 Technical ACs (Gherkin)
Context: ISCOM structure contains PCB information in CC-LT-PCBS field and CCCOM structure is available for data transfer
GIVEN
ISCOM structure contains PCB information in CC-LT-PCBS field and CCCOM structure is available for data transfer
Applied to: Transfer PCB Data to CCCOM Structure
WHEN
reverse conversion process is initiated and version compatibility requires PCB data synchronization
THEN
PCB information from ISCOM CC-LT-PCBS field is copied to CCCOM CC-LT-PCBS field
R-CCISCOM-cbl-00052 (+5) File: CCISCOM.cbl Active PCB Identification Merged 6 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Active PCB Identification':
  • Context - an iscom entry with a pcb address field:
    For PCB Address ≠ Zero?:
    When the system evaluates the pcb address value, then if pcb address is not equal to zero, the entry is identified as active and processing continues; if pcb address equals zero, the entry is skipped as inactive.
  • Context - an active iscom entry with non-zero pcb address:
    For Mark as Active PCB Entry:
    When the system begins processing the active entry, then iscom pcb number is set to 1 to start the numbering sequence.
  • Context - an active iscom entry and a target cccom entry position:
    For Continue Processing Active Entry:
    When the system processes the active pcb entry, then the database name from iscom entry is copied to the cccom entry at the current position.
  • Context - an active iscom entry with non-zero pcb address and a target cccom entry:
    For Continue Processing Active Entry:
    When the system processes the active pcb entry, then the pcb address from iscom entry is set in the corresponding cccom entry.
  • Context - a calculated iscom pcb number and a target cccom entry:
    For Continue Processing Active Entry:
    When the system determines the pcb number assignment, then if iscom pcb number equals '1', cccom database number is set to spaces; otherwise iscom pcb number is copied to cccom database number.
  • Context - a processed active iscom entry:
    For Continue Processing Active Entry:
    When the system completes processing of the active entry, then the cccom entry counter (j) is incremented by 1.
👨‍💻 Technical ACs (Gherkin)
Context: An ISCOM entry with a PCB address field
GIVEN
An ISCOM entry with a PCB address field
Applied to: PCB Address ≠ Zero?
WHEN
The system evaluates the PCB address value
THEN
If PCB address is not equal to zero, the entry is identified as active and processing continues; if PCB address equals zero, the entry is skipped as inactive
Context: An active ISCOM entry with non-zero PCB address
GIVEN
An active ISCOM entry with non-zero PCB address
Applied to: Mark as Active PCB Entry
WHEN
The system begins processing the active entry
THEN
ISCOM PCB number is set to 1 to start the numbering sequence
Context: An active ISCOM entry and a target CCCOM entry position
GIVEN
An active ISCOM entry and a target CCCOM entry position
Applied to: Continue Processing Active Entry
WHEN
The system processes the active PCB entry
THEN
The database name from ISCOM entry is copied to the CCCOM entry at the current position
Context: An active ISCOM entry with non-zero PCB address and a target CCCOM entry
GIVEN
An active ISCOM entry with non-zero PCB address and a target CCCOM entry
Applied to: Continue Processing Active Entry
WHEN
The system processes the active PCB entry
THEN
The PCB address from ISCOM entry is set in the corresponding CCCOM entry
Context: A calculated ISCOM PCB number and a target CCCOM entry
GIVEN
A calculated ISCOM PCB number and a target CCCOM entry
Applied to: Continue Processing Active Entry
WHEN
The system determines the PCB number assignment
THEN
If ISCOM PCB number equals '1', CCCOM database number is set to spaces; otherwise ISCOM PCB number is copied to CCCOM database number
Context: A processed active ISCOM entry
GIVEN
A processed active ISCOM entry
Applied to: Continue Processing Active Entry
WHEN
The system completes processing of the active entry
THEN
The CCCOM entry counter (J) is incremented by 1
R-CCISCOM-cbl-00058 File: CCISCOM.cbl PCB Sequence Numbering
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'PCB Sequence Numbering':
  • Context - an iscom table with database entries and a current database entry at position i with a specific database name:
    For PCB Sequence Numbering - Calculate sequential PCB numbers for active database entries:
    When the system needs to determine the sequential pcb number for the current database entry, then the system counts all previous occurrences of the same database name in positions 1 through i-1 and increments the pcb number for each match found, starting from an initial value of 1.
👨‍💻 Technical ACs (Gherkin)
Context: An ISCOM table with database entries and a current database entry at position I with a specific database name
GIVEN
An ISCOM table with database entries and a current database entry at position I with a specific database name
Applied to: PCB Sequence Numbering - Calculate sequential PCB numbers for active database entries
WHEN
The system needs to determine the sequential PCB number for the current database entry
THEN
The system counts all previous occurrences of the same database name in positions 1 through I-1 and increments the PCB number for each match found, starting from an initial value of 1
R-CCISCOM-cbl-00059 (+4) File: CCISCOM.cbl Database Entry Creation Merged 5 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Database Entry Creation':
  • Context - the database entry creation process is starting:
    For Initialize CCCOM Entry Counter to 0:
    When the system begins processing iscom entries for conversion to cccom, then the cccom entry counter (j) is set to zero to track new entries.
  • Context - an iscom database entry is being evaluated for conversion:
    For ISCOM Entry Has Active PCB Address?:
    When the system checks the pcb address of the iscom entry, then if pcb address is not zero, the entry is considered active and eligible for processing, otherwise it is skipped.
  • Context - an active iscom database entry needs to be converted to cccom format:
    For Create New CCCOM Database Entry:
    When the system processes the iscom entry with non-zero pcb address, then the system increments the cccom entry counter, copies the database name from iscom to cccom, sets the pcb address, and assigns the database number (spaces if pcb number is '1', otherwise the actual pcb number).
  • Context - a database entry is being processed and needs a pcb sequence number:
    For Create New CCCOM Database Entry:
    When the system encounters a database name that may have multiple instances, then the system counts how many times the same database name appears in iscom entries up to the current position to determine the correct pcb sequence number.
  • Context - a pcb sequence number has been calculated for a database entry:
    For Create New CCCOM Database Entry:
    When the system needs to assign the database number in cccom structure, then if the pcb sequence number is '1', the database number is set to spaces, otherwise the actual pcb sequence number is assigned as the database number.
👨‍💻 Technical ACs (Gherkin)
Context: The database entry creation process is starting
GIVEN
The database entry creation process is starting
Applied to: Initialize CCCOM Entry Counter to 0
WHEN
The system begins processing ISCOM entries for conversion to CCCOM
THEN
The CCCOM entry counter (J) is set to zero to track new entries
Context: An ISCOM database entry is being evaluated for conversion
GIVEN
An ISCOM database entry is being evaluated for conversion
Applied to: ISCOM Entry Has Active PCB Address?
WHEN
The system checks the PCB address of the ISCOM entry
THEN
If PCB address is not zero, the entry is considered active and eligible for processing, otherwise it is skipped
Context: An active ISCOM database entry needs to be converted to CCCOM format
GIVEN
An active ISCOM database entry needs to be converted to CCCOM format
Applied to: Create New CCCOM Database Entry
WHEN
The system processes the ISCOM entry with non-zero PCB address
THEN
The system increments the CCCOM entry counter, copies the database name from ISCOM to CCCOM, sets the PCB address, and assigns the database number (spaces if PCB number is '1', otherwise the actual PCB number)
Context: A database entry is being processed and needs a PCB sequence number
GIVEN
A database entry is being processed and needs a PCB sequence number
Applied to: Create New CCCOM Database Entry
WHEN
The system encounters a database name that may have multiple instances
THEN
The system counts how many times the same database name appears in ISCOM entries up to the current position to determine the correct PCB sequence number
Context: A PCB sequence number has been calculated for a database entry
GIVEN
A PCB sequence number has been calculated for a database entry
Applied to: Create New CCCOM Database Entry
WHEN
The system needs to assign the database number in CCCOM structure
THEN
If the PCB sequence number is '1', the database number is set to spaces, otherwise the actual PCB sequence number is assigned as the database number
R-CIMS-cbl-00063 (+4) File: CIMS.cbl PCB Address Validation Merged 5 Rules
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'PCB Address Validation':
  • Context - a database operation request is being processed:
    For Check PCB Address Status:
    When the system checks the pcb address availability, then the system determines if the pcb address is null or blank pointer to decide next processing step.
  • Context - pcb address validation has failed:
    For Set PCB Name to ZERO-PCB-NAME:
    When the system needs to generate error information, then the system sets the pcb name from pcb-mne to zero-pcb-name for error reporting.
  • Context - pcb address validation has failed and pcb name has been captured:
    For Set PCB Number to ZERO-PCB-NUM:
    When the system continues error information collection, then the system sets the pcb number from pcb-num to zero-pcb-num for error reporting.
  • Context - pcb address validation has failed and error information has been collected:
    For Generate Zero PCB Address Error Message:
    When the system needs to create an error message, then the system moves zero-pcb-addr-error-message to cc-error-message of cccom.
  • Context - pcb address validation has failed and error message has been generated:
    For Call Error Handler CERR:
    When the system needs to handle the error condition, then the system calls 'cerr' program using cccom to process the error.
👨‍💻 Technical ACs (Gherkin)
Context: A database operation request is being processed
GIVEN
A database operation request is being processed
Applied to: Check PCB Address Status
WHEN
The system checks the PCB address availability
THEN
The system determines if the PCB address is null or blank pointer to decide next processing step
Context: PCB address validation has failed
GIVEN
PCB address validation has failed
Applied to: Set PCB Name to ZERO-PCB-NAME
WHEN
The system needs to generate error information
THEN
The system sets the PCB name from PCB-MNE to ZERO-PCB-NAME for error reporting
Context: PCB address validation has failed and PCB name has been captured
GIVEN
PCB address validation has failed and PCB name has been captured
Applied to: Set PCB Number to ZERO-PCB-NUM
WHEN
The system continues error information collection
THEN
The system sets the PCB number from PCB-NUM to ZERO-PCB-NUM for error reporting
Context: PCB address validation has failed and error information has been collected
GIVEN
PCB address validation has failed and error information has been collected
Applied to: Generate Zero PCB Address Error Message
WHEN
The system needs to create an error message
THEN
The system moves ZERO-PCB-ADDR-ERROR-MESSAGE to CC-ERROR-MESSAGE of CCCOM
Context: PCB address validation has failed and error message has been generated
GIVEN
PCB address validation has failed and error message has been generated
Applied to: Call Error Handler CERR
WHEN
The system needs to handle the error condition
THEN
The system calls 'CERR' program using CCCOM to process the error
R-CCISCOM-cbl-00064 File: CCISCOM.cbl Reverse PCB Address Mapping
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Reverse PCB Address Mapping':
  • Context - an iscom entry at position i contains a valid pcb address and a corresponding cccom entry exists at position j:
    For Copy PCB Address from ISCOM Entry I to CCCOM Entry J:
    When the system performs reverse conversion from iscom to cccom format, then the pcb address from iscom entry i is copied to cccom entry j to establish the database access reference.
👨‍💻 Technical ACs (Gherkin)
Context: An ISCOM entry at position I contains a valid PCB address and a corresponding CCCOM entry exists at position J
GIVEN
An ISCOM entry at position I contains a valid PCB address and a corresponding CCCOM entry exists at position J
Applied to: Copy PCB Address from ISCOM Entry I to CCCOM Entry J
WHEN
The system performs reverse conversion from ISCOM to CCCOM format
THEN
The PCB address from ISCOM entry I is copied to CCCOM entry J to establish the database access reference
R-CCISCOM-cbl-00065 (+1) File: CCISCOM.cbl Database Number Assignment Merged 2 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Database Number Assignment':
  • Context - a database entry is being processed during iscom to cccom conversion and the iscom pcb number has been determined:
    For Assign SPACES to Database Number - First Occurrence:
    When the iscom pcb number equals '1' indicating this is the first occurrence of this database name, then the database number field in the cccom entry should be set to spaces to mark it as the primary database reference.
    For Assign PCB Number to Database Number - Subsequent Occurrence:
    When the iscom pcb number is not equal to '1' indicating this is a subsequent occurrence of this database name, then the database number field in the cccom entry should be set to the actual iscom pcb number to maintain proper sequencing.
👨‍💻 Technical ACs (Gherkin)
Context: A database entry is being processed during ISCOM to CCCOM conversion and the ISCOM PCB number has been determined
GIVEN
A database entry is being processed during ISCOM to CCCOM conversion and the ISCOM PCB number has been determined
Applied to: Assign SPACES to Database Number - First Occurrence
WHEN
The ISCOM PCB number equals '1' indicating this is the first occurrence of this database name
THEN
The database number field in the CCCOM entry should be set to spaces to mark it as the primary database reference
Applied to: Assign PCB Number to Database Number - Subsequent Occurrence
WHEN
The ISCOM PCB number is not equal to '1' indicating this is a subsequent occurrence of this database name
THEN
The database number field in the CCCOM entry should be set to the actual ISCOM PCB number to maintain proper sequencing
R-CCISCOM-cbl-00067 (+2) File: CCISCOM.cbl Process Current Database Entry Merged 3 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Process Current Database Entry':
  • Context - a database entry is being processed:
    For Initialize PCB Counter to Zero:
    When the pcb counter initialization is performed, then the iscom pcb number is set to zero.
  • Context - a database entry with index i is being processed:
    For Extract PCB Number from Database Entry:
    When pcb number extraction is performed, then the pcb number from cccom database entry at index i is moved to cccom-pcb-number.
  • Context - a database entry is being processed and the cccom-pcb-number is empty or contains spaces:
    For Set PCB Number to Default '1':
    When the pcb number validation is performed, then the cccom-pcb-number is set to '1'.
👨‍💻 Technical ACs (Gherkin)
Context: A database entry is being processed
GIVEN
A database entry is being processed
Applied to: Initialize PCB Counter to Zero
WHEN
The PCB counter initialization is performed
THEN
The ISCOM PCB number is set to zero
Context: A database entry with index I is being processed
GIVEN
A database entry with index I is being processed
Applied to: Extract PCB Number from Database Entry
WHEN
PCB number extraction is performed
THEN
The PCB number from CCCOM database entry at index I is moved to CCCOM-PCB-NUMBER
Context: A database entry is being processed and the CCCOM-PCB-NUMBER is empty or contains spaces
GIVEN
A database entry is being processed and the CCCOM-PCB-NUMBER is empty or contains spaces
Applied to: Set PCB Number to Default '1'
WHEN
The PCB number validation is performed
THEN
The CCCOM-PCB-NUMBER is set to '1'
R-CIMS-cbl-00068 (+8) File: CIMS.cbl IMS Function Call Execution Merged 9 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'IMS Function Call Execution':
  • Context - function code, pcb address, io area and ssa parameters are available:
    For Prepare IMS Call Parameters:
    When system prepares ims call parameters, then all parameters are set up for database call execution.
  • Context - pcb address is available and valid:
    For Set PCB Address to Copy Structure:
    When system sets pcb address to copy structure, then lk-copy-of-pcb is assigned the pcb address for database call.
  • Context - all call parameters are prepared and pcb copy structure is set:
    For Execute CBLTDLI Call:
    When system executes cbltdli call with function, pcb copy, io area and ssa parameters, then ims database operation is performed and control returns to program.
  • Context - function code is available in func parameter:
    For Pass Function Code:
    When system passes function code to ims database call, then function code is included as parameter in cbltdli call.
  • Context - lk-copy-of-pcb is set with pcb address:
    For Pass PCB Copy:
    When system passes pcb copy to ims database call, then pcb copy is included as parameter in cbltdli call.
  • Context - io-area is available for data transfer:
    For Pass IO Area:
    When system passes io area to ims database call, then io area is included as parameter in cbltdli call.
  • Context - ssa1 through ssa6 parameters are available based on argument count:
    For Pass SSA Parameters 1-6:
    When system passes ssa parameters to ims database call, then all available ssa parameters are included in cbltdli call.
  • Context - all parameters are passed to cbltdli call:
    For IMS Database Processing:
    When ims processes the database operation, then database operation is executed and results are returned in pcb and io area.
  • Context - ims database processing is completed:
    For Return Control to Program:
    When control returns to the program, then program continues with post-database call processing.
👨‍💻 Technical ACs (Gherkin)
Context: Function code, PCB address, IO area and SSA parameters are available
GIVEN
Function code, PCB address, IO area and SSA parameters are available
Applied to: Prepare IMS Call Parameters
WHEN
System prepares IMS call parameters
THEN
All parameters are set up for database call execution
Context: PCB address is available and valid
GIVEN
PCB address is available and valid
Applied to: Set PCB Address to Copy Structure
WHEN
System sets PCB address to copy structure
THEN
LK-COPY-OF-PCB is assigned the PCB address for database call
Context: All call parameters are prepared and PCB copy structure is set
GIVEN
All call parameters are prepared and PCB copy structure is set
Applied to: Execute CBLTDLI Call
WHEN
System executes CBLTDLI call with function, PCB copy, IO area and SSA parameters
THEN
IMS database operation is performed and control returns to program
Context: Function code is available in FUNC parameter
GIVEN
Function code is available in FUNC parameter
Applied to: Pass Function Code
WHEN
System passes function code to IMS database call
THEN
Function code is included as parameter in CBLTDLI call
Context: LK-COPY-OF-PCB is set with PCB address
GIVEN
LK-COPY-OF-PCB is set with PCB address
Applied to: Pass PCB Copy
WHEN
System passes PCB copy to IMS database call
THEN
PCB copy is included as parameter in CBLTDLI call
Context: IO-AREA is available for data transfer
GIVEN
IO-AREA is available for data transfer
Applied to: Pass IO Area
WHEN
System passes IO area to IMS database call
THEN
IO area is included as parameter in CBLTDLI call
Context: SSA1 through SSA6 parameters are available based on argument count
GIVEN
SSA1 through SSA6 parameters are available based on argument count
Applied to: Pass SSA Parameters 1-6
WHEN
System passes SSA parameters to IMS database call
THEN
All available SSA parameters are included in CBLTDLI call
Context: All parameters are passed to CBLTDLI call
GIVEN
All parameters are passed to CBLTDLI call
Applied to: IMS Database Processing
WHEN
IMS processes the database operation
THEN
Database operation is executed and results are returned in PCB and IO area
Context: IMS database processing is completed
GIVEN
IMS database processing is completed
Applied to: Return Control to Program
WHEN
Control returns to the program
THEN
Program continues with post-database call processing
R-CCISCOM-cbl-00070 (+5) File: CCISCOM.cbl Continue Processing Active Entry Merged 6 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Continue Processing Active Entry':
  • Context - an active pcb entry has been identified for processing:
    For Initialize PCB Sequence Number to 1:
    When the system begins processing the active entry, then the pcb sequence number is initialized to 1.
  • Context - a database entry is being processed and pcb sequence number is initialized to 1:
    For Calculate Sequential PCB Number for Current Database:
    When the system needs to determine the sequential number for the current database, then the system performs pcb number calculation by iterating through previous entries and incrementing the sequence number for each matching database name.
  • Context - an active pcb entry is being processed:
    For Increment CCCOM Entry Counter:
    When the system is ready to create a new cccom entry, then the cccom entry counter (j) is incremented by 1.
  • Context - an active pcb entry is being processed and cccom counter has been incremented:
    For Copy Database Name from ISCOM to CCCOM:
    When the system needs to populate the cccom entry with database information, then the database name from the current iscom entry is copied to the corresponding cccom entry.
  • Context - database name has been copied from iscom to cccom:
    For Map PCB Address from ISCOM to CCCOM:
    When the system needs to establish address mapping, then the pcb address from the current iscom entry is mapped to the corresponding cccom entry.
  • Context - pcb address has been mapped and pcb sequence number has been calculated:
    For Set Database Number to Spaces or PCB Sequence Number:
    When the system needs to set the database number field, then if the pcb sequence number equals 1, the database number is set to spaces indicating first occurrence, otherwise the database number is set to the calculated pcb sequence number.
👨‍💻 Technical ACs (Gherkin)
Context: An active PCB entry has been identified for processing
GIVEN
An active PCB entry has been identified for processing
Applied to: Initialize PCB Sequence Number to 1
WHEN
The system begins processing the active entry
THEN
The PCB sequence number is initialized to 1
Context: A database entry is being processed and PCB sequence number is initialized to 1
GIVEN
A database entry is being processed and PCB sequence number is initialized to 1
Applied to: Calculate Sequential PCB Number for Current Database
WHEN
The system needs to determine the sequential number for the current database
THEN
The system performs PCB number calculation by iterating through previous entries and incrementing the sequence number for each matching database name
Context: An active PCB entry is being processed
GIVEN
An active PCB entry is being processed
Applied to: Increment CCCOM Entry Counter
WHEN
The system is ready to create a new CCCOM entry
THEN
The CCCOM entry counter (J) is incremented by 1
Context: An active PCB entry is being processed and CCCOM counter has been incremented
GIVEN
An active PCB entry is being processed and CCCOM counter has been incremented
Applied to: Copy Database Name from ISCOM to CCCOM
WHEN
The system needs to populate the CCCOM entry with database information
THEN
The database name from the current ISCOM entry is copied to the corresponding CCCOM entry
Context: Database name has been copied from ISCOM to CCCOM
GIVEN
Database name has been copied from ISCOM to CCCOM
Applied to: Map PCB Address from ISCOM to CCCOM
WHEN
The system needs to establish address mapping
THEN
The PCB address from the current ISCOM entry is mapped to the corresponding CCCOM entry
Context: PCB address has been mapped and PCB sequence number has been calculated
GIVEN
PCB address has been mapped and PCB sequence number has been calculated
Applied to: Set Database Number to Spaces or PCB Sequence Number
WHEN
The system needs to set the database number field
THEN
If the PCB sequence number equals 1, the database number is set to spaces indicating first occurrence, otherwise the database number is set to the calculated PCB sequence number
R-CCISCOM-cbl-00076 (+2) File: CCISCOM.cbl Start Loop: K = 1 to Current Position I Merged 3 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Start Loop: K = 1 to Current Position I':
  • Context - an iscom table with database entries and a current position i being processed:
    For Start Loop: K = 1 to Current Position I-1 - Iterate through previous database entries to count matching database names for sequence calculation:
    When the system needs to determine the pcb sequence number for the database at position i by examining all previous positions from 1 to i-1, then the system increments the pcb sequence number for each previous entry that has the same database name as the current entry.
  • Context - two database entries in the iscom table at positions k and i:
    For Compare Database Names: ISCOM K vs ISCOM I:
    When the system compares the database names at these positions, then if the database names match exactly, the system identifies them as the same database requiring sequential pcb numbering.
  • Context - a pcb sequence number counter (iscom-pcb-num) and two database entries with matching names:
    For Increment PCB Sequence Number:
    When the system finds that the database name at position k matches the database name at position i, then the system adds 1 to the pcb sequence number counter to reflect the sequential occurrence of this database.
👨‍💻 Technical ACs (Gherkin)
Context: An ISCOM table with database entries and a current position I being processed
GIVEN
An ISCOM table with database entries and a current position I being processed
Applied to: Start Loop: K = 1 to Current Position I-1 - Iterate through previous database entries to count matching database names for sequence calculation
WHEN
The system needs to determine the PCB sequence number for the database at position I by examining all previous positions from 1 to I-1
THEN
The system increments the PCB sequence number for each previous entry that has the same database name as the current entry
Context: Two database entries in the ISCOM table at positions K and I
GIVEN
Two database entries in the ISCOM table at positions K and I
Applied to: Compare Database Names: ISCOM K vs ISCOM I
WHEN
The system compares the database names at these positions
THEN
If the database names match exactly, the system identifies them as the same database requiring sequential PCB numbering
Context: A PCB sequence number counter (ISCOM-PCB-NUM) and two database entries with matching names
GIVEN
A PCB sequence number counter (ISCOM-PCB-NUM) and two database entries with matching names
Applied to: Increment PCB Sequence Number
WHEN
The system finds that the database name at position K matches the database name at position I
THEN
The system adds 1 to the PCB sequence number counter to reflect the sequential occurrence of this database
R-CIMS-cbl-00077 (+5) File: CIMS.cbl IO PCB Date Time Refresh Merged 6 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'IO PCB Date Time Refresh':
  • Context - a database function call is being processed with a specific function type and pcb address:
    For Check Function Type and PCB:
    When the function is 'gu' (get unique) and the pcb address matches the io pcb address in cccom, then the system should proceed to refresh date and time information.
  • Context - a gu function is being executed on the io pcb:
    For Reset IMS Call Counter to Zero:
    When the date and time refresh process is initiated, then the ims call counter in cccom should be reset to zero.
  • Context - date and time refresh is required for io pcb operation:
    For Get Current System Date:
    When the system needs to update machine date information, then the current system date should be retrieved in ccyymmdd format.
  • Context - current system date has been retrieved in ccyymmdd format:
    For Update Machine Century in CCCOM & Update Machine Date in CCCOM:
    When machine date information needs to be updated in cccom, then the century portion (cc) should be moved to the machine century field in cccom and the date portion (yymmdd) should be moved to the machine date field in cccom.
  • Context - machine date has been updated in cccom:
    For Get Current System Time:
    When machine time information needs to be updated, then the current system time should be retrieved and stored in the machine time field of cccom.
👨‍💻 Technical ACs (Gherkin)
Context: A database function call is being processed with a specific function type and PCB address
GIVEN
A database function call is being processed with a specific function type and PCB address
Applied to: Check Function Type and PCB
WHEN
The function is 'GU' (Get Unique) AND the PCB address matches the IO PCB address in CCCOM
THEN
The system should proceed to refresh date and time information
Context: A GU function is being executed on the IO PCB
GIVEN
A GU function is being executed on the IO PCB
Applied to: Reset IMS Call Counter to Zero
WHEN
The date and time refresh process is initiated
THEN
The IMS call counter in CCCOM should be reset to zero
Context: Date and time refresh is required for IO PCB operation
GIVEN
Date and time refresh is required for IO PCB operation
Applied to: Get Current System Date
WHEN
The system needs to update machine date information
THEN
The current system date should be retrieved in CCYYMMDD format
Context: Current system date has been retrieved in CCYYMMDD format
GIVEN
Current system date has been retrieved in CCYYMMDD format
Applied to: Update Machine Century in CCCOM & Update Machine Date in CCCOM
WHEN
Machine date information needs to be updated in CCCOM
THEN
The century portion (CC) should be moved to the machine century field in CCCOM AND The date portion (YYMMDD) should be moved to the machine date field in CCCOM
Context: Machine date has been updated in CCCOM
GIVEN
Machine date has been updated in CCCOM
Applied to: Get Current System Time
WHEN
Machine time information needs to be updated
THEN
The current system time should be retrieved and stored in the machine time field of CCCOM
R-CCISCOM-cbl-00079 File: CCISCOM.cbl Compare Database Names: ISCOM K vs ISCOM I
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Compare Database Names: ISCOM K vs ISCOM I':
  • Context - two iscom table entries with positions k and i are being compared, where k represents the comparison entry and i represents the current processing entry:
    For Compare Database Names: ISCOM K vs ISCOM I:
    When the database name in iscom entry at position k equals the database name in iscom entry at position i, then the iscom pcb number counter is incremented by 1 to track the occurrence of matching database names.
👨‍💻 Technical ACs (Gherkin)
Context: Two ISCOM table entries with positions K and I are being compared, where K represents the comparison entry and I represents the current processing entry
GIVEN
Two ISCOM table entries with positions K and I are being compared, where K represents the comparison entry and I represents the current processing entry
Applied to: Compare Database Names: ISCOM K vs ISCOM I
WHEN
The database name in ISCOM entry at position K equals the database name in ISCOM entry at position I
THEN
The ISCOM PCB number counter is incremented by 1 to track the occurrence of matching database names
R-CIMS-cbl-00083 (+1) File: CIMS.cbl IMS Call Counter Management Merged 2 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'IMS Call Counter Management':
  • Context - an ims database function has been executed:
    For Reset IMS Call Counter to Zero:
    When the function is 'gu' (get unique) and the pcb address equals the io pcb address, then the ims call counter is reset to zero.
  • Context - an ims database function call has been completed:
    For Increment IMS Call Counter by 1:
    When any ims database operation is executed, then the ims call counter is incremented by 1.
👨‍💻 Technical ACs (Gherkin)
Context: An IMS database function has been executed
GIVEN
An IMS database function has been executed
Applied to: Reset IMS Call Counter to Zero
WHEN
The function is 'GU' (Get Unique) AND the PCB address equals the IO PCB address
THEN
The IMS call counter is reset to zero
Context: An IMS database function call has been completed
GIVEN
An IMS database function call has been completed
Applied to: Increment IMS Call Counter by 1
WHEN
Any IMS database operation is executed
THEN
The IMS call counter is incremented by 1
R-CIMS-cbl-00085 (+2) File: CIMS.cbl PCB Status Information Update Merged 3 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'PCB Status Information Update':
  • Context - a database operation has been completed and pcb status information is available in lk-copy-of-pcb:
    For Copy PCB Status Information to CCCOM:
    When the system processes the pcb status information update, then the complete pcb status information is copied from lk-copy-of-pcb to cc-copy-of-pcb in cccom structure.
  • Context - pcb status information contains a segment level code in lk-seg-level:
    For Segment Level Valid?:
    When the segment level is not equal to '98' and not equal to '99', then the system proceeds to copy the feedback key length information.
  • Context - segment level validation has passed (segment level is not '98' or '99'):
    For Copy Feedback Key Length to CCCOM:
    When the system processes feedback key length information, then the feedback key length is copied from lk-length-fb-key to cc-length-fb-key in cccom structure.
👨‍💻 Technical ACs (Gherkin)
Context: A database operation has been completed and PCB status information is available in LK-COPY-OF-PCB
GIVEN
A database operation has been completed and PCB status information is available in LK-COPY-OF-PCB
Applied to: Copy PCB Status Information to CCCOM
WHEN
The system processes the PCB status information update
THEN
The complete PCB status information is copied from LK-COPY-OF-PCB to CC-COPY-OF-PCB in CCCOM structure
Context: PCB status information contains a segment level code in LK-SEG-LEVEL
GIVEN
PCB status information contains a segment level code in LK-SEG-LEVEL
Applied to: Segment Level Valid?
WHEN
The segment level is not equal to '98' and not equal to '99'
THEN
The system proceeds to copy the feedback key length information
Context: Segment level validation has passed (segment level is not '98' or '99')
GIVEN
Segment level validation has passed (segment level is not '98' or '99')
Applied to: Copy Feedback Key Length to CCCOM
WHEN
The system processes feedback key length information
THEN
The feedback key length is copied from LK-LENGTH-FB-KEY to CC-LENGTH-FB-KEY in CCCOM structure
R-CIMS-cbl-00088 File: CIMS.cbl Terminal and User Information Capture
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Terminal and User Information Capture':
  • Context - a database function is being executed with a specific pcb address:
    For Terminal and User Information Capture - Captures original terminal name and user ID for GU and CHKP functions on IO PCB:
    When the function is either 'gu' (get unique) or 'chkp' (checkpoint) and the pcb address matches the io pcb address in the common control area, then the system captures the original terminal name from the common control area to the original terminal field and captures the user id from the common control area to the acf2 user id field.
👨‍💻 Technical ACs (Gherkin)
Context: A database function is being executed with a specific PCB address
GIVEN
A database function is being executed with a specific PCB address
Applied to: Terminal and User Information Capture - Captures original terminal name and user ID for GU and CHKP functions on IO PCB
WHEN
The function is either 'GU' (Get Unique) or 'CHKP' (Checkpoint) AND the PCB address matches the IO PCB address in the common control area
THEN
The system captures the original terminal name from the common control area to the original terminal field AND captures the user ID from the common control area to the ACF2 user ID field
R-CIMS-cbl-00089 (+4) File: CIMS.cbl Status Code Validation Merged 5 Rules
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Status Code Validation':
  • Context - an ims database operation has been executed and returned a status code:
    For Status Code = Spaces?:
    When the status code is evaluated for success condition, then if the status code equals spaces, the operation is considered successful and processing continues with common area updates.
  • Context - an ims operation has returned a non-blank status code and validation against acceptable status table is required:
    For I <= 12?:
    When the system iterates through the acceptable status code table, then the validation loop continues while the counter is less than or equal to 12 entries in the acceptable status table.
  • Context - an ims status code needs validation and the system is checking against acceptable status table entries:
    For Status Code Matches Entry?:
    When the current status code is compared with the current table entry, then if the status code matches the acceptable status table entry, the operation is validated successfully and processing continues.
  • Context - the current ims status code does not match the current acceptable status table entry:
    For Increment Counter I:
    When the system needs to check the next entry in the acceptable status table, then the counter is incremented by 1 to move to the next table entry for comparison.
  • Context - an ims operation has returned a status code that has been checked against all entries in the acceptable status table:
    For Generate Error Message: Status Code Not in Acceptable List:
    When the status code is not found in any of the acceptable status table entries, then an error message is generated indicating the ims return code is not in the acceptable list and error processing is invoked.
👨‍💻 Technical ACs (Gherkin)
Context: An IMS database operation has been executed and returned a status code
GIVEN
An IMS database operation has been executed and returned a status code
Applied to: Status Code = Spaces?
WHEN
The status code is evaluated for success condition
THEN
If the status code equals spaces, the operation is considered successful and processing continues with common area updates
Context: An IMS operation has returned a non-blank status code and validation against acceptable status table is required
GIVEN
An IMS operation has returned a non-blank status code and validation against acceptable status table is required
Applied to: I <= 12?
WHEN
The system iterates through the acceptable status code table
THEN
The validation loop continues while the counter is less than or equal to 12 entries in the acceptable status table
Context: An IMS status code needs validation and the system is checking against acceptable status table entries
GIVEN
An IMS status code needs validation and the system is checking against acceptable status table entries
Applied to: Status Code Matches Entry?
WHEN
The current status code is compared with the current table entry
THEN
If the status code matches the acceptable status table entry, the operation is validated successfully and processing continues
Context: The current IMS status code does not match the current acceptable status table entry
GIVEN
The current IMS status code does not match the current acceptable status table entry
Applied to: Increment Counter I
WHEN
The system needs to check the next entry in the acceptable status table
THEN
The counter is incremented by 1 to move to the next table entry for comparison
Context: An IMS operation has returned a status code that has been checked against all entries in the acceptable status table
GIVEN
An IMS operation has returned a status code that has been checked against all entries in the acceptable status table
Applied to: Generate Error Message: Status Code Not in Acceptable List
WHEN
The status code is not found in any of the acceptable status table entries
THEN
An error message is generated indicating the IMS return code is not in the acceptable list and error processing is invoked
R-CIMS-cbl-00094 File: CIMS.cbl Error Message Generation
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Error Message Generation':
  • Context - an ims database operation has completed and returned a status code that is not found in the acceptable status code table after checking all 12 entries:
    For Error Message Generation - Generates error message for unacceptable IMS status codes:
    When the system needs to handle the unacceptable status code, then the system constructs an error message by concatenating the status code with the text ': ims rc code not in acceptable list', stores this message in the cccom error message field, and calls the error handler 'cerr' with the cccom control block.
👨‍💻 Technical ACs (Gherkin)
Context: An IMS database operation has completed and returned a status code that is not found in the acceptable status code table after checking all 12 entries
GIVEN
An IMS database operation has completed and returned a status code that is not found in the acceptable status code table after checking all 12 entries
Applied to: Error Message Generation - Generates error message for unacceptable IMS status codes
WHEN
The system needs to handle the unacceptable status code
THEN
The system constructs an error message by concatenating the status code with the text ': IMS RC CODE NOT IN ACCEPTABLE LIST', stores this message in the CCCOM error message field, and calls the error handler 'CERR' with the CCCOM control block
R-CIMS-cbl-00095 (+8) File: CIMS.cbl ISCOM to CCCOM Conversion Detection Merged 9 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'ISCOM to CCCOM Conversion Detection':
  • Context - the system needs to detect iscom format usage:
    For Set Base Address to CCCOM DB PCBs:
    When iscom detection process begins, then the base address pointer is set to the cccom database pcb control blocks area.
  • Context - the base address has been established for iscom detection:
    For Set Offset Address to Current PCB Area:
    When setting up address comparison parameters, then the offset address pointer is set to the current pcb address area.
  • Context - iscom detection addresses are established:
    For Calculate ISCOM Table Size:
    When calculating table boundaries for validation, then the iscom table size is computed based on the length of cccom database pcbs.
  • Context - base and offset addresses are established for iscom detection:
    For Base Address > Zero?:
    When the base address value is evaluated, then if base address is greater than zero, use offset minus base calculation method, otherwise use base minus offset calculation method.
  • Context - base address is greater than zero:
    For Calculate Address Difference Method 1: Offset - Base:
    When computing address difference for iscom detection, then address difference is calculated as offset address minus base address.
  • Context - base address is not greater than zero:
    For Calculate Address Difference Method 2: Base - Offset:
    When computing address difference for iscom detection, then address difference is calculated as base address minus offset address.
  • Context - address offset has been determined and is within iscom range:
    For PCB Table Index Calculation:
    When converting iscom pcb to cccom format, then table index is calculated as (address offset + 8) divided by 12.
  • Context - table index has been calculated for pcb conversion:
    For ISCOM PCB Conversion:
    When iscom format pcb needs to be converted to cccom format, then external conversion service cimsconv is invoked with iscom pcb data, pcb pointer, and table index to perform the conversion.
  • Context - iscom pcb has been successfully converted to cccom format:
    For Set New PCB Address:
    When finalizing the conversion process, then the address area is updated to point to the converted iscom pcb pointer.
👨‍💻 Technical ACs (Gherkin)
Context: The system needs to detect ISCOM format usage
GIVEN
The system needs to detect ISCOM format usage
Applied to: Set Base Address to CCCOM DB PCBs
WHEN
ISCOM detection process begins
THEN
The base address pointer is set to the CCCOM database PCB control blocks area
Context: The base address has been established for ISCOM detection
GIVEN
The base address has been established for ISCOM detection
Applied to: Set Offset Address to Current PCB Area
WHEN
Setting up address comparison parameters
THEN
The offset address pointer is set to the current PCB address area
Context: ISCOM detection addresses are established
GIVEN
ISCOM detection addresses are established
Applied to: Calculate ISCOM Table Size
WHEN
Calculating table boundaries for validation
THEN
The ISCOM table size is computed based on the length of CCCOM database PCBs
Context: Base and offset addresses are established for ISCOM detection
GIVEN
Base and offset addresses are established for ISCOM detection
Applied to: Base Address > Zero?
WHEN
The base address value is evaluated
THEN
If base address is greater than zero, use offset minus base calculation method, otherwise use base minus offset calculation method
Context: Base address is greater than zero
GIVEN
Base address is greater than zero
Applied to: Calculate Address Difference Method 1: Offset - Base
WHEN
Computing address difference for ISCOM detection
THEN
Address difference is calculated as offset address minus base address
Context: Base address is not greater than zero
GIVEN
Base address is not greater than zero
Applied to: Calculate Address Difference Method 2: Base - Offset
WHEN
Computing address difference for ISCOM detection
THEN
Address difference is calculated as base address minus offset address
Context: Address offset has been determined and is within ISCOM range
GIVEN
Address offset has been determined and is within ISCOM range
Applied to: PCB Table Index Calculation
WHEN
Converting ISCOM PCB to CCCOM format
THEN
Table index is calculated as (address offset + 8) divided by 12
Context: Table index has been calculated for PCB conversion
GIVEN
Table index has been calculated for PCB conversion
Applied to: ISCOM PCB Conversion
WHEN
ISCOM format PCB needs to be converted to CCCOM format
THEN
External conversion service CIMSCONV is invoked with ISCOM PCB data, PCB pointer, and table index to perform the conversion
Context: ISCOM PCB has been successfully converted to CCCOM format
GIVEN
ISCOM PCB has been successfully converted to CCCOM format
Applied to: Set New PCB Address
WHEN
Finalizing the conversion process
THEN
The address area is updated to point to the converted ISCOM PCB pointer
R-CIMS-cbl-00104 (+2) File: CIMS.cbl PCB Table Index Calculation Merged 3 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'PCB Table Index Calculation':
  • Context - an address offset value exists from the difference between base and offset addresses:
    For PCB Table Index Calculation - Calculates table index for ISCOM to CCCOM PCB conversion based on address offset:
    When the system needs to determine the table index for pcb conversion, then add 8 to the address offset, divide the result by 12, and store as the table index.
  • Context - a table index has been calculated for pcb conversion and iscom pcb data exists:
    For Call CIMSCONV with Table Index:
    When the system needs to convert iscom pcb structure to cccom format, then call the cimsconv service with the iscom pcb data, pcb pointer, and calculated table index.
  • Context - the cimsconv service has successfully converted iscom pcb data and returned a pcb pointer:
    For Set PCB Address Area:
    When the conversion process is complete, then set the address area to point to the converted pcb pointer location.
👨‍💻 Technical ACs (Gherkin)
Context: An address offset value exists from the difference between base and offset addresses
GIVEN
An address offset value exists from the difference between base and offset addresses
Applied to: PCB Table Index Calculation - Calculates table index for ISCOM to CCCOM PCB conversion based on address offset
WHEN
The system needs to determine the table index for PCB conversion
THEN
Add 8 to the address offset, divide the result by 12, and store as the table index
Context: A table index has been calculated for PCB conversion and ISCOM PCB data exists
GIVEN
A table index has been calculated for PCB conversion and ISCOM PCB data exists
Applied to: Call CIMSCONV with Table Index
WHEN
The system needs to convert ISCOM PCB structure to CCCOM format
THEN
Call the CIMSCONV service with the ISCOM PCB data, PCB pointer, and calculated table index
Context: The CIMSCONV service has successfully converted ISCOM PCB data and returned a PCB pointer
GIVEN
The CIMSCONV service has successfully converted ISCOM PCB data and returned a PCB pointer
Applied to: Set PCB Address Area
WHEN
The conversion process is complete
THEN
Set the address area to point to the converted PCB pointer location
R-CIMS-cbl-00107 (+2) File: CIMS.cbl ISCOM PCB Conversion Merged 3 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'ISCOM PCB Conversion':
  • Context - an address offset value is available from iscom pcb processing:
    For Calculate Table Index from Address Offset:
    When the system needs to determine the table index for pcb conversion, then the table index is calculated by adding 8 to the address offset and dividing by 12.
  • Context - iscom pcb data exists and table index has been calculated:
    For Call CIMSCONV Utility with ISCOM PCB Parameters:
    When pcb format conversion is required from iscom to cccom, then the cimsconv utility is called with iscom pcb parameters and calculated table index to perform the conversion.
  • Context - cimsconv utility has successfully converted iscom pcb to cccom format:
    For Set Address Area to Converted PCB Pointer:
    When the conversion process is complete, then the address area is updated to point to the converted pcb pointer location.
👨‍💻 Technical ACs (Gherkin)
Context: An address offset value is available from ISCOM PCB processing
GIVEN
An address offset value is available from ISCOM PCB processing
Applied to: Calculate Table Index from Address Offset
WHEN
The system needs to determine the table index for PCB conversion
THEN
The table index is calculated by adding 8 to the address offset and dividing by 12
Context: ISCOM PCB data exists and table index has been calculated
GIVEN
ISCOM PCB data exists and table index has been calculated
Applied to: Call CIMSCONV Utility with ISCOM PCB Parameters
WHEN
PCB format conversion is required from ISCOM to CCCOM
THEN
The CIMSCONV utility is called with ISCOM PCB parameters and calculated table index to perform the conversion
Context: CIMSCONV utility has successfully converted ISCOM PCB to CCCOM format
GIVEN
CIMSCONV utility has successfully converted ISCOM PCB to CCCOM format
Applied to: Set Address Area to Converted PCB Pointer
WHEN
The conversion process is complete
THEN
The address area is updated to point to the converted PCB pointer location
R-CIMS-cbl-00110 File: CIMS.cbl Common Area Synchronization
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Common Area Synchronization':
  • Context - the system has both cccom and iscom control structures available and the iscom address is valid and not blank:
    For Copy Common Area Data from CCCOM to ISCOM:
    When the common area synchronization process is invoked, then the common area data from cccom is copied to iscom to ensure both structures contain identical shared information.
👨‍💻 Technical ACs (Gherkin)
Context: The system has both CCCOM and ISCOM control structures available and the ISCOM address is valid and not blank
GIVEN
The system has both CCCOM and ISCOM control structures available and the ISCOM address is valid and not blank
Applied to: Copy Common Area Data from CCCOM to ISCOM
WHEN
The common area synchronization process is invoked
THEN
The common area data from CCCOM is copied to ISCOM to ensure both structures contain identical shared information
R-CIMS-cbl-00111 (+1) File: CIMS.cbl PCB Name Normalization and Validation Merged 2 Rules
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'PCB Name Normalization and Validation':
  • Context - a pcb number value is provided:
    For PCB Number = '1'?:
    When the pcb number equals '1', then the pcb number should be converted to spaces.
  • Context - a pcb name is provided and database name table exists with entries:
    For PCB Name Matches Database Name in Table?:
    When the pcb name matches an entry in the database name table at position i, then the pcb address should be set to the corresponding pcb address from the table at position i.
👨‍💻 Technical ACs (Gherkin)
Context: A PCB number value is provided
GIVEN
A PCB number value is provided
Applied to: PCB Number = '1'?
WHEN
The PCB number equals '1'
THEN
The PCB number should be converted to spaces
Context: A PCB name is provided and database name table exists with entries
GIVEN
A PCB name is provided and database name table exists with entries
Applied to: PCB Name Matches Database Name in Table?
WHEN
The PCB name matches an entry in the database name table at position I
THEN
The PCB address should be set to the corresponding PCB address from the table at position I
R-CIMS-cbl-00113 (+3) File: CIMS.cbl PCB Table Search and Matching Logic Merged 4 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'PCB Table Search and Matching Logic':
  • Context - a pcb number value is provided for table search:
    For PCB Number = '1'?:
    When the pcb number equals '1', then the pcb number should be cleared to spaces to standardize the search criteria.
  • Context - a pcb name and a database name table with multiple entries:
    For PCB Name Matches Table Entry?:
    When the pcb name matches a database name entry in the table at position i, then the system should retrieve the corresponding pcb address from the same table position.
  • Context - a matching pcb name has been found in the database name table at position i:
    For Set PCB Address from Table Entry:
    When the pcb name matches the table entry, then the pcb address should be set to the corresponding address value from the same table position.
  • Context - a pcb table search is in progress with current index i:
    For More Table Entries Available?:
    When the search has not found a matching pcb name and current index i is less than or equal to 249 and the database name at position i is not spaces, then the search should continue to the next table entry by incrementing the index.
👨‍💻 Technical ACs (Gherkin)
Context: A PCB number value is provided for table search
GIVEN
A PCB number value is provided for table search
Applied to: PCB Number = '1'?
WHEN
The PCB number equals '1'
THEN
The PCB number should be cleared to spaces to standardize the search criteria
Context: A PCB name and a database name table with multiple entries
GIVEN
A PCB name and a database name table with multiple entries
Applied to: PCB Name Matches Table Entry?
WHEN
The PCB name matches a database name entry in the table at position I
THEN
The system should retrieve the corresponding PCB address from the same table position
Context: A matching PCB name has been found in the database name table at position I
GIVEN
A matching PCB name has been found in the database name table at position I
Applied to: Set PCB Address from Table Entry
WHEN
The PCB name matches the table entry
THEN
The PCB address should be set to the corresponding address value from the same table position
Context: A PCB table search is in progress with current index I
GIVEN
A PCB table search is in progress with current index I
Applied to: More Table Entries Available?
WHEN
The search has not found a matching PCB name and current index I is less than or equal to 249 and the database name at position I is not spaces
THEN
The search should continue to the next table entry by incrementing the index
R-CIMS-cbl-00117 (+9) File: CIMS.cbl IMS Call Parameter Assembly and Validation Merged 10 Rules
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'IMS Call Parameter Assembly and Validation':
  • Context - an ims database function code is provided in func parameter:
    For Set Function Parameter from FUNC:
    When the system processes the ims call parameters, then the function code is stored in cc-last-ims-func field of the common control area for tracking purposes.
  • Context - the argument count is 5 or greater:
    For Include SSA1 Parameter:
    When the system assembles ims call parameters, then ssa1 parameter is included in the call and stored in cc-last-ssa1 field of the common control area.
  • Context - the argument count is 6 or greater:
    For Include SSA2 Parameter:
    When the system assembles ims call parameters, then ssa2 parameter is included in the call and stored in cc-last-ssa2 field of the common control area.
  • Context - the argument count is 7 or greater:
    For Include SSA3 Parameter:
    When the system assembles ims call parameters, then ssa3 parameter is included in the call and stored in cc-last-ssa3 field of the common control area.
  • Context - the argument count is 8 or greater:
    For Include SSA4 Parameter:
    When the system assembles ims call parameters, then ssa4 parameter is included in the call and stored in cc-last-ssa4 field of the common control area.
  • Context - the argument count is 9 or greater:
    For Include SSA5 Parameter:
    When the system assembles ims call parameters, then ssa5 parameter is included in the call and stored in cc-last-ssa5 field of the common control area.
  • Context - the argument count is 10 or greater:
    For Include SSA6 Parameter:
    When the system assembles ims call parameters, then ssa6 parameter is included in the call and stored in cc-last-ssa6 field of the common control area.
  • Context - the total argument count has been determined:
    For Calculate Parameter Count:
    When the system prepares for ims call execution, then the parameter count is calculated by subtracting 1 from argument count and stored in cc-numb-of-args field.
  • Context - the system is preparing to execute an ims database call:
    For Initialize Status Code to '**':
    When all parameters have been assembled, then the status code is set to '**' in cc-status-code field to indicate call in progress.
  • Context - all ims call parameters have been validated and assembled:
    For Execute CBLTDLI Call:
    When the system executes the database operation, then the cbltdli program is called with the function, pcb, io area, and all applicable ssa parameters.
👨‍💻 Technical ACs (Gherkin)
Context: An IMS database function code is provided in FUNC parameter
GIVEN
An IMS database function code is provided in FUNC parameter
Applied to: Set Function Parameter from FUNC
WHEN
The system processes the IMS call parameters
THEN
The function code is stored in CC-LAST-IMS-FUNC field of the common control area for tracking purposes
Context: The argument count is 5 or greater
GIVEN
The argument count is 5 or greater
Applied to: Include SSA1 Parameter
WHEN
The system assembles IMS call parameters
THEN
SSA1 parameter is included in the call and stored in CC-LAST-SSA1 field of the common control area
Context: The argument count is 6 or greater
GIVEN
The argument count is 6 or greater
Applied to: Include SSA2 Parameter
WHEN
The system assembles IMS call parameters
THEN
SSA2 parameter is included in the call and stored in CC-LAST-SSA2 field of the common control area
Context: The argument count is 7 or greater
GIVEN
The argument count is 7 or greater
Applied to: Include SSA3 Parameter
WHEN
The system assembles IMS call parameters
THEN
SSA3 parameter is included in the call and stored in CC-LAST-SSA3 field of the common control area
Context: The argument count is 8 or greater
GIVEN
The argument count is 8 or greater
Applied to: Include SSA4 Parameter
WHEN
The system assembles IMS call parameters
THEN
SSA4 parameter is included in the call and stored in CC-LAST-SSA4 field of the common control area
Context: The argument count is 9 or greater
GIVEN
The argument count is 9 or greater
Applied to: Include SSA5 Parameter
WHEN
The system assembles IMS call parameters
THEN
SSA5 parameter is included in the call and stored in CC-LAST-SSA5 field of the common control area
Context: The argument count is 10 or greater
GIVEN
The argument count is 10 or greater
Applied to: Include SSA6 Parameter
WHEN
The system assembles IMS call parameters
THEN
SSA6 parameter is included in the call and stored in CC-LAST-SSA6 field of the common control area
Context: The total argument count has been determined
GIVEN
The total argument count has been determined
Applied to: Calculate Parameter Count
WHEN
The system prepares for IMS call execution
THEN
The parameter count is calculated by subtracting 1 from argument count and stored in CC-NUMB-OF-ARGS field
Context: The system is preparing to execute an IMS database call
GIVEN
The system is preparing to execute an IMS database call
Applied to: Initialize Status Code to '**'
WHEN
All parameters have been assembled
THEN
The status code is set to '**' in CC-STATUS-CODE field to indicate call in progress
Context: All IMS call parameters have been validated and assembled
GIVEN
All IMS call parameters have been validated and assembled
Applied to: Execute CBLTDLI Call
WHEN
The system executes the database operation
THEN
The CBLTDLI program is called with the function, PCB, IO area, and all applicable SSA parameters
R-CIMS-cbl-00127 (+3) File: CIMS.cbl Acceptable Status Code Table Lookup Merged 4 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Acceptable Status Code Table Lookup':
  • Context - a database operation has completed and returned a status code, and there exists a table of acceptable status codes with up to 12 entries:
    For Acceptable Status Code Table Lookup - Searches through the acceptable status code table to validate IMS return codes:
    When the system performs status code validation by iterating through the acceptable status code table, then if the status code matches any entry in the acceptable status table, the operation is considered valid and processing continues with common area updates, otherwise the status code is deemed unacceptable.
  • Context - a status code from a database operation and a specific entry from the acceptable status code table at index position i:
    For Current Status Code = Table Entry?:
    When the system compares the current status code with the table entry at the current index, then if the status code equals the table entry, the status is validated as acceptable and common area updates are performed, otherwise the comparison continues with the next table entry.
  • Context - the system is iterating through the acceptable status code table with a current index value i:
    For Index I > 12?:
    When the system checks if the current index i exceeds the maximum table size of 12 entries, then if the index is greater than 12, all table entries have been checked and the status code is considered unacceptable, otherwise the iteration continues to the next table entry.
  • Context - a database operation status code that has been compared against all entries in the acceptable status code table without finding a match:
    For All Table Entries Checked - Invalid Status:
    When all 12 entries in the acceptable status code table have been checked and no match was found, then an error message is constructed containing the status code and the text 'ims rc code not in acceptable list' and error processing is invoked.
👨‍💻 Technical ACs (Gherkin)
Context: A database operation has completed and returned a status code, and there exists a table of acceptable status codes with up to 12 entries
GIVEN
A database operation has completed and returned a status code, and there exists a table of acceptable status codes with up to 12 entries
Applied to: Acceptable Status Code Table Lookup - Searches through the acceptable status code table to validate IMS return codes
WHEN
The system performs status code validation by iterating through the acceptable status code table
THEN
If the status code matches any entry in the acceptable status table, the operation is considered valid and processing continues with common area updates, otherwise the status code is deemed unacceptable
Context: A status code from a database operation and a specific entry from the acceptable status code table at index position I
GIVEN
A status code from a database operation and a specific entry from the acceptable status code table at index position I
Applied to: Current Status Code = Table Entry?
WHEN
The system compares the current status code with the table entry at the current index
THEN
If the status code equals the table entry, the status is validated as acceptable and common area updates are performed, otherwise the comparison continues with the next table entry
Context: The system is iterating through the acceptable status code table with a current index value I
GIVEN
The system is iterating through the acceptable status code table with a current index value I
Applied to: Index I > 12?
WHEN
The system checks if the current index I exceeds the maximum table size of 12 entries
THEN
If the index is greater than 12, all table entries have been checked and the status code is considered unacceptable, otherwise the iteration continues to the next table entry
Context: A database operation status code that has been compared against all entries in the acceptable status code table without finding a match
GIVEN
A database operation status code that has been compared against all entries in the acceptable status code table without finding a match
Applied to: All Table Entries Checked - Invalid Status
WHEN
All 12 entries in the acceptable status code table have been checked and no match was found
THEN
An error message is constructed containing the status code and the text 'IMS RC CODE NOT IN ACCEPTABLE LIST' and error processing is invoked
R-CIMS-cbl-00131 (+3) File: CIMS.cbl Address Offset Calculation Logic Merged 4 Rules
Action Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'Address Offset Calculation Logic':
  • Context - base address is set to cccom db-pcbs address and offset address is set to addr-area address:
    For Base Address > Zero?:
    When base address value is greater than zero, then address-1 is set to offset address value and address-2 is set to base address value.
    For Set Address-1 = Base Address Set Address-2 = Offset Address:
    When base address value is not greater than zero, then address-1 is set to base address value and address-2 is set to offset address value.
  • Context - address-1 and address-2 values have been determined based on base address evaluation:
    For Calculate Final Offset Offset = Address-1 - Address-2:
    When final offset calculation is performed, then address offset equals address-1 minus address-2.
  • Context - cccom and iscom structures are available:
    For Calculate CIMS Table Size:
    When cims table size calculation is required, then table size is set to the length of cc-db-pcbs structure in iscom.
👨‍💻 Technical ACs (Gherkin)
Context: Base address is set to CCCOM DB-PCBS address and offset address is set to ADDR-AREA address
GIVEN
Base address is set to CCCOM DB-PCBS address and offset address is set to ADDR-AREA address
Applied to: Base Address > Zero?
WHEN
Base address value is greater than zero
THEN
Address-1 is set to offset address value and Address-2 is set to base address value
Applied to: Set Address-1 = Base Address Set Address-2 = Offset Address
WHEN
Base address value is not greater than zero
THEN
Address-1 is set to base address value and Address-2 is set to offset address value
Context: Address-1 and Address-2 values have been determined based on base address evaluation
GIVEN
Address-1 and Address-2 values have been determined based on base address evaluation
Applied to: Calculate Final Offset Offset = Address-1 - Address-2
WHEN
Final offset calculation is performed
THEN
Address offset equals Address-1 minus Address-2
Context: CCCOM and ISCOM structures are available
GIVEN
CCCOM and ISCOM structures are available
Applied to: Calculate CIMS Table Size
WHEN
CIMS table size calculation is required
THEN
Table size is set to the length of CC-DB-PCBS structure in ISCOM
R-CIMS-cbl-00135 (+5) File: CIMS.cbl ISCOM Range Validation Merged 6 Rules
Validation Rules (from EDI)
👔 Business Narrative
Business Logic Rules for 'ISCOM Range Validation':
  • Context - the cccom structure contains pcb control block information:
    For Get CCCOM PCB Base Address:
    When the system needs to validate iscom table range, then the base address of cc-db-pcbs is retrieved and stored for address calculation.
  • Context - the address area contains valid offset information:
    For Get Address Area Offset Address:
    When the system performs iscom range validation, then the offset address is retrieved and stored for comparison with the base address.
  • Context - the iscom structure cc-db-pcbs is available:
    For Calculate ISCOM Table Size:
    When the system needs to validate address offset ranges, then the table size is calculated using the length of cc-db-pcbs and stored in ws-cims-table-size.
  • Context - base address and offset address are available for calculation:
    For Base Address > Zero?:
    When the base address is greater than zero, then address 1 is set to offset address and address 2 is set to base address, otherwise address 1 is set to base address and address 2 is set to offset address.
  • Context - address 1 and address 2 are properly ordered based on base address sign:
    For Calculate Final Address Offset:
    When the system calculates the final offset, then the address offset is computed as address 1 minus address 2 and stored in ws-addr-offset.
  • Context - the address offset has been calculated and iscom table size is known:
    For Offset Within ISCOM Table Range?:
    When the system validates the offset against table boundaries, then if the offset is within the valid iscom table range, iscom conversion processing is initiated, otherwise standard pcb processing is used.
👨‍💻 Technical ACs (Gherkin)
Context: The CCCOM structure contains PCB control block information
GIVEN
The CCCOM structure contains PCB control block information
Applied to: Get CCCOM PCB Base Address
WHEN
The system needs to validate ISCOM table range
THEN
The base address of CC-DB-PCBS is retrieved and stored for address calculation
Context: The address area contains valid offset information
GIVEN
The address area contains valid offset information
Applied to: Get Address Area Offset Address
WHEN
The system performs ISCOM range validation
THEN
The offset address is retrieved and stored for comparison with the base address
Context: The ISCOM structure CC-DB-PCBS is available
GIVEN
The ISCOM structure CC-DB-PCBS is available
Applied to: Calculate ISCOM Table Size
WHEN
The system needs to validate address offset ranges
THEN
The table size is calculated using the length of CC-DB-PCBS and stored in WS-CIMS-TABLE-SIZE
Context: Base address and offset address are available for calculation
GIVEN
Base address and offset address are available for calculation
Applied to: Base Address > Zero?
WHEN
The base address is greater than zero
THEN
Address 1 is set to offset address and Address 2 is set to base address, otherwise Address 1 is set to base address and Address 2 is set to offset address
Context: Address 1 and Address 2 are properly ordered based on base address sign
GIVEN
Address 1 and Address 2 are properly ordered based on base address sign
Applied to: Calculate Final Address Offset
WHEN
The system calculates the final offset
THEN
The address offset is computed as Address 1 minus Address 2 and stored in WS-ADDR-OFFSET
Context: The address offset has been calculated and ISCOM table size is known
GIVEN
The address offset has been calculated and ISCOM table size is known
Applied to: Offset Within ISCOM Table Range?
WHEN
The system validates the offset against table boundaries
THEN
If the offset is within the valid ISCOM table range, ISCOM conversion processing is initiated, otherwise standard PCB processing is used