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.
Business Justification: Dictates the expected operational logic and validation steps when iscom structure exists with a sit version field and cccom structure contains common area data. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: ISCOM structure exists with a SIT version field and CCCOM structure contains common area data
Applied to: Version Check and Data Transfer
Action: The SIT version in ISCOM matches the working storage ISCOM version
Logic Flow:
IF ISCOM structure exists with a SIT version field and CCCOM structure contains common area data
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Dictates the expected operational logic and validation steps when iscom structure exists with incompatible sit version and cccom structure contains source data. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: ISCOM structure exists with incompatible SIT version and CCCOM structure contains source data
Applied to: ISCOM Initialization
Action: The SIT version in ISCOM does not match the working storage ISCOM version
Logic Flow:
IF ISCOM structure exists with incompatible SIT version and CCCOM structure contains source data
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when cccom and iscom structures require cross-referencing for communication.
Trigger Criteria:
Context: CCCOM and ISCOM structures require cross-referencing for communication
Applied to: Cross-Reference Address Setup
Action: ISCOM version mismatch triggers full initialization process
Logic Flow:
IF CCCOM and ISCOM structures require cross-referencing for communication
AND ISCOM version mismatch triggers full initialization process
THEN:
• Set CCCOM address in ISCOM structure and set ISCOM address in CCCOM structure
Rule Belongs to : CCISCOM.cbl
Business Justification: Establishes the required business protocol to be followed when cccom contains lt-pcbs information and iscom requires pcb data. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: CCCOM contains LT-PCBS information and ISCOM requires PCB data
Applied to: PCB Transfer
Action: Full ISCOM initialization is required due to version mismatch
Logic Flow:
IF CCCOM contains LT-PCBS information and ISCOM requires PCB data
AND Full ISCOM initialization is required due to version mismatch
THEN:
• Copy LT-PCBS data from CCCOM to ISCOM structure
Rule Belongs to : CCISCOM.cbl
Business Justification: Dictates the expected operational logic and validation steps when cccom table contains database entries with names and cccom-table-size defines maximum entries.
Trigger Criteria:
Context: CCCOM table contains database entries with names and CCCOM-TABLE-SIZE defines maximum entries
Applied to: Database Name Scanning
Action: Database address scanning is initiated during ISCOM initialization
Logic Flow:
IF CCCOM table contains database entries with names and CCCOM-TABLE-SIZE defines maximum entries
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Dictates the expected operational logic and validation steps when cccom entry contains database number field that may be empty or contain spaces. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: CCCOM entry contains database number field that may be empty or contain spaces
Applied to: PCB Number Processing
Action: Processing a CCCOM database entry during scanning
Logic Flow:
IF CCCOM entry contains database number field that may be empty or contain spaces
AND Processing a CCCOM database entry during scanning
THEN:
• Initialize ISCOM PCB number to zero, copy database number from CCCOM, andif database number is spaces then set CCCOM PCB number to '1'
Rule Belongs to : CCISCOM.cbl
Business Justification: Establishes the required business protocol to be followed when cccom entry has database name and iscom table contains database entries with names.
Trigger Criteria:
Context: CCCOM entry has database name and ISCOM table contains database entries with names
Applied to: Database Name Matching
Action: Scanning ISCOM table for matching database names during address mapping
Logic Flow:
IF CCCOM entry has database name and ISCOM table contains database entries with names
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Ensures correct system behavior and process compliance when cccom database name matches iscom database name during scanning process.
Trigger Criteria:
Context: CCCOM database name matches ISCOM database name during scanning process
Applied to: PCB Counter Management
Action: Database names are identical between CCCOM entry and ISCOM entry
Logic Flow:
IF CCCOM database name matches ISCOM database name during scanning process
AND Database names are identical between CCCOM entry and ISCOM entry
THEN:
• Increment ISCOM PCB number by 1
Rule Belongs to : CCISCOM.cbl
Business Justification: Dictates the expected operational logic and validation steps when iscom pcb number equals cccom pcb number for matching database names.
Trigger Criteria:
Context: ISCOM PCB number equals CCCOM PCB number for matching database names
Applied to: PCB Address Mapping
Action: PCB numbers match after incrementing ISCOM PCB counter
Logic Flow:
IF ISCOM PCB number equals CCCOM PCB number for matching database names
AND PCB numbers match after incrementing ISCOM PCB counter
THEN:
• Set PCB address in ISCOM entry to match PCB address from corresponding CCCOM entry
Rule Belongs to : CCISCOM.cbl
Business Justification: Ensures correct system behavior and process compliance when cccom structure exists with sit version field and iscom structure contains source data. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: CCCOM structure exists with SIT version field and ISCOM structure contains source data
Applied to: Reverse Conversion Version Check
Action: Reverse conversion entry point is accessed and CCCOM SIT version matches working storage CCCOM version
Logic Flow:
IF CCCOM structure exists with SIT version field and ISCOM structure contains source data
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Establishes the required business protocol to be followed when cccom sit version does not match working storage version and iscom contains source data. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: CCCOM SIT version does not match working storage version and ISCOM contains source data
Applied to: Reverse Data Transfer
Action: Reverse conversion is initiated with version mismatch
Logic Flow:
IF CCCOM SIT version does not match working storage version and ISCOM contains source data
AND Reverse conversion is initiated with version mismatch
THEN:
• Copy common area from ISCOM to CCCOM and update CCCOM SIT version to working storage version
Rule Belongs to : CCISCOM.cbl
Business Justification: Dictates the expected operational logic and validation steps when iscom contains lt-pcbs information and cccom requires pcb data during reverse conversion. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: ISCOM contains LT-PCBS information and CCCOM requires PCB data during reverse conversion
Applied to: Reverse PCB Transfer
Action: CCCOM version mismatch triggers full reverse initialization
Logic Flow:
IF ISCOM contains LT-PCBS information and CCCOM requires PCB data during reverse conversion
AND CCCOM version mismatch triggers full reverse initialization
THEN:
• Copy LT-PCBS data from ISCOM to CCCOM structure and set up cross-reference addresses
Rule Belongs to : CCISCOM.cbl
Business Justification: Ensures correct system behavior and process compliance when iscom table contains entries with pcb address fields that may be zero or non-zero.
Trigger Criteria:
Context: ISCOM table contains entries with PCB address fields that may be zero or non-zero
Applied to: Active PCB Identification
Action: Scanning ISCOM entries during reverse conversion process
Logic Flow:
IF ISCOM table contains entries with PCB address fields that may be zero or non-zero
AND Scanning ISCOM entries during reverse conversion process
THEN:
• Process only entries where PCB address is not equal to zero
Rule Belongs to : CCISCOM.cbl
Business Justification: Governs the functional prerequisites and system routing when iscom entry has non-zero pcb address and database name.
Trigger Criteria:
Context: ISCOM entry has non-zero PCB address and database name
Applied to: PCB Sequence Numbering
Action: Processing active ISCOM entry during reverse conversion
Logic Flow:
IF ISCOM entry has non-zero PCB address and database name
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Ensures correct system behavior and process compliance when active iscom entry contains database name and pcb information. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Active ISCOM entry contains database name and PCB information
Applied to: Database Entry Creation
Action: Processing ISCOM entry with non-zero PCB address during reverse conversion
Logic Flow:
IF Active ISCOM entry contains database name and PCB information
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Governs the functional prerequisites and system routing when iscom entry contains pcb address and corresponding cccom entry has been created.
Trigger Criteria:
Context: ISCOM entry contains PCB address and corresponding CCCOM entry has been created
Applied to: Reverse PCB Address Mapping
Action: Creating CCCOM database entry from active ISCOM entry
Logic Flow:
IF ISCOM entry contains PCB address and corresponding CCCOM entry has been created
AND Creating CCCOM database entry from active ISCOM entry
THEN:
• Set PCB address in CCCOM entry to match PCB address from ISCOM entry
Rule Belongs to : CCISCOM.cbl
Business Justification: Ensures correct system behavior and process compliance when iscom pcb number has been calculated for database entry and cccom entry requires database number.
Trigger Criteria:
Context: ISCOM PCB number has been calculated for database entry and CCCOM entry requires database number
Applied to: Database Number Assignment
Action: Finalizing CCCOM database entry creation during reverse conversion
Logic Flow:
IF ISCOM PCB number has been calculated for database entry and CCCOM entry requires database number
AND 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
Rule Belongs to : GCCIH.cbl
Business Justification: Dictates the expected operational logic and validation steps when message processing operation is initiated.
Trigger Criteria:
Context: A message processing operation is initiated
Applied to: Initialize Program Control
Action: The system begins message processing
Logic Flow:
IF A message processing operation is initiated
AND The system begins message processing
THEN:
• The current program name is saved and the module name becomes the active program identifier
Rule Belongs to : GCCIH.cbl
Business Justification: Dictates the expected operational logic and validation steps when new ih notification needs to be processed.
Trigger Criteria:
Context: A new IH notification needs to be processed
Applied to: Prepare IH Notification Data
Action: The notification data structure is being prepared
Logic Flow:
IF A new IH notification needs to be processed
AND The notification data structure is being prepared
THEN:
• The input structure is initialized and security byte is set to high values for maximum security
Rule Belongs to : GCCIH.cbl
Business Justification: Defines the strict business conditions required to proceed when ih notification data is prepared with security controls.
Trigger Criteria:
Context: IH notification data is prepared with security controls
Applied to: Format CCN Status Message
Action: The CCN status message is being formatted
Logic Flow:
IF IH notification data is prepared with security controls
AND The CCN status message is being formatted
THEN:
• The 91-byte input data is moved to positions 2-91 of the message structure and the formatted input is copied to the message area
Rule Belongs to : GCCIH.cbl
Business Justification: Dictates the expected operational logic and validation steps when ccn status message is formatted and ready for processing.
Trigger Criteria:
Context: A CCN status message is formatted and ready for processing
Applied to: Format CCN Status Message
Action: The message is prepared for transmission
Logic Flow:
IF A CCN status message is formatted and ready for processing
AND The message is prepared for transmission
THEN:
• The accept status is set to spaces to indicate a cleared/ready state
Rule Belongs to : GCCIH.cbl
Business Justification: Establishes the required business protocol to be followed when formatted ccn status message with cleared accept status.
Trigger Criteria:
Context: A formatted CCN status message with cleared accept status
Applied to: Send Initial IMS Message
Action: The message is sent for initial processing
Logic Flow:
IF A formatted CCN status message with cleared accept status
AND The message is sent for initial processing
THEN:
• The CIMS service is invoked with change operation parameters to process the message
Rule Belongs to : GCCIH.cbl
Business Justification: Governs the functional prerequisites and system routing when message has been processed through initial ims processing.
Trigger Criteria:
Context: A message has been processed through initial IMS processing
Applied to: Write Message Log
Action: The message logging is performed
Logic Flow:
IF A message has been processed through initial IMS processing
AND The message logging is performed
THEN:
• The WRITMSGL service is invoked with message code, content, length, and module name for complete audit logging
Rule Belongs to : GCCIH.cbl
Business Justification: Establishes the required business protocol to be followed when message has been processed and logged successfully.
Trigger Criteria:
Context: A message has been processed and logged successfully
Applied to: Purge IMS Message
Action: The cleanup operation is performed
Logic Flow:
IF A message has been processed and logged successfully
AND The cleanup operation is performed
THEN:
• The CIMS service is invoked with purge operation to remove the processed message from the system
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when user requests a database operation with a function code.
Trigger Criteria:
Context: A user requests a database operation with a function code
Applied to: Set SSA Type for Get Operations
Action: The function code is GHU (Get Hold Unique) or GU (Get Unique)
Logic Flow:
IF A user requests a database operation with a function code
AND The function code is GHU (Get Hold Unique) or GU (Get Unique)
THEN:
• The system sets accept status to GE and configures qualified SSA for precise record targeting
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when user requests a database operation with a function code.
Trigger Criteria:
Context: A user requests a database operation with a function code
Applied to: Set SSA Type for Next Operations
Action: The function code is GHN, GHNP, GN, or GNP (sequential navigation operations)
Logic Flow:
IF A user requests a database operation with a function code
AND The function code is GHN, GHNP, GN, or GNP (sequential navigation operations)
THEN:
• The system sets accept status to GAGBGEGK and determines SSA qualification based on unqualified SSA flag setting
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when user requests a database operation with a function code.
Trigger Criteria:
Context: A user requests a database operation with a function code
Applied to: Set SSA Type for Insert Operations
Action: The function code is ISRT (Insert)
Logic Flow:
IF A user requests a database operation with a function code
AND The function code is ISRT (Insert)
THEN:
• The system sets accept status to II and configures unqualified SSA for record insertion
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when user requests a database operation with a function code.
Trigger Criteria:
Context: A user requests a database operation with a function code
Applied to: Set SSA Type for Update/Delete Operations
Action: The function code is DLET (Delete) or REPL (Replace)
Logic Flow:
IF A user requests a database operation with a function code
AND The function code is DLET (Delete) or REPL (Replace)
THEN:
• The system configures no SSA requirement for the modification operation
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when user requests a database operation with a function code.
Trigger Criteria:
Context: A user requests a database operation with a function code
Applied to: Validate Function Code
Action: The function code is not GHU, GU, GHN, GHNP, GN, GNP, ISRT, DLET, or REPL
Logic Flow:
IF A user requests a database operation with a function code
AND The function code is not GHU, GU, GHN, GHNP, GN, GNP, ISRT, DLET, or REPL
THEN:
• The system marks the operation as not valid and prevents further processing
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when validated operation targets the root segment gcstbrt.
Trigger Criteria:
Context: A validated operation targets the root segment GCSTBRT
Applied to: Initialize Root Segment SSA
Action: The SSA flag indicates qualified search is required
Logic Flow:
IF A validated operation targets the root segment GCSTBRT
AND The SSA flag indicates qualified search is required
THEN:
• The system sets the root segment key value for targeted access
Rule Belongs to : GCCTBIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when validated operation targets the dependent segment gcstbdp with qualified ssa.
Trigger Criteria:
Context: A validated operation targets the dependent segment GCSTBDP with qualified SSA
Applied to: Initialize Dependent Segment SSA
Action: The unqualified SSA flag is not set
Logic Flow:
IF A validated operation targets the dependent segment GCSTBDP with qualified SSA
AND The unqualified SSA flag is not set
THEN:
• The system sets both root segment key value and dependent segment key value for hierarchical access
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when validated operation targets the dependent segment gcstbdp.
Trigger Criteria:
Context: A validated operation targets the dependent segment GCSTBDP
Applied to: Handle Dependent Segment Unqualified Access
Action: Either the unqualified SSA flag is set or the SSA flag indicates unqualified search
Logic Flow:
IF A validated operation targets the dependent segment GCSTBDP
AND Either the unqualified SSA flag is set or the SSA flag indicates unqualified search
THEN:
• The system sets only the root segment key value and configures unqualified SSA for broader search scope
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when validated operation specifies a segment name.
Trigger Criteria:
Context: A validated operation specifies a segment name
Applied to: Initialize Dependent Segment SSA
Action: The segment name is neither GCSTBRT (root) nor GCSTBDP (dependent)
Logic Flow:
IF A validated operation specifies a segment name
AND The segment name is neither GCSTBRT (root) nor GCSTBDP (dependent)
THEN:
• The system marks the operation as not valid and prevents database access
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when validated operation targets the root segment with initialized ssa.
Trigger Criteria:
Context: A validated operation targets the root segment with initialized SSA
Applied to: Route Root Segment Access
Action: The operation is ready for database access
Logic Flow:
IF A validated operation targets the root segment with initialized SSA
AND The operation is ready for database access
THEN:
• The system routes to primary PCB if second PCB flag is not set, otherwise routes to secondary PCB
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when validated operation targets the dependent segment with initialized ssa.
Trigger Criteria:
Context: A validated operation targets the dependent segment with initialized SSA
Applied to: Route Dependent Segment Access
Action: The operation is ready for database access
Logic Flow:
IF A validated operation targets the dependent segment with initialized SSA
AND The operation is ready for database access
THEN:
• The system routes to primary PCB if second PCB flag is not set, otherwise routes to secondary PCB
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when root segment operation is routed to primary pcb. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A root segment operation is routed to primary PCB
Applied to: Execute Root Segment Database Call with Primary PCB
Action: The SSA configuration determines the call parameters
Logic Flow:
IF A root segment operation is routed to primary PCB
AND The SSA configuration determines the call parameters
THEN:
• The system calls CIMS with appropriate SSA parameters: qualified SSA for targeted access, unqualified SSA for broader access, or no SSA for direct operations
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when root segment operation is routed to secondary pcb. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A root segment operation is routed to secondary PCB
Applied to: Execute Root Segment Database Call with Secondary PCB
Action: The SSA configuration determines the call parameters
Logic Flow:
IF A root segment operation is routed to secondary PCB
AND The SSA configuration determines the call parameters
THEN:
• The system calls CIMS with secondary PCB and appropriate SSA parameters: qualified SSA for targeted access, unqualified SSA for broader access, or no SSA for direct operations
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when dependent segment operation is routed to primary pcb. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A dependent segment operation is routed to primary PCB
Applied to: Execute Dependent Segment Database Call with Primary PCB
Action: The SSA configuration determines the call parameters
Logic Flow:
IF A dependent segment operation is routed to primary PCB
AND The SSA configuration determines the call parameters
THEN:
• The system calls CIMS with hierarchical SSA parameters: both root and dependent qualified SSAs for targeted access, root qualified and dependent unqualified SSAs for mixed access, or no SSA for direct operations
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when dependent segment operation is routed to secondary pcb. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A dependent segment operation is routed to secondary PCB
Applied to: Execute Dependent Segment Database Call with Secondary PCB
Action: The SSA configuration determines the call parameters
Logic Flow:
IF A dependent segment operation is routed to secondary PCB
AND The SSA configuration determines the call parameters
THEN:
• The system calls CIMS with secondary PCB and hierarchical SSA parameters: both root and dependent qualified SSAs for targeted access, root qualified and dependent unqualified SSAs for mixed access, or no SSA for direct operations
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when database operation has been executed through cims.
Trigger Criteria:
Context: A database operation has been executed through CIMS
Applied to: Evaluate Operation Success
Action: The operation completes and returns a status code
Logic Flow:
IF A database operation has been executed through CIMS
AND The operation completes and returns a status code
THEN:
• The system sets return flag to SUCCESSFUL if status code is spaces, otherwise sets return flag to UNSUCCESSFUL
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo processing request is received with a segment name.
Trigger Criteria:
Context: A cargo processing request is received with a segment name
Applied to: Parameter Validation
Action: The segment name is not one of GCSUSRT, GCSA2RT, GCSA8RT, or GCST2RT
Logic Flow:
IF A cargo processing request is received with a segment name
AND The segment name is not one of GCSUSRT, GCSA2RT, GCSA8RT, or GCST2RT
THEN:
• The system rejects the request with error code 0012 and message 'SEGMENT NAME INVALID'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo processing request is received with a function code.
Trigger Criteria:
Context: A cargo processing request is received with a function code
Applied to: Parameter Validation
Action: The function code is not GU, GN, ISRT, REPL, or DLET
Logic Flow:
IF A cargo processing request is received with a function code
AND The function code is not GU, GN, ISRT, REPL, or DLET
THEN:
• The system rejects the request with error code 0012 and message 'FUNCTION CODE INVALID'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when request targets gcst2rt segment.
Trigger Criteria:
Context: A request targets GCST2RT segment
Applied to: Parameter Validation
Action: The function code is not GU (Get Unique)
Logic Flow:
IF A request targets GCST2RT segment
AND The function code is not GU (Get Unique)
THEN:
• The system rejects the request with error code 0012 and message 'INVALID FUNCTION CODE'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo processing request is received.
Trigger Criteria:
Context: A cargo processing request is received
Applied to: Parameter Validation
Action: The operator field is empty or contains spaces
Logic Flow:
IF A cargo processing request is received
AND The operator field is empty or contains spaces
THEN:
• The system sets the operator to equals (=) as default
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when validated cargo processing request.
Trigger Criteria:
Context: A validated cargo processing request
Applied to: Segment Type?
Action: The segment type is GCSUSRT, GCSA2RT, GCSA8RT, or GCST2RT
Logic Flow:
IF A validated cargo processing request
AND The segment type is GCSUSRT, GCSA2RT, GCSA8RT, or GCST2RT
THEN:
• The system routes to primary, secondary, message, or table processing respectively
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record modification request.
Trigger Criteria:
Context: A cargo record modification request
Applied to: Function Code?
Action: The function code is ISRT, DLET, REPL, or ZAP
Logic Flow:
IF A cargo record modification request
AND The function code is ISRT, DLET, REPL, or ZAP
THEN:
• The system sets the update-by-module field to the current transaction code
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when new cargo record is being inserted.
Trigger Criteria:
Context: A new cargo record is being inserted
Applied to: Primary Cargo Record Insert
Action: The creation timestamp field is empty
Logic Flow:
IF A new cargo record is being inserted
AND The creation timestamp field is empty
THEN:
• The system sets creation date, time, terminal, and user ID from current system values and copies to last-modify fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being inserted.
Trigger Criteria:
Context: A cargo record is being inserted
Applied to: Primary Cargo Record Insert
Action: The creation timestamp field already contains data
Logic Flow:
IF A cargo record is being inserted
AND The creation timestamp field already contains data
THEN:
• The system updates only the last-modify date, time, terminal, and user ID with current system values
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record index update is requested.
Trigger Criteria:
Context: A cargo record index update is requested
Applied to: Index Field Management
Action: The cargo status indicates the record is deleted
Logic Flow:
IF A cargo record index update is requested
AND The cargo status indicates the record is deleted
THEN:
• The system skips all index field setting operations
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record requires bond number indexing.
Trigger Criteria:
Context: A cargo record requires bond number indexing
Applied to: Bond Control Number Processing
Action: In-bond control number exists, use it; else if entry number exists, use entry number; else set to spaces
Logic Flow:
IF A cargo record requires bond number indexing
AND In-bond control number exists, use it; else if entry number exists, use entry number; else set to spaces
THEN:
• The system sets the bond index field according to the priority hierarchy
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record deletion is requested.
Trigger Criteria:
Context: A cargo record deletion is requested
Applied to: Primary Cargo Record Delete
Action: The delete operation is initiated
Logic Flow:
IF A cargo record deletion is requested
AND The delete operation is initiated
THEN:
• The system retrieves the record, blanks index fields, sets status to DELETED, and updates the record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record replacement is requested.
Trigger Criteria:
Context: A cargo record replacement is requested
Applied to: Primary Cargo Record Update
Action: The replace operation is performed
Logic Flow:
IF A cargo record replacement is requested
AND The replace operation is performed
THEN:
• The system updates last-modify date, time, terminal, and user ID with current system values
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record status update is processed.
Trigger Criteria:
Context: A cargo record status update is processed
Applied to: GCSB1RT Index Database Management
Action: The cargo has no error conditions and no hold conditions (HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, HOLD-D, PR-H-DE, HOLDFDA)
Logic Flow:
IF A cargo record status update is processed
AND The cargo has no error conditions and no hold conditions (HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, HOLD-D, PR-H-DE, HOLDFDA)
THEN:
• The system deletes the cargo record from the GCSB1RT status index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has error or pending status.
Trigger Criteria:
Context: A cargo record has error or pending status
Applied to: GCSB1RT Index Database Management
Action: The cargo status indicates CPCARGO-ERROR, CPCARGO-PENDING, or USCARGO-ERROR
Logic Flow:
IF A cargo record has error or pending status
AND The cargo status indicates CPCARGO-ERROR, CPCARGO-PENDING, or USCARGO-ERROR
THEN:
• The system fills error fields and either updates existing status record or inserts new status record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has hold status.
Trigger Criteria:
Context: A cargo record has hold status
Applied to: GCSB1RT Index Database Management
Action: The cargo status indicates any hold condition (HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, HOLD-D, PR-H-DE, HOLDFDA)
Logic Flow:
IF A cargo record has hold status
AND The cargo status indicates any hold condition (HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, HOLD-D, PR-H-DE, HOLDFDA)
THEN:
• The system fills hold fields and either updates existing status record or inserts new status record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo search request with secondary index specified.
Trigger Criteria:
Context: A cargo search request with secondary index specified
Applied to: Secondary Index Processing
Action: The index type is CAR-ID, WAYBILL, CAR-WB, BOND, MANIFEST, DEST, LEAD-CCN, HELD-DEST, HELD-BORDER, ERR-ORIG, ERR-BORDER, or ERR-DEST
Logic Flow:
IF A cargo search request with secondary index specified
AND The index type is CAR-ID, WAYBILL, CAR-WB, BOND, MANIFEST, DEST, LEAD-CCN, HELD-DEST, HELD-BORDER, ERR-ORIG, ERR-BORDER, or ERR-DEST
THEN:
• The system routes to the appropriate index processing for that search type
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary cargo data operation is requested.
Trigger Criteria:
Context: A secondary cargo data operation is requested
Applied to: Secondary Database Processing
Action: For REPL function: if record exists and new data is empty, delete; if record exists and new data has content, replace; if record not found and new data has content, insert
Logic Flow:
IF A secondary cargo data operation is requested
AND For REPL function: if record exists and new data is empty, delete; if record exists and new data has content, replace; if record not found and new data has content, insert
THEN:
• The system performs the appropriate database operation based on the content and existence logic
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo status change triggers notification processing.
Trigger Criteria:
Context: A cargo status change triggers notification processing
Applied to: Iron Highway Notification Processing
Action: Both US cargo status and CP cargo status are empty, or the status matches the previous notification, or the status is RELEASE
Logic Flow:
IF A cargo status change triggers notification processing
AND Both US cargo status and CP cargo status are empty, or the status matches the previous notification, or the status is RELEASE
THEN:
• The system skips sending the notification
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo status notification is being prepared.
Trigger Criteria:
Context: A cargo status notification is being prepared
Applied to: Iron Highway Notification Processing
Action: US cargo status is empty and CP status is SENT, use SENT; for DELETED or RELEASE status, always process; otherwise use US cargo short description
Logic Flow:
IF A cargo status notification is being prepared
AND US cargo status is empty and CP status is SENT, use SENT; for DELETED or RELEASE status, always process; otherwise use US cargo short description
THEN:
• The system selects the appropriate status value according to the priority rules
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo status code needs to be displayed or processed.
Trigger Criteria:
Context: A cargo status code needs to be displayed or processed
Applied to: Cargo Status Description Setting
Action: The internal status is OK, PENDING, ACKNWLG, ERROR, SENT, DELETED, DELPEND, RELSD, ARRIVAL, AARR, EXPORT, AEXP, IMED-EX, or XFERED
Logic Flow:
IF A cargo status code needs to be displayed or processed
AND The internal status is OK, PENDING, ACKNWLG, ERROR, SENT, DELETED, DELPEND, RELSD, ARRIVAL, AARR, EXPORT, AEXP, IMED-EX, or XFERED
THEN:
• The system maps to corresponding business descriptions: OK, PENDING, ACK, ERROR, SENT, DELETED, DELPEND, RELEASED, MNL-ARRV, AUT-ARRV, MNL-EXP, AUT-EXP, IMED-EXP, XFERED respectively
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when secondary segment retrieval operation is requested.
Trigger Criteria:
Context: A secondary segment retrieval operation is requested
Applied to: Secondary Database Processing
Action: The function is GU or GN and the secondary key is empty or spaces
Logic Flow:
IF A secondary segment retrieval operation is requested
AND The function is GU or GN and the secondary key is empty or spaces
THEN:
• The system returns error code 0012 with message 'SECN-KEY EQUAL SPACES'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when gcsa8rt message segment retrieval operation is requested.
Trigger Criteria:
Context: A GCSA8RT message segment retrieval operation is requested
Applied to: GCSA8RT Message Processing
Action: The function is GU or GN and the GCSA8RT key is empty or spaces
Logic Flow:
IF A GCSA8RT message segment retrieval operation is requested
AND The function is GU or GN and the GCSA8RT key is empty or spaces
THEN:
• The system returns error code 0012 with message 'GCSA8RT-KEY EQUAL SPACES'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when gcsa8rt message segment insert operation is requested.
Trigger Criteria:
Context: A GCSA8RT message segment insert operation is requested
Applied to: GCSA8RT Message Processing
Action: A record with the same key already exists, perform replace operation; if no existing record, perform insert operation
Logic Flow:
IF A GCSA8RT message segment insert operation is requested
AND A record with the same key already exists, perform replace operation; if no existing record, perform insert operation
THEN:
• The system executes the appropriate database operation and restructures the message data format
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo notification requires shipment reference information.
Trigger Criteria:
Context: A cargo notification requires shipment reference information
Applied to: Reference Number Processing
Action: N9 reference segments exist for the cargo with qualifier 'CN'
Logic Flow:
IF A cargo notification requires shipment reference information
AND N9 reference segments exist for the cargo with qualifier 'CN'
THEN:
• The system extracts the reference number as shipment ID for the notification
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo operation requires station or border information.
Trigger Criteria:
Context: A cargo operation requires station or border information
Applied to: Station Code Processing
Action: The system needs to resolve location codes to station numbers
Logic Flow:
IF A cargo operation requires station or border information
AND The system needs to resolve location codes to station numbers
THEN:
• The system retrieves station information from GCSTBRT table segments using location ID
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo status change is requested.
Trigger Criteria:
Context: A cargo status change is requested
Applied to: Cargo Status Transition Management
Action: The new status represents a valid business transition from the current status
Logic Flow:
IF A cargo status change is requested
AND The new status represents a valid business transition from the current status
THEN:
• The system updates the cargo status and triggers appropriate downstream processing including notifications and index updates
Rule Belongs to : CERR.cbl
Business Justification: Defines the strict business conditions required to proceed when error processing program starts execution. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The error processing program starts execution
Applied to: Common Error Processing - Call DCCCOM
Action: The program begins error handling workflow
Logic Flow:
IF The error processing program starts execution
AND The program begins error handling workflow
THEN:
• The common communication area CCCOM is initialized through DCCCOM service
Rule Belongs to : CERR.cbl
Business Justification: Defines the strict business conditions required to proceed when common communication area has been initialized. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The common communication area has been initialized
Applied to: Dump Only Check - WS-DUMP-ONLY?
Action: The system checks the dump-only mode flag WS-DUMP-ONLY
Logic Flow:
IF The common communication area has been initialized
AND The system checks the dump-only mode flag WS-DUMP-ONLY
THEN:
• IfWS-DUMP-ONLY is true, skip environment-specific error handling and proceed directly to error notification; ifWS-DUMP-ONLY is false, continue with environment detection
Rule Belongs to : CERR.cbl
Business Justification: Dictates the expected operational logic and validation steps when system is not in dump-only mode and environment detection is required. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is not in dump-only mode and environment detection is required
Applied to: Environment Detection - CC-PROD-TEST-IMS = WS-PROD?
Action: The system compares CC-PROD-TEST-IMS with WS-PROD value
Logic Flow:
IF The system is not in dump-only mode and environment detection is required
AND The system compares CC-PROD-TEST-IMS with WS-PROD value
THEN:
• IfCC-PROD-TEST-IMS equals WS-PROD, route to production error handling; otherwise route to test error handling
Rule Belongs to : CERR.cbl
Business Justification: Defines the strict business conditions required to proceed when system has detected production environment (cc-prod-test-ims equals ws-prod). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system has detected production environment (CC-PROD-TEST-IMS equals WS-PROD)
Applied to: Production Error Handling - Call CERRPROD
Action: Production error handling is required
Logic Flow:
IF The system has detected production environment (CC-PROD-TEST-IMS equals WS-PROD)
AND Production error handling is required
THEN:
• The CERRPROD service is invoked with CCCOM communication area to handle production-specific error processing
Rule Belongs to : CERR.cbl
Business Justification: Establishes the required business protocol to be followed when system has detected test environment (cc-prod-test-ims does not equal ws-prod). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system has detected test environment (CC-PROD-TEST-IMS does not equal WS-PROD)
Applied to: Test Error Handling - Call CERRTEST
Action: Test error handling is required
Logic Flow:
IF The system has detected test environment (CC-PROD-TEST-IMS does not equal WS-PROD)
AND Test error handling is required
THEN:
• The CERRTEST service is invoked with CCCOM communication area to handle test-specific error processing
Rule Belongs to : CERR.cbl
Business Justification: Establishes the required business protocol to be followed when error processing has completed (either environment-specific handling or dump-only mode).
Trigger Criteria:
Context: Error processing has completed (either environment-specific handling or dump-only mode)
Applied to: Error Notification Display - Display blocking error message
Action: Error notification is required
Logic Flow:
IF Error processing has completed (either environment-specific handling or dump-only mode)
AND Error notification is required
THEN:
• Display blocking error message with header and footer delimiters to system error output (SYSERR)
Rule Belongs to : CERR.cbl
Business Justification: Governs the functional prerequisites and system routing when all error processing steps and notifications have been completed.
Trigger Criteria:
Context: All error processing steps and notifications have been completed
Applied to: Program Termination - Return control
Action: The error processing workflow reaches completion
Logic Flow:
IF All error processing steps and notifications have been completed
AND The error processing workflow reaches completion
THEN:
• Return control to the calling program using GOBACK statement
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when cims program is invoked with linkage parameters.
Trigger Criteria:
Context: A CIMS program is invoked with linkage parameters
Applied to: Parameter Address Linkage Setup
Action: The system processes the parameter count and argument addresses
Logic Flow:
IF A CIMS program is invoked with linkage parameters
AND The system processes the parameter count and argument addresses
THEN:
• Memory addresses are established for CCCOM, FUNC, andADDR-AREA parameters and the argument count is stored for subsequent processing
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when parameter addresses are established and argument count is available.
Trigger Criteria:
Context: Parameter addresses are established and argument count is available
Applied to: Function and SSA Parameter Processing
Action: The system processes parameters 4 through 10 representing IO-AREA and SSA1 through SSA6
Logic Flow:
IF Parameter addresses are established and argument count is available
AND 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, andIO-AREA address is established when 4 or more arguments are provided
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when cccom iscom address is not null and not blank pointer.
Trigger Criteria:
Context: CCCOM ISCOM address is not null and not blank pointer
Applied to: ISCOM Address Validation
Action: The system checks ISCOM address availability
Logic Flow:
IF CCCOM ISCOM address is not null and not blank pointer
AND The system checks ISCOM address availability
THEN:
• ISCOM address is established for subsequent processing
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when cccom structure is available with version information.
Trigger Criteria:
Context: CCCOM structure is available with version information
Applied to: CCCOM Version Compatibility Check
Action: The system compares CCCOM SIT version with working storage CCCOM version
Logic Flow:
IF CCCOM structure is available with version information
AND The system compares CCCOM SIT version with working storage CCCOM version
THEN:
• ISCOM compatibility check is performed only when versions match
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when addr-area is not null, pcb address is valid, cccom version is compatible, and pcb copy is available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context:ADDR-AREA is not null, PCB address is valid, CCCOM version is compatible, and PCB copy is available
Applied to: PCB Address Reset Logic
Action: Segment level is not '98' or '99' OR force reset flag is true
Logic Flow:
IFADDR-AREA is not null, PCB address is valid, CCCOM version is compatible, and PCB copy is available
AND Segment level is not '98' or '99' OR force reset flag is true
THEN:
• First 8 positions of ADDR-AREA are cleared with spaces
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when pcb address is null or blank pointer.
Trigger Criteria:
Context: PCB address is null or blank pointer
Applied to: PCB Address Resolution
Action: The system searches through up to 249 database name entries
Logic Flow:
IF PCB address is null or blank pointer
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when pcb address resolution process is completed.
Trigger Criteria:
Context: PCB address resolution process is completed
Applied to: PCB Address Validation
Action: PCB address remains null after resolution attempts
Logic Flow:
IF PCB address resolution process is completed
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Defines the strict business conditions required to proceed when valid pcb address exists, function code is available, and all ssa parameters are processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Valid PCB address exists, function code is available, and all SSA parameters are processed
Applied to: IMS Function Call Execution
Action: The system invokes CBLTDLI with function, PCB copy, IO area, and SSA parameters
Logic Flow:
IF Valid PCB address exists, function code is available, and all SSA parameters are processed
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Defines the strict business conditions required to proceed when ims function call is completed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: IMS function call is completed
Applied to: IO PCB Date Time Refresh
Action: Function is 'GU' (Get Unique) AND PCB address equals CCCOM IO PCB address
Logic Flow:
IF IMS function call is completed
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when ims function call is executed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: IMS function call is executed
Applied to: IMS Call Counter Management
Action: Any IMS database operation is performed
Logic Flow:
IF IMS function call is executed
AND Any IMS database operation is performed
THEN:
• IMS call counter in CCCOM is incremented by 1
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when ims call counter is updated and pcb copy is available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: IMS call counter is updated and PCB copy is available
Applied to: PCB Status Information Update
Action: PCB information needs to be synchronized with CCCOM
Logic Flow:
IF IMS call counter is updated and PCB copy is available
AND 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'
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when pcb status information is updated.
Trigger Criteria:
Context: PCB status information is updated
Applied to: Terminal and User Information Capture
Action: Function is 'GU' (Get Unique) OR 'CHKP' (Checkpoint) AND PCB address equals CCCOM IO PCB address
Logic Flow:
IF PCB status information is updated
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when ims operation is completed with status code in cccom.
Trigger Criteria:
Context: IMS operation is completed with status code in CCCOM
Applied to: Status Code Validation
Action: Status code is not blank (spaces)
Logic Flow:
IF IMS operation is completed with status code in CCCOM
AND Status code is not blank (spaces)
THEN:
• Status code is compared against up to 12 acceptable status codes in CCCOM acceptable status table
Rule Belongs to : CIMS.cbl
Business Justification: Defines the strict business conditions required to proceed when status code validation is completed.
Trigger Criteria:
Context: Status code validation is completed
Applied to: Error Message Generation
Action: Status code is not found in acceptable status code table after checking all 12 entries
Logic Flow:
IF Status code validation is completed
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when ims operation completed successfully with blank status code or acceptable status code found.
Trigger Criteria:
Context: IMS operation completed successfully with blank status code OR acceptable status code found
Applied to: Common Area Synchronization
Action: CCCOM ISCOM address is not null and not blank pointer
Logic Flow:
IF IMS operation completed successfully with blank status code OR acceptable status code found
AND CCCOM ISCOM address is not null and not blank pointer
THEN:
• CCCOM common area is copied to ISCOM common area to maintain data consistency
Rule Belongs to : WRITMSGL.cbl
Business Justification: Dictates the expected operational logic and validation steps when program has started execution.
Trigger Criteria:
Context: The program has started execution
Applied to: Message Writing Initialization
Action: The message writing initialization is triggered
Logic Flow:
IF The program has started execution
AND The message writing initialization is triggered
THEN:
• The basic message writing function WRITMSG is invoked
Rule Belongs to : WRITMSGL.cbl
Business Justification: Defines the strict business conditions required to proceed when basic message writing has been completed and six parameters p1, p2, p3, p4, p5, p6 are available.
Trigger Criteria:
Context: The basic message writing has been completed and six parameters P1, P2, P3, P4, P5, P6 are available
Applied to: Parameterized Message Writing
Action: The parameterized message writing is triggered
Logic Flow:
IF The basic message writing has been completed and six parameters P1, P2, P3, P4, P5, P6 are available
AND The parameterized message writing is triggered
THEN:
• The extended message writing function WRITMSGX is invoked with parameters P1, P2, P3, P4, P5, P6
Rule Belongs to : WRITMSGL.cbl
Business Justification: Dictates the expected operational logic and validation steps when program execution begins.
Trigger Criteria:
Context: The program execution begins
Applied to: Program Start to Program End
Action: Message processing workflow is initiated
Logic Flow:
IF The program execution begins
AND Message processing workflow is initiated
THEN:
• Basic message writing must be completed before parameterized message writing, and program terminates after both operations complete
Rule Belongs to : GCCMQERR.cbl
Business Justification: Defines the strict business conditions required to proceed when input error number is provided and an error table exists with error numbers and corresponding text messages.
Trigger Criteria:
Context: An input error number is provided and an error table exists with error numbers and corresponding text messages
Applied to: Error Code Lookup
Action: The system performs a sequential search through the error table starting from index 1 and incrementing by 1
Logic Flow:
IF An input error number is provided and an error table exists with error numbers and corresponding text messages
AND 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
Rule Belongs to : GCCMQERR.cbl
Business Justification: Ensures correct system behavior and process compliance when error table search has completed and the input error number was found in the table.
Trigger Criteria:
Context: The error table search has completed and the input error number was found in the table
Applied to: Error Message Retrieval
Action: The error number at the current index position matches the input error number
Logic Flow:
IF The error table search has completed and the input error number was found in the table
AND 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
Rule Belongs to : GCCMQERR.cbl
Business Justification: Defines the strict business conditions required to proceed when error table search has completed and the input error number was not found in the table.
Trigger Criteria:
Context: The error table search has completed and the input error number was not found in the table
Applied to: Unknown Error Handling
Action: The error number at the current index position does not match the input error number
Logic Flow:
IF The error table search has completed and the input error number was not found in the table
AND 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
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when program gcx126 starts execution. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The program GCX126 starts execution
Applied to: Initialize Program Configuration
Action: Initialization is performed
Logic Flow:
IF The program GCX126 starts execution
AND Initialization is performed
THEN:
• Set log index to 1, clear remark index, clear log array, clear previous CRN, set all segment flags to not found, set cargo not found flag, initialize line counters, set from usercode to 'OM01247', set accept status to 'GE', initialize all segment structures (M10, P4, V9, K1, X4, N7), retrieve admin table with table ID 'AD' and sequence ID 'ADMINID', if admin segment found then set Merlin recipient to admin DC Merlin 1 value, format machine date and time from system values, initialize date conversion parameters, convert machine date to Julian format, read message queue, connect to MQ manager, and open MQ queue
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when mq connection is established and queue is open. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: MQ connection is established and queue is open
Applied to: Read EDI 350 Message from Queue
Action: MQGET operation is performed
Logic Flow:
IF MQ connection is established and queue is open
AND MQGET operation is performed
THEN:
• Read message into MQS-MESSAGE buffer, calculate maximum MQS entries as (data length minus header length) divided by entry length rounded, if calculated entries exceed maximum constant then set to maximum constant value
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when edi 350 message has been retrieved from the queue.
Trigger Criteria:
Context: An EDI 350 message has been retrieved from the queue
Applied to: Message Available? and Message Valid?
Action: Message status is evaluated
Logic Flow:
IF An EDI 350 message has been retrieved from the queue
AND Message status is evaluated
THEN:
• If completion code is not OK and reason code is 2033 then set message not available flag, elseif completion code is OK and backout count is not zero then set skip message flag, elseif completion code is OK and maximum MQS entries is less than 1 then abort with error 'USER ABEND 350 MESSAGE TOO SHORT', elseif completion code is OK and backout count is zero then set good message found flag, else set end of queue flag
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when valid edi 350 message has been loaded.
Trigger Criteria:
Context: A valid EDI 350 message has been loaded
Applied to: Determine Message Type
Action: Message header is examined
Logic Flow:
IF A valid EDI 350 message has been loaded
AND Message header is examined
THEN:
• If MQS cross-way header positions 1 through 10 equal '+++3505040' then set conveyance 350 flag to true, else set cargo 350 flag to true
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when message has been validated and type determined.
Trigger Criteria:
Context: Message has been validated and type determined
Applied to: Parse EDI Segments and Segment Type?
Action: Each message line is processed
Logic Flow:
IF Message has been validated and type determined
AND Each message line is processed
THEN:
• If table ID is 'ST' then set header found and first X4 flags, elseif table ID is 'M10' then perform M10 segment processing, elseif table ID is 'P4' then perform P4 segment processing, elseif table ID is 'V9' then perform V9 segment processing, elseif table ID is 'VID' then continue, elseif table ID is 'K1' then perform K1 segment processing, elseif table ID is 'X4' then initialize K1 comments and perform X4 segment processing, elseif table ID is 'N7' then perform N7 segment processing, elseif table ID is 'SE' then set trailer found and end found flags and perform rest of message processing
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when message line contains m10 segment identifier.
Trigger Criteria:
Context: Message line contains M10 segment identifier
Applied to: Process M10 Notice Segment
Action: M10 segment is processed
Logic Flow:
IF Message line contains M10 segment identifier
AND M10 segment is processed
THEN:
• Set M10 segment found flag to true, initialize M10 segment structure, and move table entry to M10 segment structure
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when message line contains p4 segment identifier.
Trigger Criteria:
Context: Message line contains P4 segment identifier
Applied to: Process P4 Port Segment
Action: P4 segment is processed
Logic Flow:
IF Message line contains P4 segment identifier
AND P4 segment is processed
THEN:
• Set P4 segment found flag to true, initialize P4 segment structure, and move table entry to P4 segment structure
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when message line contains v9 segment identifier.
Trigger Criteria:
Context: Message line contains V9 segment identifier
Applied to: Process V9 Notice Reason Segment
Action: V9 segment is processed
Logic Flow:
IF Message line contains V9 segment identifier
AND V9 segment is processed
THEN:
• Set V9 segment found flag to true, initialize V9 segment structure, and move table entry to V9 segment structure
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when message line contains k1 segment identifier.
Trigger Criteria:
Context: Message line contains K1 segment identifier
Applied to: Process K1 Remarks Segment
Action: K1 segment is processed
Logic Flow:
IF Message line contains K1 segment identifier
AND K1 segment is processed
THEN:
• Set K1 segment found flag to true, initialize K1 segment structure, move table entry to K1 segment structure, add 1 to K1 remark index, if K1 remark index exceeds maximum (50) then set index to maximum value, else move K1 segment to K1 remark array at current index position
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when message line contains n7 segment identifier.
Trigger Criteria:
Context: Message line contains N7 segment identifier
Applied to: Process N7 Equipment Segment
Action: N7 segment is processed
Logic Flow:
IF Message line contains N7 segment identifier
AND N7 segment is processed
THEN:
• Set N7 segment found flag to true, initialize N7 segment structure, move table entry to N7 segment structure, if N7 equipment number is not spaces then move equipment number to log data at current log index with type 'EDI 350 EQP#:' and add 1 to log index
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when x4 segment is being processed and entry type code is '992' and conveyance 350 flag is true.
Trigger Criteria:
Context: X4 segment is being processed and entry type code is '992' and conveyance 350 flag is true
Applied to: Process Conveyance 350 Train Arrival and Train Found?
Action: X4 segment processing is performed
Logic Flow:
IF X4 segment is being processed and entry type code is '992' and conveyance 350 flag is true
AND X4 segment processing is performed
THEN:
• If X4 release document ID positions 1 through 25 equal previous CRN then continue, else move X4 release document ID positions 1 through 25 to B4 key value and previous CRN, perform train lookup by CRN, if train not found (status code not spaces) then prepare unknown train error message with CRN, set line count to 4, set message type to unknown, and perform email send preparation, elseif train found then move log information, format date and time from machine values, set action code to 'ZZZ', move CRN to train or US CCN field, set cargo type to CA train, set message to '350 ACK - ARRIVAL ACK AT BORDER', and spawn log entry
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when train has been validated and x4 cbsa release reference id positions 1 through 25 are moved to cargo key value.
Trigger Criteria:
Context: Train has been validated and X4 CBSA release reference ID positions 1 through 25 are moved to cargo key value
Applied to: Update Cargo Border Arrival Status
Action: Cargo border update is performed
Logic Flow:
IF Train has been validated and X4 CBSA release reference ID positions 1 through 25 are moved to cargo key value
AND Cargo border update is performed
THEN:
• Perform cargo lookup by CCN, if cargo is found then set message to '350 ACK - ARRIVAL ACK AT BORDER', move cargo CCN key to current CCN key, perform log cargo info message, set cargo border arrival acknowledgment flag to true, clear status code, set accept status to spaces, and replace cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has been updated with border arrival and cargo is master manifest type. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Cargo has been updated with border arrival and cargo is master manifest type
Applied to: Process Master Manifest Border Arrival
Action: Master manifest processing is performed
Logic Flow:
IF Cargo has been updated with border arrival and cargo is master manifest type
AND Master manifest processing is performed
THEN:
• Move cargo CCN key to B0 CCN key, clear follower manifest array, set follower not end of database flag, set index to 1, perform until follower end of database or index exceeds 100: set accept status to 'GEGB', call database with get next function for cargo using B0 qualifier, if status code is spaces and master manifest CCN equals X4 CBSA release reference ID positions 1 through 25 thenif cargo is follower manifest then move cargo CCN key to follower manifest array at index position and add 1 to index, else set follower end of database flag, subtract 1 from index, if index is less than or equal to zero then exit, else perform varying index from 1 by 1 until follower manifest at index is spaces or low values or index exceeds limit: move follower manifest CCN to cargo key value, perform cargo lookup, if cargo found then perform cargo border update
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when train lookup by crn has failed (status code is not spaces).
Trigger Criteria:
Context: Train lookup by CRN has failed (status code is not spaces)
Applied to: Send Train Not Found Error
Action: Error notification is prepared
Logic Flow:
IF Train lookup by CRN has failed (status code is not spaces)
AND Error notification is prepared
THEN:
• Clear detail line 1, concatenate 'UNKNOWN TRAIN ENTRY IN EDI 350 ' with X4 release document ID positions 1 through 25 into detail line 1, move 'THIS CRN WAS NOT FOUND.' to detail line 3, set line count to 4, set message type to unknown, and perform email send preparation
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when se trailer segment has been processed and k1 segment found flag is true.
Trigger Criteria:
Context: SE trailer segment has been processed and K1 segment found flag is true
Applied to: Log K1 Remarks
Action: Rest of message processing is performed
Logic Flow:
IF SE trailer segment has been processed and K1 segment found flag is true
AND Rest of message processing is performed
THEN:
• Perform varying index from 1 by 1 until index exceeds K1 remark index: if K1 remark for X4 at index is not spaces then initialize K1 segment, move K1 remark for X4 at index to K1 segment, clear info message, concatenate 'EDI 350 K1: ' with K1 free form message 1 into info message, perform log cargo info message, if K1 free form message 2 is not spaces then clear info message, concatenate 'EDI 350 K1: ' with K1 free form message 2 into info message, and perform log cargo info message
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when se trailer segment has been processed and n7 segment found flag is true.
Trigger Criteria:
Context: SE trailer segment has been processed and N7 segment found flag is true
Applied to: Log N7 Equipment Information
Action: Rest of message processing is performed
Logic Flow:
IF SE trailer segment has been processed and N7 segment found flag is true
AND Rest of message processing is performed
THEN:
• Perform varying log index from 1 by 1 until log line at index is spaces or log index exceeds 50: clear info message, move log line at index to info message, and perform log cargo info message
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when m10 segment has been processed and contains ccn in positions 1 through 25. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: M10 segment has been processed and contains CCN in positions 1 through 25
Applied to: Lookup Cargo by CCN
Action: Cargo lookup is performed
Logic Flow:
IF M10 segment has been processed and contains CCN in positions 1 through 25
AND Cargo lookup is performed
THEN:
• Move M10 CCN positions 1 through 25 to cargo key value, set accept status to 'GE', call database with get hold unique function for cargo using cargo qualifier, perform cargo switch setting, if cargo found then set accept status to 'GE' and call database with get hold unique function for cargo secondary using A2 qualifier, if status code is 'GE' then clear cargo secondary segment
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo lookup has failed (cargo not found) and v9 notice reason indicates released.
Trigger Criteria:
Context: Cargo lookup has failed (cargo not found) and V9 notice reason indicates released
Applied to: Handle Unknown Cargo Release
Action: Unknown cargo processing is performed
Logic Flow:
IF Cargo lookup has failed (cargo not found) and V9 notice reason indicates released
AND Unknown cargo processing is performed
THEN:
• Clear detail line 1, concatenate 'UNKNOWN EDI 350 RELEASE FROM CBSA ' with M10 CCN positions 1 through 25 into detail line 1, move 'THIS CCN WAS NOT FOUND.' to detail line 3, concatenate 'RELEASE NUMBER: ' with X4 CBSA release reference ID positions 1 through 15, ' DONE BY PORT ' with P4 port code positions 1 through 4 into detail line 4, set line count to 5, set message type to unknown, and perform email send preparation
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo lookup has failed (cargo not found) and v9 notice reason indicates deconsolidation.
Trigger Criteria:
Context: Cargo lookup has failed (cargo not found) and V9 notice reason indicates deconsolidation
Applied to: Handle Unknown Cargo Deconsolidation
Action: Unknown cargo processing is performed
Logic Flow:
IF Cargo lookup has failed (cargo not found) and V9 notice reason indicates deconsolidation
AND Unknown cargo processing is performed
THEN:
• Clear detail line 1, concatenate 'UNKNOWN EDI 350 DCON NOTICE ' with M10 CCN positions 1 through 25 into detail line 1, move 'THIS CCN WAS NOT FOUND.' to detail line 3, concatenate 'HOUSE BILL CLOSE NUMBER' with X4 CBSA release reference ID positions 1 through 25, ' DONE BY PORT ' with P4 port code positions 1 through 4 into detail line 4, set line count to 5, set message type to unknown, and perform email send preparation
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo lookup has failed (cargo not found) and v9 notice reason is not released or deconsolidation.
Trigger Criteria:
Context: Cargo lookup has failed (cargo not found) and V9 notice reason is not released or deconsolidation
Applied to: Handle Unknown Cargo Entry
Action: Unknown cargo processing is performed
Logic Flow:
IF Cargo lookup has failed (cargo not found) and V9 notice reason is not released or deconsolidation
AND Unknown cargo processing is performed
THEN:
• Clear detail line 1, concatenate 'UNKNOWN EDI 350 ENTRY FROM CBSA ' with M10 CCN positions 1 through 25 into detail line 1, move 'THIS CCN WAS NOT FOUND.' to detail line 3, concatenate 'NOTICE DOC TYPE: ' with M10 notice document type code, ' WITH REASON CODE ' with V9 notice reason code positions 1 through 4 into detail line 4, set line count to 5, set message type to unknown, and perform email send preparation
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo has been found and v9 notice reason indicates not matched.
Trigger Criteria:
Context: Cargo has been found and V9 notice reason indicates not matched
Applied to: Process Document Not Matched
Action: Cargo processing is performed
Logic Flow:
IF Cargo has been found and V9 notice reason indicates not matched
AND Cargo processing is performed
THEN:
• Clear info message, move 'EDI 350: DOC NOT MATCHED ' to info message, and perform log cargo info message
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has been found and v9 notice reason indicates cargo complete.
Trigger Criteria:
Context: Cargo has been found and V9 notice reason indicates cargo complete
Applied to: Process Cargo Complete
Action: Cargo processing is performed
Logic Flow:
IF Cargo has been found and V9 notice reason indicates cargo complete
AND Cargo processing is performed
THEN:
• Clear info message, move 'EDI 350: CARGO COMPLETE MESSAGE ' to info message, and perform log cargo info message
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo has been found and v9 notice reason indicates document package complete.
Trigger Criteria:
Context: Cargo has been found and V9 notice reason indicates document package complete
Applied to: Process Document Package Complete
Action: Cargo processing is performed
Logic Flow:
IF Cargo has been found and V9 notice reason indicates document package complete
AND Cargo processing is performed
THEN:
• If X4 CBSA release reference ID positions 1 through 15 not equal cargo broker entry positions 1 through 15 or X4 CBSA release reference ID positions 1 through 14 not equal cargo customs transaction number positions 1 through 14, and X4 CBSA release reference ID is not spaces, then move X4 CBSA release reference ID positions 1 through 15 to cargo broker entry, move X4 CBSA release reference ID positions 1 through 14 to cargo customs transaction number, move machine date to cargo broker date, move machine time positions 1 through 4 to cargo broker time, clear info message, concatenate 'EDI 350: DOC PKG COMPLETE : ' with X4 CBSA release reference ID positions 1 through 15 into info message, perform log cargo info message, and perform cargo replace
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo has been found and v9 notice reason indicates document not on file.
Trigger Criteria:
Context: Cargo has been found and V9 notice reason indicates document not on file
Applied to: Process Document Not On File
Action: Cargo processing is performed
Logic Flow:
IF Cargo has been found and V9 notice reason indicates document not on file
AND Cargo processing is performed
THEN:
• Clear info message, if X4 release document type code position 1 equals 'R' then concatenate 'EDI 350: DOC NOT ON FILE FOR RELEASE ' with X4 CBSA release reference ID positions 1 through 15 into info message and perform log cargo info message, else concatenate 'EDI 350:DOC NOT ON FILE H-BILL CLOSE ' with X4 CBSA release reference ID positions 1 through 25 into info message and perform log cargo info message
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo has been found and v9 notice reason indicates reported.
Trigger Criteria:
Context: Cargo has been found and V9 notice reason indicates reported
Applied to: Process Cargo Reported
Action: Cargo processing is performed
Logic Flow:
IF Cargo has been found and V9 notice reason indicates reported
AND Cargo processing is performed
THEN:
• Clear info message, concatenate 'EDI 350: CARGO REPORTED ' into info message, and perform log cargo info message
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo has been found and v9 notice reason indicates arrived.
Trigger Criteria:
Context: Cargo has been found and V9 notice reason indicates arrived
Applied to: Process Cargo Arrived
Action: Cargo processing is performed
Logic Flow:
IF Cargo has been found and V9 notice reason indicates arrived
AND Cargo processing is performed
THEN:
• Clear info message, concatenate 'EDI 350: CARGO ARRIVED AT PORT ' with P4 port code positions 1 through 4 into info message, and perform log cargo info message
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo has been found and v9 notice reason indicates released.
Trigger Criteria:
Context: Cargo has been found and V9 notice reason indicates released
Applied to: Process Cargo Release
Action: Cargo processing is performed
Logic Flow:
IF Cargo has been found and V9 notice reason indicates released
AND Cargo processing is performed
THEN:
• Perform set release information, clear info message, concatenate 'EDI 350: RELEASE : ' with X4 CBSA release reference ID positions 1 through 15, ' AT PORT ' with P4 port code positions 1 through 4 into info message, concatenate X4 CBSA release reference ID positions 1 through 15, '/' with P4 port code positions 1 through 4 into cargo release reason, perform log cargo info message, perform process US manifest, move cargo release date to hold date, move cargo release time to hold time, perform cargo replace, if cargo is master manifest then save cargo segment, move cargo CCN key to B0 CCN key, set follower not end of database flag, perform process multi follower manifests, restore cargo segment, move cargo waybill key to save waybill index, and move cargo equipment car to current car ID key
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo has been found and v9 notice reason indicates authorized to deliver.
Trigger Criteria:
Context: Cargo has been found and V9 notice reason indicates authorized to deliver
Applied to: Process Authorized to Deliver
Action: Cargo processing is performed
Logic Flow:
IF Cargo has been found and V9 notice reason indicates authorized to deliver
AND Cargo processing is performed
THEN:
• If cargo CSA indicator is on then move 'EDI 350: ACCEPTED - CSA' to info message, perform log cargo info message, set cargo status to CSA delivery, set cargo CSA authorization to deliver received flag to true, and perform cargo replace, else move 'EDI 350: NOT ACCEPTED - NON-CSA' to info message and perform log cargo info message, then perform process US manifest
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has been found and v9 notice reason indicates held.
Trigger Criteria:
Context: Cargo has been found and V9 notice reason indicates held
Applied to: Process Cargo Hold
Action: Cargo processing is performed
Logic Flow:
IF Cargo has been found and V9 notice reason indicates held
AND Cargo processing is performed
THEN:
• Clear info message, move 'EDI 350: GOODS HELD FOR EXAMINATION' to info message, perform log cargo info message, set cargo status to hold, perform cargo replace, if cargo CCN key positions 1 through 4 equal '6105' then perform Merlin prepare hold notification
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo has been found and v9 notice reason indicates deconsolidation.
Trigger Criteria:
Context: Cargo has been found and V9 notice reason indicates deconsolidation
Applied to: Process Deconsolidation Release
Action: Cargo processing is performed
Logic Flow:
IF Cargo has been found and V9 notice reason indicates deconsolidation
AND Cargo processing is performed
THEN:
• Perform set release information, clear info message, concatenate 'EDI 350: RELEASE VIA DECON AT PORT ' with P4 port code positions 1 through 4 into info message, concatenate 'DECONSOLIDATION AT ' with P4 port code positions 1 through 4 into cargo release reason, perform log cargo info message, perform process US manifest, move cargo release date to hold date, move cargo release time to hold time, perform cargo replace, if cargo is master manifest then save cargo segment, move cargo CCN key to B0 CCN key, set follower not end of database flag, perform process multi follower manifests, restore cargo segment, move cargo waybill key to save waybill index, and move cargo equipment car to current car ID key
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo is being released or deconsolidated.
Trigger Criteria:
Context: Cargo is being released or deconsolidated
Applied to: Set Release Information
Action: Release information setting is performed
Logic Flow:
IF Cargo is being released or deconsolidated
AND Release information setting is performed
THEN:
• Clear cargo destination station number index, clear cargo destination station number for index, move machine date to cargo release date, move machine time to cargo release time, move ACF2 user ID to cargo release by, move 'RELEASED' to cargo current status, move 'R' to cargo release status, move 'A' to cargo release type, clear cargo release reason, clear cargo error or release status index, and clear cargo error status
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when canadian cargo has been released or authorized to deliver.
Trigger Criteria:
Context: Canadian cargo has been released or authorized to deliver
Applied to: Process Associated US Manifest
Action: US manifest processing is performed
Logic Flow:
IF Canadian cargo has been released or authorized to deliver
AND US manifest processing is performed
THEN:
• Set US manifest not found flag, set not end of file flag, perform get unique US cargo by car and waybill, perform get next US cargo by car and waybill until US manifest found or end of file, if end of file then exit, else move log information, concatenate machine century with machine date into log date, move machine time to log time, move log use input message to action code, move US cargo CCN key to train or US CCN field, set cargo type to US cargo, concatenate 'CDN CCN RLSED BY EDI 350: ' with cargo CCN key into message, and perform spawn log entry
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when v9 notice reason indicates authorized to deliver.
Trigger Criteria:
Context: V9 notice reason indicates authorized to deliver
Applied to: Process CSA Authorization
Action: CSA authorization processing is performed
Logic Flow:
IF V9 notice reason indicates authorized to deliver
AND CSA authorization processing is performed
THEN:
• If cargo CSA indicator is on then move 'EDI 350: ACCEPTED - CSA' to info message, perform log cargo info message, set cargo status to CSA delivery, set cargo CSA authorization to deliver received flag to true, and perform cargo replace, else move 'EDI 350: NOT ACCEPTED - NON-CSA' to info message and perform log cargo info message
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when master manifest has been released or deconsolidated. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Master manifest has been released or deconsolidated
Applied to: Process Follower Manifests
Action: Multi follower processing is performed
Logic Flow:
IF Master manifest has been released or deconsolidated
AND Multi follower processing is performed
THEN:
• Set accept status to 'GEGB', clear follower manifest array, set index to 1, perform until follower end of database or index exceeds 100: call database with get next function for cargo using B0 qualifier, if status code is spaces and saved CCN equals master manifest CCN thenif cargo is master manifest then continue else move cargo CCN key to follower manifest array at index and add 1 to index, else set follower end of database flag, subtract 1 from index, if index is less than or equal to zero then exit, else perform varying index from 1 by 1 until follower manifest at index is spaces or low values or index exceeds limit: move follower manifest CCN to cargo key value, perform cargo lookup, if cargo found then perform set release information, clear info message, if V9 released then concatenate 'EDI 350: RELEASE : ' with X4 CBSA release reference ID positions 1 through 15, ' AT PORT ' with P4 port code positions 1 through 4 into info message and concatenate X4 CBSA release reference ID positions 1 through 15, '/' with P4 port code positions 1 through 4 into cargo release reason, else concatenate 'EDI 350: RELEASE VIA DECON AT PORT ' with P4 port code positions 1 through 4 into info message and concatenate 'DECONSOLIDATION AT ' with P4 port code positions 1 through 4 into cargo release reason, move cargo CCN key to current CCN key, perform log cargo info message, move cargo waybill key to save waybill index, move cargo equipment car to current car ID key, perform process US manifest, clear status code, set accept status to spaces, and call database with replace function for cargo
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo has been placed on hold and ccn starts with 6105.
Trigger Criteria:
Context: Cargo has been placed on hold and CCN starts with 6105
Applied to: Prepare Cargo Hold Email
Action: Merlin hold preparation is performed
Logic Flow:
IF Cargo has been placed on hold and CCN starts with 6105
AND Merlin hold preparation is performed
THEN:
• Clear detail line 1, concatenate 'Cargo on HOLD for inspection by CBSA - EDI350' into detail line 1, clear detail line 2, concatenate 'Equipment : ' with cargo equipment ID for index into detail line 3, concatenate 'Waybill : ' with cargo CCN carrier index, cargo origin station number index, cargo waybill number index into detail line 4, concatenate 'CCN : ' with cargo CCN key into detail line 5, concatenate 'DESTINATION : ' with cargo destination station name, ', ' with cargo destination station state code into detail line 6, concatenate 'MANIFEST UPON : ' with cargo manifest to station name into detail line 7, set line count to 7, set message type to hold, and perform email send preparation
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when email notification has been prepared with message type and content. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Email notification has been prepared with message type and content
Applied to: Send Email Notification
Action: Email send preparation is performed
Logic Flow:
IF Email notification has been prepared with message type and content
AND Email send preparation is performed
THEN:
• If message type is error then concatenate 'CUSTOMS RECEIVED ERR MSG ' with cargo CCN key into subject, elseif message type is info then concatenate 'BROKER/MANIFEST MISMATCH ' with cargo CCN key into subject, elseif message type is hold then concatenate 'CBSA CARGO HOLD - ' with cargo CCN key into subject, else move detail line 1 to subject, save current recipient and filename, clear recipient, if admin segment found then move admin DC Merlin 1 to recipient 1 and admin DC Merlin 5 to recipient 2, else move 'OM01247' to recipient 1 and clear recipient 2, if keywords are spaces or low values thenif cargo found and cargo CCN key not spaces then move cargo CCN key to keywords, else move current CCN key to keywords, if message type is unknown then move 'UNKNOWN' to filename, clear recipient, move 'OM01247' to recipient 1, and perform call email send, elseif message type is error then move 'CAERROR' to filename, perform call email send, move 'IN' to filename, clear recipient, move 'OM01247' to recipient 1, and perform call email send, elseif message type is info then move 'IN' to filename, clear recipient, move 'OM01247' to recipient 1, and perform call email send, elseif message type is unrelease then move 'IN' to filename, perform call email send, clear recipient, perform fetch manifest station segment, if manifest station Merlin ID not spaces then move 'IN' to filename, move manifest station Merlin ID to recipient 1, and perform call email send, elseif message type is release then clear recipient, perform fetch manifest station segment, if manifest station Merlin ID not spaces then move 'IN' to filename, move manifest station Merlin ID to recipient 1, and perform call email send, elseif message type is hold then move 'CAHOLD' to filename, clear recipient, move 'OM01247' to recipient 1, and perform call email send, then perform reset report fields
R-CCISCOM-cbl-00018 (+2)File: CCISCOM.cblBusiness Rule: Version Check and Data Transfer
Rule Belongs to : CCISCOM.cbl
Business Justification: Governs the functional prerequisites and system routing when iscom communication area exists with a sit version field and ws-iscom-version contains the expected version. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: ISCOM communication area exists with a SIT version field and WS-ISCOM-VERSION contains the expected version
Applied to: Is ISCOM Version Already Set?
Action: The system compares CC-SIT-VERSION of ISCOM with WS-ISCOM-VERSION
Logic Flow:
IF ISCOM communication area exists with a SIT version field and WS-ISCOM-VERSION contains the expected version
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when cccom and iscom communication areas exist with cc-common-area fields. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: CCCOM and ISCOM communication areas exist with CC-COMMON-AREA fields
Applied to: Transfer Common Area Data from CCCOM to ISCOM
Action: Version compatibility check passes
Logic Flow:
IF CCCOM and ISCOM communication areas exist with CC-COMMON-AREA fields
AND Version compatibility check passes
THEN:
• Copy CC-COMMON-AREA from CCCOM to CC-COMMON-AREA of ISCOM
Rule Belongs to : CCISCOM.cbl
Business Justification: Establishes the required business protocol to be followed when ws-iscom-version contains the current version and iscom has cc-sit-version field. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context:WS-ISCOM-VERSION contains the current version and ISCOM has CC-SIT-VERSION field
Applied to: Set ISCOM Version
Action: Common area data transfer is completed
Logic Flow:
IFWS-ISCOM-VERSION contains the current version and ISCOM has CC-SIT-VERSION field
Business Justification: Dictates the expected operational logic and validation steps when iscom version (cc-sit-version of iscom) does not equal the working storage iscom version (ws-iscom-version). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: 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
Action: The system processes ISCOM initialization
Logic Flow:
IF ISCOM version (CC-SIT-VERSION OF ISCOM) does not equal the working storage ISCOM version (WS-ISCOM-VERSION)
AND The system processes ISCOM initialization
THEN:
• ISCOM structure is populated with default values from ISCOMVAL
Rule Belongs to : CCISCOM.cbl
Business Justification: Establishes the required business protocol to be followed when iscom version does not match expected version and iscom has been initialized with default values. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: ISCOM version does not match expected version and ISCOM has been initialized with default values
Applied to: Copy Common Area Data from CCCOM
Action: The system processes common area data transfer
Logic Flow:
IF ISCOM version does not match expected version and ISCOM has been initialized with default values
AND The system processes common area data transfer
THEN:
• Common area data (CC-COMMON-AREA) is copied from CCCOM to ISCOM
Rule Belongs to : CCISCOM.cbl
Business Justification: Governs the functional prerequisites and system routing when iscom has been initialized and common area data has been copied. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: ISCOM has been initialized and common area data has been copied
Applied to: Set ISCOM Version Number
Action: The system finalizes ISCOM structure setup
Logic Flow:
IF ISCOM has been initialized and common area data has been copied
AND 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)
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when iscom version does not match expected version and initialization is in progress.
Trigger Criteria:
Context: ISCOM version does not match expected version and initialization is in progress
Applied to: Initialize ISCOM with Default Values
Action: The system processes LT-PCBS data transfer
Logic Flow:
IF ISCOM version does not match expected version and initialization is in progress
AND The system processes LT-PCBS data transfer
THEN:
• LT-PCBS data (CC-LT-PCBS) is copied from CCCOM to ISCOM
Business Justification: Defines the strict business conditions required to proceed when cccom and iscom communication structures exist and need to reference each other.
Trigger Criteria:
Context: 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
Action: Cross-reference setup is initiated
Logic Flow:
IF CCCOM and ISCOM communication structures exist and need to reference each other
AND 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.cblBusiness Rule: PCB Transfer
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when cccom and iscom structures exist and cc-sit-version of iscom does not equal ws-iscom-version. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: 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
Action: The system performs version compatibility processing
Logic Flow:
IF CCCOM and ISCOM structures exist and CC-SIT-VERSION of ISCOM does not equal WS-ISCOM-VERSION
AND The system performs version compatibility processing
THEN:
• CC-LT-PCBS data from CCCOM structure is copied to CC-LT-PCBS field in ISCOM structure
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when iscom and cccom structures exist and cc-sit-version of cccom does not equal ws-cccom-version. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: 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
Action: The system performs reverse version compatibility processing via ISCCCOM entry point
Logic Flow:
IF ISCOM and CCCOM structures exist and CC-SIT-VERSION of CCCOM does not equal WS-CCCOM-VERSION
AND 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.cblBusiness Rule: Database Name Scanning
Rule Belongs to : CCISCOM.cbl
Business Justification: Establishes the required business protocol to be followed when database scanning operation needs to begin.
Trigger Criteria:
Context: A database scanning operation needs to begin
Applied to: Initialize Index I = 1
Action: The system starts processing database entries
Logic Flow:
IF A database scanning operation needs to begin
AND The system starts processing database entries
THEN:
• The index counter is set to position 1 to begin scanning from the first entry
Rule Belongs to : CCISCOM.cbl
Business Justification: Dictates the expected operational logic and validation steps when database entry scanning operation is in progress with current index position i.
Trigger Criteria:
Context: A database entry scanning operation is in progress with current index position I
Applied to: Index I > CCCOM Table Size?
Action: The system checks if the current index exceeds the CCCOM table size limit
Logic Flow:
IF A database entry scanning operation is in progress with current index position I
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Establishes the required business protocol to be followed when database entry at position i within the valid table range.
Trigger Criteria:
Context: A database entry at position I within the valid table range
Applied to: Database Name at Position I = SPACES?
Action: The system examines the database name field at the current position
Logic Flow:
IF A database entry at position I within the valid table range
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when valid database entry at position i with a non-empty database name.
Trigger Criteria:
Context: A valid database entry at position I with a non-empty database name
Applied to: Process Current Database Entry
Action: The system needs to process the database entry for address mapping
Logic Flow:
IF A valid database entry at position I with a non-empty database name
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when database entry has been successfully processed at position i.
Trigger Criteria:
Context: A database entry has been successfully processed at position I
Applied to: Increment Index I by 1
Action: The system completes processing the current database entry
Logic Flow:
IF A database entry has been successfully processed at position I
AND 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-CCISCOM-cbl-00033 (+1)File: CCISCOM.cblBusiness Rule: PCB Number Processing
Rule Belongs to : CCISCOM.cbl
Business Justification: Dictates the expected operational logic and validation steps when database entry from cccom table with pcb number field that may be empty or contain spaces.
Trigger Criteria:
Context: 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
Action: The PCB number field contains spaces or is empty
Logic Flow:
IF A database entry from CCCOM table with PCB number field that may be empty or contain spaces
AND The PCB number field contains spaces or is empty
THEN:
• The system assigns default PCB number '1' to the CCCOM PCB number field
Rule Belongs to : CCISCOM.cbl
Business Justification: Dictates the expected operational logic and validation steps when database entry from cccom table with a valid pcb number that is not spaces.
Trigger Criteria:
Context: 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
Action: The PCB number field contains a valid non-space value
Logic Flow:
IF A database entry from CCCOM table with a valid PCB number that is not spaces
AND The PCB number field contains a valid non-space value
THEN:
• The system preserves the existing PCB number value without modification
R-CCISCOM-cbl-00035 (+2)File: CCISCOM.cblBusiness Rule: Database Name Matching
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when cccom database entry at position i and an iscom database entry at position j are being compared.
Trigger Criteria:
Context: A CCCOM database entry at position I and an ISCOM database entry at position J are being compared
Applied to: Do Database Names Match?
Action: The database name in CCCOM entry matches the database name in ISCOM entry
Logic Flow:
IF A CCCOM database entry at position I and an ISCOM database entry at position J are being compared
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Ensures correct system behavior and process compliance when database names between cccom and iscom entries have been confirmed as matching.
Trigger Criteria:
Context: Database names between CCCOM and ISCOM entries have been confirmed as matching
Applied to: Names Match - Proceed with Processing
Action: The matching database names are identified
Logic Flow:
IF Database names between CCCOM and ISCOM entries have been confirmed as matching
AND The matching database names are identified
THEN:
• The ISCOM PCB number is incremented by 1 to maintain proper sequencing
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when database names match and iscom pcb number has been incremented.
Trigger Criteria:
Context: Database names match and ISCOM PCB number has been incremented
Applied to: Names Match - Proceed with Processing
Action: The current ISCOM PCB number equals the CCCOM PCB number for the matched database
Logic Flow:
IF Database names match and ISCOM PCB number has been incremented
AND 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
Business Justification: Governs the functional prerequisites and system routing when database name from cccom entry (i) and a database name from iscom entry (j) are being compared.
Trigger Criteria:
Context: 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
Action: The database name from CCCOM matches the database name from ISCOM
Logic Flow:
IF A database name from CCCOM entry (I) and a database name from ISCOM entry (J) are being compared
AND The database name from CCCOM matches the database name from ISCOM
THEN:
• The ISCOM PCB number counter is incremented by 1
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when database name from cccom entry at position i and a database name from iscom entry at position j.
Trigger Criteria:
Context: A database name from CCCOM entry at position I and a database name from ISCOM entry at position J
Applied to: Database Names Match?
Action: The system compares the two database names
Logic Flow:
IF A database name from CCCOM entry at position I and a database name from ISCOM entry at position J
AND The system compares the two database names
THEN:
• If the names are identical, proceed to increment PCB counter; otherwise continue to next database entry
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when two iscom database entries at positions i and k are being compared during reverse processing.
Trigger Criteria:
Context: Two ISCOM database entries at positions I and K are being compared during reverse processing
Applied to: Increment PCB Counter by 1
Action: The database name at position I matches the database name at position K
Logic Flow:
IF Two ISCOM database entries at positions I and K are being compared during reverse processing
AND The database name at position I matches the database name at position K
THEN:
• The ISCOM PCB number counter is incremented by 1
Business Justification: Dictates the expected operational logic and validation steps when cccom entry at position i and an iscom entry at position j both contain database names.
Trigger Criteria:
Context: 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?
Action: The system compares the database name from CCCOM entry I with the database name from ISCOM entry J
Logic Flow:
IF A CCCOM entry at position I and an ISCOM entry at position J both contain database names
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when database names match between cccom entry i and iscom entry j.
Trigger Criteria:
Context: Database names match between CCCOM entry I and ISCOM entry J
Applied to: Increment ISCOM PCB Counter
Action: The system processes the matching database entries
Logic Flow:
IF Database names match between CCCOM entry I and ISCOM entry J
AND The system processes the matching database entries
THEN:
• The ISCOM PCB number counter is incremented by 1
Rule Belongs to : CCISCOM.cbl
Business Justification: Governs the functional prerequisites and system routing when iscom pcb number has been incremented and the cccom pcb number is available.
Trigger Criteria:
Context: The ISCOM PCB number has been incremented and the CCCOM PCB number is available
Applied to: PCB Numbers Match?
Action: The system compares the ISCOM PCB number with the CCCOM PCB number
Logic Flow:
IF The ISCOM PCB number has been incremented and the CCCOM PCB number is available
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Ensures correct system behavior and process compliance when database names match and pcb numbers are equal between cccom entry i and iscom entry j.
Trigger Criteria:
Context: 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
Action: The system performs PCB address mapping
Logic Flow:
IF Database names match and PCB numbers are equal between CCCOM entry I and ISCOM entry J
AND The system performs PCB address mapping
THEN:
• The PCB address from CCCOM entry I is assigned to ISCOM entry J
R-CCISCOM-cbl-00045 (+3)File: CCISCOM.cblBusiness Rule: Reverse Conversion Version Check
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when reverse conversion process is initiated with iscom and cccom communication areas.
Trigger Criteria:
Context: 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
Action: The system checks the CCCOM SIT version against the expected CCCOM version
Logic Flow:
IF A reverse conversion process is initiated with ISCOM and CCCOM communication areas
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Ensures correct system behavior and process compliance when cccom sit version equals the working storage cccom version.
Trigger Criteria:
Context: CCCOM SIT version equals the working storage CCCOM version
Applied to: Version Already Set - Transfer Common Area Data Only
Action: Reverse conversion is performed
Logic Flow:
IF CCCOM SIT version equals the working storage CCCOM version
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Governs the functional prerequisites and system routing when cccom sit version does not equal the working storage cccom version.
Trigger Criteria:
Context: CCCOM SIT version does not equal the working storage CCCOM version
Applied to: Version Not Set - Proceed with Full Initialization
Action: Reverse conversion is performed
Logic Flow:
IF CCCOM SIT version does not equal the working storage CCCOM version
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Governs the functional prerequisites and system routing when reverse conversion process is in progress.
Trigger Criteria:
Context: Reverse conversion process is in progress
Applied to: Set CCCOM Version to Expected Value
Action: Version update is required
Logic Flow:
IF Reverse conversion process is in progress
AND Version update is required
THEN:
• CCCOM SIT version is set to the working storage CCCOM version value
R-CCISCOM-cbl-00049 (+1)File: CCISCOM.cblBusiness Rule: Reverse Data Transfer
Rule Belongs to : CCISCOM.cbl
Business Justification: Governs the functional prerequisites and system routing when iscom structure contains common area data and cccom structure is available for data transfer.
Trigger Criteria:
Context: ISCOM structure contains common area data and CCCOM structure is available for data transfer
Applied to: Transfer Common Area Data from ISCOM to CCCOM
Action: Reverse conversion process is initiated from ISCOM to CCCOM
Logic Flow:
IF ISCOM structure contains common area data and CCCOM structure is available for data transfer
AND Reverse conversion process is initiated from ISCOM to CCCOM
THEN:
• Common area data from ISCOM is copied to CCCOM structure
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when cccom structure is being updated during reverse conversion and working storage contains cccom version number.
Trigger Criteria:
Context: CCCOM structure is being updated during reverse conversion and working storage contains CCCOM version number
Applied to: Set CCCOM Version Number
Action: Common area data transfer is completed
Logic Flow:
IF CCCOM structure is being updated during reverse conversion and working storage contains CCCOM version number
AND Common area data transfer is completed
THEN:
• CCCOM SIT version is set to the working storage CCCOM version number
R-CCISCOM-cbl-00051File: CCISCOM.cblBusiness Rule: Reverse PCB Transfer
Rule Belongs to : CCISCOM.cbl
Business Justification: Establishes the required business protocol to be followed when iscom structure contains pcb information in cc-lt-pcbs field and cccom structure is available for data transfer.
Trigger Criteria:
Context: 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
Action: reverse conversion process is initiated and version compatibility requires PCB data synchronization
Logic Flow:
IF ISCOM structure contains PCB information in CC-LT-PCBS field and CCCOM structure is available for data transfer
AND 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.cblBusiness Rule: Active PCB Identification
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when iscom entry with a pcb address field.
Trigger Criteria:
Context: An ISCOM entry with a PCB address field
Applied to: PCB Address ≠ Zero?
Action: The system evaluates the PCB address value
Logic Flow:
IF An ISCOM entry with a PCB address field
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Dictates the expected operational logic and validation steps when active iscom entry with non-zero pcb address.
Trigger Criteria:
Context: An active ISCOM entry with non-zero PCB address
Applied to: Mark as Active PCB Entry
Action: The system begins processing the active entry
Logic Flow:
IF An active ISCOM entry with non-zero PCB address
AND The system begins processing the active entry
THEN:
• ISCOM PCB number is set to 1 to start the numbering sequence
Rule Belongs to : CCISCOM.cbl
Business Justification: Ensures correct system behavior and process compliance when active iscom entry and a target cccom entry position.
Trigger Criteria:
Context: An active ISCOM entry and a target CCCOM entry position
Applied to: Continue Processing Active Entry
Action: The system processes the active PCB entry
Logic Flow:
IF An active ISCOM entry and a target CCCOM entry position
AND The system processes the active PCB entry
THEN:
• The database name from ISCOM entry is copied to the CCCOM entry at the current position
Rule Belongs to : CCISCOM.cbl
Business Justification: Dictates the expected operational logic and validation steps when active iscom entry with non-zero pcb address and a target cccom entry.
Trigger Criteria:
Context: An active ISCOM entry with non-zero PCB address and a target CCCOM entry
Applied to: Continue Processing Active Entry
Action: The system processes the active PCB entry
Logic Flow:
IF An active ISCOM entry with non-zero PCB address and a target CCCOM entry
AND The system processes the active PCB entry
THEN:
• The PCB address from ISCOM entry is set in the corresponding CCCOM entry
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when calculated iscom pcb number and a target cccom entry.
Trigger Criteria:
Context: A calculated ISCOM PCB number and a target CCCOM entry
Applied to: Continue Processing Active Entry
Action: The system determines the PCB number assignment
Logic Flow:
IF A calculated ISCOM PCB number and a target CCCOM entry
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Ensures correct system behavior and process compliance when processed active iscom entry.
Trigger Criteria:
Context: A processed active ISCOM entry
Applied to: Continue Processing Active Entry
Action: The system completes processing of the active entry
Logic Flow:
IF A processed active ISCOM entry
AND The system completes processing of the active entry
Business Justification: Establishes the required business protocol to be followed when iscom table with database entries and a current database entry at position i with a specific database name.
Trigger Criteria:
Context: 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
Action: The system needs to determine the sequential PCB number for the current database entry
Logic Flow:
IF An ISCOM table with database entries and a current database entry at position I with a specific database name
AND 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-1and increments the PCB number for each match found, starting from an initial value of 1
Business Justification: Ensures correct system behavior and process compliance when database entry creation process is starting.
Trigger Criteria:
Context: The database entry creation process is starting
Applied to: Initialize CCCOM Entry Counter to 0
Action: The system begins processing ISCOM entries for conversion to CCCOM
Logic Flow:
IF The database entry creation process is starting
AND The system begins processing ISCOM entries for conversion to CCCOM
THEN:
• The CCCOM entry counter (J) is set to zero to track new entries
Rule Belongs to : CCISCOM.cbl
Business Justification: Ensures correct system behavior and process compliance when iscom database entry is being evaluated for conversion.
Trigger Criteria:
Context: An ISCOM database entry is being evaluated for conversion
Applied to: ISCOM Entry Has Active PCB Address?
Action: The system checks the PCB address of the ISCOM entry
Logic Flow:
IF An ISCOM database entry is being evaluated for conversion
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Establishes the required business protocol to be followed when active iscom database entry needs to be converted to cccom format.
Trigger Criteria:
Context: An active ISCOM database entry needs to be converted to CCCOM format
Applied to: Create New CCCOM Database Entry
Action: The system processes the ISCOM entry with non-zero PCB address
Logic Flow:
IF An active ISCOM database entry needs to be converted to CCCOM format
AND 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)
Rule Belongs to : CCISCOM.cbl
Business Justification: Ensures correct system behavior and process compliance when database entry is being processed and needs a pcb sequence number.
Trigger Criteria:
Context: A database entry is being processed and needs a PCB sequence number
Applied to: Create New CCCOM Database Entry
Action: The system encounters a database name that may have multiple instances
Logic Flow:
IF A database entry is being processed and needs a PCB sequence number
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Ensures correct system behavior and process compliance when pcb sequence number has been calculated for a database entry.
Trigger Criteria:
Context: A PCB sequence number has been calculated for a database entry
Applied to: Create New CCCOM Database Entry
Action: The system needs to assign the database number in CCCOM structure
Logic Flow:
IF A PCB sequence number has been calculated for a database entry
AND 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
Business Justification: Dictates the expected operational logic and validation steps when iscom entry at position i contains a valid pcb address and a corresponding cccom entry exists at position j. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: 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
Action: The system performs reverse conversion from ISCOM to CCCOM format
Logic Flow:
IF An ISCOM entry at position I contains a valid PCB address and a corresponding CCCOM entry exists at position J
AND 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.cblBusiness Rule: Database Number Assignment
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when database entry is being processed during iscom to cccom conversion and the iscom pcb number has been determined.
Trigger Criteria:
Context: 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
Action: The ISCOM PCB number equals '1' indicating this is the first occurrence of this database name
Logic Flow:
IF A database entry is being processed during ISCOM to CCCOM conversion and the ISCOM PCB number has been determined
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when database entry is being processed during iscom to cccom conversion and the iscom pcb number has been determined.
Trigger Criteria:
Context: A database entry is being processed during ISCOM to CCCOM conversion and the ISCOM PCB number has been determined
Applied to: Assign PCB Number to Database Number - Subsequent Occurrence
Action: The ISCOM PCB number is not equal to '1' indicating this is a subsequent occurrence of this database name
Logic Flow:
IF A database entry is being processed during ISCOM to CCCOM conversion and the ISCOM PCB number has been determined
AND 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.cblBusiness Rule: Process Current Database Entry
Rule Belongs to : CCISCOM.cbl
Business Justification: Ensures correct system behavior and process compliance when database entry is being processed.
Trigger Criteria:
Context: A database entry is being processed
Applied to: Initialize PCB Counter to Zero
Action: The PCB counter initialization is performed
Logic Flow:
IF A database entry is being processed
AND The PCB counter initialization is performed
THEN:
• The ISCOM PCB number is set to zero
Rule Belongs to : CCISCOM.cbl
Business Justification: Governs the functional prerequisites and system routing when database entry with index i is being processed.
Trigger Criteria:
Context: A database entry with index I is being processed
Applied to: Extract PCB Number from Database Entry
Action: PCB number extraction is performed
Logic Flow:
IF A database entry with index I is being processed
AND PCB number extraction is performed
THEN:
• The PCB number from CCCOM database entry at index I is moved to CCCOM-PCB-NUMBER
Rule Belongs to : CCISCOM.cbl
Business Justification: Governs the functional prerequisites and system routing when database entry is being processed and the cccom-pcb-number is empty or contains spaces.
Trigger Criteria:
Context: A database entry is being processed and the CCCOM-PCB-NUMBER is empty or contains spaces
Applied to: Set PCB Number to Default '1'
Action: The PCB number validation is performed
Logic Flow:
IF A database entry is being processed and the CCCOM-PCB-NUMBER is empty or contains spaces
AND The PCB number validation is performed
THEN:
• The CCCOM-PCB-NUMBER is set to '1'
R-CCISCOM-cbl-00070 (+5)File: CCISCOM.cblBusiness Rule: Continue Processing Active Entry
Rule Belongs to : CCISCOM.cbl
Business Justification: Establishes the required business protocol to be followed when active pcb entry has been identified for processing.
Trigger Criteria:
Context: An active PCB entry has been identified for processing
Applied to: Initialize PCB Sequence Number to 1
Action: The system begins processing the active entry
Logic Flow:
IF An active PCB entry has been identified for processing
AND The system begins processing the active entry
THEN:
• The PCB sequence number is initialized to 1
Rule Belongs to : CCISCOM.cbl
Business Justification: Establishes the required business protocol to be followed when database entry is being processed and pcb sequence number is initialized to 1.
Trigger Criteria:
Context: A database entry is being processed and PCB sequence number is initialized to 1
Applied to: Calculate Sequential PCB Number for Current Database
Action: The system needs to determine the sequential number for the current database
Logic Flow:
IF A database entry is being processed and PCB sequence number is initialized to 1
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Ensures correct system behavior and process compliance when active pcb entry is being processed.
Trigger Criteria:
Context: An active PCB entry is being processed
Applied to: Increment CCCOM Entry Counter
Action: The system is ready to create a new CCCOM entry
Logic Flow:
IF An active PCB entry is being processed
AND The system is ready to create a new CCCOM entry
THEN:
• The CCCOM entry counter (J) is incremented by 1
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when active pcb entry is being processed and cccom counter has been incremented. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An active PCB entry is being processed and CCCOM counter has been incremented
Applied to: Copy Database Name from ISCOM to CCCOM
Action: The system needs to populate the CCCOM entry with database information
Logic Flow:
IF An active PCB entry is being processed and CCCOM counter has been incremented
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Establishes the required business protocol to be followed when database name has been copied from iscom to cccom.
Trigger Criteria:
Context: Database name has been copied from ISCOM to CCCOM
Applied to: Map PCB Address from ISCOM to CCCOM
Action: The system needs to establish address mapping
Logic Flow:
IF Database name has been copied from ISCOM to CCCOM
AND The system needs to establish address mapping
THEN:
• The PCB address from the current ISCOM entry is mapped to the corresponding CCCOM entry
Rule Belongs to : CCISCOM.cbl
Business Justification: Governs the functional prerequisites and system routing when pcb address has been mapped and pcb sequence number has been calculated.
Trigger Criteria:
Context: PCB address has been mapped and PCB sequence number has been calculated
Applied to: Set Database Number to Spaces or PCB Sequence Number
Action: The system needs to set the database number field
Logic Flow:
IF PCB address has been mapped and PCB sequence number has been calculated
AND 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.cblBusiness Rule: Start Loop: K = 1 to Current Position I
Rule Belongs to : CCISCOM.cbl
Business Justification: Establishes the required business protocol to be followed when iscom table with database entries and a current position i being processed.
Trigger Criteria:
Context: An ISCOM table with database entries and a current position I being processed
Applied to: K = 1 to Current Position I-1 - Iterate through previous database entries to count matching database names for sequence calculation
Action: 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
Logic Flow:
IF An ISCOM table with database entries and a current position I being processed
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when two database entries in the iscom table at positions k and i.
Trigger Criteria:
Context: Two database entries in the ISCOM table at positions K and I
Applied to: ISCOM K vs ISCOM I
Action: The system compares the database names at these positions
Logic Flow:
IF Two database entries in the ISCOM table at positions K and I
AND 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
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when pcb sequence number counter (iscom-pcb-num) and two database entries with matching names.
Trigger Criteria:
Context: A PCB sequence number counter (ISCOM-PCB-NUM) and two database entries with matching names
Applied to: Increment PCB Sequence Number
Action: The system finds that the database name at position K matches the database name at position I
Logic Flow:
IF A PCB sequence number counter (ISCOM-PCB-NUM) and two database entries with matching names
AND 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-CCISCOM-cbl-00079File: CCISCOM.cblBusiness Rule: Compare Database Names: ISCOM K vs ISCOM I
Rule Belongs to : CCISCOM.cbl
Business Justification: Defines the strict business conditions required to proceed when 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.
Trigger Criteria:
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
Applied to: ISCOM K vs ISCOM I
Action: The database name in ISCOM entry at position K equals the database name in ISCOM entry at position I
Logic Flow:
IF 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
AND 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
Business Justification: Establishes the required business protocol to be followed when error handling process is starting.
Trigger Criteria:
Context: The error handling process is starting
Applied to: No explicit initialization code found in provided COBOL snippet
Action: The main procedure begins execution
Logic Flow:
IF The error handling process is starting
AND The main procedure begins execution
THEN:
• The communication area CCCOM is initialized through the DCCCOM module
Rule Belongs to : CERR.cbl
Business Justification: Dictates the expected operational logic and validation steps when system has a dump-only mode flag ws-dump-only. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system has a dump-only mode flag WS-DUMP-ONLY
Applied to: No explicit initialization code found in provided COBOL snippet
Action: The dump-only mode is active (WS-DUMP-ONLY is true)
Logic Flow:
IF The system has a dump-only mode flag WS-DUMP-ONLY
AND The dump-only mode is active (WS-DUMP-ONLY is true)
THEN:
• Error processing is bypassed and control proceeds to program termination
Rule Belongs to : CERR.cbl
Business Justification: Defines the strict business conditions required to proceed when system is not in dump-only mode and environment indicator cc-prod-test-ims is available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: 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
Action: The environment indicator CC-PROD-TEST-IMS equals the production value WS-PROD
Logic Flow:
IF The system is not in dump-only mode and environment indicator CC-PROD-TEST-IMS is available
AND The environment indicator CC-PROD-TEST-IMS equals the production value WS-PROD
THEN:
• The production error handler CERRPROD is invoked with CCCOM parameters
Rule Belongs to : CERR.cbl
Business Justification: Defines the strict business conditions required to proceed when system is not in dump-only mode and environment indicator cc-prod-test-ims is available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: 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
Action: The environment indicator CC-PROD-TEST-IMS does not equal the production value WS-PROD
Logic Flow:
IF The system is not in dump-only mode and environment indicator CC-PROD-TEST-IMS is available
AND 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
Rule Belongs to : CERR.cbl
Business Justification: Ensures correct system behavior and process compliance when error handling process has completed initialization and conditional processing.
Trigger Criteria:
Context: The error handling process has completed initialization and conditional processing
Applied to: No explicit initialization code found in provided COBOL snippet
Action: The program reaches the notification phase
Logic Flow:
IF The error handling process has completed initialization and conditional processing
AND The program reaches the notification phase
THEN:
• A blocking error message is displayed to the system error output
Business Justification: Ensures correct system behavior and process compliance when system has access to cc-prod-test-ims environment flag and ws-prod production environment value. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: 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
Action: The system compares CC-PROD-TEST-IMS with WS-PROD value
Logic Flow:
IF The system has access to CC-PROD-TEST-IMS environment flag and WS-PROD production environment value
AND The system compares CC-PROD-TEST-IMS with WS-PROD value
THEN:
• IfCC-PROD-TEST-IMS equals WS-PROD then environment is identified as Production, otherwise environment is identified as Test
R-CERR-cbl-00014File: CERR.cblBusiness Rule: Dump Only Check
Rule Belongs to : CERR.cbl
Business Justification: Ensures correct system behavior and process compliance when system has initialized communication area and ws-dump-only flag is available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system has initialized communication area and WS-DUMP-ONLY flag is available
Applied to: Check WS-DUMP-ONLY Flag
Action: The system checks the WS-DUMP-ONLY flag status
Logic Flow:
IF The system has initialized communication area and WS-DUMP-ONLY flag is available
AND The system checks the WS-DUMP-ONLY flag status
THEN:
• IfWS-DUMP-ONLY is set to true, skip all further error processing and proceed to program termination; IfWS-DUMP-ONLY is false, continue to environment detection for error processing
R-CERR-cbl-00015File: CERR.cblBusiness Rule: Common Error Processing
Rule Belongs to : CERR.cbl
Business Justification: Dictates the expected operational logic and validation steps when system needs to perform error processing. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system needs to perform error processing
Applied to: Call DCCCOM Program
Action: The main error processing procedure is executed
Logic Flow:
IF The system needs to perform error processing
AND 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-00016File: CERR.cblBusiness Rule: Production Error Handling
Rule Belongs to : CERR.cbl
Business Justification: Establishes the required business protocol to be followed when 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. ⚠️ COBOL Technical Logic
Trigger Criteria:
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
Applied to: Call CERRPROD with Communication Area
Action: An error condition requires processing through the production error handler
Logic Flow:
IF 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
AND 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-CERR-cbl-00017 (+2)File: CERR.cblBusiness Rule: Test Error Handling
Rule Belongs to : CERR.cbl
Business Justification: Governs the functional prerequisites and system routing when 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). ⚠️ COBOL Technical Logic
Trigger Criteria:
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)
Applied to: Test Environment Detected
Action: An error condition occurs requiring error processing
Logic Flow:
IF 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)
AND 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)
Rule Belongs to : CERR.cbl
Business Justification: Governs the functional prerequisites and system routing when system is operating in dump-only mode (ws-dump-only is true). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is operating in dump-only mode (WS-DUMP-ONLY is true)
Applied to: Route Error to Test Handler
Action: An error condition occurs
Logic Flow:
IF The system is operating in dump-only mode (WS-DUMP-ONLY is true)
AND An error condition occurs
THEN:
• The system bypasses all error processing routines and skips calling any error handlers
Rule Belongs to : CERR.cbl
Business Justification: Establishes the required business protocol to be followed when error processing is required for test environment and dump mode is not active. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Error processing is required for test environment and dump mode is not active
Applied to: Call CERRTEST Program
Action: The system determines test environment error handling is needed
Logic Flow:
IF Error processing is required for test environment and dump mode is not active
AND 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
Business Justification: Defines the strict business conditions required to proceed when blocking error condition has occurred in the cims system.
Trigger Criteria:
Context: A blocking error condition has occurred in the CIMS system
Applied to: Display blocking error message to system error output
Action: The error notification display process is executed
Logic Flow:
IF A blocking error condition has occurred in the CIMS system
AND 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-CERR-cbl-00021File: CERR.cblBusiness Rule: Program Termination
Rule Belongs to : CERR.cbl
Business Justification: Ensures correct system behavior and process compliance when error processing activities have been completed including communication setup, environment-based error handler execution, and blocking error message display.
Trigger Criteria:
Context: 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
Action: The program reaches the termination point
Logic Flow:
IF Error processing activities have been completed including communication setup, environment-based error handler execution, and blocking error message display
AND The program reaches the termination point
THEN:
• The system executes program termination and returns control to the calling program
Business Justification: Ensures correct system behavior and process compliance when system has a common control area (cccom) that may contain an iscom address and the system version matches the expected cccom version.
Trigger Criteria:
Context: 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
Action: The system checks for ISCOM address availability during communication setup
Logic Flow:
IF The system has a common control area (CCCOM) that may contain an ISCOM address and the system version matches the expected CCCOM version
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when valid iscom address exists in cccom that is not null and not blank.
Trigger Criteria:
Context: A valid ISCOM address exists in CCCOM that is not null and not blank
Applied to: Set ISCOM Address for Communication
Action: The system needs to establish ISCOM communication
Logic Flow:
IF A valid ISCOM address exists in CCCOM that is not null and not blank
AND The system needs to establish ISCOM communication
THEN:
• The system sets the address of ISCOM to the CCCOM ISCOM address to enable communication
R-CIMS-cbl-00033 (+8)File: CIMS.cblBusiness Rule: CCCOM Version Compatibility Check
Rule Belongs to : CIMS.cbl
Business Justification: Defines the strict business conditions required to proceed when cccom control block with a version identifier and a system with an expected cccom version.
Trigger Criteria:
Context: A CCCOM control block with a version identifier and a system with an expected CCCOM version
Applied to: Check CCCOM Version
Action: The system checks CCCOM version compatibility
Logic Flow:
IF A CCCOM control block with a version identifier and a system with an expected CCCOM version
AND The system checks CCCOM version compatibility
THEN:
• The system compares CCCOM version against expected version and determines whether to proceed with ISCOM checks
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when cccom version has been validated against expected system version.
Trigger Criteria:
Context: CCCOM version has been validated against expected system version
Applied to: CCCOM Version = Expected Version?
Action: CCCOM version equals the expected system version
Logic Flow:
IF CCCOM version has been validated against expected system version
AND CCCOM version equals the expected system version
THEN:
• System proceeds with ISCOM compatibility checks, otherwise skips ISCOM processing
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when cccom version compatibility has been confirmed and cccom contains database pcb area.
Trigger Criteria:
Context: CCCOM version compatibility has been confirmed and CCCOM contains database PCB area
Applied to: Set Base Address to CCCOM DB PCBs
Action: System needs to perform ISCOM address calculations
Logic Flow:
IF CCCOM version compatibility has been confirmed and CCCOM contains database PCB area
AND System needs to perform ISCOM address calculations
THEN:
• System sets the base address pointer to the CCCOM database PCBs area
Rule Belongs to : CIMS.cbl
Business Justification: Defines the strict business conditions required to proceed when base address has been set to cccom database pcbs and an address area is available.
Trigger Criteria:
Context: Base address has been set to CCCOM database PCBs and an address area is available
Applied to: Set Offset Address to Address Area
Action: System needs to calculate ISCOM address offset
Logic Flow:
IF Base address has been set to CCCOM database PCBs and an address area is available
AND System needs to calculate ISCOM address offset
THEN:
• System sets the offset address pointer to the provided address area
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when iscom structure is available with database pcbs area.
Trigger Criteria:
Context: ISCOM structure is available with database PCBs area
Applied to: Calculate ISCOM Table Size
Action: System needs to determine ISCOM table boundaries
Logic Flow:
IF ISCOM structure is available with database PCBs area
AND System needs to determine ISCOM table boundaries
THEN:
• System computes the length of ISCOM database PCBs area and stores as table size
Rule Belongs to : CIMS.cbl
Business Justification: Defines the strict business conditions required to proceed when base address and offset address have been established for iscom calculations.
Trigger Criteria:
Context: Base address and offset address have been established for ISCOM calculations
Applied to: Base Address > Zero?
Action: Base address value is greater than zero
Logic Flow:
IF Base address and offset address have been established for ISCOM calculations
AND Base address value is greater than zero
THEN:
• System uses method 1 for address calculation, otherwise uses method 2
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when base address is greater than zero and offset address is available.
Trigger Criteria:
Context: Base address is greater than zero and offset address is available
Applied to: Calculate Address Offset Method 1
Action: System applies address calculation method 1
Logic Flow:
IF Base address is greater than zero and offset address is available
AND System applies address calculation method 1
THEN:
• System assigns offset address to address-1 and base address to address-2 for final offset computation
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when base address is not greater than zero and offset address is available.
Trigger Criteria:
Context: Base address is not greater than zero and offset address is available
Applied to: Calculate Address Offset Method 2
Action: System applies address calculation method 2
Logic Flow:
IF Base address is not greater than zero and offset address is available
AND System applies address calculation method 2
THEN:
• System assigns base address to address-1 and offset address to address-2 for final offset computation
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when address-1 and address-2 have been assigned based on selected calculation method.
Trigger Criteria:
Context: Address-1 and address-2 have been assigned based on selected calculation method
Applied to: Compute Final Address Offset
Action: System performs final address offset calculation
Logic Flow:
IF Address-1 and address-2 have been assigned based on selected calculation method
AND System performs final address offset calculation
THEN:
• System computes address offset as the difference between address-1 and address-2
Business Justification: Ensures correct system behavior and process compliance when pcb address reset operation is initiated.
Trigger Criteria:
Context: A PCB address reset operation is initiated
Applied to: Check Address Area Availability
Action: The system checks if the address area is not null
Logic Flow:
IF A PCB address reset operation is initiated
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when address area is available for processing.
Trigger Criteria:
Context: An address area is available for processing
Applied to: PCB Address Valid and Not Blank?
Action: The system evaluates if PCB address is not null and not blank pointer
Logic Flow:
IF An address area is available for processing
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Defines the strict business conditions required to proceed when valid pcb address exists. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A valid PCB address exists
Applied to: CCCOM Version Compatible?
Action: The system compares CC-SIT-VERSION of CCCOM with WS-CCCOM-VERSION
Logic Flow:
IF A valid PCB address exists
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when cccom version is compatible with system version. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: CCCOM version is compatible with system version
Applied to: Set PCB Copy Address
Action: The system sets the address of LK-COPY-OF-PCB to PCB-ADDR
Logic Flow:
IF CCCOM version is compatible with system version
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Defines the strict business conditions required to proceed when pcb copy address is established. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: PCB copy address is established
Applied to: Segment Level Valid?
Action: The system checks if LK-SEG-LEVEL is not equal to '98' and not equal to '99'
Logic Flow:
IF PCB copy address is established
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when segment level is valid (98 or 99).
Trigger Criteria:
Context: Segment level is valid (98 or 99)
Applied to: Force Reset Required?
Action: The system evaluates the FORCE-RESET flag
Logic Flow:
IF Segment level is valid (98 or 99)
AND The system evaluates the FORCE-RESET flag
THEN:
• The system proceeds with address reset if force reset is required, otherwise continues normal processing
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when either segment level is invalid or force reset is required.
Trigger Criteria:
Context: Either segment level is invalid or force reset is required
Applied to: Reset PCB Address Area to Spaces
Action: The system executes the address area reset operation
Logic Flow:
IF Either segment level is invalid or force reset is required
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Defines the strict business conditions required to proceed when address area is null or not available.
Trigger Criteria:
Context: The address area is null or not available
Applied to: Continue Processing
Action: The system needs to continue processing without a valid address area
Logic Flow:
IF The address area is null or not available
AND The system needs to continue processing without a valid address area
THEN:
• The system sets the address area to CSI-ADDR-AREAand generates a zero PCB address error message
Business Justification: Defines the strict business conditions required to proceed when database operation request is being processed.
Trigger Criteria:
Context: A database operation request is being processed
Applied to: Check PCB Address Status
Action: The system checks the PCB address availability
Logic Flow:
IF A database operation request is being processed
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when pcb address validation has failed.
Trigger Criteria:
Context: PCB address validation has failed
Applied to: Set PCB Name to ZERO-PCB-NAME
Action: The system needs to generate error information
Logic Flow:
IF PCB address validation has failed
AND The system needs to generate error information
THEN:
• The system sets the PCB name from PCB-MNE to ZERO-PCB-NAME for error reporting
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when pcb address validation has failed and pcb name has been captured.
Trigger Criteria:
Context: PCB address validation has failed and PCB name has been captured
Applied to: Set PCB Number to ZERO-PCB-NUM
Action: The system continues error information collection
Logic Flow:
IF PCB address validation has failed and PCB name has been captured
AND The system continues error information collection
THEN:
• The system sets the PCB number from PCB-NUM to ZERO-PCB-NUM for error reporting
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when pcb address validation has failed and error information has been collected.
Trigger Criteria:
Context: PCB address validation has failed and error information has been collected
Applied to: Generate Zero PCB Address Error Message
Action: The system needs to create an error message
Logic Flow:
IF PCB address validation has failed and error information has been collected
AND The system needs to create an error message
THEN:
• The system moves ZERO-PCB-ADDR-ERROR-MESSAGE to CC-ERROR-MESSAGE of CCCOM
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when pcb address validation has failed and error message has been generated. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: PCB address validation has failed and error message has been generated
Applied to: Call Error Handler CERR
Action: The system needs to handle the error condition
Logic Flow:
IF PCB address validation has failed and error message has been generated
AND The system needs to handle the error condition
THEN:
• The system calls 'CERR' program using CCCOM to process the error
R-CIMS-cbl-00068 (+8)File: CIMS.cblBusiness Rule: IMS Function Call Execution
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when function code, pcb address, io area and ssa parameters are available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Function code, PCB address, IO area and SSA parameters are available
Applied to: Prepare IMS Call Parameters
Action: System prepares IMS call parameters
Logic Flow:
IF Function code, PCB address, IO area and SSA parameters are available
AND System prepares IMS call parameters
THEN:
• All parameters are set up for database call execution
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when pcb address is available and valid. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: PCB address is available and valid
Applied to: Set PCB Address to Copy Structure
Action: System sets PCB address to copy structure
Logic Flow:
IF PCB address is available and valid
AND System sets PCB address to copy structure
THEN:
• LK-COPY-OF-PCB is assigned the PCB address for database call
Rule Belongs to : CIMS.cbl
Business Justification: Defines the strict business conditions required to proceed when all call parameters are prepared and pcb copy structure is set. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All call parameters are prepared and PCB copy structure is set
Applied to: Execute CBLTDLI Call
Action: System executes CBLTDLI call with function, PCB copy, IO area and SSA parameters
Logic Flow:
IF All call parameters are prepared and PCB copy structure is set
AND System executes CBLTDLI call with function, PCB copy, IO area and SSA parameters
THEN:
• IMS database operation is performed and control returns to program
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when function code is available in func parameter. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Function code is available in FUNC parameter
Applied to: Pass Function Code
Action: System passes function code to IMS database call
Logic Flow:
IF Function code is available in FUNC parameter
AND System passes function code to IMS database call
THEN:
• Function code is included as parameter in CBLTDLI call
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when lk-copy-of-pcb is set with pcb address. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context:LK-COPY-OF-PCB is set with PCB address
Applied to: Pass PCB Copy
Action: System passes PCB copy to IMS database call
Logic Flow:
IFLK-COPY-OF-PCB is set with PCB address
AND System passes PCB copy to IMS database call
THEN:
• PCB copy is included as parameter in CBLTDLI call
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when io-area is available for data transfer. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context:IO-AREA is available for data transfer
Applied to: Pass IO Area
Action: System passes IO area to IMS database call
Logic Flow:
IFIO-AREA is available for data transfer
AND System passes IO area to IMS database call
THEN:
• IO area is included as parameter in CBLTDLI call
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when ssa1 through ssa6 parameters are available based on argument count. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: SSA1 through SSA6 parameters are available based on argument count
Applied to: Pass SSA Parameters 1-6
Action: System passes SSA parameters to IMS database call
Logic Flow:
IF SSA1 through SSA6 parameters are available based on argument count
AND System passes SSA parameters to IMS database call
THEN:
• All available SSA parameters are included in CBLTDLI call
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when all parameters are passed to cbltdli call. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All parameters are passed to CBLTDLI call
Applied to: IMS Database Processing
Action: IMS processes the database operation
Logic Flow:
IF All parameters are passed to CBLTDLI call
AND IMS processes the database operation
THEN:
• Database operation is executed and results are returned in PCB and IO area
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when ims database processing is completed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: IMS database processing is completed
Applied to: Return Control to Program
Action: Control returns to the program
Logic Flow:
IF IMS database processing is completed
AND Control returns to the program
THEN:
• Program continues with post-database call processing
R-CIMS-cbl-00077 (+5)File: CIMS.cblBusiness Rule: IO PCB Date Time Refresh
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when database function call is being processed with a specific function type and pcb address. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database function call is being processed with a specific function type and PCB address
Applied to: Check Function Type and PCB
Action: The function is 'GU' (Get Unique) AND the PCB address matches the IO PCB address in CCCOM
Logic Flow:
IF A database function call is being processed with a specific function type and PCB address
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Defines the strict business conditions required to proceed when gu function is being executed on the io pcb. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A GU function is being executed on the IO PCB
Applied to: Reset IMS Call Counter to Zero
Action: The date and time refresh process is initiated
Logic Flow:
IF A GU function is being executed on the IO PCB
AND The date and time refresh process is initiated
THEN:
• The IMS call counter in CCCOM should be reset to zero
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when date and time refresh is required for io pcb operation.
Trigger Criteria:
Context: Date and time refresh is required for IO PCB operation
Applied to: Get Current System Date
Action: The system needs to update machine date information
Logic Flow:
IF Date and time refresh is required for IO PCB operation
AND The system needs to update machine date information
THEN:
• The current system date should be retrieved in CCYYMMDD format
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when current system date has been retrieved in ccyymmdd format.
Trigger Criteria:
Context: Current system date has been retrieved in CCYYMMDD format
Applied to: Update Machine Century in CCCOM & Update Machine Date in CCCOM
Action: Machine date information needs to be updated in CCCOM
Logic Flow:
IF Current system date has been retrieved in CCYYMMDD format
AND Machine date information needs to be updated in CCCOM
THEN:
• The century portion (CC) should be moved to the machine century field in CCCOM
• The date portion (YYMMDD) should be moved to the machine date field in CCCOM
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when machine date has been updated in cccom.
Trigger Criteria:
Context: Machine date has been updated in CCCOM
Applied to: Get Current System Time
Action: Machine time information needs to be updated
Logic Flow:
IF Machine date has been updated in CCCOM
AND Machine time information needs to be updated
THEN:
• The current system time should be retrieved and stored in the machine time field of CCCOM
Business Justification: Defines the strict business conditions required to proceed when ims database function has been executed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An IMS database function has been executed
Applied to: Reset IMS Call Counter to Zero
Action: The function is 'GU' (Get Unique) AND the PCB address equals the IO PCB address
Logic Flow:
IF An IMS database function has been executed
AND The function is 'GU' (Get Unique) AND the PCB address equals the IO PCB address
THEN:
• The IMS call counter is reset to zero
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when ims database function call has been completed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An IMS database function call has been completed
Applied to: Increment IMS Call Counter by 1
Action: Any IMS database operation is executed
Logic Flow:
IF An IMS database function call has been completed
AND Any IMS database operation is executed
THEN:
• The IMS call counter is incremented by 1
R-CIMS-cbl-00085 (+2)File: CIMS.cblBusiness Rule: PCB Status Information Update
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when database operation has been completed and pcb status information is available in lk-copy-of-pcb. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: 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
Action: The system processes the PCB status information update
Logic Flow:
IF A database operation has been completed and PCB status information is available in LK-COPY-OF-PCB
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when pcb status information contains a segment level code in lk-seg-level. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: PCB status information contains a segment level code in LK-SEG-LEVEL
Applied to: Segment Level Valid?
Action: The segment level is not equal to '98' and not equal to '99'
Logic Flow:
IF PCB status information contains a segment level code in LK-SEG-LEVEL
AND The segment level is not equal to '98' and not equal to '99'
THEN:
• The system proceeds to copy the feedback key length information
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when segment level validation has passed (segment level is not '98' or '99'). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Segment level validation has passed (segment level is not '98' or '99')
Applied to: Copy Feedback Key Length to CCCOM
Action: The system processes feedback key length information
Logic Flow:
IF Segment level validation has passed (segment level is not '98' or '99')
AND 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-00088File: CIMS.cblBusiness Rule: Terminal and User Information Capture
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when database function is being executed with a specific pcb address.
Trigger Criteria:
Context: 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
Action: The function is either 'GU' (Get Unique) or 'CHKP' (Checkpoint) AND the PCB address matches the IO PCB address in the common control area
Logic Flow:
IF A database function is being executed with a specific PCB address
AND 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.cblBusiness Rule: Status Code Validation
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when ims database operation has been executed and returned a status code.
Trigger Criteria:
Context: An IMS database operation has been executed and returned a status code
Applied to: Status Code = Spaces?
Action: The status code is evaluated for success condition
Logic Flow:
IF An IMS database operation has been executed and returned a status code
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Defines the strict business conditions required to proceed when ims operation has returned a non-blank status code and validation against acceptable status table is required.
Trigger Criteria:
Context: An IMS operation has returned a non-blank status code and validation against acceptable status table is required
Applied to: I <= 12?
Action: The system iterates through the acceptable status code table
Logic Flow:
IF An IMS operation has returned a non-blank status code and validation against acceptable status table is required
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Defines the strict business conditions required to proceed when ims status code needs validation and the system is checking against acceptable status table entries.
Trigger Criteria:
Context: An IMS status code needs validation and the system is checking against acceptable status table entries
Applied to: Status Code Matches Entry?
Action: The current status code is compared with the current table entry
Logic Flow:
IF An IMS status code needs validation and the system is checking against acceptable status table entries
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when current ims status code does not match the current acceptable status table entry.
Trigger Criteria:
Context: The current IMS status code does not match the current acceptable status table entry
Applied to: Increment Counter I
Action: The system needs to check the next entry in the acceptable status table
Logic Flow:
IF The current IMS status code does not match the current acceptable status table entry
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when ims operation has returned a status code that has been checked against all entries in the acceptable status table.
Trigger Criteria:
Context: An IMS operation has returned a status code that has been checked against all entries in the acceptable status table
Applied to: Status Code Not in Acceptable List
Action: The status code is not found in any of the acceptable status table entries
Logic Flow:
IF An IMS operation has returned a status code that has been checked against all entries in the acceptable status table
AND 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
Business Justification: Defines the strict business conditions required to proceed when 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.
Trigger Criteria:
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
Applied to: Error Message Generation - Generates error message for unacceptable IMS status codes
Action: The system needs to handle the unacceptable status code
Logic Flow:
IF 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
AND 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.cblBusiness Rule: ISCOM to CCCOM Conversion Detection
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when system needs to detect iscom format usage.
Trigger Criteria:
Context: The system needs to detect ISCOM format usage
Applied to: Set Base Address to CCCOM DB PCBs
Action: ISCOM detection process begins
Logic Flow:
IF The system needs to detect ISCOM format usage
AND ISCOM detection process begins
THEN:
• The base address pointer is set to the CCCOM database PCB control blocks area
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when base address has been established for iscom detection.
Trigger Criteria:
Context: The base address has been established for ISCOM detection
Applied to: Set Offset Address to Current PCB Area
Action: Setting up address comparison parameters
Logic Flow:
IF The base address has been established for ISCOM detection
AND Setting up address comparison parameters
THEN:
• The offset address pointer is set to the current PCB address area
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when iscom detection addresses are established.
Trigger Criteria:
Context: ISCOM detection addresses are established
Applied to: Calculate ISCOM Table Size
Action: Calculating table boundaries for validation
Logic Flow:
IF ISCOM detection addresses are established
AND Calculating table boundaries for validation
THEN:
• The ISCOM table size is computed based on the length of CCCOM database PCBs
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when base and offset addresses are established for iscom detection.
Trigger Criteria:
Context: Base and offset addresses are established for ISCOM detection
Applied to: Base Address > Zero?
Action: The base address value is evaluated
Logic Flow:
IF Base and offset addresses are established for ISCOM detection
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when base address is greater than zero.
Trigger Criteria:
Context: Base address is greater than zero
Applied to: Offset - Base
Action: Computing address difference for ISCOM detection
Logic Flow:
IF Base address is greater than zero
AND Computing address difference for ISCOM detection
THEN:
• Address difference is calculated as offset address minus base address
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when base address is not greater than zero.
Trigger Criteria:
Context: Base address is not greater than zero
Applied to: Base - Offset
Action: Computing address difference for ISCOM detection
Logic Flow:
IF Base address is not greater than zero
AND Computing address difference for ISCOM detection
THEN:
• Address difference is calculated as base address minus offset address
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when address offset has been determined and is within iscom range.
Trigger Criteria:
Context: Address offset has been determined and is within ISCOM range
Applied to: PCB Table Index Calculation
Action: Converting ISCOM PCB to CCCOM format
Logic Flow:
IF Address offset has been determined and is within ISCOM range
AND Converting ISCOM PCB to CCCOM format
THEN:
• Table index is calculated as (address offset + 8) divided by 12
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when table index has been calculated for pcb conversion.
Trigger Criteria:
Context: Table index has been calculated for PCB conversion
Applied to: ISCOM PCB Conversion
Action: ISCOM format PCB needs to be converted to CCCOM format
Logic Flow:
IF Table index has been calculated for PCB conversion
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when iscom pcb has been successfully converted to cccom format.
Trigger Criteria:
Context: ISCOM PCB has been successfully converted to CCCOM format
Applied to: Set New PCB Address
Action: Finalizing the conversion process
Logic Flow:
IF ISCOM PCB has been successfully converted to CCCOM format
AND 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.cblBusiness Rule: PCB Table Index Calculation
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when address offset value exists from the difference between base and offset addresses.
Trigger Criteria:
Context: 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
Action: The system needs to determine the table index for PCB conversion
Logic Flow:
IF An address offset value exists from the difference between base and offset addresses
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when table index has been calculated for pcb conversion and iscom pcb data exists. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A table index has been calculated for PCB conversion and ISCOM PCB data exists
Applied to: Call CIMSCONV with Table Index
Action: The system needs to convert ISCOM PCB structure to CCCOM format
Logic Flow:
IF A table index has been calculated for PCB conversion and ISCOM PCB data exists
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when cimsconv service has successfully converted iscom pcb data and returned a pcb pointer.
Trigger Criteria:
Context: The CIMSCONV service has successfully converted ISCOM PCB data and returned a PCB pointer
Applied to: Set PCB Address Area
Action: The conversion process is complete
Logic Flow:
IF The CIMSCONV service has successfully converted ISCOM PCB data and returned a PCB pointer
AND The conversion process is complete
THEN:
• Set the address area to point to the converted PCB pointer location
Business Justification: Dictates the expected operational logic and validation steps when address offset value is available from iscom pcb processing.
Trigger Criteria:
Context: An address offset value is available from ISCOM PCB processing
Applied to: Calculate Table Index from Address Offset
Action: The system needs to determine the table index for PCB conversion
Logic Flow:
IF An address offset value is available from ISCOM PCB processing
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when iscom pcb data exists and table index has been calculated. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: ISCOM PCB data exists and table index has been calculated
Applied to: Call CIMSCONV Utility with ISCOM PCB Parameters
Action: PCB format conversion is required from ISCOM to CCCOM
Logic Flow:
IF ISCOM PCB data exists and table index has been calculated
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Defines the strict business conditions required to proceed when cimsconv utility has successfully converted iscom pcb to cccom format.
Trigger Criteria:
Context: CIMSCONV utility has successfully converted ISCOM PCB to CCCOM format
Applied to: Set Address Area to Converted PCB Pointer
Action: The conversion process is complete
Logic Flow:
IF CIMSCONV utility has successfully converted ISCOM PCB to CCCOM format
AND The conversion process is complete
THEN:
• The address area is updated to point to the converted PCB pointer location
R-CIMS-cbl-00110File: CIMS.cblBusiness Rule: Common Area Synchronization
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when system has both cccom and iscom control structures available and the iscom address is valid and not blank. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: 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
Action: The common area synchronization process is invoked
Logic Flow:
IF The system has both CCCOM and ISCOM control structures available and the ISCOM address is valid and not blank
AND 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.cblBusiness Rule: PCB Name Normalization and Validation
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when pcb number value is provided.
Trigger Criteria:
Context: A PCB number value is provided
Applied to: PCB Number = '1'?
Action: The PCB number equals '1'
Logic Flow:
IF A PCB number value is provided
AND The PCB number equals '1'
THEN:
• The PCB number should be converted to spaces
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when pcb name is provided and database name table exists with entries.
Trigger Criteria:
Context: A PCB name is provided and database name table exists with entries
Applied to: PCB Name Matches Database Name in Table?
Action: The PCB name matches an entry in the database name table at position I
Logic Flow:
IF A PCB name is provided and database name table exists with entries
AND 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.cblBusiness Rule: PCB Table Search and Matching Logic
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when pcb number value is provided for table search.
Trigger Criteria:
Context: A PCB number value is provided for table search
Applied to: PCB Number = '1'?
Action: The PCB number equals '1'
Logic Flow:
IF A PCB number value is provided for table search
AND The PCB number equals '1'
THEN:
• The PCB number should be cleared to spaces to standardize the search criteria
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when pcb name and a database name table with multiple entries.
Trigger Criteria:
Context: A PCB name and a database name table with multiple entries
Applied to: PCB Name Matches Table Entry?
Action: The PCB name matches a database name entry in the table at position I
Logic Flow:
IF A PCB name and a database name table with multiple entries
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when matching pcb name has been found in the database name table at position i.
Trigger Criteria:
Context: A matching PCB name has been found in the database name table at position I
Applied to: Set PCB Address from Table Entry
Action: The PCB name matches the table entry
Logic Flow:
IF A matching PCB name has been found in the database name table at position I
AND The PCB name matches the table entry
THEN:
• The PCB address should be set to the corresponding address value from the same table position
Rule Belongs to : CIMS.cbl
Business Justification: Defines the strict business conditions required to proceed when pcb table search is in progress with current index i.
Trigger Criteria:
Context: A PCB table search is in progress with current index I
Applied to: More Table Entries Available?
Action: 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
Logic Flow:
IF A PCB table search is in progress with current index I
AND 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.cblBusiness Rule: IMS Call Parameter Assembly and Validation
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when ims database function code is provided in func parameter. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An IMS database function code is provided in FUNC parameter
Applied to: Set Function Parameter from FUNC
Action: The system processes the IMS call parameters
Logic Flow:
IF An IMS database function code is provided in FUNC parameter
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when argument count is 5 or greater. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The argument count is 5 or greater
Applied to: Include SSA1 Parameter
Action: The system assembles IMS call parameters
Logic Flow:
IF The argument count is 5 or greater
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when argument count is 6 or greater. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The argument count is 6 or greater
Applied to: Include SSA2 Parameter
Action: The system assembles IMS call parameters
Logic Flow:
IF The argument count is 6 or greater
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when argument count is 7 or greater. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The argument count is 7 or greater
Applied to: Include SSA3 Parameter
Action: The system assembles IMS call parameters
Logic Flow:
IF The argument count is 7 or greater
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when argument count is 8 or greater. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The argument count is 8 or greater
Applied to: Include SSA4 Parameter
Action: The system assembles IMS call parameters
Logic Flow:
IF The argument count is 8 or greater
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when argument count is 9 or greater. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The argument count is 9 or greater
Applied to: Include SSA5 Parameter
Action: The system assembles IMS call parameters
Logic Flow:
IF The argument count is 9 or greater
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when argument count is 10 or greater. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The argument count is 10 or greater
Applied to: Include SSA6 Parameter
Action: The system assembles IMS call parameters
Logic Flow:
IF The argument count is 10 or greater
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when total argument count has been determined. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The total argument count has been determined
Applied to: Calculate Parameter Count
Action: The system prepares for IMS call execution
Logic Flow:
IF The total argument count has been determined
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when system is preparing to execute an ims database call. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is preparing to execute an IMS database call
Applied to: Initialize Status Code to '**'
Action: All parameters have been assembled
Logic Flow:
IF The system is preparing to execute an IMS database call
AND All parameters have been assembled
THEN:
• The status code is set to '**' in CC-STATUS-CODE field to indicate call in progress
Rule Belongs to : CIMS.cbl
Business Justification: Defines the strict business conditions required to proceed when all ims call parameters have been validated and assembled. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All IMS call parameters have been validated and assembled
Applied to: Execute CBLTDLI Call
Action: The system executes the database operation
Logic Flow:
IF All IMS call parameters have been validated and assembled
AND 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.cblBusiness Rule: Acceptable Status Code Table Lookup
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when database operation has completed and returned a status code, and there exists a table of acceptable status codes with up to 12 entries.
Trigger Criteria:
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
Applied to: Acceptable Status Code Table Lookup - Searches through the acceptable status code table to validate IMS return codes
Action: The system performs status code validation by iterating through the acceptable status code table
Logic Flow:
IF A database operation has completed and returned a status code, and there exists a table of acceptable status codes with up to 12 entries
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when status code from a database operation and a specific entry from the acceptable status code table at index position i.
Trigger Criteria:
Context: 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?
Action: The system compares the current status code with the table entry at the current index
Logic Flow:
IF A status code from a database operation and a specific entry from the acceptable status code table at index position I
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when system is iterating through the acceptable status code table with a current index value i.
Trigger Criteria:
Context: The system is iterating through the acceptable status code table with a current index value I
Applied to: Index I > 12?
Action: The system checks if the current index I exceeds the maximum table size of 12 entries
Logic Flow:
IF The system is iterating through the acceptable status code table with a current index value I
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when database operation status code that has been compared against all entries in the acceptable status code table without finding a match.
Trigger Criteria:
Context: 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
Action: All 12 entries in the acceptable status code table have been checked and no match was found
Logic Flow:
IF A database operation status code that has been compared against all entries in the acceptable status code table without finding a match
AND 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
Business Justification: Governs the functional prerequisites and system routing when base address is set to cccom db-pcbs address and offset address is set to addr-area address.
Trigger Criteria:
Context: Base address is set to CCCOM DB-PCBS address and offset address is set to ADDR-AREA address
Applied to: Base Address > Zero?
Action: Base address value is greater than zero
Logic Flow:
IF Base address is set to CCCOM DB-PCBS address and offset address is set to ADDR-AREA address
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when base address is set to cccom db-pcbs address and offset address is set to addr-area address.
Trigger Criteria:
Context: Base address is set to CCCOM DB-PCBS address and offset address is set to ADDR-AREA address
Applied to: Set Address-1 = Base Address Set Address-2 = Offset Address
Action: Base address value is not greater than zero
Logic Flow:
IF Base address is set to CCCOM DB-PCBS address and offset address is set to ADDR-AREA address
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Establishes the required business protocol to be followed when address-1 and address-2 values have been determined based on base address evaluation.
Trigger Criteria:
Context: Address-1 and Address-2 values have been determined based on base address evaluation
Applied to: Calculate Final Offset Offset = Address-1 - Address-2
Action: Final offset calculation is performed
Logic Flow:
IF Address-1 and Address-2 values have been determined based on base address evaluation
AND Final offset calculation is performed
THEN:
• Address offset equals Address-1 minus Address-2
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when cccom and iscom structures are available.
Trigger Criteria:
Context: CCCOM and ISCOM structures are available
Applied to: Calculate CIMS Table Size
Action: CIMS table size calculation is required
Logic Flow:
IF CCCOM and ISCOM structures are available
AND 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.cblBusiness Rule: ISCOM Range Validation
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when cccom structure contains pcb control block information.
Trigger Criteria:
Context: The CCCOM structure contains PCB control block information
Applied to: Get CCCOM PCB Base Address
Action: The system needs to validate ISCOM table range
Logic Flow:
IF The CCCOM structure contains PCB control block information
AND The system needs to validate ISCOM table range
THEN:
• The base address of CC-DB-PCBS is retrieved and stored for address calculation
Rule Belongs to : CIMS.cbl
Business Justification: Dictates the expected operational logic and validation steps when address area contains valid offset information.
Trigger Criteria:
Context: The address area contains valid offset information
Applied to: Get Address Area Offset Address
Action: The system performs ISCOM range validation
Logic Flow:
IF The address area contains valid offset information
AND The system performs ISCOM range validation
THEN:
• The offset address is retrieved and stored for comparison with the base address
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when iscom structure cc-db-pcbs is available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The ISCOM structure CC-DB-PCBS is available
Applied to: Calculate ISCOM Table Size
Action: The system needs to validate address offset ranges
Logic Flow:
IF The ISCOM structure CC-DB-PCBS is available
AND The system needs to validate address offset ranges
THEN:
• The table size is calculated using the length of CC-DB-PCBSand stored in WS-CIMS-TABLE-SIZE
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when base address and offset address are available for calculation.
Trigger Criteria:
Context: Base address and offset address are available for calculation
Applied to: Base Address > Zero?
Action: The base address is greater than zero
Logic Flow:
IF Base address and offset address are available for calculation
AND 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
Rule Belongs to : CIMS.cbl
Business Justification: Governs the functional prerequisites and system routing when address 1 and address 2 are properly ordered based on base address sign. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Address 1 and Address 2 are properly ordered based on base address sign
Applied to: Calculate Final Address Offset
Action: The system calculates the final offset
Logic Flow:
IF Address 1 and Address 2 are properly ordered based on base address sign
AND The system calculates the final offset
THEN:
• The address offset is computed as Address 1 minus Address 2 and stored in WS-ADDR-OFFSET
Rule Belongs to : CIMS.cbl
Business Justification: Ensures correct system behavior and process compliance when address offset has been calculated and iscom table size is known.
Trigger Criteria:
Context: The address offset has been calculated and ISCOM table size is known
Applied to: Offset Within ISCOM Table Range?
Action: The system validates the offset against table boundaries
Logic Flow:
IF The address offset has been calculated and ISCOM table size is known
AND 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
📁 File: GCCIH.cbl
Select All in File
R-GCCIH-cbl-00008 (+1)File: GCCIH.cblBusiness Rule: Initialize Program Control
Rule Belongs to : GCCIH.cbl
Business Justification: Governs the functional prerequisites and system routing when program control initialization process is starting.
Trigger Criteria:
Context: A program control initialization process is starting
Applied to: Save Current Program Name - CC-PROG → PROG-NAME-SAVED
Action: The system needs to track the current program context
Logic Flow:
IF A program control initialization process is starting
AND The system needs to track the current program context
THEN:
• The current program identifier must be saved to preserve execution context
Rule Belongs to : GCCIH.cbl
Business Justification: Dictates the expected operational logic and validation steps when current program context has been preserved.
Trigger Criteria:
Context: The current program context has been preserved
Applied to: Set Module Name for Tracking - MODULE-NAME → CC-PROG
Action: The system switches to module execution mode
Logic Flow:
IF The current program context has been preserved
AND The system switches to module execution mode
THEN:
• The module name must be assigned as the current program identifier for tracking purposes
R-GCCIH-cbl-00010 (+2)File: GCCIH.cblBusiness Rule: Prepare IH Notification Data
Rule Belongs to : GCCIH.cbl
Business Justification: Ensures correct system behavior and process compliance when ccn status notification needs to be processed.
Trigger Criteria:
Context: A CCN status notification needs to be processed
Applied to: Clear Input Structure
Action: The system begins preparing the IH notification data
Logic Flow:
IF A CCN status notification needs to be processed
AND The system begins preparing the IH notification data
THEN:
• The GCX153-INPUT structure is initialized to clear any previous data
Rule Belongs to : GCCIH.cbl
Business Justification: Establishes the required business protocol to be followed when input structure has been initialized for ccn status notification.
Trigger Criteria:
Context: The input structure has been initialized for CCN status notification
Applied to: Set Security Parameters to High Values
Action: Security parameters need to be established
Logic Flow:
IF The input structure has been initialized for CCN status notification
AND Security parameters need to be established
THEN:
• The GCX153-SECURITY-BYTE is set to HIGH-VALUES to enforce maximum security level
Rule Belongs to : GCCIH.cbl
Business Justification: Defines the strict business conditions required to proceed when input structure is initialized and security parameters are set.
Trigger Criteria:
Context: The input structure is initialized and security parameters are set
Applied to: Input Structure Ready for CCN Status
Action: CCN status data needs to be loaded into the notification structure
Logic Flow:
IF The input structure is initialized and security parameters are set
AND CCN status data needs to be loaded into the notification structure
THEN:
• 91 bytes of GCWIH data are moved to positions 2-91 of GCX153-INPUT structure
R-GCCIH-cbl-00013 (+3)File: GCCIH.cblBusiness Rule: Format CCN Status Message
Rule Belongs to : GCCIH.cbl
Business Justification: Ensures correct system behavior and process compliance when gcwih input structure contains ccn data in positions 1 through 91.
Trigger Criteria:
Context: GCWIH input structure contains CCN data in positions 1 through 91
Applied to: Extract CCN Data from GCWIH
Action: CCN data extraction is initiated
Logic Flow:
IF GCWIH input structure contains CCN data in positions 1 through 91
AND CCN data extraction is initiated
THEN:
• 91 bytes of CCN data are extracted from GCWIH starting at position 1
Rule Belongs to : GCCIH.cbl
Business Justification: Establishes the required business protocol to be followed when 91 bytes of ccn data have been extracted from gcwih.
Trigger Criteria:
Context: 91 bytes of CCN data have been extracted from GCWIH
Applied to: Move CCN Data to Input Structure Position 2-92
Action: CCN data is moved to the input structure
Logic Flow:
IF 91 bytes of CCN data have been extracted from GCWIH
AND CCN data is moved to the input structure
THEN:
• CCN data is placed in positions 2 through 92 of GCX153-INPUT structure
Rule Belongs to : GCCIH.cbl
Business Justification: Governs the functional prerequisites and system routing when ccn status message is being prepared.
Trigger Criteria:
Context: A CCN status message is being prepared
Applied to: Move CCN Data to Input Structure Position 2-92
Action: Security initialization is performed
Logic Flow:
IF A CCN status message is being prepared
AND Security initialization is performed
THEN:
• The security byte is set to HIGH-VALUES indicating maximum security level
Rule Belongs to : GCCIH.cbl
Business Justification: Governs the functional prerequisites and system routing when gcx153-input structure contains properly formatted ccn data with security byte.
Trigger Criteria:
Context:GCX153-INPUT structure contains properly formatted CCN data with security byte
Applied to: Transfer Formatted Input to IH Message Structure
Action: Message structure transfer is initiated
Logic Flow:
IFGCX153-INPUT structure contains properly formatted CCN data with security byte
AND Message structure transfer is initiated
THEN:
• The complete formatted input is transferred to GCT1531E-MSG for IH processing
Business Justification: Ensures correct system behavior and process compliance when message input data has been prepared in gcx153-input structure and accept status is cleared. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Message input data has been prepared in GCX153-INPUT structure and accept status is cleared
Applied to: Execute CIMS Call with CHNG Function
Action: System calls CIMS program with CHNG function using CCCOM, ALT-PCB, and GCT1531E parameters
Logic Flow:
IF Message input data has been prepared in GCX153-INPUT structure and accept status is cleared
AND System calls CIMS program with CHNG function using CCCOM, ALT-PCB, and GCT1531E parameters
THEN:
• IMS message processing is initiated for the prepared message
Business Justification: Defines the strict business conditions required to proceed when ccn status notification message needs to be logged.
Trigger Criteria:
Context: A CCN status notification message needs to be logged
Applied to: Prepare Log Parameters
Action: The system prepares logging parameters
Logic Flow:
IF A CCN status notification message needs to be logged
AND The system prepares logging parameters
THEN:
• The message code, message content, message length, and module name are made available for the logging operation
Rule Belongs to : GCCIH.cbl
Business Justification: Defines the strict business conditions required to proceed when all logging parameters are prepared for the ccn status message. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All logging parameters are prepared for the CCN status message
Applied to: Call WRITMSGL Program
Action: The system calls the WRITMSGL program with message code, message content, message length, and module name
Logic Flow:
IF All logging parameters are prepared for the CCN status message
AND The system calls the WRITMSGL program with message code, message content, message length, and module name
THEN:
• The WRITMSGL program is invoked to log the CCN status notification message
Business Justification: Establishes the required business protocol to be followed when error number needs to be looked up in the error message table.
Trigger Criteria:
Context: An error number needs to be looked up in the error message table
Applied to: Initialize Search Index to 1
Action: The error lookup process begins
Logic Flow:
IF An error number needs to be looked up in the error message table
AND The error lookup process begins
THEN:
• The search index is set to position 1 to start searching from the beginning of the error table
Rule Belongs to : GCCMQERR.cbl
Business Justification: Establishes the required business protocol to be followed when system is examining an error number at the current table position.
Trigger Criteria:
Context: The system is examining an error number at the current table position
Applied to: Does Error Number Match Input?
Action: The error number at the current index is compared with the input error number
Logic Flow:
IF The system is examining an error number at the current table position
AND 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
Rule Belongs to : GCCMQERR.cbl
Business Justification: Defines the strict business conditions required to proceed when system is examining an error number at the current table position and no match was found.
Trigger Criteria:
Context: The system is examining an error number at the current table position and no match was found
Applied to: Is Error Number Empty/Spaces?
Action: The error number at the current index contains spaces or is empty
Logic Flow:
IF The system is examining an error number at the current table position and no match was found
AND 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
Rule Belongs to : GCCMQERR.cbl
Business Justification: Governs the functional prerequisites and system routing when current error number does not match the input and the end of table has not been reached.
Trigger Criteria:
Context: The current error number does not match the input and the end of table has not been reached
Applied to: Increment Index by 1
Action: The system needs to continue searching the error table
Logic Flow:
IF The current error number does not match the input and the end of table has not been reached
AND 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
Rule Belongs to : GCCMQERR.cbl
Business Justification: Defines the strict business conditions required to proceed when matching error number has been found in the error table.
Trigger Criteria:
Context: A matching error number has been found in the error table
Applied to: Search Complete - Match Found
Action: The search process completes successfully
Logic Flow:
IF A matching error number has been found in the error table
AND The search process completes successfully
THEN:
• The corresponding error message text is moved to the output message field
Rule Belongs to : GCCMQERR.cbl
Business Justification: Ensures correct system behavior and process compliance when end of the error table has been reached without finding a matching error number.
Trigger Criteria:
Context: The end of the error table has been reached without finding a matching error number
Applied to: Search Complete - End of Table Reached
Action: The search process completes without success
Logic Flow:
IF The end of the error table has been reached without finding a matching error number
AND 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
Business Justification: Dictates the expected operational logic and validation steps when error code has been found in the error message table at a specific index position.
Trigger Criteria:
Context: An error code has been found in the error message table at a specific index position
Applied to: Retrieve Error Message Text from Table
Action: The error code at the current index position equals the input error number
Logic Flow:
IF An error code has been found in the error message table at a specific index position
AND 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
Business Justification: Ensures correct system behavior and process compliance when error code has been searched in the error message table and error-number (error-index) does not equal input-error-number.
Trigger Criteria:
Context: 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
Action: The system determines the error code is not found in the table
Logic Flow:
IF An error code has been searched in the error message table and ERROR-NUMBER (ERROR-INDEX) does not equal INPUT-ERROR-NUMBER
AND 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
Rule Belongs to : GCCMQERR.cbl
Business Justification: Governs the functional prerequisites and system routing when error code is not found in the error message table and the unknown number field has been populated.
Trigger Criteria:
Context: 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
Action: The system needs to provide an error message for an unrecognized error code
Logic Flow:
IF An error code is not found in the error message table and the unknown number field has been populated
AND 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
📁 File: GCCTBIO.cbl
Select All in File
R-GCCTBIO-cbl-00017 (+2)File: GCCTBIO.cblBusiness Rule: Initialize Module Control
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when module control initialization is requested.
Trigger Criteria:
Context: A module control initialization is requested
Applied to: Save Current Program Name to PROG-NAME-SAVED
Action: The system begins module control setup
Logic Flow:
IF A module control initialization is requested
AND The system begins module control setup
THEN:
• The current program name (CC-PROG) is saved to PROG-NAME-SAVED for later restoration
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when calling program name has been saved.
Trigger Criteria:
Context: The calling program name has been saved
Applied to: Set Module Name as Current Program
Action: Module control initialization continues
Logic Flow:
IF The calling program name has been saved
AND Module control initialization continues
THEN:
• The MODULE-NAME is set as the current program (CC-PROG)
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when module control setup is in progress. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Module control setup is in progress
Applied to: Module Control Initialized
Action: Control field initialization is performed
Logic Flow:
IF Module control setup is in progress
AND Control field initialization is performed
THEN:
• RETURN-FLAG, CC-ACCEPT-STATUS, andWS-SSA-FLAG are cleared to spaces
R-GCCTBIO-cbl-00020File: GCCTBIO.cblBusiness Rule: Clear Return Status
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when database operation is about to be processed.
Trigger Criteria:
Context: A database operation is about to be processed
Applied to: Clear Return Status - Initialize return flag, accept status, and SSA flag to default values
Action: The system begins operation initialization
Logic Flow:
IF A database operation is about to be processed
AND The system begins operation initialization
THEN:
• The return flag is set to spaces, the accept status is set to spaces, and the SSA flag is set to spaces
R-GCCTBIO-cbl-00021 (+5)File: GCCTBIO.cblBusiness Rule: Validate Function Code
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when user function code is provided for validation.
Trigger Criteria:
Context: A user function code is provided for validation
Applied to: Function Code = GHU or GU?
Action: The function code is GHU (Get Hold Unique) or GU (Get Unique)
Logic Flow:
IF A user function code is provided for validation
AND The function code is GHU (Get Hold Unique) or GU (Get Unique)
THEN:
• The system sets accept status to GE and configures the request to use qualified SSA for precise record retrieval
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when user function code is provided for validation.
Trigger Criteria:
Context: A user function code is provided for validation
Applied to: Set Return Flag to NOT-VALID
Action: The function code is not GHU, GU, GHN, GHNP, GN, GNP, ISRT, DLET, or REPL
Logic Flow:
IF A user function code is provided for validation
AND The function code is not GHU, GU, GHN, GHNP, GN, GNP, ISRT, DLET, or REPL
THEN:
• The system sets the return flag to NOT-VALID to indicate the function code is not supported
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when user function code is provided that is not ghu or gu.
Trigger Criteria:
Context: A user function code is provided that is not GHU or GU
Applied to: Function Code = GHN, GHNP, GN, or GNP?
Action: The function code is GHN (Get Hold Next), GHNP (Get Hold Next in Parent), GN (Get Next), or GNP (Get Next in Parent)
Logic Flow:
IF A user function code is provided that is not GHU or GU
AND The function code is GHN (Get Hold Next), GHNP (Get Hold Next in Parent), GN (Get Next), or GNP (Get Next in Parent)
THEN:
• The system sets accept status to GAGBGEGK to enable sequential processing capabilities
Rule Belongs to : GCCTBIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when sequential read operation (ghn, ghnp, gn, or gnp) has been validated. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A sequential read operation (GHN, GHNP, GN, or GNP) has been validated
Applied to: Unqualified SSA Flag = SPACE?
Action: The unqualified SSA flag is set to SPACE (not specified)
Logic Flow:
IF A sequential read operation (GHN, GHNP, GN, or GNP) has been validated
AND The unqualified SSA flag is set to SPACE (not specified)
THEN:
• The system configures the request to use qualified SSA for structured searching, otherwise it uses unqualified SSA for broader searching
Rule Belongs to : GCCTBIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when user function code is provided that is not a read or sequential read operation. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A user function code is provided that is not a read or sequential read operation
Applied to: Function Code = ISRT?
Action: The function code is ISRT (Insert)
Logic Flow:
IF A user function code is provided that is not a read or sequential read operation
AND The function code is ISRT (Insert)
THEN:
• The system sets accept status to II and configures the request to use unqualified SSA for insert operations
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when user function code is provided that is not a read, sequential read, or insert operation. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A user function code is provided that is not a read, sequential read, or insert operation
Applied to: Function Code = DLET or REPL?
Action: The function code is DLET (Delete) or REPL (Replace)
Logic Flow:
IF A user function code is provided that is not a read, sequential read, or insert operation
AND The function code is DLET (Delete) or REPL (Replace)
THEN:
• The system configures the request to use no SSA since modification operations work on already positioned records
R-GCCTBIO-cbl-00027File: GCCTBIO.cblBusiness Rule: Set SSA Type for Get Operations
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when database operation request is being processed.
Trigger Criteria:
Context: A database operation request is being processed
Applied to: Set SSA Type for Get Operations - Determine whether to use qualified or unqualified SSA for GET UNIQUE and GET HOLD UNIQUE operations
Action: The function code is GHU (Get Hold Unique) or GU (Get Unique)
Logic Flow:
IF A database operation request is being processed
AND The function code is GHU (Get Hold Unique) or GU (Get Unique)
THEN:
• The system sets the accept status to GE and configures the SSA type to QUALIFIED-SSA for precise record matching
R-GCCTBIO-cbl-00028 (+1)File: GCCTBIO.cblBusiness Rule: Set SSA Type for Next Operations
Rule Belongs to : GCCTBIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when user function code is provided for database operation.
Trigger Criteria:
Context: A user function code is provided for database operation
Applied to: Set Accept Status to GAGBGEGK
Action: The function code is GHN (Get Hold Next) OR GHNP (Get Hold Next in Parent) OR GN (Get Next) OR GNP (Get Next in Parent)
Logic Flow:
IF A user function code is provided for database operation
AND The function code is GHN (Get Hold Next) OR GHNP (Get Hold Next in Parent) OR GN (Get Next) OR GNP (Get Next in Parent)
THEN:
• The accept status should be set to GAGBGEGK to allow sequential data access
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when get next type operation (ghn, ghnp, gn, or gnp) is being processed.
Trigger Criteria:
Context: A GET NEXT type operation (GHN, GHNP, GN, or GNP) is being processed
Applied to: Is Unqualified SSA Flag Set?
Action: The unqualified SSA flag is checked
Logic Flow:
IF A GET NEXT type operation (GHN, GHNP, GN, or GNP) is being processed
AND The unqualified SSA flag is checked
THEN:
• If the unqualified SSA flag is not set (SPACE), use qualified SSA type; if the unqualified SSA flag is set, use unqualified SSA type
R-GCCTBIO-cbl-00030 (+1)File: GCCTBIO.cblBusiness Rule: Set SSA Type for Insert Operations
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when database operation request is being processed.
Trigger Criteria:
Context: A database operation request is being processed
Applied to: Set Accept Status to II
Action: The function code is ISRT (Insert)
Logic Flow:
IF A database operation request is being processed
AND The function code is ISRT (Insert)
THEN:
• The system sets the accept status to II and configures unqualified SSA flag for the insert operation
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when database insert operation is being configured.
Trigger Criteria:
Context: A database insert operation is being configured
Applied to: Configure Unqualified SSA Flag
Action: The function code is ISRT (Insert)
Logic Flow:
IF A database insert operation is being configured
AND The function code is ISRT (Insert)
THEN:
• The system sets the SSA flag to unqualified SSA type
R-GCCTBIO-cbl-00032File: GCCTBIO.cblBusiness Rule: Set SSA Type for Update/Delete Operations
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when database operation request is being processed.
Trigger Criteria:
Context: A database operation request is being processed
Applied to: Set SSA Flag to NO-SSA
Action: The function code is DLET (Delete) OR the function code is REPL (Replace)
Logic Flow:
IF A database operation request is being processed
AND The function code is DLET (Delete) OR the function code is REPL (Replace)
THEN:
• The system sets the SSA flag to NO-SSA to indicate no search arguments are required
Business Justification: Governs the functional prerequisites and system routing when segment name is provided for processing.
Trigger Criteria:
Context: A segment name is provided for processing
Applied to: Check if Segment is Root Segment
Action: The system evaluates the segment name against the root segment identifier
Logic Flow:
IF A segment name is provided for processing
AND The system evaluates the segment name against the root segment identifier
THEN:
• The system determines if the segment is a root segment type and routes accordingly
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when root segment has been identified for processing.
Trigger Criteria:
Context: A root segment has been identified for processing
Applied to: SSA Type = QUALIFIED-SSA?
Action: The system checks the SSA flag type for qualified search requirements
Logic Flow:
IF A root segment has been identified for processing
AND The system checks the SSA flag type for qualified search requirements
THEN:
• The system determines whether to use qualified or unqualified SSA for the root segment access
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when root segment requires qualified ssa processing.
Trigger Criteria:
Context: A root segment requires qualified SSA processing
Applied to: Set Root Segment Key Value
Action: The SSA flag indicates qualified search is needed
Logic Flow:
IF A root segment requires qualified SSA processing
AND The SSA flag indicates qualified search is needed
THEN:
• The system assigns the root segment key value to enable precise segment access
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when root segment is being processed with unqualified ssa requirements.
Trigger Criteria:
Context: A root segment is being processed with unqualified SSA requirements
Applied to: Skip Key Setup
Action: The SSA flag indicates unqualified search is acceptable
Logic Flow:
IF A root segment is being processed with unqualified SSA requirements
AND The SSA flag indicates unqualified search is acceptable
THEN:
• The system skips the key value assignment and continues processing without specific key setup
Business Justification: Establishes the required business protocol to be followed when segment name is a dependent segment (gcstbdp-key-name) and the ssa flag is set to qualified ssa and the unqualified ssa flag is not set (equals space).
Trigger Criteria:
Context: The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is set to qualified SSA and the unqualified SSA flag is not set (equals space)
Applied to: Set Root Segment Key Value Set Dependent Segment Key Value
Action: The system initializes the SSA structure for dependent segment access
Logic Flow:
IF The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is set to qualified SSA and the unqualified SSA flag is not set (equals space)
AND The system initializes the SSA structure for dependent segment access
THEN:
• The system sets the root segment key value from GCSTBRT-KEYand sets the dependent segment key value from GCSTBDP-KEY
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when segment name is a dependent segment (gcstbdp-key-name) and the ssa flag is set to qualified ssa and the unqualified ssa flag is set (not equal to space).
Trigger Criteria:
Context: The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is set to qualified SSA and the unqualified SSA flag is set (not equal to space)
Applied to: Set Root Segment Key Value Change SSA Type to Unqualified
Action: The system initializes the SSA structure for dependent segment access
Logic Flow:
IF The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is set to qualified SSA and the unqualified SSA flag is set (not equal to space)
AND The system initializes the SSA structure for dependent segment access
THEN:
• The system sets the root segment key value from GCSTBRT-KEYand changes the SSA flag to unqualified SSA
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when segment name is a dependent segment (gcstbdp-key-name) and the ssa flag is not set to qualified ssa.
Trigger Criteria:
Context: The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is not set to qualified SSA
Applied to: Set Root Segment Key Value Change SSA Type to Unqualified
Action: The system initializes the SSA structure for dependent segment access
Logic Flow:
IF The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is not set to qualified SSA
AND The system initializes the SSA structure for dependent segment access
THEN:
• The system sets the root segment key value from GCSTBRT-KEYand ensures the SSA flag is set to unqualified SSA
Business Justification: Defines the strict business conditions required to proceed when segment name is provided for processing.
Trigger Criteria:
Context: A segment name is provided for processing
Applied to: Is Segment GCSTBDP?
Action: The system checks the segment type
Logic Flow:
IF A segment name is provided for processing
AND The system checks the segment type
THEN:
• The system identifies whether it is a dependent segment (GCSTBDP-KEY-NAME) or not
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when dependent segment is being processed.
Trigger Criteria:
Context: A dependent segment is being processed
Applied to: Is SSA Type Qualified?
Action: The system evaluates the SSA flag type
Logic Flow:
IF A dependent segment is being processed
AND The system evaluates the SSA flag type
THEN:
• The system determines if the SSA type is qualified or not
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when dependent segment with qualified ssa type is being processed.
Trigger Criteria:
Context: A dependent segment with qualified SSA type is being processed
Applied to: Is Unqualified Flag Set?
Action: The system checks the unqualified SSA flag status
Logic Flow:
IF A dependent segment with qualified SSA type is being processed
AND The system checks the unqualified SSA flag status
THEN:
• The system determines if the unqualified flag is set (not space) or not set (space)
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when dependent segment with qualified ssa type and unqualified flag not set.
Trigger Criteria:
Context: A dependent segment with qualified SSA type and unqualified flag not set
Applied to: Set Root Key Value, Set Dependent Key Value, Keep Qualified SSA Type
Action: The system configures the SSA parameters
Logic Flow:
IF A dependent segment with qualified SSA type and unqualified flag not set
AND The system configures the SSA parameters
THEN:
• The system sets both root key value and dependent key value while maintaining qualified SSA type
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when dependent segment with qualified ssa type and unqualified flag set.
Trigger Criteria:
Context: A dependent segment with qualified SSA type and unqualified flag set
Applied to: Set Root Key Value Only, Change to Unqualified SSA Type
Action: The system configures the SSA parameters
Logic Flow:
IF A dependent segment with qualified SSA type and unqualified flag set
AND The system configures the SSA parameters
THEN:
• The system sets only the root key value and changes the SSA type to unqualified
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when dependent segment is being processed and ssa type is not qualified.
Trigger Criteria:
Context: A dependent segment is being processed and SSA type is not qualified
Applied to: Is SSA Type Unqualified?
Action: The system evaluates the SSA flag type
Logic Flow:
IF A dependent segment is being processed and SSA type is not qualified
AND The system evaluates the SSA flag type
THEN:
• The system determines if the SSA type is unqualified
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when dependent segment with unqualified ssa type.
Trigger Criteria:
Context: A dependent segment with unqualified SSA type
Applied to: Set Root Key Value, Force Unqualified SSA Type
Action: The system configures the SSA parameters
Logic Flow:
IF A dependent segment with unqualified SSA type
AND The system configures the SSA parameters
THEN:
• The system sets the root key value and forces the SSA type to unqualified
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when segment name that is not a recognized segment type.
Trigger Criteria:
Context: A segment name that is not a recognized segment type
Applied to: Invalid Segment - Set Error Flag
Action: The system processes the segment
Logic Flow:
IF A segment name that is not a recognized segment type
AND The system processes the segment
THEN:
• The system sets the return flag to indicate an invalid segment error
Business Justification: Governs the functional prerequisites and system routing when system is processing a root segment access request and the ssa flag indicates qualified ssa is required. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is processing a root segment access request and the SSA flag indicates qualified SSA is required
Applied to: Execute Database Call with Qualified SSA
Action: The database call is executed for root segment using primary PCB
Logic Flow:
IF The system is processing a root segment access request and the SSA flag indicates qualified SSA is required
AND The database call is executed for root segment using primary PCB
THEN:
• The system calls the database interface with qualified root segment search arguments to retrieve specific records
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when system is processing a root segment access request and the ssa flag indicates unqualified ssa is required. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is processing a root segment access request and the SSA flag indicates unqualified SSA is required
Applied to: Execute Database Call with Unqualified SSA
Action: The database call is executed for root segment using primary PCB
Logic Flow:
IF The system is processing a root segment access request and the SSA flag indicates unqualified SSA is required
AND The database call is executed for root segment using primary PCB
THEN:
• The system calls the database interface with unqualified root segment search arguments to retrieve records without specific criteria
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when system is processing a root segment access request and no ssa is required for the operation. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is processing a root segment access request and no SSA is required for the operation
Applied to: Execute Database Call without SSA
Action: The database call is executed for root segment using primary PCB
Logic Flow:
IF The system is processing a root segment access request and no SSA is required for the operation
AND The database call is executed for root segment using primary PCB
THEN:
• The system calls the database interface without any segment search arguments
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when system is preparing to execute a database call for root segment access using primary pcb. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is preparing to execute a database call for root segment access using primary PCB
Applied to: SSA Type Check
Action: The SSA type needs to be determined for the database operation
Logic Flow:
IF The system is preparing to execute a database call for root segment access using primary PCB
AND The SSA type needs to be determined for the database operation
THEN:
• The system checks the WS-SSA-FLAG to determine whether to use qualified SSA, unqualified SSA, or no SSA for the database call
Business Justification: Establishes the required business protocol to be followed when ssa type is qualified ssa and secondary pcb is selected for root segment access. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The SSA type is qualified SSA and secondary PCB is selected for root segment access
Applied to: Execute Database Call with Qualified SSA
Action: A database operation is requested on the root segment
Logic Flow:
IF The SSA type is qualified SSA and secondary PCB is selected for root segment access
AND A database operation is requested on the root segment
THEN:
• Execute database call using secondary PCB with qualified root segment search arguments
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when ssa type is unqualified ssa and secondary pcb is selected for root segment access. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The SSA type is unqualified SSA and secondary PCB is selected for root segment access
Applied to: Execute Database Call with Unqualified SSA
Action: A database operation is requested on the root segment
Logic Flow:
IF The SSA type is unqualified SSA and secondary PCB is selected for root segment access
AND A database operation is requested on the root segment
THEN:
• Execute database call using secondary PCB with unqualified root segment search arguments
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when no ssa is required and secondary pcb is selected for root segment access. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: No SSA is required and secondary PCB is selected for root segment access
Applied to: Execute Database Call with No SSA
Action: A database operation is requested on the root segment
Logic Flow:
IF No SSA is required and secondary PCB is selected for root segment access
AND A database operation is requested on the root segment
THEN:
• Execute database call using secondary PCB without any search arguments
Business Justification: Defines the strict business conditions required to proceed when dependent segment access operation is requested.
Trigger Criteria:
Context: A dependent segment access operation is requested
Applied to: Check PCB Selection Flag
Action: The system checks the second PCB flag status
Logic Flow:
IF A dependent segment access operation is requested
AND The system checks the second PCB flag status
THEN:
• If the second PCB flag is spaces (not set), route to primary PCB processing, otherwise route to secondary PCB processing
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when dependent segment access operation is requested and the second pcb flag is spaces.
Trigger Criteria:
Context: A dependent segment access operation is requested and the second PCB flag is spaces
Applied to: Route to Primary PCB
Action: The system routes the operation
Logic Flow:
IF A dependent segment access operation is requested and the second PCB flag is spaces
AND The system routes the operation
THEN:
• The operation is directed to the primary PCB dependent segment processing routine
Rule Belongs to : GCCTBIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when dependent segment access operation is requested and the second pcb flag is not spaces.
Trigger Criteria:
Context: A dependent segment access operation is requested and the second PCB flag is not spaces
Applied to: Route to Secondary PCB
Action: The system routes the operation
Logic Flow:
IF A dependent segment access operation is requested and the second PCB flag is not spaces
AND The system routes the operation
THEN:
• The operation is directed to the secondary PCB dependent segment processing routine
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when dependent segment operation is routed to primary pcb and the ssa flag indicates qualified ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A dependent segment operation is routed to primary PCB and the SSA flag indicates qualified SSA
Applied to: Execute Dependent Segment Operation via Primary PCB
Action: The system executes the database operation
Logic Flow:
IF A dependent segment operation is routed to primary PCB and the SSA flag indicates qualified SSA
AND The system executes the database operation
THEN:
• Call the database interface with primary PCB, function code, segment data, qualified root SSA, and qualified dependent SSA
Rule Belongs to : GCCTBIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when dependent segment operation is routed to primary pcb and the ssa flag indicates unqualified ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A dependent segment operation is routed to primary PCB and the SSA flag indicates unqualified SSA
Applied to: Execute Dependent Segment Operation via Primary PCB
Action: The system executes the database operation
Logic Flow:
IF A dependent segment operation is routed to primary PCB and the SSA flag indicates unqualified SSA
AND The system executes the database operation
THEN:
• Call the database interface with primary PCB, function code, segment data, qualified root SSA, and unqualified dependent SSA
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when dependent segment operation is routed to primary pcb and the ssa flag indicates no ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A dependent segment operation is routed to primary PCB and the SSA flag indicates no SSA
Applied to: Execute Dependent Segment Operation via Primary PCB
Action: The system executes the database operation
Logic Flow:
IF A dependent segment operation is routed to primary PCB and the SSA flag indicates no SSA
AND The system executes the database operation
THEN:
• Call the database interface with primary PCB, function code, and segment data only
Rule Belongs to : GCCTBIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when dependent segment operation is routed to secondary pcb and the ssa flag indicates qualified ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A dependent segment operation is routed to secondary PCB and the SSA flag indicates qualified SSA
Applied to: Execute Dependent Segment Operation via Secondary PCB
Action: The system executes the database operation
Logic Flow:
IF A dependent segment operation is routed to secondary PCB and the SSA flag indicates qualified SSA
AND The system executes the database operation
THEN:
• Call the database interface with secondary PCB, function code, segment data, qualified root SSA, and qualified dependent SSA
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when dependent segment operation is routed to secondary pcb and the ssa flag indicates unqualified ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A dependent segment operation is routed to secondary PCB and the SSA flag indicates unqualified SSA
Applied to: Execute Dependent Segment Operation via Secondary PCB
Action: The system executes the database operation
Logic Flow:
IF A dependent segment operation is routed to secondary PCB and the SSA flag indicates unqualified SSA
AND The system executes the database operation
THEN:
• Call the database interface with secondary PCB, function code, segment data, qualified root SSA, and unqualified dependent SSA
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when dependent segment operation is routed to secondary pcb and the ssa flag indicates no ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A dependent segment operation is routed to secondary PCB and the SSA flag indicates no SSA
Applied to: Execute Dependent Segment Operation via Secondary PCB
Action: The system executes the database operation
Logic Flow:
IF A dependent segment operation is routed to secondary PCB and the SSA flag indicates no SSA
AND The system executes the database operation
THEN:
• Call the database interface with secondary PCB, function code, and segment data only
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when dependent segment database operation has been executed.
Trigger Criteria:
Context: A dependent segment database operation has been executed
Applied to: Check Operation Status
Action: The system checks the operation status code
Logic Flow:
IF A dependent segment database operation has been executed
AND The system checks the operation status code
THEN:
• If the status code is spaces, set return flag to successful, otherwise set return flag to unsuccessful
Business Justification: Establishes the required business protocol to be followed when dependent segment database operation is requested using primary pcb and the ssa flag is set to qualified ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A dependent segment database operation is requested using primary PCB and the SSA flag is set to qualified SSA
Applied to: Execute Database Call with Qualified SSA - Root Segment SSA - Dependent Segment SSA
Action: The database call is executed
Logic Flow:
IF A dependent segment database operation is requested using primary PCB and the SSA flag is set to qualified SSA
AND The database call is executed
THEN:
• The system calls the database interface with the function code, primary PCB, segment data, root segment qualified SSA, and dependent segment qualified SSA
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when dependent segment database operation is requested using primary pcb and the ssa flag is set to unqualified ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A dependent segment database operation is requested using primary PCB and the SSA flag is set to unqualified SSA
Applied to: Execute Database Call with Unqualified SSA - Root Segment SSA - Unqualified Dependent SSA
Action: The database call is executed
Logic Flow:
IF A dependent segment database operation is requested using primary PCB and the SSA flag is set to unqualified SSA
AND The database call is executed
THEN:
• The system calls the database interface with the function code, primary PCB, segment data, root segment qualified SSA, and dependent segment unqualified SSA
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when dependent segment database operation is requested using primary pcb and the ssa flag is set to no ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A dependent segment database operation is requested using primary PCB and the SSA flag is set to no SSA
Applied to: Execute Database Call with No SSA - No SSA Parameters
Action: The database call is executed
Logic Flow:
IF A dependent segment database operation is requested using primary PCB and the SSA flag is set to no SSA
AND The database call is executed
THEN:
• The system calls the database interface with only the function code, primary PCB, and segment data without any SSA parameters
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when dependent segment database operation is being processed with primary pcb. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A dependent segment database operation is being processed with primary PCB
Applied to: SSA Type?
Action: The system checks the SSA flag value
Logic Flow:
IF A dependent segment database operation is being processed with primary PCB
AND The system checks the SSA flag value
THEN:
• The system routes to qualified SSA call if flag equals qualified SSA, routes to unqualified SSA call if flag equals unqualified SSA, or routes to no SSA call for any other value
Business Justification: Defines the strict business conditions required to proceed when system is processing a dependent segment access request and the ssa flag is set to qualified ssa and the second pcb flag is set. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is processing a dependent segment access request AND the SSA flag is set to qualified SSA AND the second PCB flag is set
Applied to: Execute Database Call with Qualified SSA
Action: The database call is executed for dependent segment access
Logic Flow:
IF The system is processing a dependent segment access request AND the SSA flag is set to qualified SSA AND the second PCB flag is set
AND The database call is executed for dependent segment access
THEN:
• The system calls the database interface with secondary PCB, function code, segment data, root segment SSA, and dependent segment SSA
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when system is processing a dependent segment access request and the ssa flag is set to unqualified ssa and the second pcb flag is set. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is processing a dependent segment access request AND the SSA flag is set to unqualified SSA AND the second PCB flag is set
Applied to: Execute Database Call with Unqualified SSA
Action: The database call is executed for dependent segment access
Logic Flow:
IF The system is processing a dependent segment access request AND the SSA flag is set to unqualified SSA AND the second PCB flag is set
AND The database call is executed for dependent segment access
THEN:
• The system calls the database interface with secondary PCB, function code, segment data, root segment SSA, and dependent segment unqualified SSA
Rule Belongs to : GCCTBIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when system is processing a dependent segment access request and the ssa flag is set to no ssa and the second pcb flag is set. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is processing a dependent segment access request AND the SSA flag is set to no SSA AND the second PCB flag is set
Applied to: Execute Database Call with No SSA
Action: The database call is executed for dependent segment access
Logic Flow:
IF The system is processing a dependent segment access request AND the SSA flag is set to no SSA AND the second PCB flag is set
AND The database call is executed for dependent segment access
THEN:
• The system calls the database interface with secondary PCB, function code, and segment data only
Business Justification: Establishes the required business protocol to be followed when database operation has been completed and cc-status-code contains the operation result status.
Trigger Criteria:
Context: A database operation has been completed and CC-STATUS-CODE contains the operation result status
Applied to: Check CC-STATUS-CODE
Action: The system checks the CC-STATUS-CODE value
Logic Flow:
IF A database operation has been completed and CC-STATUS-CODE contains the operation result status
AND The system checks the CC-STATUS-CODE value
THEN:
• IfCC-STATUS-CODE is spaces (empty), set RETURN-FLAG to SUCCESSFUL, otherwise set RETURN-FLAG to UNSUCCESSFUL
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when database operation has completed and cc-status-code equals spaces (indicating success).
Trigger Criteria:
Context: A database operation has completed and CC-STATUS-CODE equals spaces (indicating success)
Applied to: Set RETURN-FLAG to SUCCESSFUL
Action: The system processes the successful operation status
Logic Flow:
IF A database operation has completed and CC-STATUS-CODE equals spaces (indicating success)
AND The system processes the successful operation status
THEN:
• Set RETURN-FLAG to SUCCESSFUL to indicate the operation completed successfully
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when database operation has completed and cc-status-code is not spaces (indicating failure or error).
Trigger Criteria:
Context: A database operation has completed and CC-STATUS-CODE is not spaces (indicating failure or error)
Applied to: Set RETURN-FLAG to UNSUCCESSFUL
Action: The system processes the failed operation status
Logic Flow:
IF A database operation has completed and CC-STATUS-CODE is not spaces (indicating failure or error)
AND The system processes the failed operation status
THEN:
• Set RETURN-FLAG to UNSUCCESSFUL to indicate the operation failed
R-GCCTBIO-cbl-00077File: GCCTBIO.cblBusiness Rule: Restore Calling Program Context
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when database access operation has been completed and the original program name was previously saved.
Trigger Criteria:
Context: A database access operation has been completed and the original program name was previously saved
Applied to: Restore Calling Program Context - Restore original program name before returning control to caller
Action: The database access module finishes processing
Logic Flow:
IF A database access operation has been completed and the original program name was previously saved
AND The database access module finishes processing
THEN:
• The system restores the original program name from the saved value and returns control to the calling program
R-GCCTBIO-cbl-00078 (+2)File: GCCTBIO.cblBusiness Rule: Validate GET Operations
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when function code is provided for database operation.
Trigger Criteria:
Context: A function code is provided for database operation
Applied to: Check Function Code
Action: The function code is GHU (Get Hold Unique) OR the function code is GU (Get Unique)
Logic Flow:
IF A function code is provided for database operation
AND The function code is GHU (Get Hold Unique) OR the function code is GU (Get Unique)
THEN:
• Set the accept status to GE AND set the SSA type to qualified SSA for precise record retrieval
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when function code has been validated as either ghu or gu.
Trigger Criteria:
Context: The function code has been validated as either GHU or GU
Applied to: Set Accept Status to GE
Action: The system processes the validated GET operation
Logic Flow:
IF The function code has been validated as either GHU or GU
AND The system processes the validated GET operation
THEN:
• Set the accept status to GE to indicate the operation type
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when function code has been validated as either ghu or gu.
Trigger Criteria:
Context: The function code has been validated as either GHU or GU
Applied to: Set SSA Type to Qualified
Action: The system configures the search parameters
Logic Flow:
IF The function code has been validated as either GHU or GU
AND The system configures the search parameters
THEN:
• Set the SSA type to qualified SSA to enable specific record targeting
R-GCCTBIO-cbl-00081 (+3)File: GCCTBIO.cblBusiness Rule: Validate NEXT Operations
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when user function code is provided for database operation.
Trigger Criteria:
Context: A user function code is provided for database operation
Applied to: Check Function Code for NEXT Operations
Action: The function code is GHN (Get Hold Next), GHNP (Get Hold Next in Parent), GN (Get Next), or GNP (Get Next in Parent)
Logic Flow:
IF A user function code is provided for database operation
AND The function code is GHN (Get Hold Next), GHNP (Get Hold Next in Parent), GN (Get Next), or GNP (Get Next in Parent)
THEN:
• The system recognizes it as a valid NEXT operation and proceeds with NEXT operation configuration
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when function code has been validated as a next operation (ghn, ghnp, gn, or gnp).
Trigger Criteria:
Context: The function code has been validated as a NEXT operation (GHN, GHNP, GN, or GNP)
Applied to: Set Accept Status for NEXT Operations
Action: The system processes the NEXT operation configuration
Logic Flow:
IF The function code has been validated as a NEXT operation (GHN, GHNP, GN, or GNP)
AND The system processes the NEXT operation configuration
THEN:
• The accept status is set to GAGBGEGK to indicate NEXT operation acceptance
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when next operation has been validated and accept status is configured.
Trigger Criteria:
Context: A NEXT operation has been validated and accept status is configured
Applied to: Unqualified SSA Flag Set?
Action: The unqualified SSA flag is checked and found to be space (not set)
Logic Flow:
IF A NEXT operation has been validated and accept status is configured
AND The unqualified SSA flag is checked and found to be space (not set)
THEN:
• The system configures qualified SSA type for the database search
Rule Belongs to : GCCTBIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when next operation has been validated and the unqualified ssa flag is set (not space).
Trigger Criteria:
Context: A NEXT operation has been validated and the unqualified SSA flag is set (not space)
Applied to: Configure Unqualified SSA Type
Action: The system determines SSA type configuration
Logic Flow:
IF A NEXT operation has been validated and the unqualified SSA flag is set (not space)
AND The system determines SSA type configuration
THEN:
• The system configures unqualified SSA type for the database search
Business Justification: Establishes the required business protocol to be followed when function code is provided for database operation.
Trigger Criteria:
Context: A function code is provided for database operation
Applied to: Function Code = ISRT?
Action: The function code equals ISRT (Insert)
Logic Flow:
IF A function code is provided for database operation
AND The function code equals ISRT (Insert)
THEN:
• The system should set the accept status to insert indicator (II) and configure unqualified SSA for the insert operation
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when function code has been validated as isrt (insert).
Trigger Criteria:
Context: The function code has been validated as ISRT (Insert)
Applied to: Set Accept Status to Insert Indicator
Action: The system processes the insert operation configuration
Logic Flow:
IF The function code has been validated as ISRT (Insert)
AND The system processes the insert operation configuration
THEN:
• The accept status should be set to II (Insert Indicator)
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when function code is isrt and accept status is configured for insert.
Trigger Criteria:
Context: The function code is ISRT and accept status is configured for insert
Applied to: Configure Unqualified SSA for Insert
Action: The system configures the segment search argument
Logic Flow:
IF The function code is ISRT and accept status is configured for insert
AND The system configures the segment search argument
THEN:
• The SSA flag should be set to unqualified SSA type for insert processing
Business Justification: Ensures correct system behavior and process compliance when function code is being validated for database operation.
Trigger Criteria:
Context: A function code is being validated for database operation
Applied to: Function Code = DLET?
Action: The function code is DLET (Delete)
Logic Flow:
IF A function code is being validated for database operation
AND The function code is DLET (Delete)
THEN:
• The system sets the SSA flag to NO-SSA indicating no search argument is required
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when function code is being validated for database operation and it is not a delete operation.
Trigger Criteria:
Context: A function code is being validated for database operation and it is not a delete operation
Applied to: Function Code = REPL?
Action: The function code is REPL (Replace)
Logic Flow:
IF A function code is being validated for database operation and it is not a delete operation
AND The function code is REPL (Replace)
THEN:
• The system sets the SSA flag to NO-SSA indicating no search argument is required
Rule Belongs to : GCCTBIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when function code is being validated for database operation and it is neither dlet nor repl.
Trigger Criteria:
Context: A function code is being validated for database operation and it is neither DLET nor REPL
Applied to: Continue to Next Validation
Action: The function code does not match any supported update/delete operations
Logic Flow:
IF A function code is being validated for database operation and it is neither DLET nor REPL
AND The function code does not match any supported update/delete operations
THEN:
• The system sets the return flag to NOT-VALID indicating an unsupported operation
R-GCCTBIO-cbl-00091 (+2)File: GCCTBIO.cblBusiness Rule: Configure Qualified SSA for Dependent Segment
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when segment name is a dependent segment (gcstbdp-key-name) and the ssa flag is qualified and the unqualified ssa flag is not set (space).
Trigger Criteria:
Context: The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is qualified and the unqualified SSA flag is not set (space)
Applied to: Set Root Segment Key Value
Action: The system initializes the SSA configuration
Logic Flow:
IF The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is qualified and the unqualified SSA flag is not set (space)
AND The system initializes the SSA configuration
THEN:
• The system sets both the root segment key value from GCSTBRT-KEYand the dependent segment key value from GCSTBDP-KEY
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when segment name is a dependent segment (gcstbdp-key-name) and the ssa flag is qualified and the unqualified ssa flag is set (not space).
Trigger Criteria:
Context: The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is qualified and the unqualified SSA flag is set (not space)
Applied to: Use Alternative SSA Configuration
Action: The system initializes the SSA configuration
Logic Flow:
IF The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is qualified and the unqualified SSA flag is set (not space)
AND The system initializes the SSA configuration
THEN:
• The system sets only the root segment key value from GCSTBRT-KEYand changes the SSA flag to unqualified
Rule Belongs to : GCCTBIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when segment name is a dependent segment (gcstbdp-key-name) and the ssa flag is not qualified.
Trigger Criteria:
Context: The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is not qualified
Applied to: Use Alternative SSA Configuration
Action: The system initializes the SSA configuration
Logic Flow:
IF The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is not qualified
AND The system initializes the SSA configuration
THEN:
• The system sets the root segment key value from GCSTBRT-KEYand ensures the SSA flag is set to unqualified
R-GCCTBIO-cbl-00094 (+2)File: GCCTBIO.cblBusiness Rule: Configure Unqualified SSA for Dependent Segment
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when segment name is gcstbdp dependent segment and ssa type is qualified and unqualified ssa flag is not set (space).
Trigger Criteria:
Context: Segment name is GCSTBDP dependent segment AND SSA type is qualified AND unqualified SSA flag is not set (space)
Applied to: Set Root Key Value
Action: SSA initialization is performed
Logic Flow:
IF Segment name is GCSTBDP dependent segment AND SSA type is qualified AND unqualified SSA flag is not set (space)
AND SSA initialization is performed
THEN:
• Root key value is set from GCSTBRT-KEY AND dependent key value is set from GCSTBDP-KEY
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when segment name is gcstbdp dependent segment and ssa type is qualified and unqualified ssa flag is set.
Trigger Criteria:
Context: Segment name is GCSTBDP dependent segment AND SSA type is qualified AND unqualified SSA flag is set
Applied to: Set Root Key Value Only
Action: SSA initialization is performed
Logic Flow:
IF Segment name is GCSTBDP dependent segment AND SSA type is qualified AND unqualified SSA flag is set
AND SSA initialization is performed
THEN:
• Root key value is set from GCSTBRT-KEY AND SSA type is changed to unqualified
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when segment name is gcstbdp dependent segment and ssa type is unqualified.
Trigger Criteria:
Context: Segment name is GCSTBDP dependent segment AND SSA type is unqualified
Applied to: Set Root Key Value
Action: SSA initialization is performed
Logic Flow:
IF Segment name is GCSTBDP dependent segment AND SSA type is unqualified
AND SSA initialization is performed
THEN:
• Root key value is set from GCSTBRT-KEY AND SSA type is set to unqualified
R-GCCTBIO-cbl-00097 (+11)File: GCCTBIO.cblBusiness Rule: Execute Database Call Based on SSA Type
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when database call request is received and the ssa flag is set to qualified-ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database call request is received and the SSA flag is set to QUALIFIED-SSA
Applied to: Execute Database Call with Qualified SSA
Action: The system determines the SSA type for the database operation
Logic Flow:
IF A database call request is received and the SSA flag is set to QUALIFIED-SSA
AND The system determines the SSA type for the database operation
THEN:
• The system executes the database call using qualified SSA parameters
Rule Belongs to : GCCTBIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when database call request is received and the ssa flag is set to unqualified-ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database call request is received and the SSA flag is set to UNQUALIFIED-SSA
Applied to: Execute Database Call with Unqualified SSA
Action: The system determines the SSA type for the database operation
Logic Flow:
IF A database call request is received and the SSA flag is set to UNQUALIFIED-SSA
AND The system determines the SSA type for the database operation
THEN:
• The system executes the database call using unqualified SSA parameters
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when database call request is received and the ssa flag is set to no-ssa or neither qualified-ssa nor unqualified-ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database call request is received and the SSA flag is set to NO-SSA or neither QUALIFIED-SSA nor UNQUALIFIED-SSA
Applied to: Execute Database Call with No SSA
Action: The system determines the SSA type for the database operation
Logic Flow:
IF A database call request is received and the SSA flag is set to NO-SSA or neither QUALIFIED-SSA nor UNQUALIFIED-SSA
AND The system determines the SSA type for the database operation
THEN:
• The system executes the database call without SSA parameters
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when ssa flag is set to qualified ssa and the system is configured to use the secondary pcb. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The SSA flag is set to qualified SSA and the system is configured to use the secondary PCB
Applied to: Execute Database Call with Qualified SSA
Action: A database operation is requested for dependent segment access
Logic Flow:
IF The SSA flag is set to qualified SSA and the system is configured to use the secondary PCB
AND A database operation is requested for dependent segment access
THEN:
• The system calls the database interface with the secondary PCB, user function code, segment data, and both qualified root and dependent SSA parameters
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when ssa flag is set to unqualified ssa and the system is configured to use the secondary pcb. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The SSA flag is set to unqualified SSA and the system is configured to use the secondary PCB
Applied to: Execute Database Call with Unqualified SSA
Action: A database operation is requested for dependent segment access
Logic Flow:
IF The SSA flag is set to unqualified SSA and the system is configured to use the secondary PCB
AND A database operation is requested for dependent segment access
THEN:
• The system calls the database interface with the secondary PCB, user function code, segment data, qualified root SSA, and unqualified dependent SSA parameters
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when ssa flag indicates no ssa is required and the system is configured to use the secondary pcb. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The SSA flag indicates no SSA is required and the system is configured to use the secondary PCB
Applied to: Execute Database Call with No SSA
Action: A database operation is requested for dependent segment access
Logic Flow:
IF The SSA flag indicates no SSA is required and the system is configured to use the secondary PCB
AND A database operation is requested for dependent segment access
THEN:
• The system calls the database interface with only the secondary PCB, user function code, and segment data parameters
Rule Belongs to : GCCTBIO.cbl
Business Justification: Establishes the required business protocol to be followed when dependent segment access request is being processed using primary pcb and the ssa flag is set to qualified ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A dependent segment access request is being processed using primary PCB and the SSA flag is set to qualified SSA
Applied to: Execute Database Call with Qualified SSA
Action: The system determines the SSA type for database call execution
Logic Flow:
IF A dependent segment access request is being processed using primary PCB and the SSA flag is set to qualified SSA
AND The system determines the SSA type for database call execution
THEN:
• The system calls the database interface with both root segment qualified SSA and dependent segment qualified SSA parameters
Rule Belongs to : GCCTBIO.cbl
Business Justification: Governs the functional prerequisites and system routing when dependent segment access request is being processed using primary pcb and the ssa flag is set to unqualified ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A dependent segment access request is being processed using primary PCB and the SSA flag is set to unqualified SSA
Applied to: Execute Database Call with Unqualified SSA
Action: The system determines the SSA type for database call execution
Logic Flow:
IF A dependent segment access request is being processed using primary PCB and the SSA flag is set to unqualified SSA
AND The system determines the SSA type for database call execution
THEN:
• The system calls the database interface with root segment qualified SSA and dependent segment unqualified SSA parameters
Rule Belongs to : GCCTBIO.cbl
Business Justification: Defines the strict business conditions required to proceed when dependent segment access request is being processed using primary pcb and the ssa flag is set to no ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A dependent segment access request is being processed using primary PCB and the SSA flag is set to no SSA
Applied to: Execute Database Call with No SSA
Action: The system determines the SSA type for database call execution
Logic Flow:
IF A dependent segment access request is being processed using primary PCB and the SSA flag is set to no SSA
AND The system determines the SSA type for database call execution
THEN:
• The system calls the database interface without any SSA parameters, using only basic operation parameters
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when ssa type is qualified ssa and secondary pcb is being used for dependent segment access. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: SSA type is qualified SSA and secondary PCB is being used for dependent segment access
Applied to: Execute Database Call with Qualified SSA
Action: database call is executed for dependent segment operation
Logic Flow:
IF SSA type is qualified SSA and secondary PCB is being used for dependent segment access
AND database call is executed for dependent segment operation
THEN:
• system calls CIMS with user function code, secondary PCB, segment data, root qualified SSA, and dependent qualified SSA
Rule Belongs to : GCCTBIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when ssa type is unqualified ssa and secondary pcb is being used for dependent segment access. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: SSA type is unqualified SSA and secondary PCB is being used for dependent segment access
Applied to: Execute Database Call with Unqualified SSA
Action: database call is executed for dependent segment operation
Logic Flow:
IF SSA type is unqualified SSA and secondary PCB is being used for dependent segment access
AND database call is executed for dependent segment operation
THEN:
• system calls CIMS with user function code, secondary PCB, segment data, root qualified SSA, and dependent unqualified SSA
Rule Belongs to : GCCTBIO.cbl
Business Justification: Ensures correct system behavior and process compliance when ssa type requires no ssa parameters and secondary pcb is being used for dependent segment access. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: SSA type requires no SSA parameters and secondary PCB is being used for dependent segment access
Applied to: Execute Database Call with No SSA
Action: database call is executed for dependent segment operation
Logic Flow:
IF SSA type requires no SSA parameters and secondary PCB is being used for dependent segment access
AND database call is executed for dependent segment operation
THEN:
• system calls CIMS with user function code, secondary PCB, and segment data only
Business Justification: Defines the strict business conditions required to proceed when parameter validation process is starting.
Trigger Criteria:
Context: The parameter validation process is starting
Applied to: Set Parameter Valid Flag to TRUE
Action: The system begins validation
Logic Flow:
IF The parameter validation process is starting
AND The system begins validation
THEN:
• The parameter valid flag should be set to TRUE as the initial state
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when system is initializing for parameter validation.
Trigger Criteria:
Context: The system is initializing for parameter validation
Applied to: Get Current Machine Time
Action: Time capture is required
Logic Flow:
IF The system is initializing for parameter validation
AND Time capture is required
THEN:
• The current machine time should be stored in working storage for later use
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when segment name is provided for processing.
Trigger Criteria:
Context: A segment name is provided for processing
Applied to: Is Segment Name Valid?
Action: The segment name is not GCSUSRT and not GCSA2RT and not GCSA8RT and not GCST2RT
Logic Flow:
IF A segment name is provided for processing
AND The segment name is not GCSUSRT and not GCSA2RT and not GCSA8RT and not GCST2RT
THEN:
• The parameter should be marked as invalid with error code '0012' and message 'SEGMENT NAME INVALID'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when function code is provided for processing.
Trigger Criteria:
Context: A function code is provided for processing
Applied to: Is Function Code Valid?
Action: The function code is not equal to 'GU ' and not equal to 'GN ' and not equal to 'ISRT' and not equal to 'REPL' and not equal to 'DLET'
Logic Flow:
IF A function code is provided for processing
AND The function code is not equal to 'GU ' and not equal to 'GN ' and not equal to 'ISRT' and not equal to 'REPL' and not equal to 'DLET'
THEN:
• The parameter should be marked as invalid with error code '0012' and message 'FUNCTION CODE INVALID'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when segment name is gcst2rt.
Trigger Criteria:
Context: The segment name is GCST2RT
Applied to: GCST2RT with Non-GU Function?
Action: The function code is not 'GU '
Logic Flow:
IF The segment name is GCST2RT
AND The function code is not 'GU '
THEN:
• The parameter should be marked as invalid with error code '0012' and message 'INVALID FUNCTION CODE'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when operator field is provided in the input parameters.
Trigger Criteria:
Context: An operator field is provided in the input parameters
Applied to: Set Default Operator to ' ='
Action: The operator field contains only spaces
Logic Flow:
IF An operator field is provided in the input parameters
AND The operator field contains only spaces
THEN:
• The operator should be set to ' =' as the default value
R-GCCUSIO-cbl-00033 (+15)File: GCCUSIO.cblBusiness Rule: Primary Cargo Record Insert
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being inserted into the primary database.
Trigger Criteria:
Context: A cargo record is being inserted into the primary database
Applied to: Set Creation Audit Trail
Action: The creation timestamp field is empty or spaces
Logic Flow:
IF A cargo record is being inserted into the primary database
AND The creation timestamp field is empty or spaces
THEN:
• The system sets creation century, date, time, terminal, and user ID from current system values and copies this information to last modify fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being inserted into the primary database.
Trigger Criteria:
Context: A cargo record is being inserted into the primary database
Applied to: Set Last Modify Audit Trail
Action: The creation timestamp field already contains data
Logic Flow:
IF A cargo record is being inserted into the primary database
AND The creation timestamp field already contains data
THEN:
• The system updates only the last modify century, date, time, terminal, and user ID with current system values while preserving the original creation timestamp
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed for index field population.
Trigger Criteria:
Context: A cargo record is being processed for index field population
Applied to: Populate Index Fields
Action: The cargo status indicates the record is marked as deleted
Logic Flow:
IF A cargo record is being processed for index field population
AND The cargo status indicates the record is marked as deleted
THEN:
• The system skips all index field population and exits the index setting process
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with a ccn key is being processed.
Trigger Criteria:
Context: A cargo record with a CCN key is being processed
Applied to: Populate Index Fields
Action: Index fields are being populated
Logic Flow:
IF A cargo record with a CCN key is being processed
AND Index fields are being populated
THEN:
• The system copies the CCN key to car ID index, waybill index, and car-waybill index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for index population.
Trigger Criteria:
Context: A cargo record is being processed for index population
Applied to: Populate Index Fields
Action: The destination index field is not empty or spaces
Logic Flow:
IF A cargo record is being processed for index population
AND The destination index field is not empty or spaces
THEN:
• The system copies the CCN key to the destination index field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record contains equipment car information.
Trigger Criteria:
Context: A cargo record contains equipment car information
Applied to: Set Car ID Index
Action: Car ID indexes are being populated
Logic Flow:
IF A cargo record contains equipment car information
AND Car ID indexes are being populated
THEN:
• The system assigns the equipment car value to both the car ID number index and car-waybill car ID index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record contains waybill information including road number, station number, waybill number, and waybill date.
Trigger Criteria:
Context: A cargo record contains waybill information including road number, station number, waybill number, and waybill date
Applied to: Set Waybill Index Fields
Action: Waybill indexes are being populated
Logic Flow:
IF A cargo record contains waybill information including road number, station number, waybill number, and waybill date
AND Waybill indexes are being populated
THEN:
• The system assigns road number to road index, station number to station index, waybill number to waybill index, waybill date to waybill date index, and copies waybill number to car-waybill index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record may contain in-bond control number or entry number.
Trigger Criteria:
Context: A cargo record may contain in-bond control number or entry number
Applied to: Set Bond Control Number Index
Action: Bond number index is being populated
Logic Flow:
IF A cargo record may contain in-bond control number or entry number
AND Bond number index is being populated
THEN:
• The system uses in-bond control number if available, otherwise uses entry number if available, otherwise sets bond index to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has a ccn key.
Trigger Criteria:
Context: A cargo record has a CCN key
Applied to: Set Manifest Index
Action: Manifest index is being populated
Logic Flow:
IF A cargo record has a CCN key
AND Manifest index is being populated
THEN:
• The system assigns the CCN key value to the manifest index field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has an internal cargo status code.
Trigger Criteria:
Context: A cargo record has an internal cargo status code
Applied to: Set Cargo Status Description
Action: Status description is being set
Logic Flow:
IF A cargo record has an internal cargo status code
AND Status description is being set
THEN:
• The system maps the status code to corresponding description: OK to 'OK', PENDING to 'PENDING', ACKNWLG to 'ACK', ERROR to 'ERROR', SENT to 'SENT', DELETED to 'DELETED', DELPEND to 'DELPEND', RELSD to 'RELEASED', ARRIVAL to 'MNL-ARRV', AARR to 'AUT-ARRV', EXPORT to 'MNL-EXP', AEXP to 'AUT-EXP', IMED-EX to 'IMED-EXP', XFERED to 'XFERED', or uses the original status if no mapping exists
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record is prepared with all required fields populated.
Trigger Criteria:
Context: A cargo record is prepared with all required fields populated
Applied to: Insert Record to Primary Database
Action: The record insertion is requested
Logic Flow:
IF A cargo record is prepared with all required fields populated
AND The record insertion is requested
THEN:
• The system calls the database interface to insert the record using the primary PCB and unqualified SSA
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been processed.
Trigger Criteria:
Context: A cargo record has been processed
Applied to: Save Iron Highway Status
Action: Iron Highway notification data is being prepared
Logic Flow:
IF A cargo record has been processed
AND Iron Highway notification data is being prepared
THEN:
• The system saves the US cargo short description to the Iron Highway status field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record contains waybill number index information.
Trigger Criteria:
Context: A cargo record contains waybill number index information
Applied to: Save Waybill Number
Action: Notification data is being prepared
Logic Flow:
IF A cargo record contains waybill number index information
AND Notification data is being prepared
THEN:
• The system extracts the first 15 characters of the waybill number index and saves it for notification processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record contains car id number index information.
Trigger Criteria:
Context: A cargo record contains car ID number index information
Applied to: Save Car Number
Action: Notification data is being prepared
Logic Flow:
IF A cargo record contains car ID number index information
AND Notification data is being prepared
THEN:
• The system saves the car ID number index value for notification processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo status information has been captured and prepared.
Trigger Criteria:
Context: Cargo status information has been captured and prepared
Applied to: Process Iron Highway Notification
Action: Iron Highway notification processing is invoked
Logic Flow:
IF Cargo status information has been captured and prepared
AND Iron Highway notification processing is invoked
THEN:
• The system calls the Iron Highway notification module to send status updates to external systems
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has been inserted or updated in the primary database.
Trigger Criteria:
Context: A cargo record has been inserted or updated in the primary database
Applied to: Update Index Database
Action: Index database update is requested
Logic Flow:
IF A cargo record has been inserted or updated in the primary database
AND Index database update is requested
THEN:
• The system calls the index database update process to maintain cargo status tracking tables based on error and hold conditions
R-GCCUSIO-cbl-00049 (+19)File: GCCUSIO.cblBusiness Rule: Primary Cargo Record Update
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record update operation is requested.
Trigger Criteria:
Context: A cargo record update operation is requested
Applied to: Retrieve Current Cargo Record
Action: The system needs to retrieve the current cargo record
Logic Flow:
IF A cargo record update operation is requested
AND The system needs to retrieve the current cargo record
THEN:
• The system performs a Get Hold Unique operation to retrieve and lock the current cargo record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record is being updated.
Trigger Criteria:
Context: A cargo record is being updated
Applied to: Save Current Iron Highway Status & Save Current Waybill Number & Save Current Car Number
Action: The current cargo record is retrieved
Logic Flow:
IF A cargo record is being updated
AND The current cargo record is retrieved
THEN:
• The system saves the US cargo short description to track status changes
• The system saves the first 15 characters of the waybill number index for notification purposes
• The system saves the car ID number index for notification purposes
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when current cargo record has been retrieved and saved data exists.
Trigger Criteria:
Context: The current cargo record has been retrieved and saved data exists
Applied to: Restore Updated Cargo Data
Action: The system needs to apply updates to the cargo record
Logic Flow:
IF The current cargo record has been retrieved and saved data exists
AND The system needs to apply updates to the cargo record
THEN:
• The system restores the updated cargo data from the saved working area
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed for index field updates.
Trigger Criteria:
Context: A cargo record is being processed for index field updates
Applied to: Populate Index Fields
Action: The cargo record is marked as deleted
Logic Flow:
IF A cargo record is being processed for index field updates
AND The cargo record is marked as deleted
THEN:
• The system skips all index field population and exits the process
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being updated and is not marked as deleted.
Trigger Criteria:
Context: A cargo record is being updated and is not marked as deleted
Applied to: Populate Index Fields
Action: Index fields need to be populated
Logic Flow:
IF A cargo record is being updated and is not marked as deleted
AND Index fields need to be populated
THEN:
• The system copies the US CCN key to RT071, RT072, and RT073 index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being updated with index fields.
Trigger Criteria:
Context: A cargo record is being updated with index fields
Applied to: Populate Index Fields
Action: The destination index field is not empty
Logic Flow:
IF A cargo record is being updated with index fields
AND The destination index field is not empty
THEN:
• The system copies the US CCN key to the RT076 destination index field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being updated with index fields.
Trigger Criteria:
Context: A cargo record is being updated with index fields
Applied to: Set Car ID Index
Action: Car identification information is available
Logic Flow:
IF A cargo record is being updated with index fields
AND Car identification information is available
THEN:
• The system copies the equipment car number to both RT071 and RT073 car ID index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being updated with index fields.
Trigger Criteria:
Context: A cargo record is being updated with index fields
Applied to: Set Waybill Index Fields
Action: Waybill information is available in the cargo record
Logic Flow:
IF A cargo record is being updated with index fields
AND Waybill information is available in the cargo record
THEN:
• The system populates RT072 index with road number, station number, waybill number and waybill date, and copies waybill number to RT073 index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being updated with index fields.
Trigger Criteria:
Context: A cargo record is being updated with index fields
Applied to: Set Manifest Index
Action: Index field population is in progress
Logic Flow:
IF A cargo record is being updated with index fields
AND Index field population is in progress
THEN:
• The system copies the US CCN key to the RT075 manifest index field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being updated with bond index information.
Trigger Criteria:
Context: A cargo record is being updated with bond index information
Applied to: Set Bond Number Index
Action: The in-bond control number is not empty
Logic Flow:
IF A cargo record is being updated with bond index information
AND The in-bond control number is not empty
THEN:
• The system uses the in-bond control number to populate the RT074 bond number index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being updated with bond index information.
Trigger Criteria:
Context: A cargo record is being updated with bond index information
Applied to: Set Entry Number as Bond Index
Action: Both in-bond control number and entry number are empty
Logic Flow:
IF A cargo record is being updated with bond index information
AND Both in-bond control number and entry number are empty
THEN:
• The system sets the RT074 bond number index to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being updated with bond index information and in-bond control number is empty.
Trigger Criteria:
Context: A cargo record is being updated with bond index information and in-bond control number is empty
Applied to: Set Entry Number as Bond Index
Action: The entry number is not empty
Logic Flow:
IF A cargo record is being updated with bond index information and in-bond control number is empty
AND The entry number is not empty
THEN:
• The system uses the entry number to populate the RT074 bond number index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being replaced.
Trigger Criteria:
Context: A cargo record is being replaced
Applied to: Update Last Modification Timestamp & Set Last Modification User ID & Set Last Modification Terminal
Action: The record modification tracking needs to be updated
Logic Flow:
IF A cargo record is being replaced
AND The record modification tracking needs to be updated
THEN:
• The system sets the last modify date to current machine date and last modify time to current machine time
• The system sets the last modify user ID to the current ACF2 user ID
• The system sets the last modify terminal to the current originating terminal
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has been prepared with updated data and timestamps.
Trigger Criteria:
Context: A cargo record has been prepared with updated data and timestamps
Applied to: Replace Cargo Record in Database
Action: The record is ready to be saved to the database
Logic Flow:
IF A cargo record has been prepared with updated data and timestamps
AND The record is ready to be saved to the database
THEN:
• The system performs a replace operation using unqualified SSA to update the cargo record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been successfully replaced in the primary database.
Trigger Criteria:
Context: A cargo record has been successfully replaced in the primary database
Applied to: Update Index Database Records
Action: Index database synchronization is required
Logic Flow:
IF A cargo record has been successfully replaced in the primary database
AND Index database synchronization is required
THEN:
• The system updates the GCSB1RT index database records to reflect the cargo status changes
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been updated and index databases have been synchronized.
Trigger Criteria:
Context: A cargo record has been updated and index databases have been synchronized
Applied to: Process Iron Highway Notification
Action: Status change notification is required
Logic Flow:
IF A cargo record has been updated and index databases have been synchronized
AND Status change notification is required
THEN:
• The system processes Iron Highway notification using saved status information
R-GCCUSIO-cbl-00069 (+11)File: GCCUSIO.cblBusiness Rule: Primary Cargo Record Delete
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record exists in the system and delete operation is requested.
Trigger Criteria:
Context: A cargo record exists in the system and delete operation is requested
Applied to: Retrieve Current Cargo Record
Action: The system needs to retrieve the current cargo record for deletion
Logic Flow:
IF A cargo record exists in the system and delete operation is requested
AND The system needs to retrieve the current cargo record for deletion
THEN:
• The system performs a Get Hold Unique operation to retrieve and lock the cargo record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record is being processed for deletion.
Trigger Criteria:
Context: A cargo record is being processed for deletion
Applied to: Save Iron Highway Status Information
Action: The system retrieves the current cargo record
Logic Flow:
IF A cargo record is being processed for deletion
AND The system retrieves the current cargo record
THEN:
• The system saves the RT21 US cargo short description to the Iron Highway status field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record is being processed for deletion.
Trigger Criteria:
Context: A cargo record is being processed for deletion
Applied to: Set Cargo Status to DELETED
Action: The system completes index field clearing
Logic Flow:
IF A cargo record is being processed for deletion
AND The system completes index field clearing
THEN:
• The system sets the RT10 CP cargo status to DELETED
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record contains waybill and car identification information.
Trigger Criteria:
Context: A cargo record contains waybill and car identification information
Applied to: Save Waybill and Car Numbers
Action: The system processes the cargo record for deletion
Logic Flow:
IF A cargo record contains waybill and car identification information
AND The system processes the cargo record for deletion
THEN:
• The system saves the first 15 characters of the waybill number index and the car identification number index for notification purposes
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record is being logically deleted.
Trigger Criteria:
Context: A cargo record is being logically deleted
Applied to: Clear Waybill Index & Clear Car-Waybill Index & Clear Bond Number Index & Clear Destination Index
Action: The system processes index field clearing
Logic Flow:
IF A cargo record is being logically deleted
AND The system processes index field clearing
THEN:
• The system sets the RT072 waybill index field to spaces
• The system sets the RT073 car-waybill index field to spaces
• The system sets the RT074 bond index field to spaces
• The system sets the RT076 destination index field to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been marked as deleted.
Trigger Criteria:
Context: A cargo record has been marked as deleted
Applied to: Set Cargo Status to DELETED
Action: The system processes status description updates
Logic Flow:
IF A cargo record has been marked as deleted
AND The system processes status description updates
THEN:
• The system sets the RT10B CP cargo status description to the corresponding deleted status description
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has been marked as deleted with cleared index fields.
Trigger Criteria:
Context: A cargo record has been marked as deleted with cleared index fields
Applied to: Update Cargo Record with Deleted Status
Action: The system needs to persist the deletion changes
Logic Flow:
IF A cargo record has been marked as deleted with cleared index fields
AND The system needs to persist the deletion changes
THEN:
• The system performs a replace operation to update the cargo record with the deleted status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been successfully marked as deleted.
Trigger Criteria:
Context: A cargo record has been successfully marked as deleted
Applied to: Process Iron Highway Notification
Action: The system completes the cargo record update
Logic Flow:
IF A cargo record has been successfully marked as deleted
AND The system completes the cargo record update
THEN:
• The system processes Iron Highway notification using the saved status, waybill number, and car identification information
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been successfully deleted.
Trigger Criteria:
Context: A cargo record has been successfully deleted
Applied to: Delete GCSB1RT Index Records
Action: The system needs to clean up related index records
Logic Flow:
IF A cargo record has been successfully deleted
AND The system needs to clean up related index records
THEN:
• The system deletes the corresponding GCSB1RT status index record using the cargo CCN key
R-GCCUSIO-cbl-00081 (+12)File: GCCUSIO.cblBusiness Rule: Primary Cargo Record Retrieval
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record retrieval request is received with function code gu or gn.
Trigger Criteria:
Context: A cargo record retrieval request is received with function code GU or GN
Applied to: Build Primary SSA with CCN Key
Action: The CCN key field is not empty
Logic Flow:
IF A cargo record retrieval request is received with function code GU or GN
AND The CCN key field is not empty
THEN:
• Build qualified SSA with CCN key value and execute qualified search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record retrieval request is received with function code gu or gn.
Trigger Criteria:
Context: A cargo record retrieval request is received with function code GU or GN
Applied to: Build Unqualified SSA
Action: The CCN key field is empty or spaces
Logic Flow:
IF A cargo record retrieval request is received with function code GU or GN
AND The CCN key field is empty or spaces
THEN:
• Build unqualified SSA and execute unqualified search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record retrieval request is received with function code other than isrt, repl, dlet, or zap.
Trigger Criteria:
Context: A cargo record retrieval request is received with function code other than ISRT, REPL, DLET, or ZAP
Applied to: Secondary Index Specified?
Action: The secondary index field is not empty or spaces
Logic Flow:
IF A cargo record retrieval request is received with function code other than ISRT, REPL, DLET, or ZAP
AND The secondary index field is not empty or spaces
THEN:
• Route to secondary index processing instead of primary SSA building
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary index search request is received.
Trigger Criteria:
Context: A secondary index search request is received
Applied to: Car ID Index Search
Action: The index type is CAR-ID
Logic Flow:
IF A secondary index search request is received
AND The index type is CAR-ID
THEN:
• Use car ID index structure with car identification value and operator to search cargo records
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary index search request is received.
Trigger Criteria:
Context: A secondary index search request is received
Applied to: Waybill Index Search
Action: The index type is WAYBILL
Logic Flow:
IF A secondary index search request is received
AND The index type is WAYBILL
THEN:
• Use waybill index structure with waybill number value and operator to search cargo records
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary index search request is received.
Trigger Criteria:
Context: A secondary index search request is received
Applied to: Car-Waybill Index Search
Action: The index type is CAR-WB and car-waybill index is not empty
Logic Flow:
IF A secondary index search request is received
AND The index type is CAR-WB and car-waybill index is not empty
THEN:
• Use qualified SSA with car-waybill index value, otherwise use unqualified SSA
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary index search request is received.
Trigger Criteria:
Context: A secondary index search request is received
Applied to: Bond Number Index Search
Action: The index type is BOND and bond index is not empty
Logic Flow:
IF A secondary index search request is received
AND The index type is BOND and bond index is not empty
THEN:
• Use qualified SSA with bond index value, otherwise use unqualified SSA
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary index search request is received.
Trigger Criteria:
Context: A secondary index search request is received
Applied to: Lead CCN Index Search
Action: The index type is LEAD-CCN and lead manifest CCN is not empty
Logic Flow:
IF A secondary index search request is received
AND The index type is LEAD-CCN and lead manifest CCN is not empty
THEN:
• Use qualified SSA with lead CCN value, otherwise use unqualified SSA
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary index search request is received.
Trigger Criteria:
Context: A secondary index search request is received
Applied to: Held Destination Index Search
Action: The index type is HELD-DEST
Logic Flow:
IF A secondary index search request is received
AND The index type is HELD-DEST
THEN:
• Search status table by held destination key, then retrieve primary cargo record using the cargo key from status record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary index search request is received.
Trigger Criteria:
Context: A secondary index search request is received
Applied to: Held Border Index Search
Action: The index type is HELD-BORDER
Logic Flow:
IF A secondary index search request is received
AND The index type is HELD-BORDER
THEN:
• Search status table by held border key, then retrieve primary cargo record using the cargo key from status record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary index search request is received.
Trigger Criteria:
Context: A secondary index search request is received
Applied to: Error Origin Index Search
Action: The index type is ERR-ORIG
Logic Flow:
IF A secondary index search request is received
AND The index type is ERR-ORIG
THEN:
• Search status table by error origin key, then retrieve primary cargo record using the cargo key from status record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary index search request is received.
Trigger Criteria:
Context: A secondary index search request is received
Applied to: Error Border Index Search
Action: The index type is ERR-BORDER
Logic Flow:
IF A secondary index search request is received
AND The index type is ERR-BORDER
THEN:
• Search status table by error border key, then retrieve primary cargo record using the cargo key from status record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary index search request is received.
Trigger Criteria:
Context: A secondary index search request is received
Applied to: Error Destination Index Search
Action: The index type is ERR-DEST
Logic Flow:
IF A secondary index search request is received
AND The index type is ERR-DEST
THEN:
• Search status table by error destination key, then retrieve primary cargo record using the cargo key from status record
R-GCCUSIO-cbl-00094 (+6)File: GCCUSIO.cblBusiness Rule: Index Field Management
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed for index field updates.
Trigger Criteria:
Context: A cargo record is being processed for index field updates
Applied to: Is Cargo Deleted?
Action: The cargo status indicates it is deleted (88-GCUSRT-RT10-CPCARGO-DELETED is true)
Logic Flow:
IF A cargo record is being processed for index field updates
AND The cargo status indicates it is deleted (88-GCUSRT-RT10-CPCARGO-DELETED is true)
THEN:
• The system should skip all index field population and exit the index management process
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is active (not deleted). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record is active (not deleted)
Applied to: Set CCN Key Index Fields
Action: Index fields are being updated
Logic Flow:
IF A cargo record is active (not deleted)
AND Index fields are being updated
THEN:
• The system should copy the US CCN key to RT071, RT072, and RT073 index fields, andif destination index is not empty, also copy to RT076 index field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has equipment car information. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record has equipment car information
Applied to: Populate Car ID Index
Action: Index fields are being populated
Logic Flow:
IF A cargo record has equipment car information
AND Index fields are being populated
THEN:
• The system should copy the equipment car number to the car ID index field (RT071-CAR-ID-NUM-INDEX)
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record contains waybill information.
Trigger Criteria:
Context: A cargo record contains waybill information
Applied to: Populate Waybill Index Fields
Action: Index fields are being updated
Logic Flow:
IF A cargo record contains waybill information
AND Index fields are being updated
THEN:
• The system should populate RT072 index with road number, station number, waybill number, and waybill date from the RT082 fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has both car and waybill information. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record has both car and waybill information
Applied to: Populate Car-Waybill Combined Index
Action: Index fields are being populated
Logic Flow:
IF A cargo record has both car and waybill information
AND Index fields are being populated
THEN:
• The system should copy the waybill number from RT072 to RT073 waybill index and copy the equipment car number to RT073 car ID index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record may have bond-related numbers.
Trigger Criteria:
Context: A cargo record may have bond-related numbers
Applied to: Bond Control Number Available?
Action: The bond index field is being populated
Logic Flow:
IF A cargo record may have bond-related numbers
AND The bond index field is being populated
THEN:
• If in-bond control number is not empty, use it for bond index; otherwiseif entry number is not empty, use entry number; otherwise clear the bond index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record is being processed for index updates. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record is being processed for index updates
Applied to: Set Manifest Index
Action: All other index fields have been populated
Logic Flow:
IF A cargo record is being processed for index updates
AND All other index fields have been populated
THEN:
• The system should copy the US CCN key to the manifest index field (RT075-MANIF-INDEX)
R-GCCUSIO-cbl-00101 (+14)File: GCCUSIO.cblBusiness Rule: Cargo Status Description Setting
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with cp cargo status code indicating ok status.
Trigger Criteria:
Context: A cargo record exists with CP cargo status code indicating OK status
Applied to: Set Status Description to 'OK'
Action: The system processes cargo status description setting
Logic Flow:
IF A cargo record exists with CP cargo status code indicating OK status
AND The system processes cargo status description setting
THEN:
• The cargo status description field is set to 'OK'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with cp cargo status code indicating pending status.
Trigger Criteria:
Context: A cargo record exists with CP cargo status code indicating PENDING status
Applied to: Set Status Description to 'PENDING'
Action: The system processes cargo status description setting
Logic Flow:
IF A cargo record exists with CP cargo status code indicating PENDING status
AND The system processes cargo status description setting
THEN:
• The cargo status description field is set to 'PENDING'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with cp cargo status code indicating acknowledged status.
Trigger Criteria:
Context: A cargo record exists with CP cargo status code indicating ACKNOWLEDGED status
Applied to: Set Status Description to 'ACKNOWLEDGED'
Action: The system processes cargo status description setting
Logic Flow:
IF A cargo record exists with CP cargo status code indicating ACKNOWLEDGED status
AND The system processes cargo status description setting
THEN:
• The cargo status description field is set to 'ACK'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists with cp cargo status code indicating error status.
Trigger Criteria:
Context: A cargo record exists with CP cargo status code indicating ERROR status
Applied to: Set Status Description to 'ERROR'
Action: The system processes cargo status description setting
Logic Flow:
IF A cargo record exists with CP cargo status code indicating ERROR status
AND The system processes cargo status description setting
THEN:
• The cargo status description field is set to 'ERROR'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with cp cargo status code indicating sent status.
Trigger Criteria:
Context: A cargo record exists with CP cargo status code indicating SENT status
Applied to: Set Status Description to 'SENT'
Action: The system processes cargo status description setting
Logic Flow:
IF A cargo record exists with CP cargo status code indicating SENT status
AND The system processes cargo status description setting
THEN:
• The cargo status description field is set to 'SENT'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with cp cargo status code indicating deleted status.
Trigger Criteria:
Context: A cargo record exists with CP cargo status code indicating DELETED status
Applied to: Set Status Description to 'DELETED'
Action: The system processes cargo status description setting
Logic Flow:
IF A cargo record exists with CP cargo status code indicating DELETED status
AND The system processes cargo status description setting
THEN:
• The cargo status description field is set to 'DELETED'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with cp cargo status code indicating delete pending status.
Trigger Criteria:
Context: A cargo record exists with CP cargo status code indicating DELETE PENDING status
Applied to: Set Status Description to 'DELETE PENDING'
Action: The system processes cargo status description setting
Logic Flow:
IF A cargo record exists with CP cargo status code indicating DELETE PENDING status
AND The system processes cargo status description setting
THEN:
• The cargo status description field is set to 'DELPEND'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record exists with cp cargo status code indicating released status.
Trigger Criteria:
Context: A cargo record exists with CP cargo status code indicating RELEASED status
Applied to: Set Status Description to 'RELEASED'
Action: The system processes cargo status description setting
Logic Flow:
IF A cargo record exists with CP cargo status code indicating RELEASED status
AND The system processes cargo status description setting
THEN:
• The cargo status description field is set to 'RELEASED'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with cp cargo status code indicating arrival status.
Trigger Criteria:
Context: A cargo record exists with CP cargo status code indicating ARRIVAL status
Applied to: Set Status Description to 'MANUAL ARRIVAL'
Action: The system processes cargo status description setting
Logic Flow:
IF A cargo record exists with CP cargo status code indicating ARRIVAL status
AND The system processes cargo status description setting
THEN:
• The cargo status description field is set to 'MNL-ARRV'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with cp cargo status code indicating auto arrival status.
Trigger Criteria:
Context: A cargo record exists with CP cargo status code indicating AUTO ARRIVAL status
Applied to: Set Status Description to 'AUTO ARRIVAL'
Action: The system processes cargo status description setting
Logic Flow:
IF A cargo record exists with CP cargo status code indicating AUTO ARRIVAL status
AND The system processes cargo status description setting
THEN:
• The cargo status description field is set to 'AUT-ARRV'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with cp cargo status code indicating export status.
Trigger Criteria:
Context: A cargo record exists with CP cargo status code indicating EXPORT status
Applied to: Set Status Description to 'MANUAL EXPORT'
Action: The system processes cargo status description setting
Logic Flow:
IF A cargo record exists with CP cargo status code indicating EXPORT status
AND The system processes cargo status description setting
THEN:
• The cargo status description field is set to 'MNL-EXP'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with cp cargo status code indicating auto export status.
Trigger Criteria:
Context: A cargo record exists with CP cargo status code indicating AUTO EXPORT status
Applied to: Set Status Description to 'AUTO EXPORT'
Action: The system processes cargo status description setting
Logic Flow:
IF A cargo record exists with CP cargo status code indicating AUTO EXPORT status
AND The system processes cargo status description setting
THEN:
• The cargo status description field is set to 'AUT-EXP'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with cp cargo status code indicating immediate export status.
Trigger Criteria:
Context: A cargo record exists with CP cargo status code indicating IMMEDIATE EXPORT status
Applied to: Set Status Description to 'IMMEDIATE EXPORT'
Action: The system processes cargo status description setting
Logic Flow:
IF A cargo record exists with CP cargo status code indicating IMMEDIATE EXPORT status
AND The system processes cargo status description setting
THEN:
• The cargo status description field is set to 'IMED-EXP'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with cp cargo status code indicating transferred status.
Trigger Criteria:
Context: A cargo record exists with CP cargo status code indicating TRANSFERRED status
Applied to: Set Status Description to 'TRANSFERRED'
Action: The system processes cargo status description setting
Logic Flow:
IF A cargo record exists with CP cargo status code indicating TRANSFERRED status
AND The system processes cargo status description setting
THEN:
• The cargo status description field is set to 'XFERED'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists with cp cargo status code that does not match any predefined status values.
Trigger Criteria:
Context: A cargo record exists with CP cargo status code that does not match any predefined status values
Applied to: Use Original Status Code as Description
Action: The system processes cargo status description setting
Logic Flow:
IF A cargo record exists with CP cargo status code that does not match any predefined status values
AND The system processes cargo status description setting
THEN:
• The cargo status description field is set to the original CP cargo status code value
R-GCCUSIO-cbl-00116 (+9)File: GCCUSIO.cblBusiness Rule: Secondary Index Processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo search request with car id index type is received.
Trigger Criteria:
Context: A cargo search request with car ID index type is received
Applied to: Search Car ID Index
Action: The system processes the car ID index search
Logic Flow:
IF A cargo search request with car ID index type is received
AND The system processes the car ID index search
THEN:
• The system sets the car ID key value from the cargo record car ID index field, applies the search operator, and executes the search using the car ID secondary index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo search request with waybill index type is received.
Trigger Criteria:
Context: A cargo search request with waybill index type is received
Applied to: Search Waybill Index
Action: The system processes the waybill index search
Logic Flow:
IF A cargo search request with waybill index type is received
AND The system processes the waybill index search
THEN:
• The system sets the waybill key value from the cargo record waybill index field, applies the search operator, and executes the search using the waybill secondary index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo search request with car-waybill index type is received.
Trigger Criteria:
Context: A cargo search request with car-waybill index type is received
Applied to: Car-Waybill Index Exists?
Action: The system checks if the car-waybill index field contains data
Logic Flow:
IF A cargo search request with car-waybill index type is received
AND The system checks if the car-waybill index field contains data
THEN:
• If the car-waybill index field is not empty, the system uses qualified search with the index value, otherwise it uses unqualified search with empty key value
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo search request with bond index type is received.
Trigger Criteria:
Context: A cargo search request with bond index type is received
Applied to: Bond Index Exists?
Action: The system checks if the bond index field contains data
Logic Flow:
IF A cargo search request with bond index type is received
AND The system checks if the bond index field contains data
THEN:
• If the bond index field is not empty, the system uses qualified search with the index value, otherwise it uses unqualified search with empty key value
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo search request with lead ccn index type is received.
Trigger Criteria:
Context: A cargo search request with lead CCN index type is received
Applied to: Lead CCN Exists?
Action: The system checks if the lead manifest CCN field contains data
Logic Flow:
IF A cargo search request with lead CCN index type is received
AND The system checks if the lead manifest CCN field contains data
THEN:
• If the lead manifest CCN field is not empty, the system uses qualified search with the CCN value, otherwise it uses unqualified search with empty key value
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo search request with held destination index type is received.
Trigger Criteria:
Context: A cargo search request with held destination index type is received
Applied to: Search Held Destination Index
Action: The system processes the held destination index search
Logic Flow:
IF A cargo search request with held destination index type is received
AND The system processes the held destination index search
THEN:
• The system retrieves the held destination index record using the search criteria, extracts the cargo key from the index record, and retrieves the corresponding primary cargo record using the extracted key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo search request with held border index type is received.
Trigger Criteria:
Context: A cargo search request with held border index type is received
Applied to: Search Held Border Index
Action: The system processes the held border index search
Logic Flow:
IF A cargo search request with held border index type is received
AND The system processes the held border index search
THEN:
• The system retrieves the held border index record using the search criteria, extracts the cargo key from the index record, and retrieves the corresponding primary cargo record using the extracted key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo search request with error origin index type is received.
Trigger Criteria:
Context: A cargo search request with error origin index type is received
Applied to: Search Error Origin Index
Action: The system processes the error origin index search
Logic Flow:
IF A cargo search request with error origin index type is received
AND The system processes the error origin index search
THEN:
• The system retrieves the error origin index record using the search criteria, extracts the cargo key from the index record, and retrieves the corresponding primary cargo record using the extracted key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo search request with error border index type is received.
Trigger Criteria:
Context: A cargo search request with error border index type is received
Applied to: Search Error Border Index
Action: The system processes the error border index search
Logic Flow:
IF A cargo search request with error border index type is received
AND The system processes the error border index search
THEN:
• The system retrieves the error border index record using the search criteria, extracts the cargo key from the index record, and retrieves the corresponding primary cargo record using the extracted key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo search request with error destination index type is received.
Trigger Criteria:
Context: A cargo search request with error destination index type is received
Applied to: Search Error Destination Index
Action: The system processes the error destination index search
Logic Flow:
IF A cargo search request with error destination index type is received
AND The system processes the error destination index search
THEN:
• The system retrieves the error destination index record using the search criteria, extracts the cargo key from the index record, and retrieves the corresponding primary cargo record using the extracted key
R-GCCUSIO-cbl-00126 (+15)File: GCCUSIO.cblBusiness Rule: Error Index Management
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with status indicators.
Trigger Criteria:
Context: A cargo record with status indicators
Applied to: Cargo Has Error Status?
Action: The system checks for error conditions
Logic Flow:
IF A cargo record with status indicators
AND The system checks for error conditions
THEN:
• Error index management is triggered if cargo has CPCARGO-ERROR, CPCARGO-PENDING, orUSCARGO-ERROR status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with error status.
Trigger Criteria:
Context: A cargo record with error status
Applied to: Populate Origin Error Index
Action: The system processes error index fields
Logic Flow:
IF A cargo record with error status
AND The system processes error index fields
THEN:
• Origin error index is populated with error code 'E', origin station number, and cargo CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with error status.
Trigger Criteria:
Context: A cargo record with error status
Applied to: Populate Destination Error Index
Action: The system processes destination error index
Logic Flow:
IF A cargo record with error status
AND The system processes destination error index
THEN:
• Destination error index is populated with error code 'E', destination station number, and cargo CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record requiring border error index and location id.
Trigger Criteria:
Context: A cargo record requiring border error index and location ID
Applied to: Get Border Station from MC Table
Action: The system looks up border station information
Logic Flow:
IF A cargo record requiring border error index and location ID
AND The system looks up border station information
THEN:
• MC table is queried using location ID to retrieve border station number
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with error status and successful border station lookup.
Trigger Criteria:
Context: A cargo record with error status and successful border station lookup
Applied to: Populate Border Error Index
Action: The system processes border error index
Logic Flow:
IF A cargo record with error status and successful border station lookup
AND The system processes border error index
THEN:
• Border error index is populated with error code 'E', border station number from MC table, and cargo CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when error index fields populated for a cargo record.
Trigger Criteria:
Context: Error index fields populated for a cargo record
Applied to: GCSB1RT Index Record Exists?
Action: The system checks for existing GCSB1RT index record
Logic Flow:
IF Error index fields populated for a cargo record
AND The system checks for existing GCSB1RT index record
THEN:
• Existing record is updated if found, otherwise new record is created
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with error status and no existing gcsb1rt record.
Trigger Criteria:
Context: A cargo record with error status and no existing GCSB1RT record
Applied to: Create New Index Record
Action: The system processes error index record creation
Logic Flow:
IF A cargo record with error status and no existing GCSB1RT record
AND The system processes error index record creation
THEN:
• New GCSB1RT record is inserted with populated error index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with error status and existing gcsb1rt record.
Trigger Criteria:
Context: A cargo record with error status and existing GCSB1RT record
Applied to: Update Existing Index Record
Action: The system processes error index record update
Logic Flow:
IF A cargo record with error status and existing GCSB1RT record
AND The system processes error index record update
THEN:
• Existing GCSB1RT record is updated with current error index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record without error status but with existing error index fields.
Trigger Criteria:
Context: A cargo record without error status but with existing error index fields
Applied to: Remove Error Index Fields
Action: The system processes error index cleanup
Logic Flow:
IF A cargo record without error status but with existing error index fields
AND The system processes error index cleanup
THEN:
• Error origin, destination, and border index fields are cleared to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when gcsb1rt record with error fields cleared.
Trigger Criteria:
Context: A GCSB1RT record with error fields cleared
Applied to: All Error Fields Empty?
Action: The system checks if all error and hold fields are empty
Logic Flow:
IF A GCSB1RT record with error fields cleared
AND The system checks if all error and hold fields are empty
THEN:
• Record is deleted if all fields are empty, otherwise record is updated
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when gcsb1rt record with all error and hold index fields empty.
Trigger Criteria:
Context: A GCSB1RT record with all error and hold index fields empty
Applied to: Delete Index Record
Action: The system processes index record cleanup
Logic Flow:
IF A GCSB1RT record with all error and hold index fields empty
AND The system processes index record cleanup
THEN:
• GCSB1RT record is deleted from the database
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when gcsb1rt record with some error fields cleared but hold fields still populated.
Trigger Criteria:
Context: A GCSB1RT record with some error fields cleared but hold fields still populated
Applied to: Update Index Record
Action: The system processes partial index cleanup
Logic Flow:
IF A GCSB1RT record with some error fields cleared but hold fields still populated
AND The system processes partial index cleanup
THEN:
• GCSB1RT record is updated with remaining non-empty index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when search request for origin error index.
Trigger Criteria:
Context: A search request for origin error index
Applied to: Search Origin Error Index
Action: The system processes origin error search
Logic Flow:
IF A search request for origin error index
AND The system processes origin error search
THEN:
• GCSB1RT is queried using origin error station and cargo key to find matching records
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when search request for border error index.
Trigger Criteria:
Context: A search request for border error index
Applied to: Search Border Error Index
Action: The system processes border error search
Logic Flow:
IF A search request for border error index
AND The system processes border error search
THEN:
• GCSB1RT is queried using border error station and cargo key to find matching records
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when search request for destination error index.
Trigger Criteria:
Context: A search request for destination error index
Applied to: Search Destination Error Index
Action: The system processes destination error search
Logic Flow:
IF A search request for destination error index
AND The system processes destination error search
THEN:
• GCSB1RT is queried using destination error station and cargo key to find matching records
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when successful error index search results from gcsb1rt.
Trigger Criteria:
Context: Successful error index search results from GCSB1RT
Applied to: Retrieve Matching Cargo Records
Action: The system processes search results
Logic Flow:
IF Successful error index search results from GCSB1RT
AND The system processes search results
THEN:
• Primary cargo records are retrieved from GCSUSRT using cargo keys found in index search
R-GCCUSIO-cbl-00142 (+10)File: GCCUSIO.cblBusiness Rule: Hold Index Management
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with various status indicators.
Trigger Criteria:
Context: A cargo record with various status indicators
Applied to: Check Cargo Hold Status
Action: The system checks for hold status conditions
Logic Flow:
IF A cargo record with various status indicators
AND The system checks for hold status conditions
THEN:
• The system identifies if cargo is in any hold status (HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, HOLD-D, PR-H-DE, HOLDFDA) or has no hold status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo is confirmed to be in hold status.
Trigger Criteria:
Context: Cargo is confirmed to be in hold status
Applied to: Determine Hold Type
Action: The system analyzes the specific hold status codes
Logic Flow:
IF Cargo is confirmed to be in hold status
AND The system analyzes the specific hold status codes
THEN:
• The system determines if the hold is destination-related (HOLD, HOLDPCS, PR-HPCS, HOLD-D, PR-H-DE, HOLDFDA) or border-related (HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, HOLDFDA)
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has destination hold status (hold, holdpcs, pr-hpcs, hold-d, pr-h-de, holdfda).
Trigger Criteria:
Context: Cargo has destination hold status (HOLD, HOLDPCS, PR-HPCS, HOLD-D, PR-H-DE, HOLDFDA)
Applied to: Set Destination Hold Index
Action: The system processes hold index fields
Logic Flow:
IF Cargo has destination hold status (HOLD, HOLDPCS, PR-HPCS, HOLD-D, PR-H-DE, HOLDFDA)
AND The system processes hold index fields
THEN:
• The system sets destination station number to held-dest field and cargo CCN key to held-dest-cargo field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has border hold status (hold, holdpcs, pr-hpcs, hold-b, pr-h-bo, holdfda).
Trigger Criteria:
Context: Cargo has border hold status (HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, HOLDFDA)
Applied to: Set Border Hold Index
Action: The system processes hold index fields
Logic Flow:
IF Cargo has border hold status (HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, HOLDFDA)
AND The system processes hold index fields
THEN:
• The system retrieves border station from MC table lookup and sets held-border field to border station number and held-border-cargo field to cargo CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo requires border hold index and has location id.
Trigger Criteria:
Context: Cargo requires border hold index and has location ID
Applied to: Lookup Border Station from MC Table
Action: The system needs border station information
Logic Flow:
IF Cargo requires border hold index and has location ID
AND The system needs border station information
THEN:
• The system calls table lookup service with MC table ID and location ID to retrieve station number
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when gcsb1rt index record exists for the cargo and hold index fields are populated.
Trigger Criteria:
Context: A GCSB1RT index record exists for the cargo and hold index fields are populated
Applied to: Update Existing Index Record
Action: The system processes hold index management
Logic Flow:
IF A GCSB1RT index record exists for the cargo and hold index fields are populated
AND The system processes hold index management
THEN:
• The system replaces the existing index record with updated hold field information
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when no gcsb1rt index record exists for the cargo and hold index fields are populated.
Trigger Criteria:
Context: No GCSB1RT index record exists for the cargo and hold index fields are populated
Applied to: Create New Index Record
Action: The system processes hold index management
Logic Flow:
IF No GCSB1RT index record exists for the cargo and hold index fields are populated
AND The system processes hold index management
THEN:
• The system inserts a new index record with cargo key and hold field information
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo is not in any hold status (not hold, holdpcs, pr-hpcs, hold-b, pr-h-bo, hold-d, pr-h-de, holdfda).
Trigger Criteria:
Context: Cargo is not in any hold status (not HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, HOLD-D, PR-H-DE, HOLDFDA)
Applied to: Clear Hold Index Fields
Action: The system processes hold index management
Logic Flow:
IF Cargo is not in any hold status (not HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, HOLD-D, PR-H-DE, HOLDFDA)
AND The system processes hold index management
THEN:
• The system clears held-dest-index and held-border-index fields to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when hold index fields have been cleared and an existing index record is found.
Trigger Criteria:
Context: Hold index fields have been cleared and an existing index record is found
Applied to: Any Other Index Types Active?
Action: The system checks for other active index types
Logic Flow:
IF Hold index fields have been cleared and an existing index record is found
AND The system checks for other active index types
THEN:
• The system determines if error indexes (error-dest-index, error-orig-index, error-border-index) contain data to decide record retention
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when hold index fields are cleared and no error index fields contain data.
Trigger Criteria:
Context: Hold index fields are cleared and no error index fields contain data
Applied to: Delete Index Record
Action: The system determines index record is no longer needed
Logic Flow:
IF Hold index fields are cleared and no error index fields contain data
AND The system determines index record is no longer needed
THEN:
• The system deletes the GCSB1RT index record completely
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when hold index fields are cleared but error index fields contain data.
Trigger Criteria:
Context: Hold index fields are cleared but error index fields contain data
Applied to: Update Index Record
Action: The system processes index record maintenance
Logic Flow:
IF Hold index fields are cleared but error index fields contain data
AND The system processes index record maintenance
THEN:
• The system replaces the index record with cleared hold fields but preserved error field information
Business Justification: Ensures correct system behavior and process compliance when secondary cargo data segment (gcsa2rt) replace operation is requested.
Trigger Criteria:
Context: A secondary cargo data segment (GCSA2RT) replace operation is requested
Applied to: New Data Empty?
Action: The system retrieves the existing record and evaluates the new cargo data content
Logic Flow:
IF A secondary cargo data segment (GCSA2RT) replace operation is requested
AND The system retrieves the existing record and evaluates the new cargo data content
THEN:
• If the new data contains only spaces, low-values, or underscores, the system should delete the existing record; otherwise it should insert or replace the record based on whether it exists
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary cargo data segment (gcsa2rt) insert operation is requested.
Trigger Criteria:
Context: A secondary cargo data segment (GCSA2RT) insert operation is requested
Applied to: Insert Data Valid?
Action: The system evaluates the cargo data content for insertion
Logic Flow:
IF A secondary cargo data segment (GCSA2RT) insert operation is requested
AND The system evaluates the cargo data content for insertion
THEN:
• The system should only proceed with insertion if the data is not all spaces, not all low-values, and not all underscores
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary cargo data segment (gcsa2rt) delete operation is requested.
Trigger Criteria:
Context: A secondary cargo data segment (GCSA2RT) delete operation is requested
Applied to: Delete Secondary Record
Action: The system attempts to retrieve the existing record using GHU function
Logic Flow:
IF A secondary cargo data segment (GCSA2RT) delete operation is requested
AND The system attempts to retrieve the existing record using GHU function
THEN:
• If the record exists (status code is not 'GE'), the system should proceed with deletion; if not found, the operation should continue without error
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary cargo data retrieval operation is requested.
Trigger Criteria:
Context: A secondary cargo data retrieval operation is requested
Applied to: Index Type?
Action: The system evaluates the index type specified in the request
Logic Flow:
IF A secondary cargo data retrieval operation is requested
AND The system evaluates the index type specified in the request
THEN:
• IfSECN-KEY index is specified, use secondary key search; otherwise use primary key search with built secondary SSA
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary cargo data replace operation is in progress.
Trigger Criteria:
Context: A secondary cargo data replace operation is in progress
Applied to: Record Found?
Action: The system attempts to retrieve the existing record using GHU function with 'GE' accept status
Logic Flow:
IF A secondary cargo data replace operation is in progress
AND The system attempts to retrieve the existing record using GHU function with 'GE' accept status
THEN:
• If the status code equals 'GE', the record is not found and requires insertion; if status code is spaces, the record exists and can be replaced or deleted based on data content
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when secondary cargo data delete operation is requested.
Trigger Criteria:
Context: A secondary cargo data delete operation is requested
Applied to: Record Exists?
Action: The system retrieves the record using GHU function with 'GE' accept status
Logic Flow:
IF A secondary cargo data delete operation is requested
AND The system retrieves the record using GHU function with 'GE' accept status
THEN:
• If the status code is spaces, the record exists and should be deleted; if status code is 'GE', the record does not exist and no deletion is needed
Business Justification: Ensures correct system behavior and process compliance when gcsa8rt message processing request with function code gu or gn.
Trigger Criteria:
Context: A GCSA8RT message processing request with function code GU or GN
Applied to: Message Key Valid?
Action: The GCSA8RT key field is empty or contains only spaces
Logic Flow:
IF A GCSA8RT message processing request with function code GU or GN
AND The GCSA8RT key field is empty or contains only spaces
THEN:
• Return error code '0012' with message 'GCSA8RT-KEY EQUAL SPACES'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when gcsa8rt message delete request.
Trigger Criteria:
Context: A GCSA8RT message delete request
Applied to: Check if Message Exists
Action: The delete function is initiated
Logic Flow:
IF A GCSA8RT message delete request
AND The delete function is initiated
THEN:
• First perform a GHU (Get Hold Unique) operation to check if the message exists
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when gcsa8rt message delete request has been processed.
Trigger Criteria:
Context: A GCSA8RT message delete request has been processed
Applied to: Message Found?
Action: The message exists in the system (status code is spaces)
Logic Flow:
IF A GCSA8RT message delete request has been processed
AND The message exists in the system (status code is spaces)
THEN:
• Proceed with the delete operation using DLET function code
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when gcsa8rt message insert request.
Trigger Criteria:
Context: A GCSA8RT message insert request
Applied to: Check if Message Exists
Action: The insert function is initiated
Logic Flow:
IF A GCSA8RT message insert request
AND The insert function is initiated
THEN:
• First perform a GHU operation to check if the message already exists
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when gcsa8rt message insert request has checked for existing message.
Trigger Criteria:
Context: A GCSA8RT message insert request has checked for existing message
Applied to: Message Found?
Action: The message already exists in the system (status code is spaces)
Logic Flow:
IF A GCSA8RT message insert request has checked for existing message
AND The message already exists in the system (status code is spaces)
THEN:
• Use REPL function code to replace the existing message, otherwise use ISRT function code to insert new message
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when gcsa8rt message insert or replace operation.
Trigger Criteria:
Context: A GCSA8RT message insert or replace operation
Applied to: Format Message Data
Action: The message data needs to be stored
Logic Flow:
IF A GCSA8RT message insert or replace operation
AND The message data needs to be stored
THEN:
• Combine the GCSA8RT key with the saved IO area data to create the complete message segment
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when gcsa8rt message retrieval request with function code gu.
Trigger Criteria:
Context: A GCSA8RT message retrieval request with function code GU
Applied to: Retrieve Message Segment
Action: The retrieval operation is initiated
Logic Flow:
IF A GCSA8RT message retrieval request with function code GU
AND The retrieval operation is initiated
THEN:
• Build qualified SSA with the message key and perform the database call
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when gcsa8rt message has been successfully retrieved.
Trigger Criteria:
Context: A GCSA8RT message has been successfully retrieved
Applied to: Separate Key from Data
Action: The message data needs to be returned to the caller
Logic Flow:
IF A GCSA8RT message has been successfully retrieved
AND The message data needs to be returned to the caller
THEN:
• Extract the data portion from the complete message segment and move it to the IO area, excluding the key portion
Business Justification: Governs the functional prerequisites and system routing when table lookup request is initiated.
Trigger Criteria:
Context: A table lookup request is initiated
Applied to: Initialize Table Parameters
Action: The system prepares for table lookup operation
Logic Flow:
IF A table lookup request is initiated
AND The system prepares for table lookup operation
THEN:
• All table parameters are cleared including second PCB flag, unqualified SSA flag, table key values, and return flag
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when station information lookup is required.
Trigger Criteria:
Context: A station information lookup is required
Applied to: Set Table ID to 'MC'
Action: The system needs to identify the correct table type
Logic Flow:
IF A station information lookup is required
AND The system needs to identify the correct table type
THEN:
• The table ID is set to 'MC' and function code is set to 'GU' for station table lookup
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record contains a location id name.
Trigger Criteria:
Context: A cargo record contains a location ID name
Applied to: Set Station Key from Location ID
Action: The system performs station table lookup
Logic Flow:
IF A cargo record contains a location ID name
AND The system performs station table lookup
THEN:
• The location ID name from the cargo record is used as the station sequence ID key for table lookup
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when table parameters are initialized with mc table id and station key. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Table parameters are initialized with MC table ID and station key
Applied to: Call Table Lookup Service
Action: The system needs to retrieve station information
Logic Flow:
IF Table parameters are initialized with MC table ID and station key
AND The system needs to retrieve station information
THEN:
• The GCCTBIO table lookup service is called with the prepared parameters to access table segments
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when table lookup operation has been performed.
Trigger Criteria:
Context: A table lookup operation has been performed
Applied to: Table Record Found?
Action: The system checks the lookup result
Logic Flow:
IF A table lookup operation has been performed
AND The system checks the lookup result
THEN:
• If return flag equals '0' then station record is found, otherwise station record is not found
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when station record is found in the mc table.
Trigger Criteria:
Context: A station record is found in the MC table
Applied to: Extract Station Number
Action: The system needs to extract station information
Logic Flow:
IF A station record is found in the MC table
AND The system needs to extract station information
THEN:
• The table segment data is moved to MC segment structure and the MC station number is extracted for use
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when station number has been successfully extracted from mc table.
Trigger Criteria:
Context: A station number has been successfully extracted from MC table
Applied to: Use Station Number for Border Processing
Action: The system processes border-related cargo operations
Logic Flow:
IF A station number has been successfully extracted from MC table
AND The system processes border-related cargo operations
THEN:
• The MC station number is used as the border station identifier in cargo status processing
R-GCCUSIO-cbl-00174 (+11)File: GCCUSIO.cblBusiness Rule: GCSB1RT Index Database Management
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists in the system.
Trigger Criteria:
Context: A cargo record exists in the system
Applied to: No Index Processing Required - Delete Record
Action: The cargo has no CP cargo error status AND no CP cargo pending status AND no US cargo error status AND no US cargo hold status AND no US cargo hold PCS status AND no US cargo pre-hold PCS status AND no US cargo hold border status AND no US cargo pre-hold border status AND no US cargo hold destination status AND no US cargo pre-hold destination status AND no US cargo hold FDA status
Logic Flow:
IF A cargo record exists in the system
AND The cargo has no CP cargo error status AND no CP cargo pending status AND no US cargo error status AND no US cargo hold status AND no US cargo hold PCS status AND no US cargo pre-hold PCS status AND no US cargo hold border status AND no US cargo pre-hold border status AND no US cargo hold destination status AND no US cargo pre-hold destination status AND no US cargo hold FDA status
THEN:
• Delete the cargo record from GCSB1RT index database and complete index management
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists in gcsb1rt index database.
Trigger Criteria:
Context: A cargo record exists in GCSB1RT index database
Applied to: Clear Error Index Fields
Action: The cargo has no CP cargo error status AND no CP cargo pending status AND no US cargo error status
Logic Flow:
IF A cargo record exists in GCSB1RT index database
AND The cargo has no CP cargo error status AND no CP cargo pending status AND no US cargo error status
THEN:
• Clear the error origin index field AND clear the error destination index field AND clear the error border index field in the GCSB1RT record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists in gcsb1rt index database.
Trigger Criteria:
Context: A cargo record exists in GCSB1RT index database
Applied to: Clear Hold Index Fields
Action: The cargo has no US cargo hold status AND no US cargo hold PCS status AND no US cargo pre-hold PCS status AND no US cargo hold border status AND no US cargo pre-hold border status AND no US cargo hold destination status AND no US cargo pre-hold destination status AND no US cargo hold FDA status
Logic Flow:
IF A cargo record exists in GCSB1RT index database
AND The cargo has no US cargo hold status AND no US cargo hold PCS status AND no US cargo pre-hold PCS status AND no US cargo hold border status AND no US cargo pre-hold border status AND no US cargo hold destination status AND no US cargo pre-hold destination status AND no US cargo hold FDA status
THEN:
• Clear the held destination index field AND clear the held border index field in the GCSB1RT record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when error and hold index fields have been cleared from a gcsb1rt record.
Trigger Criteria:
Context: Error and hold index fields have been cleared from a GCSB1RT record
Applied to: Any Index Fields Remaining?
Action: The error destination index field is empty AND the error origin index field is empty AND the error border index field is empty
Logic Flow:
IF Error and hold index fields have been cleared from a GCSB1RT record
AND The error destination index field is empty AND the error origin index field is empty AND the error border index field is empty
THEN:
• Delete the GCSB1RT record from the index database
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when error and hold index fields have been cleared from a gcsb1rt record.
Trigger Criteria:
Context: Error and hold index fields have been cleared from a GCSB1RT record
Applied to: Any Index Fields Remaining?
Action: At least one of the following fields is not empty: error destination index field OR error origin index field OR error border index field
Logic Flow:
IF Error and hold index fields have been cleared from a GCSB1RT record
AND At least one of the following fields is not empty: error destination index field OR error origin index field OR error border index field
THEN:
• Replace the existing GCSB1RT record with the updated field values
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has error or pending status conditions.
Trigger Criteria:
Context: A cargo record has error or pending status conditions
Applied to: Populate Error Index Fields
Action: The cargo has CP cargo error status OR CP cargo pending status OR US cargo error status
Logic Flow:
IF A cargo record has error or pending status conditions
AND The cargo has CP cargo error status OR CP cargo pending status OR US cargo error status
THEN:
• Set error code origin to 'E' AND set error origin station to cargo origin station number AND set cargo CCN key to error origin cargo field AND set error code border to 'E' AND set error code destination to 'E' AND set cargo destination station number to error destination field AND set cargo CCN key to error destination cargo field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when error index fields are being populated for a cargo record.
Trigger Criteria:
Context: Error index fields are being populated for a cargo record
Applied to: Set Border Station Code via MC Table Lookup
Action: The MC table lookup is performed using cargo location ID name
Logic Flow:
IF Error index fields are being populated for a cargo record
AND The MC table lookup is performed using cargo location ID name
THEN:
• If MC table lookup returns success flag '0', set the MC station number from table segment to error border index field AND set cargo CCN key to error border cargo field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has hold status conditions.
Trigger Criteria:
Context: A cargo record has hold status conditions
Applied to: Set Destination Hold Index
Action: The cargo has US cargo hold status OR US cargo hold PCS status OR US cargo pre-hold PCS status OR US cargo hold destination status OR US cargo pre-hold destination status OR US cargo hold FDA status
Logic Flow:
IF A cargo record has hold status conditions
AND The cargo has US cargo hold status OR US cargo hold PCS status OR US cargo pre-hold PCS status OR US cargo hold destination status OR US cargo pre-hold destination status OR US cargo hold FDA status
THEN:
• Set cargo destination station number to held destination index field AND set cargo CCN key to held destination cargo field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has hold status conditions.
Trigger Criteria:
Context: A cargo record has hold status conditions
Applied to: Set Border Hold Index via MC Table Lookup
Action: The cargo has US cargo hold status OR US cargo hold PCS status OR US cargo pre-hold PCS status OR US cargo hold border status OR US cargo pre-hold border status OR US cargo hold FDA status
Logic Flow:
IF A cargo record has hold status conditions
AND The cargo has US cargo hold status OR US cargo hold PCS status OR US cargo pre-hold PCS status OR US cargo hold border status OR US cargo pre-hold border status OR US cargo hold FDA status
THEN:
• Perform MC table lookup using cargo location ID name AND if lookup returns success flag '0', set MC station number from table segment to held border index field AND set cargo CCN key to held border cargo field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has error or hold conditions and no existing gcsb1rt record is found.
Trigger Criteria:
Context: A cargo record has error or hold conditions AND no existing GCSB1RT record is found
Applied to: Insert New GCSB1RT Record
Action: Error or hold index fields have been populated
Logic Flow:
IF A cargo record has error or hold conditions AND no existing GCSB1RT record is found
AND Error or hold index fields have been populated
THEN:
• Set cargo CCN key to GCSB1RT key cargo field AND insert new GCSB1RT record with populated index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has error or hold conditions and an existing gcsb1rt record is found.
Trigger Criteria:
Context: A cargo record has error or hold conditions AND an existing GCSB1RT record is found
Applied to: Replace Existing GCSB1RT Record
Action: Error or hold index fields have been populated or cleared
Logic Flow:
IF A cargo record has error or hold conditions AND an existing GCSB1RT record is found
AND Error or hold index fields have been populated or cleared
THEN:
• Replace the existing GCSB1RT record with the updated field values
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record requires gcsb1rt index management.
Trigger Criteria:
Context: A cargo record requires GCSB1RT index management
Applied to: Retrieve Existing GCSB1RT Record
Action: GCSB1RT record retrieval is attempted using cargo CCN key
Logic Flow:
IF A cargo record requires GCSB1RT index management
AND GCSB1RT record retrieval is attempted using cargo CCN key
THEN:
• If record is found, set found indicator to true AND if record is not found, set found indicator to false
R-GCCUSIO-cbl-00186 (+10)File: GCCUSIO.cblBusiness Rule: Iron Highway Notification Processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed for iron highway notification.
Trigger Criteria:
Context: A cargo record is being processed for Iron Highway notification
Applied to: Status Change Required?
Action: Both US cargo short description and CP cargo status description are empty or spaces
Logic Flow:
IF A cargo record is being processed for Iron Highway notification
AND Both US cargo short description and CP cargo status description are empty or spaces
THEN:
• Skip the Iron Highway notification process entirely
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed for iron highway notification.
Trigger Criteria:
Context: A cargo record is being processed for Iron Highway notification
Applied to: Station Configuration Found?
Action: The Iron Highway station configuration table lookup returns no matching record
Logic Flow:
IF A cargo record is being processed for Iron Highway notification
AND The Iron Highway station configuration table lookup returns no matching record
THEN:
• Skip the Iron Highway notification process
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed for iron highway notification.
Trigger Criteria:
Context: A cargo record is being processed for Iron Highway notification
Applied to: Determine Notification Status
Action: The CP cargo status description equals 'DELETED'
Logic Flow:
IF A cargo record is being processed for Iron Highway notification
AND The CP cargo status description equals 'DELETED'
THEN:
• Set the Iron Highway notification status to 'DELETED'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed for iron highway notification.
Trigger Criteria:
Context: A cargo record is being processed for Iron Highway notification
Applied to: Determine Notification Status
Action: The CP cargo status description equals 'RELEASE'
Logic Flow:
IF A cargo record is being processed for Iron Highway notification
AND The CP cargo status description equals 'RELEASE'
THEN:
• Set the Iron Highway notification status to 'RELEASE'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed for iron highway notification.
Trigger Criteria:
Context: A cargo record is being processed for Iron Highway notification
Applied to: Determine Notification Status
Action: The US cargo short description is empty or spaces AND the CP cargo status description equals 'SENT '
Logic Flow:
IF A cargo record is being processed for Iron Highway notification
AND The US cargo short description is empty or spaces AND the CP cargo status description equals 'SENT '
THEN:
• Set the Iron Highway notification status to 'SENT'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed for iron highway notification.
Trigger Criteria:
Context: A cargo record is being processed for Iron Highway notification
Applied to: Determine Notification Status
Action: The cargo status is not DELETED, RELEASE, or the special SENT case
Logic Flow:
IF A cargo record is being processed for Iron Highway notification
AND The cargo status is not DELETED, RELEASE, or the special SENT case
THEN:
• Set the Iron Highway notification status to the US cargo short description value
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has a us cargo short description status.
Trigger Criteria:
Context: A cargo record has a US cargo short description status
Applied to: Status Change Required?
Action: The US cargo short description equals 'RELEASE'
Logic Flow:
IF A cargo record has a US cargo short description status
AND The US cargo short description equals 'RELEASE'
THEN:
• Skip the Iron Highway notification process
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed and has a saved previous status.
Trigger Criteria:
Context: A cargo record is being processed and has a saved previous status
Applied to: Status Change Required?
Action: The current cargo status matches the previously saved status AND the status is not DELETED or RELEASE
Logic Flow:
IF A cargo record is being processed and has a saved previous status
AND The current cargo status matches the previously saved status AND the status is not DELETED or RELEASE
THEN:
• Skip the Iron Highway notification process
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record requires iron highway notification processing.
Trigger Criteria:
Context: A cargo record requires Iron Highway notification processing
Applied to: Retrieve Iron Highway Station Configuration
Action: The system needs to check Iron Highway configuration
Logic Flow:
IF A cargo record requires Iron Highway notification processing
AND The system needs to check Iron Highway configuration
THEN:
• Retrieve table segment 'IH' using the waybill station number as the sequence ID
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when iron highway station configuration is found and notification should proceed.
Trigger Criteria:
Context: Iron Highway station configuration is found and notification should proceed
Applied to: Extract N9 Reference Numbers
Action: The system processes N9 reference number segments for the cargo
Logic Flow:
IF Iron Highway station configuration is found and notification should proceed
AND The system processes N9 reference number segments for the cargo
THEN:
• Search through up to 20 N9 reference number qualifiers and extract the reference number where qualifier equals 'CN' as the shipment ID
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when iron highway notification status has been determined and message prepared.
Trigger Criteria:
Context: Iron Highway notification status has been determined and message prepared
Applied to: Send Notification to Iron Highway System
Action: All required notification data is available including car ID, waybill number, CCN, and status
Logic Flow:
IF Iron Highway notification status has been determined and message prepared
AND All required notification data is available including car ID, waybill number, CCN, and status
THEN:
• Send notification to Iron Highway system using record type 'UC' with car identification, waybill number, cargo control number, shipment ID, and determined status
R-GCCUSIO-cbl-00197 (+6)File: GCCUSIO.cblBusiness Rule: Reference Number Processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with a valid us ccn key exists.
Trigger Criteria:
Context: A cargo record with a valid US CCN key exists
Applied to: Build Secondary Data Key - Use Cargo Control Number - Set Record Type '02' - Set Sequence '0001'
Action: The system needs to retrieve N9 reference data for the cargo
Logic Flow:
IF A cargo record with a valid US CCN key exists
AND The system needs to retrieve N9 reference data for the cargo
THEN:
• The system builds a secondary data key using the cargo's US CCN key, sets record type to '02', and sets sequence number to '0001'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when secondary data key has been constructed with cargo control number, record type '02', and sequence '0001'.
Trigger Criteria:
Context: A secondary data key has been constructed with cargo control number, record type '02', and sequence '0001'
Applied to: Retrieve Secondary Cargo Data GCSUSS02 Segment
Action: The system executes a retrieval operation for secondary cargo data
Logic Flow:
IF A secondary data key has been constructed with cargo control number, record type '02', and sequence '0001'
AND The system executes a retrieval operation for secondary cargo data
THEN:
• The system calls the database interface to retrieve the GCSUSS02 segment using the qualified key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when retrieval operation for secondary cargo data has been executed.
Trigger Criteria:
Context: A retrieval operation for secondary cargo data has been executed
Applied to: Secondary Data Found?
Action: The system checks the operation result status
Logic Flow:
IF A retrieval operation for secondary cargo data has been executed
AND The system checks the operation result status
THEN:
• If the status code is spaces (successful), secondary data is available for N9 processing, otherwise no secondary data is available
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary cargo data has been successfully retrieved.
Trigger Criteria:
Context: Secondary cargo data has been successfully retrieved
Applied to: Initialize N9 Counter to Zero
Action: The system prepares to process N9 reference entries
Logic Flow:
IF Secondary cargo data has been successfully retrieved
AND The system prepares to process N9 reference entries
THEN:
• The system sets the N9 counter to zero to begin iteration from the first entry
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when n9 counter has been initialized and secondary data is available.
Trigger Criteria:
Context: The N9 counter has been initialized and secondary data is available
Applied to: Loop Through 20 N9 Reference Entries
Action: The system processes N9 reference entries
Logic Flow:
IF The N9 counter has been initialized and secondary data is available
AND The system processes N9 reference entries
THEN:
• The system performs 20 iterations, incrementing the N9 counter by 1 each time to access each reference entry
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when n9 reference entry is being processed during the iteration.
Trigger Criteria:
Context: An N9 reference entry is being processed during the iteration
Applied to: N9 Qualifier = 'CN' 'Shipment ID'?
Action: The system examines the N9 reference number qualifier for the current entry
Logic Flow:
IF An N9 reference entry is being processed during the iteration
AND The system examines the N9 reference number qualifier for the current entry
THEN:
• If the qualifier equals 'CN', the entry contains shipment ID information, otherwise it contains other reference data
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when n9 reference entry has qualifier 'cn' indicating shipment id.
Trigger Criteria:
Context: An N9 reference entry has qualifier 'CN' indicating shipment ID
Applied to: Extract Reference Number as Shipment ID
Action: The system processes this qualified reference entry
Logic Flow:
IF An N9 reference entry has qualifier 'CN' indicating shipment ID
AND The system processes this qualified reference entry
THEN:
• The system moves the N9 reference number value to the shipment ID field for notification purposes
Business Justification: Ensures correct system behavior and process compliance when cargo record is being inserted and the creation timestamp field is empty (spaces).
Trigger Criteria:
Context: A cargo record is being inserted and the creation timestamp field is empty (spaces)
Applied to: Set Creation Audit Fields
Action: The system processes the record creation
Logic Flow:
IF A cargo record is being inserted and the creation timestamp field is empty (spaces)
AND The system processes the record creation
THEN:
• The system sets creation century from machine century, creation date from machine date, creation time from machine time hours and minutes, creation terminal from originating terminal, creation user ID from ACF2 user ID, and copies all creation information to last modification fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being updated and the creation timestamp field is not empty.
Trigger Criteria:
Context: A cargo record is being updated and the creation timestamp field is not empty
Applied to: Set Last Modification Audit Fields
Action: The system processes the record modification
Logic Flow:
IF A cargo record is being updated and the creation timestamp field is not empty
AND The system processes the record modification
THEN:
• The system updates last modification century from machine century, last modification date from machine date, last modification time from machine time hours and minutes, last modification terminal from originating terminal, and last modification user ID from ACF2 user ID while preserving existing creation audit information
R-GCCUSIO-cbl-00206 (+3)File: GCCUSIO.cblBusiness Rule: Bond Control Number Processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for bond control number indexing.
Trigger Criteria:
Context: A cargo record is being processed for bond control number indexing
Applied to: Is Cargo Deleted?
Action: The cargo status indicates it has been deleted (88-GCUSRT-RT10-CPCARGO-DELETED is true)
Logic Flow:
IF A cargo record is being processed for bond control number indexing
AND The cargo status indicates it has been deleted (88-GCUSRT-RT10-CPCARGO-DELETED is true)
THEN:
• Bond control number processing is skipped and control exits the procedure
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record requires bond number index population and cargo is not deleted.
Trigger Criteria:
Context: A cargo record requires bond number index population and cargo is not deleted
Applied to: In-Bond Control Number Available?
Action: The in-bond control number field (GCUSRT-M1206-IN-BOND-CTRL-NUM) contains a value other than spaces
Logic Flow:
IF A cargo record requires bond number index population and cargo is not deleted
AND The in-bond control number field (GCUSRT-M1206-IN-BOND-CTRL-NUM) contains a value other than spaces
THEN:
• The in-bond control number is used to populate the bond number index field (GCUSRT-RT074-BOND-NUM-INDEX)
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record requires bond number index population, cargo is not deleted, and in-bond control number is not available (spaces).
Trigger Criteria:
Context: A cargo record requires bond number index population, cargo is not deleted, and in-bond control number is not available (spaces)
Applied to: Entry Number Available?
Action: The entry number field (GCUSRT-M1202-ENTRY-NUM) contains a value other than spaces
Logic Flow:
IF A cargo record requires bond number index population, cargo is not deleted, and in-bond control number is not available (spaces)
AND The entry number field (GCUSRT-M1202-ENTRY-NUM) contains a value other than spaces
THEN:
• The entry number is used to populate the bond number index field (GCUSRT-RT074-BOND-NUM-INDEX)
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record requires bond number index population, cargo is not deleted, in-bond control number is not available (spaces), and entry number is not available (spaces).
Trigger Criteria:
Context: A cargo record requires bond number index population, cargo is not deleted, in-bond control number is not available (spaces), and entry number is not available (spaces)
Applied to: Entry Number Not Present
Action: Both control number fields are empty
Logic Flow:
IF A cargo record requires bond number index population, cargo is not deleted, in-bond control number is not available (spaces), and entry number is not available (spaces)
AND Both control number fields are empty
THEN:
• The bond number index field (GCUSRT-RT074-BOND-NUM-INDEX) is set to spaces
R-GCCUSIO-cbl-00210 (+6)File: GCCUSIO.cblBusiness Rule: Station Code Processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with origin station information and error conditions are being processed.
Trigger Criteria:
Context: A cargo record exists with origin station information and error conditions are being processed
Applied to: Extract Origin Station Code
Action: The system processes error field population
Logic Flow:
IF A cargo record exists with origin station information and error conditions are being processed
AND The system processes error field population
THEN:
• The origin station number from the cargo record is extracted and assigned to the error origin index field with error code 'E'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with destination station information and error conditions are being processed.
Trigger Criteria:
Context: A cargo record exists with destination station information and error conditions are being processed
Applied to: Extract Destination Station Code
Action: The system processes error field population
Logic Flow:
IF A cargo record exists with destination station information and error conditions are being processed
AND The system processes error field population
THEN:
• The destination station number from the cargo record is extracted and assigned to the error destination index field with error code 'E'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with location id information and error conditions are being processed.
Trigger Criteria:
Context: A cargo record exists with location ID information and error conditions are being processed
Applied to: Determine Border Station Code
Action: The system needs to determine the border station for error processing
Logic Flow:
IF A cargo record exists with location ID information and error conditions are being processed
AND The system needs to determine the border station for error processing
THEN:
• The system performs a table lookup using 'MC' table ID and the cargo's location ID as the sequence ID to retrieve the border station information
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when mc table lookup has been performed and returned successfully with return flag '0'.
Trigger Criteria:
Context: An MC table lookup has been performed and returned successfully with return flag '0'
Applied to: Set Border Station from Table
Action: The system processes the table lookup results for border station determination
Logic Flow:
IF An MC table lookup has been performed and returned successfully with return flag '0'
AND The system processes the table lookup results for border station determination
THEN:
• The station number is extracted from the MC table segment and assigned to the error border index field with error code 'E'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has error or pending conditions that require error index population.
Trigger Criteria:
Context: A cargo record has error or pending conditions that require error index population
Applied to: Populate Error Index Fields
Action: The system processes error field population
Logic Flow:
IF A cargo record has error or pending conditions that require error index population
AND The system processes error field population
THEN:
• The system sets error code 'E' for origin, border, and destination fields, populates origin error index with origin station number, populates destination error index with destination station number, populates border error index with border station number from MC table lookup, and assigns the cargo CCN key to all error cargo index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has hold conditions including uscargo-hold, uscargo-holdpcs, uscargo-pr-hpcs, uscargo-hold-d, uscargo-pr-h-de, or uscargo-holdfda.
Trigger Criteria:
Context: A cargo record has hold conditions including USCARGO-HOLD, USCARGO-HOLDPCS, USCARGO-PR-HPCS, USCARGO-HOLD-D, USCARGO-PR-H-DE, or USCARGO-HOLDFDA
Applied to: Populate Hold Index Fields
Action: The system processes hold field population for destination-related holds
Logic Flow:
IF A cargo record has hold conditions including USCARGO-HOLD, USCARGO-HOLDPCS, USCARGO-PR-HPCS, USCARGO-HOLD-D, USCARGO-PR-H-DE, or USCARGO-HOLDFDA
AND The system processes hold field population for destination-related holds
THEN:
• The destination station number from the cargo record is assigned to the held destination index field and the cargo CCN key is assigned to the held destination cargo index field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has hold conditions including uscargo-hold, uscargo-holdpcs, uscargo-pr-hpcs, uscargo-hold-b, uscargo-pr-h-bo, or uscargo-holdfda.
Trigger Criteria:
Context: A cargo record has hold conditions including USCARGO-HOLD, USCARGO-HOLDPCS, USCARGO-PR-HPCS, USCARGO-HOLD-B, USCARGO-PR-H-BO, or USCARGO-HOLDFDA
Applied to: Populate Hold Index Fields
Action: The system processes hold field population for border-related holds
Logic Flow:
IF A cargo record has hold conditions including USCARGO-HOLD, USCARGO-HOLDPCS, USCARGO-PR-HPCS, USCARGO-HOLD-B, USCARGO-PR-H-BO, or USCARGO-HOLDFDA
AND The system processes hold field population for border-related holds
THEN:
• The system performs MC table lookup using the cargo's location ID, andif successful (return flag '0'), extracts the station number from the MC table segment and assigns it to the held border index field, and assigns the cargo CCN key to the held border cargo index field
R-GCCUSIO-cbl-00217 (+8)File: GCCUSIO.cblBusiness Rule: Cargo Status Transition Management
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with hold conditions but no error conditions (not cpcargo-error, not cpcargo-pending, not uscargo-error).
Trigger Criteria:
Context: A cargo record exists with hold conditions but no error conditions (not CPCARGO-ERROR, not CPCARGO-PENDING, not USCARGO-ERROR)
Applied to: Remove Error Index Entries
Action: The cargo status is being updated
Logic Flow:
IF A cargo record exists with hold conditions but no error conditions (not CPCARGO-ERROR, not CPCARGO-PENDING, not USCARGO-ERROR)
AND The cargo status is being updated
THEN:
• The system clears error origin index, error destination index, and error border index fields to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with error conditions but no hold conditions (not uscargo-hold, not uscargo-holdpcs, not uscargo-pr-hpcs, not uscargo-hold-b, not uscargo-pr-h-bo, not uscargo-hold-d, not uscargo-pr-h-de, not uscargo-holdfda).
Trigger Criteria:
Context: A cargo record exists with error conditions but no hold conditions (not USCARGO-HOLD, not USCARGO-HOLDPCS, not USCARGO-PR-HPCS, not USCARGO-HOLD-B, not USCARGO-PR-H-BO, not USCARGO-HOLD-D, not USCARGO-PR-H-DE, not USCARGO-HOLDFDA)
Applied to: Remove Hold Index Entries
Action: The cargo status is being updated
Logic Flow:
IF A cargo record exists with error conditions but no hold conditions (not USCARGO-HOLD, not USCARGO-HOLDPCS, not USCARGO-PR-HPCS, not USCARGO-HOLD-B, not USCARGO-PR-H-BO, not USCARGO-HOLD-D, not USCARGO-PR-H-DE, not USCARGO-HOLDFDA)
AND The cargo status is being updated
THEN:
• The system clears held destination index and held border index fields to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has error conditions (cpcargo-error or cpcargo-pending or uscargo-error).
Trigger Criteria:
Context: A cargo record has error conditions (CPCARGO-ERROR or CPCARGO-PENDING or USCARGO-ERROR)
Applied to: Create Error Index Entries
Action: The cargo status is being updated
Logic Flow:
IF A cargo record has error conditions (CPCARGO-ERROR or CPCARGO-PENDING or USCARGO-ERROR)
AND The cargo status is being updated
THEN:
• The system sets error code to 'E', populates error origin with origin station number, error border with border station number from MC table lookup, error destination with destination station number, and associates all error indexes with the cargo CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has hold conditions (uscargo-hold or uscargo-holdpcs or uscargo-pr-hpcs or uscargo-hold-d or uscargo-pr-h-de or uscargo-holdfda or uscargo-hold-b or uscargo-pr-h-bo).
Trigger Criteria:
Context: A cargo record has hold conditions (USCARGO-HOLD or USCARGO-HOLDPCS or USCARGO-PR-HPCS or USCARGO-HOLD-D or USCARGO-PR-H-DE or USCARGO-HOLDFDA or USCARGO-HOLD-B or USCARGO-PR-H-BO)
Applied to: Create Hold Index Entries
Action: The cargo status is being updated
Logic Flow:
IF A cargo record has hold conditions (USCARGO-HOLD or USCARGO-HOLDPCS or USCARGO-PR-HPCS or USCARGO-HOLD-D or USCARGO-PR-H-DE or USCARGO-HOLDFDA or USCARGO-HOLD-B or USCARGO-PR-H-BO)
AND The cargo status is being updated
THEN:
• The system populates held destination index with destination station number and cargo CCN for destination holds, and populates held border index with border station number from MC table lookup and cargo CCN for border holds
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has no error conditions (not cpcargo-error, not cpcargo-pending, not uscargo-error) and no hold conditions (not uscargo-hold, not uscargo-holdpcs, not uscargo-pr-hpcs, not uscargo-hold-b, not uscargo-pr-h-bo, not uscargo-hold-d, not uscargo-pr-h-de, not uscargo-holdfda).
Trigger Criteria:
Context: A cargo record has no error conditions (not CPCARGO-ERROR, not CPCARGO-PENDING, not USCARGO-ERROR) and no hold conditions (not USCARGO-HOLD, not USCARGO-HOLDPCS, not USCARGO-PR-HPCS, not USCARGO-HOLD-B, not USCARGO-PR-H-BO, not USCARGO-HOLD-D, not USCARGO-PR-H-DE, not USCARGO-HOLDFDA)
Applied to: Delete GCSB1RT Index Record
Action: The cargo status is being updated
Logic Flow:
IF A cargo record has no error conditions (not CPCARGO-ERROR, not CPCARGO-PENDING, not USCARGO-ERROR) and no hold conditions (not USCARGO-HOLD, not USCARGO-HOLDPCS, not USCARGO-PR-HPCS, not USCARGO-HOLD-B, not USCARGO-PR-H-BO, not USCARGO-HOLD-D, not USCARGO-PR-H-DE, not USCARGO-HOLDFDA)
AND The cargo status is being updated
THEN:
• The system deletes the cargo record from the GCSB1RT status index table
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists in the status index table and has either error conditions or hold conditions but not both cleared.
Trigger Criteria:
Context: A cargo record exists in the status index table and has either error conditions or hold conditions but not both cleared
Applied to: Update GCSB1RT Index Record
Action: The cargo status is being updated
Logic Flow:
IF A cargo record exists in the status index table and has either error conditions or hold conditions but not both cleared
AND The cargo status is being updated
THEN:
• The system updates the existing GCSB1RT record with the current index field values
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has error conditions (cpcargo-error or cpcargo-pending or uscargo-error) or hold conditions (uscargo-hold or uscargo-holdpcs or uscargo-pr-hpcs or uscargo-hold-b or uscargo-pr-h-bo or uscargo-hold-d or uscargo-pr-h-de or uscargo-holdfda) and no existing status index record exists.
Trigger Criteria:
Context: A cargo record has error conditions (CPCARGO-ERROR or CPCARGO-PENDING or USCARGO-ERROR) or hold conditions (USCARGO-HOLD or USCARGO-HOLDPCS or USCARGO-PR-HPCS or USCARGO-HOLD-B or USCARGO-PR-H-BO or USCARGO-HOLD-D or USCARGO-PR-H-DE or USCARGO-HOLDFDA) and no existing status index record exists
Applied to: Create New GCSB1RT Index Record
Action: The cargo status is being updated
Logic Flow:
IF A cargo record has error conditions (CPCARGO-ERROR or CPCARGO-PENDING or USCARGO-ERROR) or hold conditions (USCARGO-HOLD or USCARGO-HOLDPCS or USCARGO-PR-HPCS or USCARGO-HOLD-B or USCARGO-PR-H-BO or USCARGO-HOLD-D or USCARGO-PR-H-DE or USCARGO-HOLDFDA) and no existing status index record exists
AND The cargo status is being updated
THEN:
• The system creates a new GCSB1RT record with the cargo CCN key and populated index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has an internal cp cargo status code.
Trigger Criteria:
Context: A cargo record has an internal CP cargo status code
Applied to: Set Cargo Status Description
Action: The cargo status description needs to be set
Logic Flow:
IF A cargo record has an internal CP cargo status code
AND The cargo status description needs to be set
THEN:
• The system maps the internal status code to the corresponding business description: OK to 'OK', PENDING to 'PENDING', ACKNWLG to 'ACK', ERROR to 'ERROR', SENT to 'SENT', DELETED to 'DELETED', DELPEND to 'DELPEND', RELSD to 'RELEASED', ARRIVAL to 'MNL-ARRV', AARR to 'AUT-ARRV', EXPORT to 'MNL-EXP', AEXP to 'AUT-EXP', IMED-EX to 'IMED-EXP', XFERED to 'XFERED', or uses the original status code if no mapping exists
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being modified with insert, replace, delete, or zap operations.
Trigger Criteria:
Context: A cargo record is being modified with insert, replace, delete, or zap operations
Applied to: Update Last Modification Timestamp
Action: The cargo status is being updated
Logic Flow:
IF A cargo record is being modified with insert, replace, delete, or zap operations
AND The cargo status is being updated
THEN:
• The system updates the last modification fields with current machine century, date, time, originating terminal, and user ID
R-GCCUSIO-cbl-00226 (+17)File: GCCUSIO.cblBusiness Rule: Populate Index Fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for index field population.
Trigger Criteria:
Context: A cargo record is being processed for index field population
Applied to: Is Cargo Deleted?
Action: The cargo status indicates it is deleted (88-GCUSRT-RT10-CPCARGO-DELETED is true)
Logic Flow:
IF A cargo record is being processed for index field population
AND The cargo status indicates it is deleted (88-GCUSRT-RT10-CPCARGO-DELETED is true)
THEN:
• The system should exit the index population process without setting any index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with a valid ccn key is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record with a valid CCN key is being processed
Applied to: Set CCN Key Index Fields
Action: The cargo is not deleted and index population is required
Logic Flow:
IF A cargo record with a valid CCN key is being processed
AND The cargo is not deleted and index population is required
THEN:
• The system should copy the CCN key to RT071, RT072, and RT073 index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with a valid ccn key is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record with a valid CCN key is being processed
Applied to: Set CCN Key Index Fields
Action: Index fields need to be populated for the cargo record
Logic Flow:
IF A cargo record with a valid CCN key is being processed
AND Index fields need to be populated for the cargo record
THEN:
• The system should copy the CCN key to car ID index (RT071), waybill index (RT072), and car-waybill index (RT073) fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with a valid ccn key is being processed.
Trigger Criteria:
Context: A cargo record with a valid CCN key is being processed
Applied to: Set Manifest Index with CCN Key
Action: Manifest index field needs to be populated
Logic Flow:
IF A cargo record with a valid CCN key is being processed
AND Manifest index field needs to be populated
THEN:
• The system should move the CCN key value to the manifest index field (RT075)
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being processed for index population. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record is being processed for index population
Applied to: Set Destination CCN Key
Action: The destination index field (GCUSRT-RT076-DEST-INDEX) is not empty
Logic Flow:
IF A cargo record is being processed for index population
AND The destination index field (GCUSRT-RT076-DEST-INDEX) is not empty
THEN:
• The system should copy the CCN key to the destination CCN key index field (GCUSRT-RT076-US-CCN-KEY-INDEX)
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being processed for index population. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record is being processed for index population
Applied to: Set Manifest Index
Action: The manifest index field needs to be populated
Logic Flow:
IF A cargo record is being processed for index population
AND The manifest index field needs to be populated
THEN:
• The system should copy the CCN key to the manifest index field (GCUSRT-RT075-MANIF-INDEX)
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record contains equipment car information. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record contains equipment car information
Applied to: Populate Car ID Index & Extract Car ID from Equipment Field
Action: Index fields are being populated
Logic Flow:
IF A cargo record contains equipment car information
AND Index fields are being populated
THEN:
• The system should copy the equipment car number to the car ID index field
• The system should move the equipment car value to both the car ID number index (RT071) and car-waybill index (RT073) fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record contains transportation information including road number, station number, waybill number, and waybill date. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record contains transportation information including road number, station number, waybill number, and waybill date
Applied to: Populate Waybill Index Fields
Action: Index fields are being populated
Logic Flow:
IF A cargo record contains transportation information including road number, station number, waybill number, and waybill date
AND Index fields are being populated
THEN:
• The system should copy road number to road index, station number to station index, waybill number to waybill index, and waybill date to date index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill and car information has been populated in their respective index fields. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Waybill and car information has been populated in their respective index fields
Applied to: Set Waybill Cross-Reference
Action: Cross-reference indexes are being established
Logic Flow:
IF Waybill and car information has been populated in their respective index fields
AND Cross-reference indexes are being established
THEN:
• The system should copy the waybill number to the cross-reference waybill index and the equipment car to the cross-reference car ID index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being processed for bond index population.
Trigger Criteria:
Context: A cargo record is being processed for bond index population
Applied to: Use Bond Control Number
Action: The in-bond control number field (GCUSRT-M1206-IN-BOND-CTRL-NUM) is not empty
Logic Flow:
IF A cargo record is being processed for bond index population
AND The in-bond control number field (GCUSRT-M1206-IN-BOND-CTRL-NUM) is not empty
THEN:
• The system should use the in-bond control number as the bond number index value
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being processed for bond index population.
Trigger Criteria:
Context: A cargo record is being processed for bond index population
Applied to: Clear Bond Index
Action: Both the in-bond control number and entry number fields are empty
Logic Flow:
IF A cargo record is being processed for bond index population
AND Both the in-bond control number and entry number fields are empty
THEN:
• The system should set the bond number index field to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being processed for bond index population.
Trigger Criteria:
Context: A cargo record is being processed for bond index population
Applied to: In-Bond Control Number Exists?, Use In-Bond Control Number for Bond Index, Entry Number Exists?, Use Entry Number for Bond Index, Clear Bond Index
Action: The system evaluates available bond-related identifiers
Logic Flow:
IF A cargo record is being processed for bond index population
AND The system evaluates available bond-related identifiers
THEN:
• If in-bond control number exists, use it for bond index; otherwiseif entry number exists, use entry number for bond index; otherwise clear the bond index to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has no in-bond control number but contains an entry number.
Trigger Criteria:
Context: A cargo record has no in-bond control number but contains an entry number
Applied to: Use Entry Number
Action: The in-bond control number is empty and the entry number field (GCUSRT-M1202-ENTRY-NUM) is not empty
Logic Flow:
IF A cargo record has no in-bond control number but contains an entry number
AND The in-bond control number is empty and the entry number field (GCUSRT-M1202-ENTRY-NUM) is not empty
THEN:
• The system should use the entry number as the bond number index value
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record is being processed for index field updates.
Trigger Criteria:
Context: A cargo record is being processed for index field updates
Applied to: Is Cargo Deleted?
Action: The cargo status indicates it has been deleted (88-GCUSRT-RT10-CPCARGO-DELETED is true)
Logic Flow:
IF A cargo record is being processed for index field updates
AND The cargo status indicates it has been deleted (88-GCUSRT-RT10-CPCARGO-DELETED is true)
THEN:
• The system should skip all index field population and exit the process immediately
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record contains waybill information with road number, station number, waybill number, and waybill date.
Trigger Criteria:
Context: A cargo record contains waybill information with road number, station number, waybill number, and waybill date
Applied to: Extract Road Number from Waybill, Extract Station Number from Waybill, Extract Waybill Number, Extract Waybill Date
Action: Index fields are being populated
Logic Flow:
IF A cargo record contains waybill information with road number, station number, waybill number, and waybill date
AND Index fields are being populated
THEN:
• The system should extract and populate road index, station index, waybill index, and waybill date index fields from the waybill data
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill number index has been populated from waybill data. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Waybill number index has been populated from waybill data
Applied to: Populate Car-Waybill Index
Action: Car-waybill index needs to be created
Logic Flow:
IF Waybill number index has been populated from waybill data
AND Car-waybill index needs to be created
THEN:
• The system should copy the waybill number index value to the car-waybill index field (RT073)
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed for destination index population.
Trigger Criteria:
Context: A cargo record is being processed for destination index population
Applied to: Update Destination Index if Present
Action: The destination index field (RT076-DEST-INDEX) is not equal to spaces
Logic Flow:
IF A cargo record is being processed for destination index population
AND The destination index field (RT076-DEST-INDEX) is not equal to spaces
THEN:
• The system should move the CCN key to the destination index CCN key field (RT076-US-CCN-KEY-INDEX)
R-GCCUSIO-cbl-00236 (+1)File: GCCUSIO.cblBusiness Rule: Set Creation Audit Trail
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being inserted and the creation timestamp field is empty (spaces).
Trigger Criteria:
Context: A cargo record is being inserted and the creation timestamp field is empty (spaces)
Applied to: Creation Timestamp Already Exists?
Action: The system processes the cargo record insertion
Logic Flow:
IF A cargo record is being inserted and the creation timestamp field is empty (spaces)
AND The system processes the cargo record insertion
THEN:
• The system sets creation century from current system century, creation date from current system date, creation time from current system time, creation terminal from originating terminal, creation user ID from ACF2 user ID, and copies all creation information to last modify fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being inserted and the creation timestamp field contains existing data (not spaces).
Trigger Criteria:
Context: A cargo record is being inserted and the creation timestamp field contains existing data (not spaces)
Applied to: Creation Timestamp Already Exists?
Action: The system processes the cargo record insertion
Logic Flow:
IF A cargo record is being inserted and the creation timestamp field contains existing data (not spaces)
AND The system processes the cargo record insertion
THEN:
• The system preserves existing creation information and only updates last modify century from current system century, last modify date from current system date, last modify time from current system time, last modify terminal from originating terminal, and last modify user ID from ACF2 user ID
R-GCCUSIO-cbl-00246 (+3)File: GCCUSIO.cblBusiness Rule: Populate Car ID Index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed for car id index population.
Trigger Criteria:
Context: A cargo record is being processed for car ID index population
Applied to: Is Cargo Record Deleted?
Action: The cargo record has deletion status flag set to true (88-GCUSRT-RT10-CPCARGO-DELETED)
Logic Flow:
IF A cargo record is being processed for car ID index population
AND The cargo record has deletion status flag set to true (88-GCUSRT-RT10-CPCARGO-DELETED)
THEN:
• The system skips all car ID index field population and exits the process immediately
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is active and not marked as deleted.
Trigger Criteria:
Context: A cargo record is active and not marked as deleted
Applied to: Extract Equipment Car Information
Action: The system processes the record for car ID index population
Logic Flow:
IF A cargo record is active and not marked as deleted
AND The system processes the record for car ID index population
THEN:
• The system extracts the equipment car information from field GCUSRT-RT081-EQUIPMENT-CAR for use in index population
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment car information has been extracted from an active cargo record.
Trigger Criteria:
Context: Equipment car information has been extracted from an active cargo record
Applied to: Set Car ID Number Index Field
Action: The system populates car ID index fields
Logic Flow:
IF Equipment car information has been extracted from an active cargo record
AND The system populates car ID index fields
THEN:
• The equipment car value is moved to the primary car ID number index field GCUSRT-RT071-CAR-ID-NUM-INDEX
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when primary car id number index has been populated with equipment car information.
Trigger Criteria:
Context: The primary car ID number index has been populated with equipment car information
Applied to: Update Car-Waybill Combined Index
Action: The system updates combined index fields
Logic Flow:
IF The primary car ID number index has been populated with equipment car information
AND The system updates combined index fields
THEN:
• The equipment car value is also moved to the car-waybill combined index field GCUSRT-RT073-CAR-ID-NUM-INDEX
R-GCCUSIO-cbl-00255 (+3)File: GCCUSIO.cblBusiness Rule: Populate Bond Index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record is being processed for bond index population.
Trigger Criteria:
Context: A cargo record is being processed for bond index population
Applied to: Is Cargo Deleted?
Action: The cargo status indicates it has been deleted (88-GCUSRT-RT10-CPCARGO-DELETED is true)
Logic Flow:
IF A cargo record is being processed for bond index population
AND The cargo status indicates it has been deleted (88-GCUSRT-RT10-CPCARGO-DELETED is true)
THEN:
• The bond index population process should be skipped and control should exit immediately
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record requires bond index population and the cargo is not deleted.
Trigger Criteria:
Context: A cargo record requires bond index population and the cargo is not deleted
Applied to: In-Bond Control Number Available?
Action: The in-bond control number field (GCUSRT-M1206-IN-BOND-CTRL-NUM) contains a value other than spaces
Logic Flow:
IF A cargo record requires bond index population and the cargo is not deleted
AND The in-bond control number field (GCUSRT-M1206-IN-BOND-CTRL-NUM) contains a value other than spaces
THEN:
• The in-bond control number should be used to populate the bond number index field (GCUSRT-RT074-BOND-NUM-INDEX)
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record requires bond index population, the cargo is not deleted, and the in-bond control number is spaces.
Trigger Criteria:
Context: A cargo record requires bond index population, the cargo is not deleted, and the in-bond control number is spaces
Applied to: Entry Number Available?
Action: The entry number field (GCUSRT-M1202-ENTRY-NUM) contains a value other than spaces
Logic Flow:
IF A cargo record requires bond index population, the cargo is not deleted, and the in-bond control number is spaces
AND The entry number field (GCUSRT-M1202-ENTRY-NUM) contains a value other than spaces
THEN:
• The entry number should be used to populate the bond number index field (GCUSRT-RT074-BOND-NUM-INDEX)
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record requires bond index population, the cargo is not deleted, the in-bond control number is spaces, and the entry number is spaces.
Trigger Criteria:
Context: A cargo record requires bond index population, the cargo is not deleted, the in-bond control number is spaces, and the entry number is spaces
Applied to: Set Bond Index to Spaces
Action: No valid bond identification numbers are available
Logic Flow:
IF A cargo record requires bond index population, the cargo is not deleted, the in-bond control number is spaces, and the entry number is spaces
AND No valid bond identification numbers are available
THEN:
• The bond number index field (GCUSRT-RT074-BOND-NUM-INDEX) should be set to spaces
R-GCCUSIO-cbl-00259 (+4)File: GCCUSIO.cblBusiness Rule: Execute Car ID Search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with car identification number in the car id index field.
Trigger Criteria:
Context: A cargo record exists with car identification number in the car ID index field
Applied to: Set Car ID Index Value
Action: Car ID search is initiated
Logic Flow:
IF A cargo record exists with car identification number in the car ID index field
AND Car ID search is initiated
THEN:
• The car identification number from the cargo record is mapped to the search key value
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when search operator is specified in the input parameters.
Trigger Criteria:
Context: A search operator is specified in the input parameters
Applied to: Set Search Operator
Action: Car ID search is being configured
Logic Flow:
IF A search operator is specified in the input parameters
AND Car ID search is being configured
THEN:
• The input search operator is applied to the car ID search criteria
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when car id index search is being performed.
Trigger Criteria:
Context: Car ID index search is being performed
Applied to: Configure Car ID PCB
Action: Database path needs to be configured
Logic Flow:
IF Car ID index search is being performed
AND Database path needs to be configured
THEN:
• The secondary PCB for car ID index is selected as the working database path
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when car id search key and operator are configured.
Trigger Criteria:
Context: Car ID search key and operator are configured
Applied to: Build Qualified SSA
Action: Database search statement needs to be built
Logic Flow:
IF Car ID search key and operator are configured
AND Database search statement needs to be built
THEN:
• A qualified SSA is constructed using the car ID search criteria
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when car id search statement and database path are configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Car ID search statement and database path are configured
Applied to: Execute Database Call
Action: Car ID search is executed
Logic Flow:
IF Car ID search statement and database path are configured
AND Car ID search is executed
THEN:
• Database call is performed using the configured function code, PCB, data area, and search statement
Business Justification: Establishes the required business protocol to be followed when waybill search request is initiated with gcwusio-index-waybill condition.
Trigger Criteria:
Context: A waybill search request is initiated with GCWUSIO-INDEX-WAYBILL condition
Applied to: Set Waybill Search Parameters
Action: The system processes the waybill index search request
Logic Flow:
IF A waybill search request is initiated with GCWUSIO-INDEX-WAYBILL condition
AND The system processes the waybill index search request
THEN:
• The system sets PCB3 as the database control block and extracts waybill index value from GCUSRT-RT072-WAYBILL-INDEX to GCUW-KEY-VALUE for search processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when waybill search is being configured with search parameters.
Trigger Criteria:
Context: A waybill search is being configured with search parameters
Applied to: Set Search Operator
Action: The system assigns the search operator
Logic Flow:
IF A waybill search is being configured with search parameters
AND The system assigns the search operator
THEN:
• The system copies the operator from GCWUSIO-OPERATOR to GCUW-OPERATOR for waybill comparison logic
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill search parameters including key value and operator are configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Waybill search parameters including key value and operator are configured
Applied to: Build Qualified Search Statement
Action: The system constructs the database search statement
Logic Flow:
IF Waybill search parameters including key value and operator are configured
AND The system constructs the database search statement
THEN:
• The system assigns GCUW-SSA-QUAL to WS-SSA-1 to create a qualified search statement for waybill-based cargo lookup
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when qualified search statement is constructed with waybill parameters and pcb3 is set as the database control block. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A qualified search statement is constructed with waybill parameters and PCB3 is set as the database control block
Applied to: Execute Database Search
Action: The system executes the database search via X1100-CALL-ONE-SSA
Logic Flow:
IF A qualified search statement is constructed with waybill parameters and PCB3 is set as the database control block
AND The system executes the database search via X1100-CALL-ONE-SSA
THEN:
• The system performs the database call using CIMS with the function code, PCB, IO area, and SSA to retrieve matching cargo records
R-GCCUSIO-cbl-00268 (+4)File: GCCUSIO.cblBusiness Rule: Execute Car
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when car-waybill search request is initiated.
Trigger Criteria:
Context: A car-waybill search request is initiated
Applied to: Car-Waybill Index Available?
Action: The car-waybill index field is checked for content
Logic Flow:
IF A car-waybill search request is initiated
AND The car-waybill index field is checked for content
THEN:
• If index contains data, qualified search is prepared; if index is empty or spaces, unqualified search is prepared
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when car-waybill index contains valid data.
Trigger Criteria:
Context: Car-waybill index contains valid data
Applied to: Build Qualified Search with Car-Waybill Key
Action: Qualified search is being configured
Logic Flow:
IF Car-waybill index contains valid data
AND Qualified search is being configured
THEN:
• Car-waybill index value is moved to search key and qualified SSA is set for precise record matching
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when car-waybill index is empty or contains only spaces.
Trigger Criteria:
Context: Car-waybill index is empty or contains only spaces
Applied to: Build Unqualified Search
Action: Unqualified search is being configured
Logic Flow:
IF Car-waybill index is empty or contains only spaces
AND Unqualified search is being configured
THEN:
• Search key is set to spaces and unqualified SSA is set to retrieve all records
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when car-waybill search parameters are being configured.
Trigger Criteria:
Context: Car-waybill search parameters are being configured
Applied to: Set Search Operator
Action: Search operator needs to be set
Logic Flow:
IF Car-waybill search parameters are being configured
AND Search operator needs to be set
THEN:
• The operator from the request is assigned to the car-waybill search operator field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when car-waybill search parameters are configured with pcb4 and appropriate ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Car-waybill search parameters are configured with PCB4 and appropriate SSA
Applied to: Execute Database Search on Car-Waybill Index
Action: Database search is executed
Logic Flow:
IF Car-waybill search parameters are configured with PCB4 and appropriate SSA
AND Database search is executed
THEN:
• System performs database call using the configured search criteria to retrieve cargo records via car-waybill index
R-GCCUSIO-cbl-00273 (+4)File: GCCUSIO.cblBusiness Rule: Execute Bond Search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo search request is initiated using bond control number index.
Trigger Criteria:
Context: A cargo search request is initiated using bond control number index
Applied to: Bond Index Available?
Action: The system checks if bond index field contains data
Logic Flow:
IF A cargo search request is initiated using bond control number index
AND The system checks if bond index field contains data
THEN:
• If bond index is not empty, use qualified search with bond number, otherwise use unqualified search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when bond index field contains a valid bond control number. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Bond index field contains a valid bond control number
Applied to: Set Bond Search Parameters
Action: Setting up bond search parameters
Logic Flow:
IF Bond index field contains a valid bond control number
AND Setting up bond search parameters
THEN:
• Copy bond index value to search key and set operator from request parameters
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when bond index contains a valid bond control number and search parameters are set.
Trigger Criteria:
Context: Bond index contains a valid bond control number and search parameters are set
Applied to: Build Qualified SSA with Bond Number
Action: Building search argument for bond index query
Logic Flow:
IF Bond index contains a valid bond control number and search parameters are set
AND Building search argument for bond index query
THEN:
• Create qualified SSA using bond key value and set PCB5 as the search control block
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when bond index field is empty or contains spaces.
Trigger Criteria:
Context: Bond index field is empty or contains spaces
Applied to: Build Unqualified SSA
Action: Building search argument for bond index query
Logic Flow:
IF Bond index field is empty or contains spaces
AND Building search argument for bond index query
THEN:
• Create unqualified SSA with empty key value and set PCB5 as the search control block
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when search arguments are constructed and pcb5 is set for bond index access. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Search arguments are constructed and PCB5 is set for bond index access
Applied to: Execute Bond Index Search
Action: Executing the bond index search operation
Logic Flow:
IF Search arguments are constructed and PCB5 is set for bond index access
AND Executing the bond index search operation
THEN:
• Call database interface using function code, PCB5, data area, and constructed SSA
R-GCCUSIO-cbl-00278 (+17)File: GCCUSIO.cblBusiness Rule: Execute Error Index Search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo search request with error index specification.
Trigger Criteria:
Context: A cargo search request with error index specification
Applied to: Error Index Type?
Action: The system evaluates the error index type from the request parameters
Logic Flow:
IF A cargo search request with error index specification
AND The system evaluates the error index type from the request parameters
THEN:
• The system routes to the appropriate error index search path (origin, border, or destination error index)
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when origin error index search is requested.
Trigger Criteria:
Context: An origin error index search is requested
Applied to: Set Origin Error Search Parameters
Action: The system prepares to search by origin error index
Logic Flow:
IF An origin error index search is requested
AND The system prepares to search by origin error index
THEN:
• The system sets error code to 'E', maps origin station number to error origin key, and sets cargo CCN as the error origin cargo key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when border error index search is requested.
Trigger Criteria:
Context: A border error index search is requested
Applied to: Set Border Error Search Parameters
Action: The system prepares to search by border error index
Logic Flow:
IF A border error index search is requested
AND The system prepares to search by border error index
THEN:
• The system sets error code to 'E', retrieves border station number from MC table lookup using location ID, and sets cargo CCN as the error border cargo key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when destination error index search is requested.
Trigger Criteria:
Context: A destination error index search is requested
Applied to: Set Destination Error Search Parameters
Action: The system prepares to search by destination error index
Logic Flow:
IF A destination error index search is requested
AND The system prepares to search by destination error index
THEN:
• The system sets error code to 'E', maps destination station number to error destination key, and sets cargo CCN as the error destination cargo key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when origin error search parameters are configured.
Trigger Criteria:
Context: Origin error search parameters are configured
Applied to: Search GCSB1RT by Origin Error Index
Action: The system executes search against GCSB1RT table using origin error index
Logic Flow:
IF Origin error search parameters are configured
AND The system executes search against GCSB1RT table using origin error index
THEN:
• The system attempts to retrieve cargo status record matching the origin error criteria using qualified SSA
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when border error search parameters are configured.
Trigger Criteria:
Context: Border error search parameters are configured
Applied to: Search GCSB1RT by Border Error Index
Action: The system executes search against GCSB1RT table using border error index
Logic Flow:
IF Border error search parameters are configured
AND The system executes search against GCSB1RT table using border error index
THEN:
• The system attempts to retrieve cargo status record matching the border error criteria using qualified SSA
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when destination error search parameters are configured.
Trigger Criteria:
Context: Destination error search parameters are configured
Applied to: Search GCSB1RT by Destination Error Index
Action: The system executes search against GCSB1RT table using destination error index
Logic Flow:
IF Destination error search parameters are configured
AND The system executes search against GCSB1RT table using destination error index
THEN:
• The system attempts to retrieve cargo status record matching the destination error criteria using qualified SSA
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when search for origin error record has been executed.
Trigger Criteria:
Context: A search for origin error record has been executed
Applied to: Origin Error Record Found?
Action: The system checks the database operation status code
Logic Flow:
IF A search for origin error record has been executed
AND The system checks the database operation status code
THEN:
• If status code is spaces then record is found, otherwise no record found
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when search for border error record has been executed.
Trigger Criteria:
Context: A search for border error record has been executed
Applied to: Border Error Record Found?
Action: The system checks the database operation status code
Logic Flow:
IF A search for border error record has been executed
AND The system checks the database operation status code
THEN:
• If status code is spaces then record is found, otherwise no record found
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when search for destination error record has been executed.
Trigger Criteria:
Context: A search for destination error record has been executed
Applied to: Destination Error Record Found?
Action: The system checks the database operation status code
Logic Flow:
IF A search for destination error record has been executed
AND The system checks the database operation status code
THEN:
• If status code is spaces then record is found, otherwise no record found
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when origin error status record has been found with cargo ccn key.
Trigger Criteria:
Context: An origin error status record has been found with cargo CCN key
Applied to: Retrieve Associated Cargo Record
Action: The system attempts to retrieve the associated main cargo record
Logic Flow:
IF An origin error status record has been found with cargo CCN key
AND The system attempts to retrieve the associated main cargo record
THEN:
• The system searches GCSUSRT table using the cargo CCN key from the error status record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when border error status record has been found with cargo ccn key.
Trigger Criteria:
Context: A border error status record has been found with cargo CCN key
Applied to: Retrieve Associated Cargo Record
Action: The system attempts to retrieve the associated main cargo record
Logic Flow:
IF A border error status record has been found with cargo CCN key
AND The system attempts to retrieve the associated main cargo record
THEN:
• The system searches GCSUSRT table using the cargo CCN key from the error status record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when destination error status record has been found with cargo ccn key.
Trigger Criteria:
Context: A destination error status record has been found with cargo CCN key
Applied to: Retrieve Associated Cargo Record
Action: The system attempts to retrieve the associated main cargo record
Logic Flow:
IF A destination error status record has been found with cargo CCN key
AND The system attempts to retrieve the associated main cargo record
THEN:
• The system searches GCSUSRT table using the cargo CCN key from the error status record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when retrieval attempt for main cargo record associated with origin error has been made.
Trigger Criteria:
Context: A retrieval attempt for main cargo record associated with origin error has been made
Applied to: Cargo Record Exists?
Action: The system checks if the cargo record retrieval was successful
Logic Flow:
IF A retrieval attempt for main cargo record associated with origin error has been made
AND The system checks if the cargo record retrieval was successful
THEN:
• If status code is spaces then cargo record exists, otherwise cargo record does not exist indicating data inconsistency
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when retrieval attempt for main cargo record associated with border error has been made.
Trigger Criteria:
Context: A retrieval attempt for main cargo record associated with border error has been made
Applied to: Cargo Record Exists?
Action: The system checks if the cargo record retrieval was successful
Logic Flow:
IF A retrieval attempt for main cargo record associated with border error has been made
AND The system checks if the cargo record retrieval was successful
THEN:
• If status code is spaces then cargo record exists, otherwise cargo record does not exist indicating data inconsistency
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when retrieval attempt for main cargo record associated with destination error has been made.
Trigger Criteria:
Context: A retrieval attempt for main cargo record associated with destination error has been made
Applied to: Cargo Record Exists?
Action: The system checks if the cargo record retrieval was successful
Logic Flow:
IF A retrieval attempt for main cargo record associated with destination error has been made
AND The system checks if the cargo record retrieval was successful
THEN:
• If status code is spaces then cargo record exists, otherwise cargo record does not exist indicating data inconsistency
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when error status record exists in gcsb1rt but the associated cargo record does not exist in gcsusrt.
Trigger Criteria:
Context: An error status record exists in GCSB1RT but the associated cargo record does not exist in GCSUSRT
Applied to: Log Index Inconsistency Error
Action: The system detects this data inconsistency condition
Logic Flow:
IF An error status record exists in GCSB1RT but the associated cargo record does not exist in GCSUSRT
AND The system detects this data inconsistency condition
THEN:
• The system logs error message 'GCSB1RT EXIST WITHOUT GCSUSRT' and calls error handling routine
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been successfully found through error index search and validated for existence.
Trigger Criteria:
Context: A cargo record has been successfully found through error index search and validated for existence
Applied to: Return Cargo Record Data
Action: The system completes the error index search process
Logic Flow:
IF A cargo record has been successfully found through error index search and validated for existence
AND The system completes the error index search process
THEN:
• The system returns the cargo record data in the IO area for further processing
R-GCCUSIO-cbl-00296 (+8)File: GCCUSIO.cblBusiness Rule: Execute Hold Index Search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when hold index search request is initiated.
Trigger Criteria:
Context: A hold index search request is initiated
Applied to: Hold Index Type?
Action: The system evaluates the index type specified in GCWUSIO-INDEX-HELD-DEST or GCWUSIO-INDEX-HELD-BORDER
Logic Flow:
IF A hold index search request is initiated
AND The system evaluates the index type specified in GCWUSIO-INDEX-HELD-DEST or GCWUSIO-INDEX-HELD-BORDER
THEN:
• The system routes to the appropriate hold index search processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when index type is held destination (gcwusio-index-held-dest is true).
Trigger Criteria:
Context: The index type is held destination (GCWUSIO-INDEX-HELD-DEST is true)
Applied to: Search Held Destination Index
Action: The system processes the held destination index search
Logic Flow:
IF The index type is held destination (GCWUSIO-INDEX-HELD-DEST is true)
AND The system processes the held destination index search
THEN:
• The system retrieves GCSB1RT record using held destination key and cargo key from the index, then calls CIMS to access the held destination index database
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when index type is held border (gcwusio-index-held-border is true).
Trigger Criteria:
Context: The index type is held border (GCWUSIO-INDEX-HELD-BORDER is true)
Applied to: Search Held Border Index
Action: The system processes the held border index search
Logic Flow:
IF The index type is held border (GCWUSIO-INDEX-HELD-BORDER is true)
AND The system processes the held border index search
THEN:
• The system retrieves GCSB1RT record using held border key and cargo key from the index, then calls CIMS to access the held border index database
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when hold index search is being performed with valid index keys.
Trigger Criteria:
Context: A hold index search is being performed with valid index keys
Applied to: Retrieve GCSB1RT Index Record
Action: The system calls CIMS with the function code, PCB, GCSB1RT record, and qualified SSA
Logic Flow:
IF A hold index search is being performed with valid index keys
AND The system calls CIMS with the function code, PCB, GCSB1RT record, and qualified SSA
THEN:
• The system retrieves the GCSB1RT index record from the database and the status code indicates success or failure
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when gcsb1rt index record has been successfully retrieved.
Trigger Criteria:
Context: A GCSB1RT index record has been successfully retrieved
Applied to: Extract Cargo Key from Index
Action: The system processes the index record
Logic Flow:
IF A GCSB1RT index record has been successfully retrieved
AND The system processes the index record
THEN:
• The system extracts the cargo key (GCB1-KEY-CARGO) from the index record and prepares it for primary cargo record retrieval
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo key has been extracted from the gcsb1rt index record.
Trigger Criteria:
Context: A cargo key has been extracted from the GCSB1RT index record
Applied to: Retrieve Primary Cargo Record
Action: The system sets the function code to GU (Get Unique) and calls X1100-CALL-ONE-SSA with the cargo key
Logic Flow:
IF A cargo key has been extracted from the GCSB1RT index record
AND The system sets the function code to GU (Get Unique) and calls X1100-CALL-ONE-SSA with the cargo key
THEN:
• The system attempts to retrieve the primary GCSUSRT cargo record using the extracted key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when attempt to retrieve the primary cargo record has been made.
Trigger Criteria:
Context: An attempt to retrieve the primary cargo record has been made
Applied to: Primary Record Found?
Action: The system checks the status code after the retrieval attempt
Logic Flow:
IF An attempt to retrieve the primary cargo record has been made
AND The system checks the status code after the retrieval attempt
THEN:
• If status code is spaces then primary record is found, otherwise primary record is not found
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when primary cargo record has been successfully retrieved (status code is spaces).
Trigger Criteria:
Context: The primary cargo record has been successfully retrieved (status code is spaces)
Applied to: Return Cargo Data
Action: The hold index search completes successfully
Logic Flow:
IF The primary cargo record has been successfully retrieved (status code is spaces)
AND The hold index search completes successfully
THEN:
• The system returns the retrieved cargo data to the calling process
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when gcsb1rt index record exists but the corresponding primary cargo record is not found (status code is not spaces).
Trigger Criteria:
Context: A GCSB1RT index record exists but the corresponding primary cargo record is not found (status code is not spaces)
Applied to: Log Index Inconsistency Error
Action: The system detects this index inconsistency
Logic Flow:
IF A GCSB1RT index record exists but the corresponding primary cargo record is not found (status code is not spaces)
AND The system detects this index inconsistency
THEN:
• The system sets error message to 'GCSB1RT EXIST WITHOUT GCSUSRT' and calls CERR error handling program
R-GCCUSIO-cbl-00305 (+4)File: GCCUSIO.cblBusiness Rule: Populate Origin Error Index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when system is processing error fields for origin station cargo processing.
Trigger Criteria:
Context: The system is processing error fields for origin station cargo processing
Applied to: Set Error Code to 'E'
Action: The origin error index needs to be populated
Logic Flow:
IF The system is processing error fields for origin station cargo processing
AND The origin error index needs to be populated
THEN:
• The error code for origin station must be set to 'E'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with origin station information.
Trigger Criteria:
Context: A cargo record exists with origin station information
Applied to: Extract Origin Station Number
Action: Processing error conditions for the origin station
Logic Flow:
IF A cargo record exists with origin station information
AND Processing error conditions for the origin station
THEN:
• The origin station number must be extracted from the cargo record field RT28-ORIG-STN-NUM
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when origin station number has been extracted from the cargo record.
Trigger Criteria:
Context: The origin station number has been extracted from the cargo record
Applied to: Set Origin Error Index Key
Action: Building the error index for origin station processing
Logic Flow:
IF The origin station number has been extracted from the cargo record
AND Building the error index for origin station processing
THEN:
• The origin error index key must be set to the extracted origin station number
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record exists with a unique ccn key identifier.
Trigger Criteria:
Context: A cargo record exists with a unique CCN key identifier
Applied to: Extract Cargo CCN Key
Action: Processing error conditions that need to be linked to specific cargo
Logic Flow:
IF A cargo record exists with a unique CCN key identifier
AND Processing error conditions that need to be linked to specific cargo
THEN:
• The cargo CCN key must be extracted from the cargo record US-CCN-KEY field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo ccn key has been extracted from the cargo record.
Trigger Criteria:
Context: The cargo CCN key has been extracted from the cargo record
Applied to: Set Origin Error Cargo Key
Action: Building the error index that links errors to specific cargo
Logic Flow:
IF The cargo CCN key has been extracted from the cargo record
AND Building the error index that links errors to specific cargo
THEN:
• The origin error cargo key must be set to the extracted cargo CCN key
R-GCCUSIO-cbl-00310 (+7)File: GCCUSIO.cblBusiness Rule: Get Border Station from MC Table
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when request to retrieve border station information from mc table.
Trigger Criteria:
Context: A request to retrieve border station information from MC table
Applied to: Initialize Table Request Parameters
Action: The system prepares for table lookup
Logic Flow:
IF A request to retrieve border station information from MC table
AND The system prepares for table lookup
THEN:
• All table request parameters are cleared and initialized to spaces, and PCB flags are reset
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when table lookup request is being prepared.
Trigger Criteria:
Context: A table lookup request is being prepared
Applied to: Set Function Code to 'GU'
Action: The system configures the database operation type
Logic Flow:
IF A table lookup request is being prepared
AND The system configures the database operation type
THEN:
• The function code is set to 'GU' for Get Unique operation
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when table lookup request for border station information.
Trigger Criteria:
Context: A table lookup request for border station information
Applied to: Set Table ID to 'MC'
Action: The system identifies which table to query
Logic Flow:
IF A table lookup request for border station information
AND The system identifies which table to query
THEN:
• The table ID is set to 'MC' to target the MC table
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with location id information.
Trigger Criteria:
Context: A cargo record with location ID information
Applied to: Set Location ID from Cargo Record
Action: The system prepares the MC table lookup key
Logic Flow:
IF A cargo record with location ID information
AND The system prepares the MC table lookup key
THEN:
• The location ID from the cargo record is used as the sequence ID for table lookup
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when all table lookup parameters are properly configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All table lookup parameters are properly configured
Applied to: Call Table Lookup Service GCCTBIO
Action: The system needs to retrieve MC table data
Logic Flow:
IF All table lookup parameters are properly configured
AND The system needs to retrieve MC table data
THEN:
• The GCCTBIO service is called with the configured parameters to perform the table lookup
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when completed mc table lookup operation.
Trigger Criteria:
Context: A completed MC table lookup operation
Applied to: Table Lookup Successful?
Action: The system evaluates the lookup result
Logic Flow:
IF A completed MC table lookup operation
AND The system evaluates the lookup result
THEN:
• If return flag equals '0' then lookup is successful, otherwise lookup failed
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when successful mc table lookup with retrieved table segment data.
Trigger Criteria:
Context: A successful MC table lookup with retrieved table segment data
Applied to: Extract Border Station Number from MC Segment
Action: The system processes the MC segment information
Logic Flow:
IF A successful MC table lookup with retrieved table segment data
AND The system processes the MC segment information
THEN:
• The border station number is extracted from the MC segment structure
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when successfully extracted border station number from mc table.
Trigger Criteria:
Context: A successfully extracted border station number from MC table
Applied to: Set Border Station in Index Fields
Action: The system updates error index fields
Logic Flow:
IF A successfully extracted border station number from MC table
AND The system updates error index fields
THEN:
• The border station number is assigned to the error border key field
R-GCCUSIO-cbl-00318 (+6)File: GCCUSIO.cblBusiness Rule: Populate Border Error Index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record requires border error index processing.
Trigger Criteria:
Context: A cargo record requires border error index processing
Applied to: Set Error Code to 'E' for Border
Action: The system processes error fields for border station tracking
Logic Flow:
IF A cargo record requires border error index processing
AND The system processes error fields for border station tracking
THEN:
• The border error code is set to 'E' to identify it as an error condition
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record contains location information.
Trigger Criteria:
Context: A cargo record contains location information
Applied to: Get Location ID from Cargo Record
Action: Border error index processing requires station number lookup
Logic Flow:
IF A cargo record contains location information
AND Border error index processing requires station number lookup
THEN:
• The location ID is retrieved from the cargo record RT04 field for table lookup
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when location id is available for border station lookup. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A location ID is available for border station lookup
Applied to: Call MC Table Lookup for Border Station
Action: The system needs to determine the border station number
Logic Flow:
IF A location ID is available for border station lookup
AND The system needs to determine the border station number
THEN:
• The MC table lookup service is called with function code 'GU', table ID 'MC', and the location ID as sequence identifier
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when mc table lookup has been performed for border station information.
Trigger Criteria:
Context: An MC table lookup has been performed for border station information
Applied to: Table Lookup Successful?
Action: The system checks the lookup result
Logic Flow:
IF An MC table lookup has been performed for border station information
AND The system checks the lookup result
THEN:
• If the return flag equals '0', the lookup is considered successful and border station processing continues, otherwise border index processing is skipped
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when mc table lookup has returned successfully with table segment data.
Trigger Criteria:
Context: MC table lookup has returned successfully with table segment data
Applied to: Extract Border Station Number from MC Table
Action: The system processes the returned MC table segment
Logic Flow:
IF MC table lookup has returned successfully with table segment data
AND The system processes the returned MC table segment
THEN:
• The border station number is extracted from the MC segment station number field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when border station number has been successfully retrieved from mc table lookup.
Trigger Criteria:
Context: A border station number has been successfully retrieved from MC table lookup
Applied to: Set Border Error Index Key with Station Number
Action: The system builds the border error index key
Logic Flow:
IF A border station number has been successfully retrieved from MC table lookup
AND The system builds the border error index key
THEN:
• The border error index key is set with the retrieved border station number
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has a valid ccn key and border station number is available.
Trigger Criteria:
Context: A cargo record has a valid CCN key and border station number is available
Applied to: Set Border Error Index Key with Cargo CCN
Action: The system finalizes the border error index key construction
Logic Flow:
IF A cargo record has a valid CCN key and border station number is available
AND The system finalizes the border error index key construction
THEN:
• The cargo CCN key is set as the border error cargo identifier in the index key
R-GCCUSIO-cbl-00325 (+5)File: GCCUSIO.cblBusiness Rule: Populate Destination Error Index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when system is processing destination error index fields for a cargo record.
Trigger Criteria:
Context: The system is processing destination error index fields for a cargo record
Applied to: Set Error Code to 'E'
Action: The destination error index population process is initiated
Logic Flow:
IF The system is processing destination error index fields for a cargo record
AND The destination error index population process is initiated
THEN:
• The destination error code field must be set to 'E'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with destination station information.
Trigger Criteria:
Context: A cargo record exists with destination station information
Applied to: Extract Destination Station Number
Action: The destination error index is being populated
Logic Flow:
IF A cargo record exists with destination station information
AND The destination error index is being populated
THEN:
• The destination station number must be extracted from the cargo record's destination station field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with a valid ccn key.
Trigger Criteria:
Context: A cargo record exists with a valid CCN key
Applied to: Get Cargo CCN Key
Action: The destination error index is being populated
Logic Flow:
IF A cargo record exists with a valid CCN key
AND The destination error index is being populated
THEN:
• The cargo's CCN key must be retrieved from the cargo record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when destination error index is being created or updated.
Trigger Criteria:
Context: The destination error index is being created or updated
Applied to: Set GCB1-KEY-ECODE-DEST = 'E'
Action: The error code field needs to be set
Logic Flow:
IF The destination error index is being created or updated
AND The error code field needs to be set
THEN:
• The GCB1-KEY-ECODE-DEST field must be set to 'E'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when destination station number has been extracted from the cargo record.
Trigger Criteria:
Context: The destination station number has been extracted from the cargo record
Applied to: Set GCB1-KEY-ERROR-DEST = Destination Station Number
Action: The destination error index is being populated
Logic Flow:
IF The destination station number has been extracted from the cargo record
AND The destination error index is being populated
THEN:
• The GCB1-KEY-ERROR-DEST field must be set to the destination station number
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo ccn key has been retrieved from the cargo record.
Trigger Criteria:
Context: The cargo CCN key has been retrieved from the cargo record
Applied to: Set GCB1-KEY-ERROR-DEST-CARGO = CCN Key
Action: The destination error index is being populated
Logic Flow:
IF The cargo CCN key has been retrieved from the cargo record
AND The destination error index is being populated
THEN:
• The GCB1-KEY-ERROR-DEST-CARGO field must be set to the cargo's CCN key
R-GCCUSIO-cbl-00331 (+3)File: GCCUSIO.cblBusiness Rule: Determine Hold Type
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with us cargo status conditions.
Trigger Criteria:
Context: A cargo record with US cargo status conditions
Applied to: Check Cargo Status for Hold Conditions
Action: The cargo status indicates HOLD, HOLDPCS, PR-HPCS, HOLD-D, PR-H-DE, or HOLDFDA
Logic Flow:
IF A cargo record with US cargo status conditions
AND The cargo status indicates HOLD, HOLDPCS, PR-HPCS, HOLD-D, PR-H-DE, or HOLDFDA
THEN:
• The system sets the destination station number as held destination key and the CCN key as held destination cargo key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with us cargo status conditions.
Trigger Criteria:
Context: A cargo record with US cargo status conditions
Applied to: Check Cargo Status for Hold Conditions
Action: The cargo status indicates HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, or HOLDFDA
Logic Flow:
IF A cargo record with US cargo status conditions
AND The cargo status indicates HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, or HOLDFDA
THEN:
• The system initiates MC table lookup to determine the border station information
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record requiring border hold processing with a location id.
Trigger Criteria:
Context: A cargo record requiring border hold processing with a location ID
Applied to: Get Station Information from MC Table
Action: The system performs MC table lookup using the location ID as sequence ID
Logic Flow:
IF A cargo record requiring border hold processing with a location ID
AND The system performs MC table lookup using the location ID as sequence ID
THEN:
• The system retrieves the corresponding station segment information from the MC table
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when successful mc table lookup that returns station information with return flag '0'.
Trigger Criteria:
Context: A successful MC table lookup that returns station information with return flag '0'
Applied to: Set Border Station Number
Action: The station segment contains valid station number information
Logic Flow:
IF A successful MC table lookup that returns station information with return flag '0'
AND The station segment contains valid station number information
THEN:
• The system sets the station number as held border key and the CCN key as held border cargo key
R-GCCUSIO-cbl-00335 (+2)File: GCCUSIO.cblBusiness Rule: Set Destination Hold Index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with various hold status conditions.
Trigger Criteria:
Context: A cargo record with various hold status conditions
Applied to: Check Cargo Hold Status
Action: The system checks for destination hold status types including HOLD, HOLDPCS, PR-HPCS, HOLD-D, PR-H-DE, or HOLDFDA
Logic Flow:
IF A cargo record with various hold status conditions
AND The system checks for destination hold status types including HOLD, HOLDPCS, PR-HPCS, HOLD-D, PR-H-DE, or HOLDFDA
THEN:
• The system identifies whether destination hold index processing is required
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with destination hold status and a destination station number.
Trigger Criteria:
Context: A cargo record with destination hold status and a destination station number
Applied to: Set Destination Hold Index Key
Action: The system processes destination hold index creation
Logic Flow:
IF A cargo record with destination hold status and a destination station number
AND The system processes destination hold index creation
THEN:
• The destination station number is assigned to the destination hold index key field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with destination hold status and a valid ccn key.
Trigger Criteria:
Context: A cargo record with destination hold status and a valid CCN key
Applied to: Set Cargo CCN for Destination Hold
Action: The system creates the destination hold index entry
Logic Flow:
IF A cargo record with destination hold status and a valid CCN key
AND The system creates the destination hold index entry
THEN:
• The cargo CCN key is assigned to the destination hold cargo reference field
R-GCCUSIO-cbl-00338 (+6)File: GCCUSIO.cblBusiness Rule: Set Border Hold Index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with various hold status conditions.
Trigger Criteria:
Context: A cargo record with various hold status conditions
Applied to: Check Cargo Hold Status
Action: The system checks for border hold requirements
Logic Flow:
IF A cargo record with various hold status conditions
AND The system checks for border hold requirements
THEN:
• Border hold processing is triggered only for specific hold status types: HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, or HOLDFDA
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo with confirmed hold status conditions.
Trigger Criteria:
Context: Cargo with confirmed hold status conditions
Applied to: Is Border Hold Status?
Action: The hold status is HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, or HOLDFDA
Logic Flow:
IF Cargo with confirmed hold status conditions
AND The hold status is HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, or HOLDFDA
THEN:
• Border hold index processing is required and MC table lookup is initiated
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo requiring border hold index with location id information.
Trigger Criteria:
Context: Cargo requiring border hold index with location ID information
Applied to: Perform MC Table Lookup
Action: MC table lookup is performed using table ID 'MC' and cargo location ID as sequence ID
Logic Flow:
IF Cargo requiring border hold index with location ID information
AND MC table lookup is performed using table ID 'MC' and cargo location ID as sequence ID
THEN:
• System attempts to retrieve corresponding station information from the MC reference table
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when mc table lookup has been performed for border station information.
Trigger Criteria:
Context: MC table lookup has been performed for border station information
Applied to: Table Lookup Successful?
Action: The table lookup return flag equals '0'
Logic Flow:
IF MC table lookup has been performed for border station information
AND The table lookup return flag equals '0'
THEN:
• The lookup is considered successful and station number extraction proceeds
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when successful mc table lookup with valid table segment data.
Trigger Criteria:
Context: Successful MC table lookup with valid table segment data
Applied to: Extract Station Number from MC Table
Action: Station information is available in the MC table segment
Logic Flow:
IF Successful MC table lookup with valid table segment data
AND Station information is available in the MC table segment
THEN:
• The MC station number is extracted and prepared for border hold index key population
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when valid border station number extracted from mc table.
Trigger Criteria:
Context: Valid border station number extracted from MC table
Applied to: Set Border Hold Index Key
Action: Border hold index requires population
Logic Flow:
IF Valid border station number extracted from MC table
AND Border hold index requires population
THEN:
• The border hold index key is set with the extracted MC station number
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when border hold index key has been populated with station number.
Trigger Criteria:
Context: Border hold index key has been populated with station number
Applied to: Set Border Hold Cargo Key
Action: Cargo CCN key is available for reference
Logic Flow:
IF Border hold index key has been populated with station number
AND Cargo CCN key is available for reference
THEN:
• The border hold cargo key is set with the cargo's US CCN key for cross-reference
R-GCCUSIO-cbl-00345 (+11)File: GCCUSIO.cblBusiness Rule: Retrieve Existing Secondary Record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when secondary cargo data processing request is received.
Trigger Criteria:
Context: A secondary cargo data processing request is received
Applied to: Function Type?
Action: The function code is REPL (Replace) or DLET (Delete)
Logic Flow:
IF A secondary cargo data processing request is received
AND The function code is REPL (Replace) or DLET (Delete)
THEN:
• The system routes to retrieval processing to check for existing records before performing the operation
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when repl or dlet operation is requested for secondary cargo data.
Trigger Criteria:
Context: A REPL or DLET operation is requested for secondary cargo data
Applied to: Set Function to GHU for Retrieval
Action: The system needs to verify record existence
Logic Flow:
IF A REPL or DLET operation is requested for secondary cargo data
AND The system needs to verify record existence
THEN:
• The function code is temporarily changed to GHU (Get Hold Unique) for the existence check
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when secondary record existence check is being performed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A secondary record existence check is being performed
Applied to: Set Accept Status to GE
Action: The system prepares the database call parameters
Logic Flow:
IF A secondary record existence check is being performed
AND The system prepares the database call parameters
THEN:
• The accept status is set to 'GE' to handle both found and not-found scenarios gracefully
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when secondary cargo record needs to be retrieved.
Trigger Criteria:
Context: A secondary cargo record needs to be retrieved
Applied to: Build Secondary SSA with Key
Action: The secondary record key is available and not empty
Logic Flow:
IF A secondary cargo record needs to be retrieved
AND The secondary record key is available and not empty
THEN:
• The system builds a qualified SSA (Segment Search Argument) using the key value for precise record location
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when retrieval parameters are properly configured with function code, pcb, and ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The retrieval parameters are properly configured with function code, PCB, and SSA
Applied to: Call Database with Retrieval Parameters
Action: The database call is executed
Logic Flow:
IF The retrieval parameters are properly configured with function code, PCB, and SSA
AND The database call is executed
THEN:
• The system attempts to retrieve the secondary cargo record and returns the operation status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when database retrieval operation has been completed.
Trigger Criteria:
Context: A database retrieval operation has been completed
Applied to: Record Found?
Action: The status code is empty (spaces)
Logic Flow:
IF A database retrieval operation has been completed
AND The status code is empty (spaces)
THEN:
• The system determines that the record was found and sets the found flag to true
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when database retrieval operation has been completed.
Trigger Criteria:
Context: A database retrieval operation has been completed
Applied to: Set Not Found Flag - No Record
Action: The status code is 'GE' (record not found)
Logic Flow:
IF A database retrieval operation has been completed
AND The status code is 'GE' (record not found)
THEN:
• The system sets the not-found flag and prepares for insert operation if data is provided
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when secondary cargo data has been prepared for processing.
Trigger Criteria:
Context: Secondary cargo data has been prepared for processing
Applied to: Data Content Check
Action: The data content is all spaces, low-values, or underscore characters
Logic Flow:
IF Secondary cargo data has been prepared for processing
AND The data content is all spaces, low-values, or underscore characters
THEN:
• The system treats this as empty data and prepares for delete operation if record exists, or skips operation if record doesn't exist
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when existing secondary cargo record is found and new data contains meaningful content.
Trigger Criteria:
Context: An existing secondary cargo record is found and new data contains meaningful content
Applied to: Prepare for Replace Operation
Action: The operation type is REPL and data is not empty
Logic Flow:
IF An existing secondary cargo record is found and new data contains meaningful content
AND The operation type is REPL and data is not empty
THEN:
• The system prepares to replace the existing record with the new data using REPL function code
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when no existing secondary cargo record is found and new data contains meaningful content.
Trigger Criteria:
Context: No existing secondary cargo record is found and new data contains meaningful content
Applied to: Prepare for Insert Operation
Action: The operation type is REPL and data is not empty
Logic Flow:
IF No existing secondary cargo record is found and new data contains meaningful content
AND The operation type is REPL and data is not empty
THEN:
• The system changes the function code to ISRT to insert a new record with the provided data
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when existing secondary cargo record is found and either new data is empty or delete operation is explicitly requested.
Trigger Criteria:
Context: An existing secondary cargo record is found and either new data is empty or delete operation is explicitly requested
Applied to: Prepare for Delete Operation
Action: The data content is empty (spaces, low-values, or underscores) or function code is DLET
Logic Flow:
IF An existing secondary cargo record is found and either new data is empty or delete operation is explicitly requested
AND The data content is empty (spaces, low-values, or underscores) or function code is DLET
THEN:
• The system prepares to delete the existing record using DLET function code
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when insert operation is requested for secondary cargo data.
Trigger Criteria:
Context: An insert operation is requested for secondary cargo data
Applied to: Continue with Requested Operation
Action: The cargo data is not all spaces, not all low-values, and not all underscore characters
Logic Flow:
IF An insert operation is requested for secondary cargo data
AND The cargo data is not all spaces, not all low-values, and not all underscore characters
THEN:
• The system proceeds with the insert operation using the provided meaningful data
R-GCCUSIO-cbl-00357 (+7)File: GCCUSIO.cblBusiness Rule: Process Secondary Data Validation
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when secondary cargo data is being processed for validation.
Trigger Criteria:
Context: Secondary cargo data is being processed for validation
Applied to: Data = ALL SPACES?
Action: The cargo data content equals all spaces
Logic Flow:
IF Secondary cargo data is being processed for validation
AND The cargo data content equals all spaces
THEN:
• The data should be marked as empty and invalid for processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when secondary cargo data is being processed for validation.
Trigger Criteria:
Context: Secondary cargo data is being processed for validation
Applied to: Mark Data as Valid
Action: The cargo data content does not equal all spaces and does not equal all low-values and does not equal all underscore characters
Logic Flow:
IF Secondary cargo data is being processed for validation
AND The cargo data content does not equal all spaces and does not equal all low-values and does not equal all underscore characters
THEN:
• The data should be marked as valid for processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary cargo data is being processed for validation and does not contain all spaces.
Trigger Criteria:
Context: Secondary cargo data is being processed for validation and does not contain all spaces
Applied to: Data = ALL LOW-VALUES?
Action: The cargo data content equals all low-values
Logic Flow:
IF Secondary cargo data is being processed for validation and does not contain all spaces
AND The cargo data content equals all low-values
THEN:
• The data should be marked as empty and invalid for processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when secondary cargo data is being processed for validation and does not contain all spaces or low-values.
Trigger Criteria:
Context: Secondary cargo data is being processed for validation and does not contain all spaces or low-values
Applied to: Data = ALL Underscores '_'?
Action: The cargo data content equals all underscore characters
Logic Flow:
IF Secondary cargo data is being processed for validation and does not contain all spaces or low-values
AND The cargo data content equals all underscore characters
THEN:
• The data should be marked as empty and invalid for processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when secondary cargo insert operation is requested and the data has been validated as empty or invalid.
Trigger Criteria:
Context: A secondary cargo insert operation is requested and the data has been validated as empty or invalid
Applied to: Skip Insert Operation
Action: The function code is ISRT (Insert)
Logic Flow:
IF A secondary cargo insert operation is requested and the data has been validated as empty or invalid
AND The function code is ISRT (Insert)
THEN:
• The insert operation should be skipped and not executed
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when secondary cargo replace operation is requested and the new data has been validated as empty or invalid.
Trigger Criteria:
Context: A secondary cargo replace operation is requested and the new data has been validated as empty or invalid
Applied to: Execute Delete Operation
Action: The function code is REPL (Replace) and an existing record is found
Logic Flow:
IF A secondary cargo replace operation is requested and the new data has been validated as empty or invalid
AND The function code is REPL (Replace) and an existing record is found
THEN:
• A delete operation should be executed to remove the existing record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when secondary cargo replace operation is requested and the data has been validated as valid.
Trigger Criteria:
Context: A secondary cargo replace operation is requested and the data has been validated as valid
Applied to: Proceed with Replace
Action: The function code is REPL (Replace) and an existing record is found
Logic Flow:
IF A secondary cargo replace operation is requested and the data has been validated as valid
AND The function code is REPL (Replace) and an existing record is found
THEN:
• The replace operation should proceed to update the existing record with the new valid data
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when secondary cargo replace operation is requested and the data has been validated as valid.
Trigger Criteria:
Context: A secondary cargo replace operation is requested and the data has been validated as valid
Applied to: Proceed with Insert
Action: The function code is REPL (Replace) and no existing record is found
Logic Flow:
IF A secondary cargo replace operation is requested and the data has been validated as valid
AND The function code is REPL (Replace) and no existing record is found
THEN:
• An insert operation should be executed to create a new record with the valid data
R-GCCUSIO-cbl-00365 (+4)File: GCCUSIO.cblBusiness Rule: Format Message Data
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when message insert operation is requested with message data containing key and content information.
Trigger Criteria:
Context: A message insert operation is requested with message data containing key and content information
Applied to: Structure Message for Insert/Replace
Action: The system processes the insert operation for GCSA8RT segment
Logic Flow:
IF A message insert operation is requested with message data containing key and content information
AND The system processes the insert operation for GCSA8RT segment
THEN:
• The system extracts the message key from the input, extracts the data content, combines the key and data into a properly structured message segment, and prepares it for database storage
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when message retrieval operation is requested for gcsa8rt segment.
Trigger Criteria:
Context: A message retrieval operation is requested for GCSA8RT segment
Applied to: Extract Data Content from Segment
Action: The system successfully retrieves the message segment from storage
Logic Flow:
IF A message retrieval operation is requested for GCSA8RT segment
AND The system successfully retrieves the message segment from storage
THEN:
• The system extracts the data content from the retrieved segment structure and formats it for return to the calling program
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when message retrieval operation (gu or gn) is requested for gcsa8rt segment.
Trigger Criteria:
Context: A message retrieval operation (GU or GN) is requested for GCSA8RT segment
Applied to: Extract Message Key
Action: The message key is empty or contains only spaces
Logic Flow:
IF A message retrieval operation (GU or GN) is requested for GCSA8RT segment
AND The message key is empty or contains only spaces
THEN:
• The system sets error number '0012' and error message 'GCSA8RT-KEY EQUAL SPACES' to indicate invalid key for retrieval
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when message operation request is received for gcsa8rt segment.
Trigger Criteria:
Context: A message operation request is received for GCSA8RT segment
Applied to: Message Operation Type?
Action: The system evaluates the function code
Logic Flow:
IF A message operation request is received for GCSA8RT segment
AND The system evaluates the function code
THEN:
• The system routes to delete processing for 'DLET', insert processing for 'ISRT', or retrieval processing for 'GU' function codes
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when insert operation is requested for a message segment.
Trigger Criteria:
Context: An insert operation is requested for a message segment
Applied to: Structure Message for Insert/Replace
Action: The system attempts to retrieve the existing message using GHU function
Logic Flow:
IF An insert operation is requested for a message segment
AND The system attempts to retrieve the existing message using GHU function
THEN:
• If the message exists, the system performs a replace operation; if the message does not exist, the system performs an insert operation
R-GCCUSIO-cbl-00370 (+7)File: GCCUSIO.cblBusiness Rule: Retrieve Existing GCSB1RT Record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when request to retrieve an existing gcsb1rt index record.
Trigger Criteria:
Context: A request to retrieve an existing GCSB1RT index record
Applied to: Clear GCSB1RT Work Area
Action: The system begins the retrieval process
Logic Flow:
IF A request to retrieve an existing GCSB1RT index record
AND The system begins the retrieval process
THEN:
• The GCSB1RT work area is cleared to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when primary cargo record with a us ccn key.
Trigger Criteria:
Context: A primary cargo record with a US CCN key
Applied to: Set Cargo Key from Primary Record
Action: The system needs to search for the corresponding GCSB1RT index record
Logic Flow:
IF A primary cargo record with a US CCN key
AND The system needs to search for the corresponding GCSB1RT index record
THEN:
• The US CCN key from the primary record is set as the key value for GCSB1RT search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when request to retrieve a gcsb1rt record from the database.
Trigger Criteria:
Context: A request to retrieve a GCSB1RT record from the database
Applied to: Set Database Status to Accept 'GE'
Action: The system prepares for database access
Logic Flow:
IF A request to retrieve a GCSB1RT record from the database
AND The system prepares for database access
THEN:
• The database accept status is set to 'GE' to handle record not found conditions
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when need to retrieve a gcsb1rt record that may be updated.
Trigger Criteria:
Context: A need to retrieve a GCSB1RT record that may be updated
Applied to: Set Function Code to 'GHU'
Action: The system sets up the database function code
Logic Flow:
IF A need to retrieve a GCSB1RT record that may be updated
AND The system sets up the database function code
THEN:
• The function code is set to 'GHU' to obtain exclusive access to the record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when configured database request with cargo key, function code, and qualified search criteria. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A configured database request with cargo key, function code, and qualified search criteria
Applied to: Call Database with Qualified Search
Action: The system executes the database call
Logic Flow:
IF A configured database request with cargo key, function code, and qualified search criteria
AND The system executes the database call
THEN:
• The database is accessed using CIMS with the specified parameters and qualified search criteria
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when database call response for gcsb1rt record retrieval. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database call response for GCSB1RT record retrieval
Applied to: Record Found?
Action: The system evaluates the database status code
Logic Flow:
IF A database call response for GCSB1RT record retrieval
AND The system evaluates the database status code
THEN:
• If status code equals spaces then record is found, otherwise record is not found
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when successful database retrieval with status code equal to spaces.
Trigger Criteria:
Context: A successful database retrieval with status code equal to spaces
Applied to: Set Found Flag
Action: The system processes the successful retrieval response
Logic Flow:
IF A successful database retrieval with status code equal to spaces
AND The system processes the successful retrieval response
THEN:
• The GCSB1RT found flag is set to true
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when database retrieval with status code not equal to spaces.
Trigger Criteria:
Context: A database retrieval with status code not equal to spaces
Applied to: Set Not Found Flag
Action: The system processes the unsuccessful retrieval response
Logic Flow:
IF A database retrieval with status code not equal to spaces
AND The system processes the unsuccessful retrieval response
THEN:
• The GCSB1RT not found flag is set to true
R-GCCUSIO-cbl-00378 (+19)File: GCCUSIO.cblBusiness Rule: Populate Error Index Fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record requires error index field population.
Trigger Criteria:
Context: A cargo record requires error index field population
Applied to: Set Origin Error Code to 'E'
Action: The system processes origin error information
Logic Flow:
IF A cargo record requires error index field population
AND The system processes origin error information
THEN:
• The origin error code is set to 'E' to indicate an error classification
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record requires error index field population.
Trigger Criteria:
Context: A cargo record requires error index field population
Applied to: Set Border Error Code to 'E'
Action: The system processes border error information
Logic Flow:
IF A cargo record requires error index field population
AND The system processes border error information
THEN:
• The border error code is set to 'E' to indicate an error classification
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record requires error index field population.
Trigger Criteria:
Context: A cargo record requires error index field population
Applied to: Set Destination Error Code to 'E'
Action: The system processes destination error information
Logic Flow:
IF A cargo record requires error index field population
AND The system processes destination error information
THEN:
• The destination error code is set to 'E' to indicate an error classification
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record requires error index field population.
Trigger Criteria:
Context: A cargo record requires error index field population
Applied to: Set Error Code 'E' for Origin Station
Action: The system begins populating error fields for the origin station
Logic Flow:
IF A cargo record requires error index field population
AND The system begins populating error fields for the origin station
THEN:
• The error code 'E' is assigned to the origin station error code field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record requires error index field population.
Trigger Criteria:
Context: A cargo record requires error index field population
Applied to: Set Error Code 'E' for Border Station
Action: The system begins populating error fields for the border station
Logic Flow:
IF A cargo record requires error index field population
AND The system begins populating error fields for the border station
THEN:
• The error code 'E' is assigned to the border station error code field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record requires error index field population.
Trigger Criteria:
Context: A cargo record requires error index field population
Applied to: Set Error Code 'E' for Destination Station
Action: The system begins populating error fields for the destination station
Logic Flow:
IF A cargo record requires error index field population
AND The system begins populating error fields for the destination station
THEN:
• The error code 'E' is assigned to the destination station error code field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record contains origin station information.
Trigger Criteria:
Context: A cargo record contains origin station information
Applied to: Extract Origin Station Number from Cargo Record
Action: The system populates error index fields
Logic Flow:
IF A cargo record contains origin station information
AND The system populates error index fields
THEN:
• The origin station number is extracted from the cargo record field RT28-ORIG-STN-NUMand used for error index population
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when origin error code and station number are established.
Trigger Criteria:
Context: Origin error code and station number are established
Applied to: Set Origin Error Index with CCN Key
Action: The system creates the origin error index entry
Logic Flow:
IF Origin error code and station number are established
AND The system creates the origin error index entry
THEN:
• The cargo's CCN key is assigned to the origin error cargo field to link the error to the specific cargo record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record contains location identifier information.
Trigger Criteria:
Context: A cargo record contains location identifier information
Applied to: Lookup Border Station from MC Table
Action: The system needs to determine the border station for error indexing
Logic Flow:
IF A cargo record contains location identifier information
AND The system needs to determine the border station for error indexing
THEN:
• The system performs a table lookup using the location ID from field RT04-LOCATION-ID-NAME to retrieve border station details from the MC table
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when mc table lookup returns successful results with return flag '0'.
Trigger Criteria:
Context: The MC table lookup returns successful results with return flag '0'
Applied to: Extract Border Station Number from Table
Action: The system processes the table lookup results
Logic Flow:
IF The MC table lookup returns successful results with return flag '0'
AND The system processes the table lookup results
THEN:
• The border station number is extracted from the MC segment station number field for error index population
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when border error code and station information are established.
Trigger Criteria:
Context: Border error code and station information are established
Applied to: Set Border Error Index with CCN Key
Action: The system creates the border error index entry
Logic Flow:
IF Border error code and station information are established
AND The system creates the border error index entry
THEN:
• The cargo's CCN key is assigned to the border error cargo field to link the error to the specific cargo record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record contains destination station information.
Trigger Criteria:
Context: A cargo record contains destination station information
Applied to: Extract Destination Station Number from Cargo Record
Action: The system populates error index fields
Logic Flow:
IF A cargo record contains destination station information
AND The system populates error index fields
THEN:
• The destination station number is extracted from the cargo record field RT29-DEST-STN-NUMand used for error index population
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when destination error code and station number are established.
Trigger Criteria:
Context: Destination error code and station number are established
Applied to: Set Destination Error Index with CCN Key
Action: The system creates the destination error index entry
Logic Flow:
IF Destination error code and station number are established
AND The system creates the destination error index entry
THEN:
• The cargo's CCN key is assigned to the destination error cargo field to link the error to the specific cargo record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with origin station information.
Trigger Criteria:
Context: A cargo record exists with origin station information
Applied to: Extract Origin Station Number from Cargo Record
Action: The system populates error index fields for origin station
Logic Flow:
IF A cargo record exists with origin station information
AND The system populates error index fields for origin station
THEN:
• The origin station number is extracted from field RT28-ORIG-STN-NUMand assigned to the error origin key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has a unique ccn key and origin station error information.
Trigger Criteria:
Context: A cargo record has a unique CCN key and origin station error information
Applied to: Set Cargo CCN Key for Origin Error Index
Action: The system populates the origin error index
Logic Flow:
IF A cargo record has a unique CCN key and origin station error information
AND The system populates the origin error index
THEN:
• The cargo's CCN key is assigned to the error origin cargo field to establish the link
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record contains a location id and the mc table is available.
Trigger Criteria:
Context: A cargo record contains a location ID and the MC table is available
Applied to: Lookup Border Station from MC Table
Action: The system needs to determine the border station for error indexing
Logic Flow:
IF A cargo record contains a location ID and the MC table is available
AND The system needs to determine the border station for error indexing
THEN:
• The system performs a table lookup using the cargo's location ID to retrieve the corresponding border station information
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when mc table lookup returns a successful result with station information.
Trigger Criteria:
Context: The MC table lookup returns a successful result with station information
Applied to: Extract Border Station Number from Table
Action: The system processes the table lookup response
Logic Flow:
IF The MC table lookup returns a successful result with station information
AND The system processes the table lookup response
THEN:
• The border station number is extracted from the MC-STATION-NUM field in the table segment and assigned to the error border key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has a unique ccn key and border station error information is being processed.
Trigger Criteria:
Context: A cargo record has a unique CCN key and border station error information is being processed
Applied to: Set Cargo CCN Key for Border Error Index
Action: The system populates the border error index
Logic Flow:
IF A cargo record has a unique CCN key and border station error information is being processed
AND The system populates the border error index
THEN:
• The cargo's CCN key is assigned to the error border cargo field to establish the link
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with destination station information.
Trigger Criteria:
Context: A cargo record exists with destination station information
Applied to: Extract Destination Station Number from Cargo Record
Action: The system populates error index fields for destination station
Logic Flow:
IF A cargo record exists with destination station information
AND The system populates error index fields for destination station
THEN:
• The destination station number is extracted from field RT29-DEST-STN-NUMand assigned to the error destination key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has a unique ccn key and destination station error information.
Trigger Criteria:
Context: A cargo record has a unique CCN key and destination station error information
Applied to: Set Cargo CCN Key for Destination Error Index
Action: The system populates the destination error index
Logic Flow:
IF A cargo record has a unique CCN key and destination station error information
AND The system populates the destination error index
THEN:
• The cargo's CCN key is assigned to the error destination cargo field to establish the link
R-GCCUSIO-cbl-00388 (+7)File: GCCUSIO.cblBusiness Rule: Populate Hold Index Fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with hold status conditions.
Trigger Criteria:
Context: A cargo record exists with hold status conditions
Applied to: Set Destination Hold Index
Action: The cargo has USCARGO-HOLD or USCARGO-HOLDPCS or USCARGO-PR-HPCS or USCARGO-HOLD-D or USCARGO-PR-H-DE or USCARGO-HOLDFDA status
Logic Flow:
IF A cargo record exists with hold status conditions
AND The cargo has USCARGO-HOLD or USCARGO-HOLDPCS or USCARGO-PR-HPCS or USCARGO-HOLD-D or USCARGO-PR-H-DE or USCARGO-HOLDFDA status
THEN:
• The system sets the destination hold index with the destination station number and copies the cargo control number key to the destination hold cargo field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with hold status conditions.
Trigger Criteria:
Context: A cargo record exists with hold status conditions
Applied to: Set Border Hold Index
Action: The cargo has USCARGO-HOLD or USCARGO-HOLDPCS or USCARGO-PR-HPCS or USCARGO-HOLD-B or USCARGO-PR-H-BO or USCARGO-HOLDFDA status
Logic Flow:
IF A cargo record exists with hold status conditions
AND The cargo has USCARGO-HOLD or USCARGO-HOLDPCS or USCARGO-PR-HPCS or USCARGO-HOLD-B or USCARGO-PR-H-BO or USCARGO-HOLDFDA status
THEN:
• The system sets the border hold index with the border station number and copies the cargo control number key to the border hold cargo field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record requires border hold index population.
Trigger Criteria:
Context: A cargo record requires border hold index population
Applied to: Lookup Border Station Information & Lookup Border Station from MC Table
Action: The system needs to determine the border station number
Logic Flow:
IF A cargo record requires border hold index population
AND The system needs to determine the border station number
THEN:
• The system queries the MC table using the cargo location ID and retrieves the station number if found
• The system calls the table lookup service with table ID 'MC' and cargo location ID to retrieve the station number
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when system has performed an mc table lookup for border station information.
Trigger Criteria:
Context: The system has performed an MC table lookup for border station information
Applied to: Station Found?
Action: The table lookup returns a successful result with return flag '0'
Logic Flow:
IF The system has performed an MC table lookup for border station information
AND The table lookup returns a successful result with return flag '0'
THEN:
• The system assigns the retrieved station number to the border hold index, otherwise no border station assignment occurs
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with destination hold status conditions.
Trigger Criteria:
Context: A cargo record exists with destination hold status conditions
Applied to: Set Destination Hold Index
Action: The cargo status is HOLD or HOLDPCS or PR-HPCS or HOLD-D or PR-H-DE or HOLDFDA
Logic Flow:
IF A cargo record exists with destination hold status conditions
AND The cargo status is HOLD or HOLDPCS or PR-HPCS or HOLD-D or PR-H-DE or HOLDFDA
THEN:
• The system sets the destination hold index using the destination station number and cargo CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with border hold status conditions.
Trigger Criteria:
Context: A cargo record exists with border hold status conditions
Applied to: Set Border Hold Index
Action: The cargo status is HOLD or HOLDPCS or PR-HPCS or HOLD-B or PR-H-BO or HOLDFDA
Logic Flow:
IF A cargo record exists with border hold status conditions
AND The cargo status is HOLD or HOLDPCS or PR-HPCS or HOLD-B or PR-H-BO or HOLDFDA
THEN:
• The system performs MC table lookup and sets the border hold index using the border station number and cargo CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when mc table lookup has been performed for border station information.
Trigger Criteria:
Context: The MC table lookup has been performed for border station information
Applied to: Use Border Station Number
Action: The table lookup returns successfully with return flag '0'
Logic Flow:
IF The MC table lookup has been performed for border station information
AND The table lookup returns successfully with return flag '0'
THEN:
• The system uses the retrieved station number from the table segment to set the border hold index
R-GCCUSIO-cbl-00392 (+6)File: GCCUSIO.cblBusiness Rule: Retrieve Iron Highway Station Configuration
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with us cargo status and cp cargo status fields.
Trigger Criteria:
Context: A cargo record with US cargo status and CP cargo status fields
Applied to: IH Status Processing Required?
Action: The system evaluates if IH notification processing is needed
Logic Flow:
IF A cargo record with US cargo status and CP cargo status fields
AND The system evaluates if IH notification processing is needed
THEN:
• IH processing is required if both status fields are not empty OR if CP status is 'SENT' when US status is empty OR if status is not 'RELEASE'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when table lookup operation is required.
Trigger Criteria:
Context: A table lookup operation is required
Applied to: Set Table Lookup Parameters
Action: The system prepares for table lookup
Logic Flow:
IF A table lookup operation is required
AND The system prepares for table lookup
THEN:
• All lookup parameter fields are cleared and function code is set to 'GU' (Get Unique)
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when table lookup operation for ih configuration.
Trigger Criteria:
Context: A table lookup operation for IH configuration
Applied to: Set Table ID to 'IH'
Action: The system sets the table identifier
Logic Flow:
IF A table lookup operation for IH configuration
AND The system sets the table identifier
THEN:
• The table ID is set to 'IH' to identify the Iron Highway configuration table
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when saved waybill station code from cargo processing.
Trigger Criteria:
Context: A saved waybill station code from cargo processing
Applied to: Set Station Code as Search Key
Action: The system sets the search key for IH table lookup
Logic Flow:
IF A saved waybill station code from cargo processing
AND The system sets the search key for IH table lookup
THEN:
• The waybill station code is assigned as the sequence ID search key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when table lookup parameters are configured with table id 'ih' and station code. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Table lookup parameters are configured with table ID 'IH' and station code
Applied to: Call Table Lookup Service
Action: The system calls the table lookup service
Logic Flow:
IF Table lookup parameters are configured with table ID 'IH' and station code
AND The system calls the table lookup service
THEN:
• The GCCTBIO service is invoked with the configured parameters to retrieve table segment data
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when table lookup service call has been executed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A table lookup service call has been executed
Applied to: IH Configuration Found?
Action: The system checks the lookup result
Logic Flow:
IF A table lookup service call has been executed
AND The system checks the lookup result
THEN:
• Configuration is found if the return flag equals '0', otherwise no configuration is available
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when ih configuration table lookup was successful.
Trigger Criteria:
Context: IH configuration table lookup was successful
Applied to: Retrieve IH Station Settings
Action: The system processes the retrieved table segment
Logic Flow:
IF IH configuration table lookup was successful
AND The system processes the retrieved table segment
THEN:
• IH station settings are extracted and made available for notification processing
Business Justification: Establishes the required business protocol to be followed when cargo control number (ccn) exists in the primary cargo record.
Trigger Criteria:
Context: A cargo control number (CCN) exists in the primary cargo record
Applied to: Build Secondary Key with CCN + Record Type '02' + Sequence '0001'
Action: The system needs to extract N9 reference numbers for notification processing
Logic Flow:
IF A cargo control number (CCN) exists in the primary cargo record
AND The system needs to extract N9 reference numbers for notification processing
THEN:
• The system builds a secondary record key using the CCN, record type '02', and sequence '0001'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary record key has been constructed with ccn, record type '02', and sequence '0001'.
Trigger Criteria:
Context: A secondary record key has been constructed with CCN, record type '02', and sequence '0001'
Applied to: Retrieve Secondary Cargo Record GCSUSS02
Action: The system executes a database retrieval operation for the secondary cargo record
Logic Flow:
IF A secondary record key has been constructed with CCN, record type '02', and sequence '0001'
AND The system executes a database retrieval operation for the secondary cargo record
THEN:
• The system retrieves the GCSUSS02 record if it exists in the database
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when database retrieval operation has been executed for secondary cargo record gcsuss02.
Trigger Criteria:
Context: A database retrieval operation has been executed for secondary cargo record GCSUSS02
Applied to: Record Found?
Action: The system checks the operation result status
Logic Flow:
IF A database retrieval operation has been executed for secondary cargo record GCSUSS02
AND The system checks the operation result status
THEN:
• The system proceeds with N9 extraction if the record exists, otherwise terminates N9 processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when secondary cargo record with n9 reference data has been successfully retrieved.
Trigger Criteria:
Context: A secondary cargo record with N9 reference data has been successfully retrieved
Applied to: Initialize Reference Counter to Zero
Action: The system begins processing reference number fields
Logic Flow:
IF A secondary cargo record with N9 reference data has been successfully retrieved
AND The system begins processing reference number fields
THEN:
• The system initializes the reference counter to zero to start sequential processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when n9 reference data exists in the secondary cargo record and counter is initialized.
Trigger Criteria:
Context: N9 reference data exists in the secondary cargo record and counter is initialized
Applied to: Loop Through 20 Reference Number Positions
Action: The system processes reference number positions sequentially
Logic Flow:
IF N9 reference data exists in the secondary cargo record and counter is initialized
AND The system processes reference number positions sequentially
THEN:
• The system examines each of the 20 possible reference number positions for qualifying data
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when system is examining a specific reference number position in the n9 data.
Trigger Criteria:
Context: The system is examining a specific reference number position in the N9 data
Applied to: Reference Qualifier = 'CN'?
Action: The reference qualifier field is evaluated
Logic Flow:
IF The system is examining a specific reference number position in the N9 data
AND The reference qualifier field is evaluated
THEN:
• The system identifies positions where the qualifier equals 'CN' for shipment ID extraction
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when reference number position contains the qualifier 'cn'.
Trigger Criteria:
Context: A reference number position contains the qualifier 'CN'
Applied to: Extract Reference Number as Shipment ID
Action: The system processes this qualified reference position
Logic Flow:
IF A reference number position contains the qualifier 'CN'
AND The system processes this qualified reference position
THEN:
• The system extracts the corresponding reference number value and assigns it as the shipment ID
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when system has processed a reference number position.
Trigger Criteria:
Context: The system has processed a reference number position
Applied to: More Positions to Check?
Action: The system evaluates the current position count against the total available positions
Logic Flow:
IF The system has processed a reference number position
AND The system evaluates the current position count against the total available positions
THEN:
• The system continues processing if more positions exist, otherwise completes the N9 extraction
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when additional reference number positions remain to be processed.
Trigger Criteria:
Context: Additional reference number positions remain to be processed
Applied to: Move to Next Reference Position
Action: The system advances the processing sequence
Logic Flow:
IF Additional reference number positions remain to be processed
AND The system advances the processing sequence
THEN:
• The system increments the position counter and moves to examine the next reference number field
R-GCCUSIO-cbl-00408 (+9)File: GCCUSIO.cblBusiness Rule: Determine Notification Status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists with empty cargo status description and cp cargo status equals sent.
Trigger Criteria:
Context: A cargo record exists with empty cargo status description and CP cargo status equals SENT
Applied to: Set Status to SENT
Action: The system evaluates notification status determination
Logic Flow:
IF A cargo record exists with empty cargo status description and CP cargo status equals SENT
AND The system evaluates notification status determination
THEN:
• The system should set the notification status to SENT
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with both cargo status description and cp cargo status description being empty or spaces.
Trigger Criteria:
Context: A cargo record exists with both cargo status description and CP cargo status description being empty or spaces
Applied to: Exit - No Notification Needed
Action: The system evaluates notification requirements
Logic Flow:
IF A cargo record exists with both cargo status description and CP cargo status description being empty or spaces
AND The system evaluates notification requirements
THEN:
• The system should exit without sending any notification
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record exists with cp cargo status description equal to deleted or release.
Trigger Criteria:
Context: A cargo record exists with CP cargo status description equal to DELETED or RELEASE
Applied to: Continue Processing
Action: The system evaluates notification processing requirements
Logic Flow:
IF A cargo record exists with CP cargo status description equal to DELETED or RELEASE
AND The system evaluates notification processing requirements
THEN:
• The system should continue with notification processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists where the saved notification status equals the current cargo status description.
Trigger Criteria:
Context: A cargo record exists where the saved notification status equals the current cargo status description
Applied to: Exit - No Status Change
Action: The system compares current status with previous notification status
Logic Flow:
IF A cargo record exists where the saved notification status equals the current cargo status description
AND The system compares current status with previous notification status
THEN:
• The system should exit without sending notification
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with cargo status description equal to release.
Trigger Criteria:
Context: A cargo record exists with cargo status description equal to RELEASE
Applied to: Exit - Release Status
Action: The system evaluates notification requirements
Logic Flow:
IF A cargo record exists with cargo status description equal to RELEASE
AND The system evaluates notification requirements
THEN:
• The system should exit without sending any notification
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with cp cargo status description equal to deleted.
Trigger Criteria:
Context: A cargo record exists with CP cargo status description equal to DELETED
Applied to: Set Status to DELETED
Action: The system determines final notification status
Logic Flow:
IF A cargo record exists with CP cargo status description equal to DELETED
AND The system determines final notification status
THEN:
• The system should set notification status to DELETED and saved status to DELETED
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with cp cargo status description equal to release.
Trigger Criteria:
Context: A cargo record exists with CP cargo status description equal to RELEASE
Applied to: Set Status to RELEASE
Action: The system determines final notification status
Logic Flow:
IF A cargo record exists with CP cargo status description equal to RELEASE
AND The system determines final notification status
THEN:
• The system should set notification status to RELEASE and saved status to RELEASE
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with empty cargo status description and cp cargo status description equal to sent.
Trigger Criteria:
Context: A cargo record exists with empty cargo status description and CP cargo status description equal to SENT
Applied to: Set Status to SENT
Action: The system determines final notification status
Logic Flow:
IF A cargo record exists with empty cargo status description and CP cargo status description equal to SENT
AND The system determines final notification status
THEN:
• The system should set notification status to SENT
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists where cp status is not deleted, not release, and either us status is not empty or cp status is not sent.
Trigger Criteria:
Context: A cargo record exists where CP status is not DELETED, not RELEASE, and either US status is not empty or CP status is not SENT
Applied to: Use US Cargo Status
Action: The system determines final notification status
Logic Flow:
IF A cargo record exists where CP status is not DELETED, not RELEASE, and either US status is not empty or CP status is not SENT
AND The system determines final notification status
THEN:
• The system should use the US cargo status description as the notification status and save the US cargo status as the saved status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with determined notification status and iron highway table configuration is found. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record exists with determined notification status and Iron Highway table configuration is found
Applied to: Send Notification to Iron Highway
Action: The system prepares to send notification
Logic Flow:
IF A cargo record exists with determined notification status and Iron Highway table configuration is found
AND The system prepares to send notification
THEN:
• The system should call Iron Highway notification service with record type UC, car ID, waybill number, CCN, shipment ID, and status
R-GCCUSIO-cbl-00418 (+13)File: GCCUSIO.cblBusiness Rule: Prepare Iron Highway Message
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for iron highway notification.
Trigger Criteria:
Context: A cargo record is being processed for Iron Highway notification
Applied to: Set Status to 'SENT'
Action: The US cargo status description is empty AND the CP cargo status description equals 'SENT '
Logic Flow:
IF A cargo record is being processed for Iron Highway notification
AND The US cargo status description is empty AND the CP cargo status description equals 'SENT '
THEN:
• The system sets the saved IH status to the CP cargo status description value
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for iron highway notification.
Trigger Criteria:
Context: A cargo record is being processed for Iron Highway notification
Applied to: Exit - No Message Needed
Action: Both US cargo status description is empty AND CP cargo status description is empty
Logic Flow:
IF A cargo record is being processed for Iron Highway notification
AND Both US cargo status description is empty AND CP cargo status description is empty
THEN:
• The system exits the notification process without sending a message
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for iron highway notification.
Trigger Criteria:
Context: A cargo record is being processed for Iron Highway notification
Applied to: Continue Processing
Action: The CP cargo status description equals 'DELETED' OR equals 'RELEASE'
Logic Flow:
IF A cargo record is being processed for Iron Highway notification
AND The CP cargo status description equals 'DELETED' OR equals 'RELEASE'
THEN:
• The system continues with the notification processing workflow
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for iron highway notification.
Trigger Criteria:
Context: A cargo record is being processed for Iron Highway notification
Applied to: Exit - Release Status
Action: The US cargo status description equals 'RELEASE'
Logic Flow:
IF A cargo record is being processed for Iron Highway notification
AND The US cargo status description equals 'RELEASE'
THEN:
• The system exits the notification process without sending a message
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed for iron highway notification and the status is not deleted or release.
Trigger Criteria:
Context: A cargo record is being processed for Iron Highway notification AND the status is not DELETED or RELEASE
Applied to: Exit - No Change
Action: The saved IH status equals the current US cargo status description
Logic Flow:
IF A cargo record is being processed for Iron Highway notification AND the status is not DELETED or RELEASE
AND The saved IH status equals the current US cargo status description
THEN:
• The system exits the notification process without sending a message
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has passed initial status validation for iron highway notification.
Trigger Criteria:
Context: A cargo record has passed initial status validation for Iron Highway notification
Applied to: Lookup Iron Highway Station Table
Action: The system needs to determine if the station supports Iron Highway notifications
Logic Flow:
IF A cargo record has passed initial status validation for Iron Highway notification
AND The system needs to determine if the station supports Iron Highway notifications
THEN:
• The system looks up the IH table using the saved waybill station as the sequence ID
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when system has looked up the iron highway station configuration table.
Trigger Criteria:
Context: The system has looked up the Iron Highway station configuration table
Applied to: Exit - Station Not Configured
Action: The table lookup returns a non-zero return flag indicating the station is not found
Logic Flow:
IF The system has looked up the Iron Highway station configuration table
AND The table lookup returns a non-zero return flag indicating the station is not found
THEN:
• The system exits the notification process without sending a message
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill station is configured for iron highway notifications.
Trigger Criteria:
Context: The waybill station is configured for Iron Highway notifications
Applied to: Extract N9 Reference Numbers
Action: The system processes the cargo record for notification
Logic Flow:
IF The waybill station is configured for Iron Highway notifications
AND The system processes the cargo record for notification
THEN:
• The system retrieves N9 reference information and extracts the shipment ID from CN reference qualifier
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being prepared for iron highway notification.
Trigger Criteria:
Context: A cargo record is being prepared for Iron Highway notification
Applied to: Set Message Status to 'DELETED'
Action: The CP cargo status description equals 'DELETED'
Logic Flow:
IF A cargo record is being prepared for Iron Highway notification
AND The CP cargo status description equals 'DELETED'
THEN:
• The system sets the Iron Highway message status to 'DELETED' and the saved IH status to 'DELETED'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being prepared for iron highway notification and the status is not deleted.
Trigger Criteria:
Context: A cargo record is being prepared for Iron Highway notification AND the status is not DELETED
Applied to: Set Message Status to 'RELEASE'
Action: The CP cargo status description equals 'RELEASE'
Logic Flow:
IF A cargo record is being prepared for Iron Highway notification AND the status is not DELETED
AND The CP cargo status description equals 'RELEASE'
THEN:
• The system sets the Iron Highway message status to 'RELEASE' and the saved IH status to 'RELEASE'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being prepared for iron highway notification and the status is not deleted or release.
Trigger Criteria:
Context: A cargo record is being prepared for Iron Highway notification AND the status is not DELETED or RELEASE
Applied to: Set Message Status to 'SENT'
Action: The US cargo status description is empty AND the CP cargo status description equals 'SENT '
Logic Flow:
IF A cargo record is being prepared for Iron Highway notification AND the status is not DELETED or RELEASE
AND The US cargo status description is empty AND the CP cargo status description equals 'SENT '
THEN:
• The system sets the Iron Highway message status to 'SENT'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being prepared for iron highway notification and the status is not deleted or release.
Trigger Criteria:
Context: A cargo record is being prepared for Iron Highway notification AND the status is not DELETED or RELEASE
Applied to: Set Message Status from US Cargo Description
Action: The US cargo status description is not empty OR the CP cargo status description is not 'SENT '
Logic Flow:
IF A cargo record is being prepared for Iron Highway notification AND the status is not DELETED or RELEASE
AND The US cargo status description is not empty OR the CP cargo status description is not 'SENT '
THEN:
• The system sets the Iron Highway message status to the US cargo status description and updates the saved IH status to the US cargo status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been validated and status determined for iron highway notification.
Trigger Criteria:
Context: A cargo record has been validated and status determined for Iron Highway notification
Applied to: Set Message Record Type to 'UC'
Action: The system prepares the notification message content
Logic Flow:
IF A cargo record has been validated and status determined for Iron Highway notification
AND The system prepares the notification message content
THEN:
• The system sets record type to 'UC', car ID from saved car number, waybill from saved waybill number, and CCN from cargo key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when iron highway notification message has been formatted with all required information. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The Iron Highway notification message has been formatted with all required information
Applied to: Call Iron Highway Interface
Action: The system is ready to send the notification
Logic Flow:
IF The Iron Highway notification message has been formatted with all required information
AND The system is ready to send the notification
THEN:
• The system calls the GCCIH program with the common control block and Iron Highway message structure
R-GCCUSIO-cbl-00432 (+2)File: GCCUSIO.cblBusiness Rule: Loop Through 20 N9 Reference Entries
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo ccn key exists in the system.
Trigger Criteria:
Context: A cargo CCN key exists in the system
Applied to: Retrieve Secondary Cargo Record Type 02
Action: The system needs to process N9 reference numbers for shipment identification
Logic Flow:
IF A cargo CCN key exists in the system
AND The system needs to process N9 reference numbers for shipment identification
THEN:
• The system retrieves the secondary cargo record with record type '02' and sequence '0001' using the cargo CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when secondary cargo record exists with n9 reference number data.
Trigger Criteria:
Context: A secondary cargo record exists with N9 reference number data
Applied to: Loop Through 20 N9 Reference Entries
Action: The system processes the N9 reference numbers
Logic Flow:
IF A secondary cargo record exists with N9 reference number data
AND The system processes the N9 reference numbers
THEN:
• The system loops through 20 reference entries, checks each reference qualifier, and extracts the reference number as shipment ID when the qualifier equals 'CN'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when n9 reference number entries are being processed.
Trigger Criteria:
Context: N9 reference number entries are being processed
Applied to: Reference Qualifier = 'CN'?
Action: A reference entry has qualifier 'CN'
Logic Flow:
IF N9 reference number entries are being processed
AND A reference entry has qualifier 'CN'
THEN:
• The system extracts the corresponding reference number and stores it as the shipment ID for Iron Highway notification
R-GCCUSIO-cbl-00435 (+2)File: GCCUSIO.cblBusiness Rule: Determine Bond Number Source
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record requires bond number indexing for tracking purposes.
Trigger Criteria:
Context: A cargo record requires bond number indexing for tracking purposes
Applied to: In-Bond Control Number Available?
Action: The system evaluates available bond control numbers and the in-bond control number field (M1206) is not empty
Logic Flow:
IF A cargo record requires bond number indexing for tracking purposes
AND The system evaluates available bond control numbers and the in-bond control number field (M1206) is not empty
THEN:
• The system uses the in-bond control number as the bond number index value
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record requires bond number indexing and the in-bond control number is empty.
Trigger Criteria:
Context: A cargo record requires bond number indexing and the in-bond control number is empty
Applied to: Entry Number Available?
Action: The system evaluates the entry number field (M1202) and it is not empty
Logic Flow:
IF A cargo record requires bond number indexing and the in-bond control number is empty
AND The system evaluates the entry number field (M1202) and it is not empty
THEN:
• The system uses the entry number as the bond number index value
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record requires bond number indexing and both in-bond control number and entry number are empty.
Trigger Criteria:
Context: A cargo record requires bond number indexing and both in-bond control number and entry number are empty
Applied to: Set Bond Index to Spaces
Action: The system cannot find any valid bond number source
Logic Flow:
IF A cargo record requires bond number indexing and both in-bond control number and entry number are empty
AND The system cannot find any valid bond number source
THEN:
• The system sets the bond number index to spaces (empty value)
R-GCCUSIO-cbl-00438 (+5)File: GCCUSIO.cblBusiness Rule: Lookup MC Table for Border Station
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when need to lookup border station code from mc table.
Trigger Criteria:
Context: A need to lookup border station code from MC table
Applied to: Initialize MC Table Lookup Parameters
Action: The system prepares to perform MC table lookup
Logic Flow:
IF A need to lookup border station code from MC table
AND The system prepares to perform MC table lookup
THEN:
• All lookup parameters are cleared and initialized to spaces, and function code is set to 'GU' for retrieval
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when requirement to lookup station master data.
Trigger Criteria:
Context: A requirement to lookup station master data
Applied to: Set Table ID to 'MC'
Action: The system configures table lookup parameters
Logic Flow:
IF A requirement to lookup station master data
AND The system configures table lookup parameters
THEN:
• Table ID is set to 'MC' to identify the station master table
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with location id information.
Trigger Criteria:
Context: A cargo record with location ID information
Applied to: Set Search Key to Location ID
Action: The system prepares MC table lookup
Logic Flow:
IF A cargo record with location ID information
AND The system prepares MC table lookup
THEN:
• The cargo location ID is set as the sequence ID search key for MC table lookup
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when all mc table lookup parameters are properly initialized. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All MC table lookup parameters are properly initialized
Applied to: Call Table Lookup Routine GCCTBIO
Action: The system needs to retrieve station master data
Logic Flow:
IF All MC table lookup parameters are properly initialized
AND The system needs to retrieve station master data
THEN:
• External routine GCCTBIO is called with function code, table parameters, and search keys to perform the lookup
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when mc table lookup has been executed.
Trigger Criteria:
Context: MC table lookup has been executed
Applied to: Table Record Found?
Action: The system evaluates the lookup result
Logic Flow:
IF MC table lookup has been executed
AND The system evaluates the lookup result
THEN:
• If return flag equals '0' then lookup is successful, otherwise lookup failed
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when mc table lookup was successful and returned a valid table segment.
Trigger Criteria:
Context: MC table lookup was successful and returned a valid table segment
Applied to: Extract Border Station Number from MC Segment
Action: The system processes the retrieved MC table data
Logic Flow:
IF MC table lookup was successful and returned a valid table segment
AND The system processes the retrieved MC table data
THEN:
• The border station number is extracted from the MC segment and made available for cargo status processing
R-GCCUSIO-cbl-00444 (+11)File: GCCUSIO.cblBusiness Rule: Check Error Status Conditions
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed for status evaluation.
Trigger Criteria:
Context: A cargo record is being processed for status evaluation
Applied to: CP Cargo Error Status?
Action: The CP cargo status field RT10-CPCARGO-STATUS indicates an error condition (88-GCUSRT-RT10-CPCARGO-ERROR is true)
Logic Flow:
IF A cargo record is being processed for status evaluation
AND The CP cargo status field RT10-CPCARGO-STATUS indicates an error condition (88-GCUSRT-RT10-CPCARGO-ERROR is true)
THEN:
• The system flags the cargo as having an error condition and proceeds to error handling workflow
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed for status evaluation.
Trigger Criteria:
Context: A cargo record is being processed for status evaluation
Applied to: No Error/Hold Conditions
Action: All error and hold status checks return false (no CP cargo errors, no CP cargo pending, no US cargo errors, and no US cargo hold conditions of any type)
Logic Flow:
IF A cargo record is being processed for status evaluation
AND All error and hold status checks return false (no CP cargo errors, no CP cargo pending, no US cargo errors, and no US cargo hold conditions of any type)
THEN:
• The system determines the cargo has clean status and proceeds to normal processing workflow without special handling requirements
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed and cp cargo error status is false.
Trigger Criteria:
Context: A cargo record is being processed and CP cargo error status is false
Applied to: CP Cargo Pending Status?
Action: The CP cargo status field RT10-CPCARGO-STATUS indicates a pending condition (88-GCUSRT-RT10-CPCARGO-PENDING is true)
Logic Flow:
IF A cargo record is being processed and CP cargo error status is false
AND The CP cargo status field RT10-CPCARGO-STATUS indicates a pending condition (88-GCUSRT-RT10-CPCARGO-PENDING is true)
THEN:
• The system flags the cargo as having a pending condition and proceeds to pending status handling workflow
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed and both cp cargo error and pending statuses are false.
Trigger Criteria:
Context: A cargo record is being processed and both CP cargo error and pending statuses are false
Applied to: US Cargo Error Status?
Action: The US cargo status field RT11-USCARGO-STATUS indicates an error condition (88-GCUSRT-RT11-USCARGO-ERROR is true)
Logic Flow:
IF A cargo record is being processed and both CP cargo error and pending statuses are false
AND The US cargo status field RT11-USCARGO-STATUS indicates an error condition (88-GCUSRT-RT11-USCARGO-ERROR is true)
THEN:
• The system flags the cargo as having an error condition and proceeds to error handling workflow
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed and no error conditions exist.
Trigger Criteria:
Context: A cargo record is being processed and no error conditions exist
Applied to: US Cargo Hold Status?
Action: The US cargo status field RT11-USCARGO-STATUS indicates a general hold condition (88-GCUSRT-RT11-USCARGO-HOLD is true)
Logic Flow:
IF A cargo record is being processed and no error conditions exist
AND The US cargo status field RT11-USCARGO-STATUS indicates a general hold condition (88-GCUSRT-RT11-USCARGO-HOLD is true)
THEN:
• The system flags the cargo as having a hold condition and proceeds to hold status handling workflow
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record is being processed and no error or general hold conditions exist.
Trigger Criteria:
Context: A cargo record is being processed and no error or general hold conditions exist
Applied to: US Cargo Hold PCS Status?
Action: The US cargo status field RT11-USCARGO-STATUS indicates a PCS hold condition (88-GCUSRT-RT11-USCARGO-HOLDPCS is true)
Logic Flow:
IF A cargo record is being processed and no error or general hold conditions exist
AND The US cargo status field RT11-USCARGO-STATUS indicates a PCS hold condition (88-GCUSRT-RT11-USCARGO-HOLDPCS is true)
THEN:
• The system flags the cargo as having a hold condition and proceeds to hold status handling workflow
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed and no error, general hold, or pcs hold conditions exist.
Trigger Criteria:
Context: A cargo record is being processed and no error, general hold, or PCS hold conditions exist
Applied to: US Cargo PR-HPCS Status?
Action: The US cargo status field RT11-USCARGO-STATUS indicates a pre-release PCS hold condition (88-GCUSRT-RT11-USCARGO-PR-HPCS is true)
Logic Flow:
IF A cargo record is being processed and no error, general hold, or PCS hold conditions exist
AND The US cargo status field RT11-USCARGO-STATUS indicates a pre-release PCS hold condition (88-GCUSRT-RT11-USCARGO-PR-HPCS is true)
THEN:
• The system flags the cargo as having a hold condition and proceeds to hold status handling workflow
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed and no error or previous hold conditions exist.
Trigger Criteria:
Context: A cargo record is being processed and no error or previous hold conditions exist
Applied to: US Cargo Hold Border Status?
Action: The US cargo status field RT11-USCARGO-STATUS indicates a border hold condition (88-GCUSRT-RT11-USCARGO-HOLD-B is true)
Logic Flow:
IF A cargo record is being processed and no error or previous hold conditions exist
AND The US cargo status field RT11-USCARGO-STATUS indicates a border hold condition (88-GCUSRT-RT11-USCARGO-HOLD-B is true)
THEN:
• The system flags the cargo as having a hold condition and proceeds to hold status handling workflow
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed and no error or previous hold conditions exist.
Trigger Criteria:
Context: A cargo record is being processed and no error or previous hold conditions exist
Applied to: US Cargo PR-H-BO Status?
Action: The US cargo status field RT11-USCARGO-STATUS indicates a pre-release border hold condition (88-GCUSRT-RT11-USCARGO-PR-H-BO is true)
Logic Flow:
IF A cargo record is being processed and no error or previous hold conditions exist
AND The US cargo status field RT11-USCARGO-STATUS indicates a pre-release border hold condition (88-GCUSRT-RT11-USCARGO-PR-H-BO is true)
THEN:
• The system flags the cargo as having a hold condition and proceeds to hold status handling workflow
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed and no error or previous hold conditions exist.
Trigger Criteria:
Context: A cargo record is being processed and no error or previous hold conditions exist
Applied to: US Cargo Hold Dest Status?
Action: The US cargo status field RT11-USCARGO-STATUS indicates a destination hold condition (88-GCUSRT-RT11-USCARGO-HOLD-D is true)
Logic Flow:
IF A cargo record is being processed and no error or previous hold conditions exist
AND The US cargo status field RT11-USCARGO-STATUS indicates a destination hold condition (88-GCUSRT-RT11-USCARGO-HOLD-D is true)
THEN:
• The system flags the cargo as having a hold condition and proceeds to hold status handling workflow
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed and no error or previous hold conditions exist.
Trigger Criteria:
Context: A cargo record is being processed and no error or previous hold conditions exist
Applied to: US Cargo PR-H-DE Status?
Action: The US cargo status field RT11-USCARGO-STATUS indicates a pre-release destination hold condition (88-GCUSRT-RT11-USCARGO-PR-H-DE is true)
Logic Flow:
IF A cargo record is being processed and no error or previous hold conditions exist
AND The US cargo status field RT11-USCARGO-STATUS indicates a pre-release destination hold condition (88-GCUSRT-RT11-USCARGO-PR-H-DE is true)
THEN:
• The system flags the cargo as having a hold condition and proceeds to hold status handling workflow
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed and no error or previous hold conditions exist.
Trigger Criteria:
Context: A cargo record is being processed and no error or previous hold conditions exist
Applied to: US Cargo Hold FDA Status?
Action: The US cargo status field RT11-USCARGO-STATUS indicates an FDA hold condition (88-GCUSRT-RT11-USCARGO-HOLDFDA is true)
Logic Flow:
IF A cargo record is being processed and no error or previous hold conditions exist
AND The US cargo status field RT11-USCARGO-STATUS indicates an FDA hold condition (88-GCUSRT-RT11-USCARGO-HOLDFDA is true)
THEN:
• The system flags the cargo as having a hold condition and proceeds to hold status handling workflow
R-GCCUSIO-cbl-00456 (+13)File: GCCUSIO.cblBusiness Rule: Check Hold Status Conditions
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with rt11 uscargo status field.
Trigger Criteria:
Context: A cargo record with RT11 USCARGO status field
Applied to: Check RT11 USCARGO HOLD Status?
Action: The system checks if RT11 USCARGO status equals HOLD
Logic Flow:
IF A cargo record with RT11 USCARGO status field
AND The system checks if RT11 USCARGO status equals HOLD
THEN:
• The system identifies cargo as having general hold status requiring destination hold index processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with rt11 uscargo status field and no general hold status.
Trigger Criteria:
Context: A cargo record with RT11 USCARGO status field and no general HOLD status
Applied to: Check RT11 USCARGO HOLDPCS Status?
Action: The system checks if RT11 USCARGO status equals HOLDPCS
Logic Flow:
IF A cargo record with RT11 USCARGO status field and no general HOLD status
AND The system checks if RT11 USCARGO status equals HOLDPCS
THEN:
• The system identifies cargo as having hold PCS status requiring destination hold index processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with rt11 uscargo status field and no hold or holdpcs status.
Trigger Criteria:
Context: A cargo record with RT11 USCARGO status field and no HOLD or HOLDPCS status
Applied to: Check RT11 USCARGO PR-HPCS Status?
Action: The system checks if RT11 USCARGO status equals PR-HPCS
Logic Flow:
IF A cargo record with RT11 USCARGO status field and no HOLD or HOLDPCS status
AND The system checks if RT11 USCARGO status equals PR-HPCS
THEN:
• The system identifies cargo as having pre-release hold PCS status requiring destination hold index processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with rt11 uscargo status field and no destination hold statuses.
Trigger Criteria:
Context: A cargo record with RT11 USCARGO status field and no destination hold statuses
Applied to: Check RT11 USCARGO HOLD-B Status?
Action: The system checks if RT11 USCARGO status equals HOLD-B
Logic Flow:
IF A cargo record with RT11 USCARGO status field and no destination hold statuses
AND The system checks if RT11 USCARGO status equals HOLD-B
THEN:
• The system identifies cargo as having border hold status requiring border hold index processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with rt11 uscargo status field and no destination hold or hold-b statuses.
Trigger Criteria:
Context: A cargo record with RT11 USCARGO status field and no destination hold or HOLD-B statuses
Applied to: Check RT11 USCARGO PR-H-BO Status?
Action: The system checks if RT11 USCARGO status equals PR-H-BO
Logic Flow:
IF A cargo record with RT11 USCARGO status field and no destination hold or HOLD-B statuses
AND The system checks if RT11 USCARGO status equals PR-H-BO
THEN:
• The system identifies cargo as having pre-release hold border status requiring border hold index processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with rt11 uscargo status field and no previous hold statuses.
Trigger Criteria:
Context: A cargo record with RT11 USCARGO status field and no previous hold statuses
Applied to: Check RT11 USCARGO HOLD-D Status?
Action: The system checks if RT11 USCARGO status equals HOLD-D
Logic Flow:
IF A cargo record with RT11 USCARGO status field and no previous hold statuses
AND The system checks if RT11 USCARGO status equals HOLD-D
THEN:
• The system identifies cargo as having destination hold status requiring destination hold index processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with rt11 uscargo status field and no previous hold statuses.
Trigger Criteria:
Context: A cargo record with RT11 USCARGO status field and no previous hold statuses
Applied to: Check RT11 USCARGO PR-H-DE Status?
Action: The system checks if RT11 USCARGO status equals PR-H-DE
Logic Flow:
IF A cargo record with RT11 USCARGO status field and no previous hold statuses
AND The system checks if RT11 USCARGO status equals PR-H-DE
THEN:
• The system identifies cargo as having pre-release hold destination status requiring destination hold index processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with rt11 uscargo status field and no previous hold statuses.
Trigger Criteria:
Context: A cargo record with RT11 USCARGO status field and no previous hold statuses
Applied to: Check RT11 USCARGO HOLDFDA Status?
Action: The system checks if RT11 USCARGO status equals HOLDFDA
Logic Flow:
IF A cargo record with RT11 USCARGO status field and no previous hold statuses
AND The system checks if RT11 USCARGO status equals HOLDFDA
THEN:
• The system identifies cargo as having FDA hold status requiring destination hold index processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with destination-related hold status (hold, holdpcs, pr-hpcs, hold-d, pr-h-de, or holdfda).
Trigger Criteria:
Context: A cargo record with destination-related hold status (HOLD, HOLDPCS, PR-HPCS, HOLD-D, PR-H-DE, or HOLDFDA)
Applied to: Set Destination Hold Index
Action: The system processes the hold status
Logic Flow:
IF A cargo record with destination-related hold status (HOLD, HOLDPCS, PR-HPCS, HOLD-D, PR-H-DE, or HOLDFDA)
AND The system processes the hold status
THEN:
• The system sets GCB1-KEY-HELD-DEST to cargo destination station number RT29-DEST-STN-NUMandGCB1-KEY-HELD-DEST-CARGO to cargo CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with border-related hold status (hold, holdpcs, pr-hpcs, hold-b, pr-h-bo, or holdfda).
Trigger Criteria:
Context: A cargo record with border-related hold status (HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, or HOLDFDA)
Applied to: Set Border Hold Index
Action: The system processes the hold status
Logic Flow:
IF A cargo record with border-related hold status (HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, or HOLDFDA)
AND The system processes the hold status
THEN:
• The system retrieves station information for the border location and sets GCB1-KEY-HELD-BORDER to the border station number andGCB1-KEY-HELD-BORDER-CARGO to cargo CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record requiring border hold index processing.
Trigger Criteria:
Context: A cargo record requiring border hold index processing
Applied to: Retrieve Station Information for Border
Action: The system needs to set border hold index
Logic Flow:
IF A cargo record requiring border hold index processing
AND The system needs to set border hold index
THEN:
• The system calls table lookup function to retrieve MC table segment using cargo location ID and extracts station number for border hold index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with hold status and populated hold index fields.
Trigger Criteria:
Context: A cargo record with hold status and populated hold index fields
Applied to: Update GCSB1RT Index Record
Action: The system processes hold status
Logic Flow:
IF A cargo record with hold status and populated hold index fields
AND The system processes hold status
THEN:
• The system checks if GCSB1RT record exists and either updates existing record or inserts new record with hold index information
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with no hold status conditions.
Trigger Criteria:
Context: A cargo record with no hold status conditions
Applied to: Clear Hold Index Fields
Action: The system processes cargo status update
Logic Flow:
IF A cargo record with no hold status conditions
AND The system processes cargo status update
THEN:
• The system clears GCB1-HELD-DEST-INDEXandGCB1-HELD-BORDER-INDEX fields to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when gcsb1rt record exists for cargo with cleared hold indexes.
Trigger Criteria:
Context: A GCSB1RT record exists for cargo with cleared hold indexes
Applied to: Delete GCSB1RT if No Other Indexes
Action: The cargo has no error index fields populated (error-dest, error-orig, error-border are all spaces)
Logic Flow:
IF A GCSB1RT record exists for cargo with cleared hold indexes
AND The cargo has no error index fields populated (error-dest, error-orig, error-border are all spaces)
THEN:
• The system deletes the GCSB1RT index record completely
R-GCCUSIO-cbl-00470 (+11)File: GCCUSIO.cblBusiness Rule: Update Error Index Entries
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed for index updates.
Trigger Criteria:
Context: A cargo record is being processed for index updates
Applied to: Cargo Has Error Status?
Action: The system checks for CP cargo error status OR CP cargo pending status OR US cargo error status
Logic Flow:
IF A cargo record is being processed for index updates
AND The system checks for CP cargo error status OR CP cargo pending status OR US cargo error status
THEN:
• The cargo is classified as having error status if any of these conditions are true
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record requires error index processing.
Trigger Criteria:
Context: A cargo record requires error index processing
Applied to: Retrieve Existing Error Index Record
Action: The system searches for existing GCSB1RT error index record using cargo CCN key
Logic Flow:
IF A cargo record requires error index processing
AND The system searches for existing GCSB1RT error index record using cargo CCN key
THEN:
• The system retrieves the record if it exists and sets appropriate status flag
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has error status and error index record is being processed.
Trigger Criteria:
Context: Cargo has error status and error index record is being processed
Applied to: Populate Error Origin Station & Populate Error Destination Station
Action: The system fills error fields for the index record
Logic Flow:
IF Cargo has error status and error index record is being processed
AND The system fills error fields for the index record
THEN:
• Error code 'E' is set, origin station number is populated from cargo record, and cargo CCN is set as error origin cargo key
• Error code 'E' is set, destination station number is populated from cargo record, and cargo CCN is set as error destination cargo key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo has error status and error index record needs border station information.
Trigger Criteria:
Context: Cargo has error status and error index record needs border station information
Applied to: Get Border Station from MC Table
Action: The system looks up MC table using cargo location ID
Logic Flow:
IF Cargo has error status and error index record needs border station information
AND The system looks up MC table using cargo location ID
THEN:
• If table lookup is successful, the border station number is retrieved from the table segment
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo has error status and border station information is available from mc table lookup.
Trigger Criteria:
Context: Cargo has error status and border station information is available from MC table lookup
Applied to: Populate Error Border Station
Action: The system fills error border fields for the index record
Logic Flow:
IF Cargo has error status and border station information is available from MC table lookup
AND The system fills error border fields for the index record
THEN:
• Error code 'E' is set, border station number is populated from MC table result, and cargo CCN is set as error border cargo key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo has error status and no existing error index record is found.
Trigger Criteria:
Context: Cargo has error status and no existing error index record is found
Applied to: Create New Error Index Record
Action: The system needs to create error index entry
Logic Flow:
IF Cargo has error status and no existing error index record is found
AND The system needs to create error index entry
THEN:
• A new GCSB1RT record is inserted with cargo CCN as key and populated error fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo has error status and existing error index record is found.
Trigger Criteria:
Context: Cargo has error status and existing error index record is found
Applied to: Update Existing Error Index Record
Action: The system needs to update error index entry
Logic Flow:
IF Cargo has error status and existing error index record is found
AND The system needs to update error index entry
THEN:
• The existing GCSB1RT record is updated with current error field information
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo no longer has error status but has existing error index record.
Trigger Criteria:
Context: Cargo no longer has error status but has existing error index record
Applied to: Clear Error Index Fields
Action: The system processes index cleanup for non-error cargo
Logic Flow:
IF Cargo no longer has error status but has existing error index record
AND The system processes index cleanup for non-error cargo
THEN:
• Error origin index, error destination index, and error border index fields are set to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when error fields have been cleared from index record.
Trigger Criteria:
Context: Error fields have been cleared from index record
Applied to: Any Other Index Entries Remain?
Action: The system checks if held destination index and held border index are both empty
Logic Flow:
IF Error fields have been cleared from index record
AND The system checks if held destination index and held border index are both empty
THEN:
• If both held indexes are empty, the record should be deleted; otherwise, the record should be kept
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when error fields have been cleared and no other index entries remain in the record.
Trigger Criteria:
Context: Error fields have been cleared and no other index entries remain in the record
Applied to: Delete Error Index Record
Action: The system determines the index record is no longer needed
Logic Flow:
IF Error fields have been cleared and no other index entries remain in the record
AND The system determines the index record is no longer needed
THEN:
• The GCSB1RT error index record is deleted from the database
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when error fields have been cleared but other index entries still remain in the record.
Trigger Criteria:
Context: Error fields have been cleared but other index entries still remain in the record
Applied to: Keep Error Index Record
Action: The system determines the index record is still needed for other purposes
Logic Flow:
IF Error fields have been cleared but other index entries still remain in the record
AND The system determines the index record is still needed for other purposes
THEN:
• The GCSB1RT error index record is updated and retained in the database
R-GCCUSIO-cbl-00482 (+8)File: GCCUSIO.cblBusiness Rule: Update Hold Index Entries
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with various status flags.
Trigger Criteria:
Context: A cargo record with various status flags
Applied to: Check Cargo Hold Status
Action: The system checks for any active hold conditions including USCARGO-HOLD, USCARGO-HOLDPCS, USCARGO-PR-HPCS, USCARGO-HOLD-B, USCARGO-PR-H-BO, USCARGO-HOLD-D, USCARGO-PR-H-DE, or USCARGO-HOLDFDA
Logic Flow:
IF A cargo record with various status flags
AND The system checks for any active hold conditions including USCARGO-HOLD, USCARGO-HOLDPCS, USCARGO-PR-HPCS, USCARGO-HOLD-B, USCARGO-PR-H-BO, USCARGO-HOLD-D, USCARGO-PR-H-DE, or USCARGO-HOLDFDA
THEN:
• The system proceeds with hold index processing if any hold condition is active, otherwise skips hold processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with active hold status.
Trigger Criteria:
Context: A cargo record with active hold status
Applied to: Set Destination Hold Index Fields
Action: The cargo has USCARGO-HOLD or USCARGO-HOLDPCS or USCARGO-PR-HPCS or USCARGO-HOLD-D or USCARGO-PR-H-DE or USCARGO-HOLDFDA status
Logic Flow:
IF A cargo record with active hold status
AND The cargo has USCARGO-HOLD or USCARGO-HOLDPCS or USCARGO-PR-HPCS or USCARGO-HOLD-D or USCARGO-PR-H-DE or USCARGO-HOLDFDA status
THEN:
• The system sets the destination station number to held destination index and cargo CCN key to held destination cargo index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with border hold status and successful mc table lookup.
Trigger Criteria:
Context: A cargo record with border hold status and successful MC table lookup
Applied to: Set Border Hold Index Fields
Action: The cargo has USCARGO-HOLD or USCARGO-HOLDPCS or USCARGO-PR-HPCS or USCARGO-HOLD-B or USCARGO-PR-H-BO or USCARGO-HOLDFDA status and MC table lookup returns successfully
Logic Flow:
IF A cargo record with border hold status and successful MC table lookup
AND The cargo has USCARGO-HOLD or USCARGO-HOLDPCS or USCARGO-PR-HPCS or USCARGO-HOLD-B or USCARGO-PR-H-BO or USCARGO-HOLDFDA status and MC table lookup returns successfully
THEN:
• The system sets the MC station number to held border index and cargo CCN key to held border cargo index
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record requiring border hold index processing.
Trigger Criteria:
Context: A cargo record requiring border hold index processing
Applied to: Lookup Border Station from MC Table
Action: The system needs to determine border station number for hold indexing
Logic Flow:
IF A cargo record requiring border hold index processing
AND The system needs to determine border station number for hold indexing
THEN:
• The system calls table lookup service with MC table ID and cargo location ID to retrieve station number
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with hold conditions and no existing gcsb1rt index record.
Trigger Criteria:
Context: A cargo record with hold conditions and no existing GCSB1RT index record
Applied to: Create New GCSB1RT Index Record
Action: The system attempts to retrieve GCSB1RT record and receives not found status
Logic Flow:
IF A cargo record with hold conditions and no existing GCSB1RT index record
AND The system attempts to retrieve GCSB1RT record and receives not found status
THEN:
• The system creates a new GCSB1RT record with cargo CCN as the key and populated hold index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with hold conditions and an existing gcsb1rt index record.
Trigger Criteria:
Context: A cargo record with hold conditions and an existing GCSB1RT index record
Applied to: Update Existing GCSB1RT Index Record
Action: The system successfully retrieves an existing GCSB1RT record
Logic Flow:
IF A cargo record with hold conditions and an existing GCSB1RT index record
AND The system successfully retrieves an existing GCSB1RT record
THEN:
• The system updates the existing record with current hold index field values
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record that previously had hold conditions.
Trigger Criteria:
Context: A cargo record that previously had hold conditions
Applied to: Clear Hold Index Fields
Action: The cargo no longer has any of the hold status conditions (USCARGO-HOLD, USCARGO-HOLDPCS, USCARGO-PR-HPCS, USCARGO-HOLD-B, USCARGO-PR-H-BO, USCARGO-HOLD-D, USCARGO-PR-H-DE, USCARGO-HOLDFDA)
Logic Flow:
IF A cargo record that previously had hold conditions
AND The cargo no longer has any of the hold status conditions (USCARGO-HOLD, USCARGO-HOLDPCS, USCARGO-PR-HPCS, USCARGO-HOLD-B, USCARGO-PR-H-BO, USCARGO-HOLD-D, USCARGO-PR-H-DE, USCARGO-HOLDFDA)
THEN:
• The system clears the held destination index and held border index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when gcsb1rt index record with cleared hold fields.
Trigger Criteria:
Context: A GCSB1RT index record with cleared hold fields
Applied to: Delete GCSB1RT Index Record
Action: The error destination index, error origin index, and error border index are all empty
Logic Flow:
IF A GCSB1RT index record with cleared hold fields
AND The error destination index, error origin index, and error border index are all empty
THEN:
• The system deletes the entire GCSB1RT index record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when gcsb1rt index record with cleared hold fields and existing error index entries.
Trigger Criteria:
Context: A GCSB1RT index record with cleared hold fields and existing error index entries
Applied to: Update GCSB1RT with Cleared Hold Fields
Action: At least one of the error destination index, error origin index, or error border index contains data
Logic Flow:
IF A GCSB1RT index record with cleared hold fields and existing error index entries
AND At least one of the error destination index, error origin index, or error border index contains data
THEN:
• The system updates the GCSB1RT record with cleared hold fields while preserving error index entries
R-GCCUSIO-cbl-00491 (+2)File: GCCUSIO.cblBusiness Rule: Set CCN Key Index Fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for index field updates.
Trigger Criteria:
Context: A cargo record is being processed for index field updates
Applied to: Is Cargo Deleted?
Action: The cargo status indicates it is deleted (88-GCUSRT-RT10-CPCARGO-DELETED is true)
Logic Flow:
IF A cargo record is being processed for index field updates
AND The cargo status indicates it is deleted (88-GCUSRT-RT10-CPCARGO-DELETED is true)
THEN:
• The system should skip all CCN key index field setting operations and exit the process
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is active (not deleted) and being processed for index updates. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record is active (not deleted) and being processed for index updates
Applied to: Copy CCN Key to RT071 Index Field, Copy CCN Key to RT072 Index Field, Copy CCN Key to RT073 Index Field
Action: The CCN key index fields need to be populated
Logic Flow:
IF A cargo record is active (not deleted) and being processed for index updates
AND The CCN key index fields need to be populated
THEN:
• The system should copy the cargo control number key (GCUSRT-US-CCN-KEY) to RT071, RT072, and RT073 index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being processed and primary ccn index fields have been set. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record is being processed and primary CCN index fields have been set
Applied to: Is Destination Index Not Empty?, Copy CCN Key to RT076 Destination Index Field
Action: The destination index field (GCUSRT-RT076-DEST-INDEX) is not empty (not equal to spaces)
Logic Flow:
IF A cargo record is being processed and primary CCN index fields have been set
AND The destination index field (GCUSRT-RT076-DEST-INDEX) is not empty (not equal to spaces)
THEN:
• The system should copy the cargo control number key (GCUSRT-US-CCN-KEY) to the RT076 destination index field (GCUSRT-RT076-US-CCN-KEY-INDEX)
R-GCCUSIO-cbl-00494 (+13)File: GCCUSIO.cblBusiness Rule: Populate Waybill Index Fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for waybill index population.
Trigger Criteria:
Context: A cargo record is being processed for waybill index population
Applied to: Check if Cargo is Deleted
Action: The cargo record has a deleted status indicator set to true
Logic Flow:
IF A cargo record is being processed for waybill index population
AND The cargo record has a deleted status indicator set to true
THEN:
• The system skips all waybill index field population and exits the process
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is not deleted and contains transportation routing information.
Trigger Criteria:
Context: A cargo record is not deleted and contains transportation routing information
Applied to: Extract Road Number from RT082 & Extract Station Number from RT082 & Extract Waybill Number from RT082 & Extract Waybill Date from RT082
Action: The system processes waybill index fields
Logic Flow:
IF A cargo record is not deleted and contains transportation routing information
AND The system processes waybill index fields
THEN:
• The road number is extracted from the RT082 transportation segment
• The station number is extracted from the RT082 transportation segment
• The waybill number is extracted from the RT082 transportation segment
• The waybill date is extracted from the RT082 transportation segment
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when road number has been extracted from rt082 transportation data.
Trigger Criteria:
Context: The road number has been extracted from RT082 transportation data
Applied to: Map Road Number to RT072-ROAD-INDEX
Action: The system populates waybill index fields
Logic Flow:
IF The road number has been extracted from RT082 transportation data
AND The system populates waybill index fields
THEN:
• The road number is mapped to the RT072-ROAD-INDEX field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when station number has been extracted from rt082 transportation data.
Trigger Criteria:
Context: The station number has been extracted from RT082 transportation data
Applied to: Map Station Number to RT072-STN-INDEX
Action: The system populates waybill index fields
Logic Flow:
IF The station number has been extracted from RT082 transportation data
AND The system populates waybill index fields
THEN:
• The station number is mapped to the RT072-STN-INDEX field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill number has been extracted from rt082 transportation data.
Trigger Criteria:
Context: The waybill number has been extracted from RT082 transportation data
Applied to: Map Waybill Number to RT072-WB-INDEX
Action: The system populates waybill index fields
Logic Flow:
IF The waybill number has been extracted from RT082 transportation data
AND The system populates waybill index fields
THEN:
• The waybill number is mapped to the RT072-WB-INDEX field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill date has been extracted from rt082 transportation data.
Trigger Criteria:
Context: The waybill date has been extracted from RT082 transportation data
Applied to: Map Waybill Date to RT072-WB-DTE-INDEX
Action: The system populates waybill index fields
Logic Flow:
IF The waybill date has been extracted from RT082 transportation data
AND The system populates waybill index fields
THEN:
• The waybill date is mapped to the RT072-WB-DTE-INDEX field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed for waybill index field population.
Trigger Criteria:
Context: A cargo record is being processed for waybill index field population
Applied to: Cargo Record Deleted?
Action: The cargo record has a deleted status indicator set to true
Logic Flow:
IF A cargo record is being processed for waybill index field population
AND The cargo record has a deleted status indicator set to true
THEN:
• The system skips all waybill index field population and exits the process
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is active and not deleted.
Trigger Criteria:
Context: A cargo record is active and not deleted
Applied to: Extract Road Number from Cargo Data & Extract Station Number from Cargo Data & Extract Waybill Number from Cargo Data & Extract Waybill Date from Cargo Data
Action: The system processes waybill index fields
Logic Flow:
IF A cargo record is active and not deleted
AND The system processes waybill index fields
THEN:
• The road number from the cargo equipment data (RT082-ROAD-NUM) is copied to the waybill road index field (RT072-ROAD-INDEX)
• The station number from the cargo equipment data (RT082-STN-NUM) is copied to the waybill station index field (RT072-STN-INDEX)
• The waybill number from the cargo equipment data (RT082-WB-NUM) is copied to the waybill number index field (RT072-WB-INDEX)
• The waybill date from the cargo equipment data (RT082-WB-DTE) is copied to the waybill date index field (RT072-WB-DTE-INDEX)
R-GCCUSIO-cbl-00503 (+3)File: GCCUSIO.cblBusiness Rule: Determine Bond Index Source
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for index field population and the cargo is not marked as deleted.
Trigger Criteria:
Context: A cargo record is being processed for index field population and the cargo is not marked as deleted
Applied to: Determine Bond Index Source - Evaluates in-bond control number availability, falls back to entry number, or sets to spaces based on customs data hierarchy
Action: The system needs to determine the bond index value for cargo tracking
Logic Flow:
IF A cargo record is being processed for index field population and the cargo is not marked as deleted
AND The system needs to determine the bond index value for cargo tracking
THEN:
• The system should use in-bond control number as first priority, entry number as second priority, or set to spaces if neither is available
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record contains an in-bond control number that is not spaces.
Trigger Criteria:
Context: A cargo record contains an in-bond control number that is not spaces
Applied to: Use In-Bond Control Number as Bond Index
Action: The system evaluates bond index assignment
Logic Flow:
IF A cargo record contains an in-bond control number that is not spaces
AND The system evaluates bond index assignment
THEN:
• The system should assign the in-bond control number to the bond number index field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has no in-bond control number (spaces) but contains an entry number that is not spaces.
Trigger Criteria:
Context: A cargo record has no in-bond control number (spaces) but contains an entry number that is not spaces
Applied to: Use Entry Number as Bond Index
Action: The system evaluates bond index assignment after finding no in-bond control number
Logic Flow:
IF A cargo record has no in-bond control number (spaces) but contains an entry number that is not spaces
AND The system evaluates bond index assignment after finding no in-bond control number
THEN:
• The system should assign the entry number to the bond number index field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has both in-bond control number and entry number set to spaces.
Trigger Criteria:
Context: A cargo record has both in-bond control number and entry number set to spaces
Applied to: Set Bond Index to Spaces
Action: The system evaluates bond index assignment after finding no valid customs numbers
Logic Flow:
IF A cargo record has both in-bond control number and entry number set to spaces
AND The system evaluates bond index assignment after finding no valid customs numbers
THEN:
• The system should set the bond number index field to spaces
R-GCCUSIO-cbl-00507 (+5)File: GCCUSIO.cblBusiness Rule: Build Car ID Search Parameters
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with car id index field populated.
Trigger Criteria:
Context: A cargo record exists with car ID index field populated
Applied to: Extract Car ID from Index Field
Action: Car ID search parameters are being built
Logic Flow:
IF A cargo record exists with car ID index field populated
AND Car ID search parameters are being built
THEN:
• The car ID value is extracted from GCUSRT-RT071-CAR-ID-INDEX field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when car id has been extracted from the index field.
Trigger Criteria:
Context: Car ID has been extracted from the index field
Applied to: Map Car ID to Search Key Value
Action: Search parameters are being configured
Logic Flow:
IF Car ID has been extracted from the index field
AND Search parameters are being configured
THEN:
• The car ID value is mapped to GCUC-KEY-VALUE for search operations
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when search operator is provided in input parameters.
Trigger Criteria:
Context: Search operator is provided in input parameters
Applied to: Set Search Operator from Input
Action: Car ID search parameters are being built
Logic Flow:
IF Search operator is provided in input parameters
AND Car ID search parameters are being built
THEN:
• The operator from GCWUSIO-OPERATOR is assigned to GCUC-OPERATOR
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when car id search is being initiated. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Car ID search is being initiated
Applied to: Configure Car ID PCB Path
Action: Database access path needs to be configured
Logic Flow:
IF Car ID search is being initiated
AND Database access path needs to be configured
THEN:
• GCUS-PCB2 is assigned to WS-PCB for car ID index access
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when car id search key and operator are configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Car ID search key and operator are configured
Applied to: Build Qualified SSA Statement
Action: Database query statement needs to be built
Logic Flow:
IF Car ID search key and operator are configured
AND Database query statement needs to be built
THEN:
• GCUC-SSA-QUAL is assigned to WS-SSA-1 for qualified search execution
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when car id search parameters are fully configured with pcb path and qualified ssa.
Trigger Criteria:
Context: Car ID search parameters are fully configured with PCB path and qualified SSA
Applied to: Execute Car ID Index Search
Action: Car ID index search is executed
Logic Flow:
IF Car ID search parameters are fully configured with PCB path and qualified SSA
AND Car ID index search is executed
THEN:
• X1100-CALL-ONE-SSA is performed to execute the database search operation
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with waybill index information in rt072-waybill-index field.
Trigger Criteria:
Context: A cargo record exists with waybill index information in RT072-WAYBILL-INDEX field
Applied to: Extract Waybill Index Value from RT072-WAYBILL-INDEX
Action: The system processes a waybill index search request
Logic Flow:
IF A cargo record exists with waybill index information in RT072-WAYBILL-INDEX field
AND The system processes a waybill index search request
THEN:
• The waybill index value is extracted from GCUSRT-RT072-WAYBILL-INDEXand moved to GCUW-KEY-VALUE for search parameter construction
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill index search request is being processed with a specified search operator in gcwusio-operator.
Trigger Criteria:
Context: A waybill index search request is being processed with a specified search operator in GCWUSIO-OPERATOR
Applied to: Set Search Operator from Input Parameter
Action: The system builds waybill search parameters
Logic Flow:
IF A waybill index search request is being processed with a specified search operator in GCWUSIO-OPERATOR
AND The system builds waybill search parameters
THEN:
• The search operator from GCWUSIO-OPERATOR is moved to GCUW-OPERATOR to define the comparison criteria for the waybill search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill index search operation is being initiated. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A waybill index search operation is being initiated
Applied to: Configure PCB3 Database Path
Action: The system prepares database access parameters
Logic Flow:
IF A waybill index search operation is being initiated
AND The system prepares database access parameters
THEN:
• The PCB3 database path (GCUS-PCB3) is configured in WS-PCB to direct the search to the waybill index database structure
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when waybill key value and search operator have been set in gcuw-key-value and gcuw-operator respectively. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Waybill key value and search operator have been set in GCUW-KEY-VALUE and GCUW-OPERATOR respectively
Applied to: Construct Qualified Search Statement GCUW-SSA-QUAL
Action: The system builds the complete search statement
Logic Flow:
IF Waybill key value and search operator have been set in GCUW-KEY-VALUE and GCUW-OPERATOR respectively
AND The system builds the complete search statement
THEN:
• A qualified search statement GCUW-SSA-QUAL is constructed and moved to WS-SSA-1 to enable precise waybill index searching
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when all waybill search parameters have been configured including pcb, search statement, and key values.
Trigger Criteria:
Context: All waybill search parameters have been configured including PCB, search statement, and key values
Applied to: Execute Waybill Index Search
Action: The system performs the waybill index search operation
Logic Flow:
IF All waybill search parameters have been configured including PCB, search statement, and key values
AND The system performs the waybill index search operation
THEN:
• The search is executed via X1100-CALL-ONE-SSA to retrieve cargo records matching the waybill index criteria
R-GCCUSIO-cbl-00518 (+2)File: GCCUSIO.cblBusiness Rule: Determine Car
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when car-waybill index search request is being processed.
Trigger Criteria:
Context: A car-waybill index search request is being processed
Applied to: Check Car-Waybill Index Content
Action: The car-waybill index field contains data (is not empty spaces)
Logic Flow:
IF A car-waybill index search request is being processed
AND The car-waybill index field contains data (is not empty spaces)
THEN:
• The system sets up a qualified search using the car-waybill index value as the search key and configures qualified search parameters
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when car-waybill index search request is being processed.
Trigger Criteria:
Context: A car-waybill index search request is being processed
Applied to: Set Up Unqualified Search
Action: The car-waybill index field is empty (contains spaces)
Logic Flow:
IF A car-waybill index search request is being processed
AND The car-waybill index field is empty (contains spaces)
THEN:
• The system clears the search key value to spaces and configures unqualified search parameters to retrieve all records
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when car-waybill index field contains data.
Trigger Criteria:
Context: The car-waybill index field contains data
Applied to: Set Car-Waybill Index Value as Search Key
Action: Setting up a qualified search for car-waybill records
Logic Flow:
IF The car-waybill index field contains data
AND Setting up a qualified search for car-waybill records
THEN:
• The system moves the car-waybill index value to the search key field, sets the operator, and configures qualified SSA parameters
R-GCCUSIO-cbl-00521 (+3)File: GCCUSIO.cblBusiness Rule: Determine Bond Search Type
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with bond index field that may or may not contain bond number data.
Trigger Criteria:
Context: A cargo record with bond index field that may or may not contain bond number data
Applied to: Bond Index Available?
Action: The system evaluates the bond index field for content
Logic Flow:
IF A cargo record with bond index field that may or may not contain bond number data
AND The system evaluates the bond index field for content
THEN:
• The system identifies whether bond index contains valid bond number data or is empty
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when bond index field contains valid bond number data (not spaces).
Trigger Criteria:
Context: Bond index field contains valid bond number data (not spaces)
Applied to: Set Bond Number from Index Field
Action: The system prepares bond search parameters
Logic Flow:
IF Bond index field contains valid bond number data (not spaces)
AND The system prepares bond search parameters
THEN:
• The system sets the bond number value from the bond index field and configures qualified search with specific bond number criteria
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when bond index field is empty (contains spaces).
Trigger Criteria:
Context: Bond index field is empty (contains spaces)
Applied to: Set Empty Bond Number
Action: The system prepares bond search parameters
Logic Flow:
IF Bond index field is empty (contains spaces)
AND The system prepares bond search parameters
THEN:
• The system sets empty bond number value and configures unqualified search to retrieve all bond records
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when bond search parameters are configured with either specific bond number for qualified search or empty value for unqualified search.
Trigger Criteria:
Context: Bond search parameters are configured with either specific bond number for qualified search or empty value for unqualified search
Applied to: Execute Bond Index Search
Action: The system executes the bond index search operation
Logic Flow:
IF Bond search parameters are configured with either specific bond number for qualified search or empty value for unqualified search
AND The system executes the bond index search operation
THEN:
• The system performs the database search using the configured search parameters and retrieval method
Business Justification: Governs the functional prerequisites and system routing when request to build secondary ssa parameters for database access.
Trigger Criteria:
Context: A request to build secondary SSA parameters for database access
Applied to: Is Function GU or GN?
Action: The function code is GU (Get Unique) or GN (Get Next) AND the secondary key (GCSUSS00-KEY) is empty spaces
Logic Flow:
IF A request to build secondary SSA parameters for database access
AND The function code is GU (Get Unique) or GN (Get Next) AND the secondary key (GCSUSS00-KEY) is empty spaces
THEN:
• Set error code '0012' and error message 'SECN-KEY EQUAL SPACES' to indicate invalid parameters
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when valid secondary key is provided for database access.
Trigger Criteria:
Context: A valid secondary key is provided for database access
Applied to: Map Secondary Key to Search Value
Action: Building SSA parameters for secondary segment access
Logic Flow:
IF A valid secondary key is provided for database access
AND Building SSA parameters for secondary segment access
THEN:
• Map the secondary key (GCSUSS00-KEY) to the database search value (GCA2-KEY-VALUE)
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when secondary key mapping is completed successfully.
Trigger Criteria:
Context: Secondary key mapping is completed successfully
Applied to: Set PCB Path for Secondary Database
Action: Configuring database access parameters
Logic Flow:
IF Secondary key mapping is completed successfully
AND Configuring database access parameters
THEN:
• Set the PCB (Program Communication Block) to GCA2-PCB for secondary database path
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when database path is configured and search key is mapped.
Trigger Criteria:
Context: Database path is configured and search key is mapped
Applied to: Construct Qualified SSA Statement
Action: Finalizing SSA parameters for database access
Logic Flow:
IF Database path is configured and search key is mapped
AND Finalizing SSA parameters for database access
THEN:
• Set the SSA statement to GCA2-SSA-QUAL (qualified SSA) for targeted record retrieval
R-GCCUSIO-cbl-00529 (+5)File: GCCUSIO.cblBusiness Rule: Validate Secondary Data Content
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when secondary cargo data is being processed for repl function.
Trigger Criteria:
Context: Secondary cargo data is being processed for REPL function
Applied to: Check Cargo Data Content
Action: The cargo data equals ALL SPACES OR ALL LOW-VALUES OR ALL UNDERSCORES
Logic Flow:
IF Secondary cargo data is being processed for REPL function
AND The cargo data equals ALL SPACES OR ALL LOW-VALUES OR ALL UNDERSCORES
THEN:
• Mark the data as empty and invalid for processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when secondary cargo data is being processed.
Trigger Criteria:
Context: Secondary cargo data is being processed
Applied to: Mark Data as Valid
Action: The cargo data does NOT equal ALL SPACES AND does NOT equal ALL LOW-VALUES AND does NOT equal ALL UNDERSCORES
Logic Flow:
IF Secondary cargo data is being processed
AND The cargo data does NOT equal ALL SPACES AND does NOT equal ALL LOW-VALUES AND does NOT equal ALL UNDERSCORES
THEN:
• Mark the data as valid and continue with normal processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when function code is isrt for secondary cargo data.
Trigger Criteria:
Context: Function code is ISRT for secondary cargo data
Applied to: Skip INSERT Operation
Action: The cargo data equals ALL SPACES OR ALL LOW-VALUES OR ALL UNDERSCORES
Logic Flow:
IF Function code is ISRT for secondary cargo data
AND The cargo data equals ALL SPACES OR ALL LOW-VALUES OR ALL UNDERSCORES
THEN:
• Skip the INSERT operation and do not create a record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when function code is repl for secondary cargo data and existing record is found.
Trigger Criteria:
Context: Function code is REPL for secondary cargo data AND existing record is found
Applied to: Perform DELETE Operation
Action: The replacement cargo data equals ALL SPACES OR ALL LOW-VALUES OR ALL UNDERSCORES
Logic Flow:
IF Function code is REPL for secondary cargo data AND existing record is found
AND The replacement cargo data equals ALL SPACES OR ALL LOW-VALUES OR ALL UNDERSCORES
THEN:
• Perform DELETE operation to remove the existing record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when function code is repl for secondary cargo data and existing record is found.
Trigger Criteria:
Context: Function code is REPL for secondary cargo data AND existing record is found
Applied to: Continue with Normal Processing
Action: The replacement cargo data does NOT equal ALL SPACES AND does NOT equal ALL LOW-VALUES AND does NOT equal ALL UNDERSCORES
Logic Flow:
IF Function code is REPL for secondary cargo data AND existing record is found
AND The replacement cargo data does NOT equal ALL SPACES AND does NOT equal ALL LOW-VALUES AND does NOT equal ALL UNDERSCORES
THEN:
• Perform REPL operation to update the existing record with new data
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when function code is repl for secondary cargo data and no existing record is found.
Trigger Criteria:
Context: Function code is REPL for secondary cargo data AND no existing record is found
Applied to: Continue with Normal Processing
Action: The cargo data does NOT equal ALL SPACES AND does NOT equal ALL LOW-VALUES AND does NOT equal ALL UNDERSCORES
Logic Flow:
IF Function code is REPL for secondary cargo data AND no existing record is found
AND The cargo data does NOT equal ALL SPACES AND does NOT equal ALL LOW-VALUES AND does NOT equal ALL UNDERSCORES
Business Justification: Defines the strict business conditions required to proceed when message segment insert or replace operation is being performed.
Trigger Criteria:
Context: A message segment insert or replace operation is being performed
Applied to: Save Original IO Area
Action: The operation type is ISRT or REPL
Logic Flow:
IF A message segment insert or replace operation is being performed
AND The operation type is ISRT or REPL
THEN:
• The original IO area content must be saved to working storage before any modifications
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when message segment operation requires key extraction.
Trigger Criteria:
Context: A message segment operation requires key extraction
Applied to: Extract Message Key from Input
Action: The operation is insert or replace
Logic Flow:
IF A message segment operation requires key extraction
AND The operation is insert or replace
THEN:
• The message key must be extracted from the GCWUSIO input area to the working storage key field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when message segment requires data extraction.
Trigger Criteria:
Context: A message segment requires data extraction
Applied to: Extract Message Data from Input
Action: Processing insert or replace operations
Logic Flow:
IF A message segment requires data extraction
AND Processing insert or replace operations
THEN:
• The message data content must be extracted from the saved IO area to working storage data field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when message key has been extracted from input.
Trigger Criteria:
Context: Message key has been extracted from input
Applied to: Move Key to Working Storage Key Field
Action: Structuring a message segment
Logic Flow:
IF Message key has been extracted from input
AND Structuring a message segment
THEN:
• The key must be moved to the appropriate working storage key field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when message data has been extracted from input.
Trigger Criteria:
Context: Message data has been extracted from input
Applied to: Move Data to Working Storage Data Field
Action: Structuring a message segment
Logic Flow:
IF Message data has been extracted from input
AND Structuring a message segment
THEN:
• The data must be moved to the appropriate working storage data field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when message key and data are in working storage fields.
Trigger Criteria:
Context: Message key and data are in working storage fields
Applied to: Combine Key and Data into Segment Format
Action: Creating a structured segment for database operations
Logic Flow:
IF Message key and data are in working storage fields
AND Creating a structured segment for database operations
THEN:
• The key and data must be combined into the complete segment structure in working storage
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when complete segment structure exists in working storage.
Trigger Criteria:
Context: A complete segment structure exists in working storage
Applied to: Move Structured Segment to IO Area
Action: Preparing for database insert or replace operation
Logic Flow:
IF A complete segment structure exists in working storage
AND Preparing for database insert or replace operation
THEN:
• The structured segment must be moved to the GCWUSIO IO area
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when message segment retrieval operation is requested.
Trigger Criteria:
Context: A message segment retrieval operation is requested
Applied to: Validate Key Not Spaces
Action: The function code is GU or GN and the message key is spaces
Logic Flow:
IF A message segment retrieval operation is requested
AND The function code is GU or GN and the message key is spaces
THEN:
• An error must be set indicating the key cannot be spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when retrieval operation has an empty message key.
Trigger Criteria:
Context: A retrieval operation has an empty message key
Applied to: Set Error - Key Cannot be Spaces
Action: Key validation fails for GU or GN operations
Logic Flow:
IF A retrieval operation has an empty message key
AND Key validation fails for GU or GN operations
THEN:
• Error number '0012' and message 'GCSA8RT-KEY EQUAL SPACES' must be set
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when valid message key exists for retrieval.
Trigger Criteria:
Context: A valid message key exists for retrieval
Applied to: Retrieve Message Segment
Action: Processing GU operations with valid key
Logic Flow:
IF A valid message key exists for retrieval
AND Processing GU operations with valid key
THEN:
• The message segment must be retrieved using the qualified SSA and appropriate PCB
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when message segment has been successfully retrieved.
Trigger Criteria:
Context: A message segment has been successfully retrieved
Applied to: Extract Segment into Working Storage
Action: Processing the retrieved segment data
Logic Flow:
IF A message segment has been successfully retrieved
AND Processing the retrieved segment data
THEN:
• The complete segment must be moved to working storage for data extraction
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when message segment data has been extracted to working storage.
Trigger Criteria:
Context: Message segment data has been extracted to working storage
Applied to: Move Data Portion to IO Area
Action: Preparing retrieval operation response
Logic Flow:
IF Message segment data has been extracted to working storage
AND Preparing retrieval operation response
THEN:
• Only the data portion must be moved back to the GCWUSIO IO area
R-GCCUSIO-cbl-00547 (+6)File: GCCUSIO.cblBusiness Rule: Lookup Border Station Information
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when border station lookup is required for error index population.
Trigger Criteria:
Context: A border station lookup is required for error index population
Applied to: Initialize Table Lookup Parameters
Action: The system prepares to lookup border station information
Logic Flow:
IF A border station lookup is required for error index population
AND The system prepares to lookup border station information
THEN:
• All table lookup parameters are cleared to spaces and flags are reset to ensure clean initialization
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when border station lookup parameters are initialized.
Trigger Criteria:
Context: Border station lookup parameters are initialized
Applied to: Set Function Code to 'GU'
Action: The system prepares to retrieve border station information
Logic Flow:
IF Border station lookup parameters are initialized
AND The system prepares to retrieve border station information
THEN:
• The function code is set to 'GU' to perform a unique record retrieval
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when function code is set for border station lookup.
Trigger Criteria:
Context: Function code is set for border station lookup
Applied to: Set Table ID to 'MC'
Action: The system identifies which table contains border station data
Logic Flow:
IF Function code is set for border station lookup
AND The system identifies which table contains border station data
THEN:
• The table ID is set to 'MC' to access the border station reference table
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when mc table is identified for border station lookup.
Trigger Criteria:
Context: MC table is identified for border station lookup
Applied to: Set Location ID from Cargo Record
Action: The system needs to specify which location to lookup
Logic Flow:
IF MC table is identified for border station lookup
AND The system needs to specify which location to lookup
THEN:
• The location ID from the cargo record is used as the search sequence ID for the MC table lookup
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when all lookup parameters are set with mc table id and location id. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All lookup parameters are set with MC table ID and location ID
Applied to: Call Table Lookup Service GCCTBIO
Action: The system executes the border station lookup
Logic Flow:
IF All lookup parameters are set with MC table ID and location ID
AND The system executes the border station lookup
THEN:
• The GCCTBIO table lookup service is called with the prepared parameters to retrieve border station data
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when border station table lookup service has been executed.
Trigger Criteria:
Context: Border station table lookup service has been executed
Applied to: Lookup Successful?
Action: The system checks the lookup result
Logic Flow:
IF Border station table lookup service has been executed
AND The system checks the lookup result
THEN:
• If return flag equals '0' then lookup is successful, otherwise lookup failed
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when border station lookup was successful with return flag '0'.
Trigger Criteria:
Context: Border station lookup was successful with return flag '0'
Applied to: Extract Border Station Number from MC Segment
Action: The system processes the retrieved MC table segment
Logic Flow:
IF Border station lookup was successful with return flag '0'
AND The system processes the retrieved MC table segment
THEN:
• The border station number is extracted from the MC segment and made available for error index population
R-GCCUSIO-cbl-00554 (+8)File: GCCUSIO.cblBusiness Rule: Build IH Table Lookup Parameters
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when system needs to retrieve iron highway table configuration.
Trigger Criteria:
Context: The system needs to retrieve Iron Highway table configuration
Applied to: Set Function Code to 'GU'
Action: IH table lookup parameters are being initialized
Logic Flow:
IF The system needs to retrieve Iron Highway table configuration
AND IH table lookup parameters are being initialized
THEN:
• The function code should be set to 'GU' for Get Unique operation
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when system is preparing to lookup iron highway table data.
Trigger Criteria:
Context: The system is preparing to lookup Iron Highway table data
Applied to: Set Accept Status to 'GE'
Action: Table lookup parameters are being configured
Logic Flow:
IF The system is preparing to lookup Iron Highway table data
AND Table lookup parameters are being configured
THEN:
• The accept status should be set to 'GE' to handle table not found conditions gracefully
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when system is preparing iron highway table lookup parameters.
Trigger Criteria:
Context: The system is preparing Iron Highway table lookup parameters
Applied to: Clear Table Key Fields
Action: Table key fields need to be initialized
Logic Flow:
IF The system is preparing Iron Highway table lookup parameters
AND Table key fields need to be initialized
THEN:
• All table key fields including table key value, detail key value, second PCB flag, and unqualified SSA flag should be cleared to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when system needs to access iron highway configuration data.
Trigger Criteria:
Context: The system needs to access Iron Highway configuration data
Applied to: Set Table ID to 'IH'
Action: Table lookup parameters are being set
Logic Flow:
IF The system needs to access Iron Highway configuration data
AND Table lookup parameters are being set
THEN:
• The table ID should be set to 'IH' to identify the Iron Highway configuration table
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when system has saved waybill station information.
Trigger Criteria:
Context: The system has saved waybill station information
Applied to: Extract Station Code from Waybill
Action: Iron Highway table lookup requires a station-based search key
Logic Flow:
IF The system has saved waybill station information
AND Iron Highway table lookup requires a station-based search key
THEN:
• The station code should be extracted from the saved waybill station data and used as the search sequence ID
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when station code has been extracted from waybill information.
Trigger Criteria:
Context: A station code has been extracted from waybill information
Applied to: Set Station Code as Search Key
Action: Iron Highway table lookup parameters are being finalized
Logic Flow:
IF A station code has been extracted from waybill information
AND Iron Highway table lookup parameters are being finalized
THEN:
• The extracted station code should be assigned as the table search sequence ID
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when system is preparing to call iron highway table lookup service. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is preparing to call Iron Highway table lookup service
Applied to: Clear Return Flag
Action: Return flag needs to be initialized
Logic Flow:
IF The system is preparing to call Iron Highway table lookup service
AND Return flag needs to be initialized
THEN:
• The return flag should be cleared to spaces to ensure accurate result detection
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when all iron highway table lookup parameters have been prepared including function code, table id, and station search key. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All Iron Highway table lookup parameters have been prepared including function code, table ID, and station search key
Applied to: Call Table Lookup Service
Action: The system needs to retrieve Iron Highway configuration data
Logic Flow:
IF All Iron Highway table lookup parameters have been prepared including function code, table ID, and station search key
AND The system needs to retrieve Iron Highway configuration data
THEN:
• The table lookup service should be called with the prepared parameters to retrieve the configuration segment
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when iron highway table lookup service has been called.
Trigger Criteria:
Context: Iron Highway table lookup service has been called
Applied to: Table Found?
Action: The system needs to determine if the table data was found
Logic Flow:
IF Iron Highway table lookup service has been called
AND The system needs to determine if the table data was found
THEN:
• If the return flag equals '0' then the table was found successfully, otherwise the table was not found
Business Justification: Defines the strict business conditions required to proceed when cargo record with a valid ccn key exists.
Trigger Criteria:
Context: A cargo record with a valid CCN key exists
Applied to: Build Complete Secondary Key
Action: The system needs to retrieve N9 reference data for shipment identification
Logic Flow:
IF A cargo record with a valid CCN key exists
AND The system needs to retrieve N9 reference data for shipment identification
THEN:
• The system builds a secondary key using the CCN key, record type '02', and sequence '0001'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when complete secondary key has been built with ccn, record type '02', and sequence '0001'. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A complete secondary key has been built with CCN, record type '02', and sequence '0001'
Applied to: Retrieve N9 Reference Data
Action: The system executes a database call to retrieve N9 reference data
Logic Flow:
IF A complete secondary key has been built with CCN, record type '02', and sequence '0001'
AND The system executes a database call to retrieve N9 reference data
THEN:
• The system retrieves the N9 reference data from the GCSA2RT secondary cargo segment
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when n9 reference data has been successfully retrieved from the database.
Trigger Criteria:
Context: N9 reference data has been successfully retrieved from the database
Applied to: Loop Through 20 N9 Records
Action: The system processes the N9 reference numbers
Logic Flow:
IF N9 reference data has been successfully retrieved from the database
AND The system processes the N9 reference numbers
THEN:
• The system initializes a counter to zero and loops through up to 20 N9 reference number records
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when system is processing n9 reference number records.
Trigger Criteria:
Context: The system is processing N9 reference number records
Applied to: Extract Shipment ID from Reference Number
Action: A reference number qualifier equals 'CN'
Logic Flow:
IF The system is processing N9 reference number records
AND A reference number qualifier equals 'CN'
THEN:
• The system extracts the corresponding reference number as the shipment ID
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when system attempts to retrieve n9 reference data using the secondary key.
Trigger Criteria:
Context: The system attempts to retrieve N9 reference data using the secondary key
Applied to: No N9 Data Available
Action: No N9 reference data is found in the database
Logic Flow:
IF The system attempts to retrieve N9 reference data using the secondary key
AND No N9 reference data is found in the database
THEN:
• The system continues processing without shipment ID information
R-GCCUSIO-cbl-00568 (+6)File: GCCUSIO.cblBusiness Rule: Compare Status Changes
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being processed for iron highway notification.
Trigger Criteria:
Context: A cargo record is being processed for Iron Highway notification
Applied to: Current US Cargo Status Empty?
Action: The US cargo short description is empty (spaces) AND the CP cargo status description is not equal to 'SENT'
Logic Flow:
IF A cargo record is being processed for Iron Highway notification
AND The US cargo short description is empty (spaces) AND the CP cargo status description is not equal to 'SENT'
THEN:
• The system should proceed to check if both current and CP status are empty
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being processed for iron highway notification.
Trigger Criteria:
Context: A cargo record is being processed for Iron Highway notification
Applied to: CP Status = DELETED or RELEASE?
Action: The CP cargo status description equals 'DELETED' OR equals 'RELEASE'
Logic Flow:
IF A cargo record is being processed for Iron Highway notification
AND The CP cargo status description equals 'DELETED' OR equals 'RELEASE'
THEN:
• The system should continue with the notification process without checking for status changes
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has empty us cargo short description and cp cargo status description equals 'sent'.
Trigger Criteria:
Context: A cargo record has empty US cargo short description AND CP cargo status description equals 'SENT'
Applied to: CP Cargo Status = SENT?
Action: The system is determining the current status for Iron Highway notification
Logic Flow:
IF A cargo record has empty US cargo short description AND CP cargo status description equals 'SENT'
AND The system is determining the current status for Iron Highway notification
THEN:
• The system should use the CP cargo status description as the current status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being evaluated for iron highway notification.
Trigger Criteria:
Context: A cargo record is being evaluated for Iron Highway notification
Applied to: Both Current and CP Status Empty?
Action: Both the US cargo short description is empty (spaces) AND the CP cargo status description is empty (spaces)
Logic Flow:
IF A cargo record is being evaluated for Iron Highway notification
AND Both the US cargo short description is empty (spaces) AND the CP cargo status description is empty (spaces)
THEN:
• The system should exit the notification process without sending any notification
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being evaluated for iron highway notification.
Trigger Criteria:
Context: A cargo record is being evaluated for Iron Highway notification
Applied to: Current Status = RELEASE?
Action: The US cargo short description equals 'RELEASE'
Logic Flow:
IF A cargo record is being evaluated for Iron Highway notification
AND The US cargo short description equals 'RELEASE'
THEN:
• The system should exit the notification process without sending notification
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has a previously saved status for comparison.
Trigger Criteria:
Context: A cargo record has a previously saved status for comparison
Applied to: Saved Status = Current Status?
Action: The saved Iron Highway status equals the current US cargo short description
Logic Flow:
IF A cargo record has a previously saved status for comparison
AND The saved Iron Highway status equals the current US cargo short description
THEN:
• The system should exit the notification process as no status change has occurred
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has passed all status comparison checks.
Trigger Criteria:
Context: A cargo record has passed all status comparison checks
Applied to: Status Change Detected
Action: The current status is different from the saved status AND the current status is not 'RELEASE' AND not both statuses are empty
Logic Flow:
IF A cargo record has passed all status comparison checks
AND The current status is different from the saved status AND the current status is not 'RELEASE' AND not both statuses are empty
THEN:
• The system should proceed with generating and sending the Iron Highway notification
R-GCCUSIO-cbl-00575 (+16)File: GCCUSIO.cblBusiness Rule: Evaluate CP Cargo Status Conditions
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cp cargo record with rt10 status field.
Trigger Criteria:
Context: A CP cargo record with RT10 status field
Applied to: Check RT10 CPCARGO-ERROR Status?
Action: The system checks the RT10 CPCARGO-ERROR status condition
Logic Flow:
IF A CP cargo record with RT10 status field
AND The system checks the RT10 CPCARGO-ERROR status condition
THEN:
• The system identifies if error processing is required based on the CPCARGO-ERROR status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cp cargo record with rt10 status field.
Trigger Criteria:
Context: A CP cargo record with RT10 status field
Applied to: Check RT10 CPCARGO-PENDING Status?
Action: The system checks the RT10 CPCARGO-PENDING status condition
Logic Flow:
IF A CP cargo record with RT10 status field
AND The system checks the RT10 CPCARGO-PENDING status condition
THEN:
• The system identifies if error processing is required based on the CPCARGO-PENDING status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record with rt11 status field.
Trigger Criteria:
Context: A US cargo record with RT11 status field
Applied to: Check RT11 USCARGO-ERROR Status?
Action: The system checks the RT11 USCARGO-ERROR status condition
Logic Flow:
IF A US cargo record with RT11 status field
AND The system checks the RT11 USCARGO-ERROR status condition
THEN:
• The system identifies if error processing is required based on the USCARGO-ERROR status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record with rt11 status field.
Trigger Criteria:
Context: A US cargo record with RT11 status field
Applied to: Check RT11 USCARGO-HOLD Status?
Action: The system checks the RT11 USCARGO-HOLD status condition
Logic Flow:
IF A US cargo record with RT11 status field
AND The system checks the RT11 USCARGO-HOLD status condition
THEN:
• The system identifies if hold processing is required based on the USCARGO-HOLD status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record with rt11 status field.
Trigger Criteria:
Context: A US cargo record with RT11 status field
Applied to: Check RT11 USCARGO-HOLDPCS Status?
Action: The system checks the RT11 USCARGO-HOLDPCS status condition
Logic Flow:
IF A US cargo record with RT11 status field
AND The system checks the RT11 USCARGO-HOLDPCS status condition
THEN:
• The system identifies if hold processing is required based on the USCARGO-HOLDPCS status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record with rt11 status field.
Trigger Criteria:
Context: A US cargo record with RT11 status field
Applied to: Check RT11 USCARGO-PR-HPCS Status?
Action: The system checks the RT11 USCARGO-PR-HPCS status condition
Logic Flow:
IF A US cargo record with RT11 status field
AND The system checks the RT11 USCARGO-PR-HPCS status condition
THEN:
• The system identifies if hold processing is required based on the USCARGO-PR-HPCS status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record with rt11 status field.
Trigger Criteria:
Context: A US cargo record with RT11 status field
Applied to: Check RT11 USCARGO-HOLD-B Status?
Action: The system checks the RT11 USCARGO-HOLD-B status condition
Logic Flow:
IF A US cargo record with RT11 status field
AND The system checks the RT11 USCARGO-HOLD-B status condition
THEN:
• The system identifies if hold processing is required based on the USCARGO-HOLD-B status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record with rt11 status field.
Trigger Criteria:
Context: A US cargo record with RT11 status field
Applied to: Check RT11 USCARGO-PR-H-BO Status?
Action: The system checks the RT11 USCARGO-PR-H-BO status condition
Logic Flow:
IF A US cargo record with RT11 status field
AND The system checks the RT11 USCARGO-PR-H-BO status condition
THEN:
• The system identifies if hold processing is required based on the USCARGO-PR-H-BO status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record with rt11 status field.
Trigger Criteria:
Context: A US cargo record with RT11 status field
Applied to: Check RT11 USCARGO-HOLD-D Status?
Action: The system checks the RT11 USCARGO-HOLD-D status condition
Logic Flow:
IF A US cargo record with RT11 status field
AND The system checks the RT11 USCARGO-HOLD-D status condition
THEN:
• The system identifies if hold processing is required based on the USCARGO-HOLD-D status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record with rt11 status field.
Trigger Criteria:
Context: A US cargo record with RT11 status field
Applied to: Check RT11 USCARGO-PR-H-DE Status?
Action: The system checks the RT11 USCARGO-PR-H-DE status condition
Logic Flow:
IF A US cargo record with RT11 status field
AND The system checks the RT11 USCARGO-PR-H-DE status condition
THEN:
• The system identifies if hold processing is required based on the USCARGO-PR-H-DE status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record with rt11 status field.
Trigger Criteria:
Context: A US cargo record with RT11 status field
Applied to: Check RT11 USCARGO-HOLDFDA Status?
Action: The system checks the RT11 USCARGO-HOLDFDA status condition
Logic Flow:
IF A US cargo record with RT11 status field
AND The system checks the RT11 USCARGO-HOLDFDA status condition
THEN:
• The system identifies if hold processing is required based on the USCARGO-HOLDFDA status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with no error conditions (rt10 cpcargo-error, rt10 cpcargo-pending, rt11 uscargo-error) and no hold conditions (rt11 uscargo-hold, rt11 uscargo-holdpcs, rt11 uscargo-pr-hpcs, rt11 uscargo-hold-b, rt11 uscargo-pr-h-bo, rt11 uscargo-hold-d, rt11 uscargo-pr-h-de, rt11 uscargo-holdfda).
Trigger Criteria:
Context: A cargo record with no error conditions (RT10 CPCARGO-ERROR, RT10 CPCARGO-PENDING, RT11 USCARGO-ERROR) and no hold conditions (RT11 USCARGO-HOLD, RT11 USCARGO-HOLDPCS, RT11 USCARGO-PR-HPCS, RT11 USCARGO-HOLD-B, RT11 USCARGO-PR-H-BO, RT11 USCARGO-HOLD-D, RT11 USCARGO-PR-H-DE, RT11 USCARGO-HOLDFDA)
Applied to: Delete GCSB1RT Index Record
Action: The system processes the cargo status update
Logic Flow:
IF A cargo record with no error conditions (RT10 CPCARGO-ERROR, RT10 CPCARGO-PENDING, RT11 USCARGO-ERROR) and no hold conditions (RT11 USCARGO-HOLD, RT11 USCARGO-HOLDPCS, RT11 USCARGO-PR-HPCS, RT11 USCARGO-HOLD-B, RT11 USCARGO-PR-H-BO, RT11 USCARGO-HOLD-D, RT11 USCARGO-PR-H-DE, RT11 USCARGO-HOLDFDA)
AND The system processes the cargo status update
THEN:
• The system removes the cargo record from the GCSB1RT status index table
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with no error conditions (rt10 cpcargo-error, rt10 cpcargo-pending, rt11 uscargo-error) but with hold conditions.
Trigger Criteria:
Context: A cargo record with no error conditions (RT10 CPCARGO-ERROR, RT10 CPCARGO-PENDING, RT11 USCARGO-ERROR) but with hold conditions
Applied to: Clear Error Index Fields
Action: The system processes the cargo status update
Logic Flow:
IF A cargo record with no error conditions (RT10 CPCARGO-ERROR, RT10 CPCARGO-PENDING, RT11 USCARGO-ERROR) but with hold conditions
AND The system processes the cargo status update
THEN:
• The system clears the error origin index, error destination index, and error border index fields in the status record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with no hold conditions (rt11 uscargo-hold, rt11 uscargo-holdpcs, rt11 uscargo-pr-hpcs, rt11 uscargo-hold-b, rt11 uscargo-pr-h-bo, rt11 uscargo-hold-d, rt11 uscargo-pr-h-de, rt11 uscargo-holdfda) but with error conditions.
Trigger Criteria:
Context: A cargo record with no hold conditions (RT11 USCARGO-HOLD, RT11 USCARGO-HOLDPCS, RT11 USCARGO-PR-HPCS, RT11 USCARGO-HOLD-B, RT11 USCARGO-PR-H-BO, RT11 USCARGO-HOLD-D, RT11 USCARGO-PR-H-DE, RT11 USCARGO-HOLDFDA) but with error conditions
Applied to: Clear Hold Index Fields
Action: The system processes the cargo status update
Logic Flow:
IF A cargo record with no hold conditions (RT11 USCARGO-HOLD, RT11 USCARGO-HOLDPCS, RT11 USCARGO-PR-HPCS, RT11 USCARGO-HOLD-B, RT11 USCARGO-PR-H-BO, RT11 USCARGO-HOLD-D, RT11 USCARGO-PR-H-DE, RT11 USCARGO-HOLDFDA) but with error conditions
AND The system processes the cargo status update
THEN:
• The system clears the held destination index and held border index fields in the status record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with error conditions (rt10 cpcargo-error, rt10 cpcargo-pending, or rt11 uscargo-error).
Trigger Criteria:
Context: A cargo record with error conditions (RT10 CPCARGO-ERROR, RT10 CPCARGO-PENDING, or RT11 USCARGO-ERROR)
Applied to: Fill Error Index Fields
Action: The system processes the cargo status update
Logic Flow:
IF A cargo record with error conditions (RT10 CPCARGO-ERROR, RT10 CPCARGO-PENDING, or RT11 USCARGO-ERROR)
AND The system processes the cargo status update
THEN:
• The system populates error code and location fields for origin station, border station, and destination station in the status index record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with hold conditions (rt11 uscargo-hold, rt11 uscargo-holdpcs, rt11 uscargo-pr-hpcs, rt11 uscargo-hold-b, rt11 uscargo-pr-h-bo, rt11 uscargo-hold-d, rt11 uscargo-pr-h-de, or rt11 uscargo-holdfda).
Trigger Criteria:
Context: A cargo record with hold conditions (RT11 USCARGO-HOLD, RT11 USCARGO-HOLDPCS, RT11 USCARGO-PR-HPCS, RT11 USCARGO-HOLD-B, RT11 USCARGO-PR-H-BO, RT11 USCARGO-HOLD-D, RT11 USCARGO-PR-H-DE, or RT11 USCARGO-HOLDFDA)
Applied to: Fill Hold Index Fields
Action: The system processes the cargo status update
Logic Flow:
IF A cargo record with hold conditions (RT11 USCARGO-HOLD, RT11 USCARGO-HOLDPCS, RT11 USCARGO-PR-HPCS, RT11 USCARGO-HOLD-B, RT11 USCARGO-PR-H-BO, RT11 USCARGO-HOLD-D, RT11 USCARGO-PR-H-DE, or RT11 USCARGO-HOLDFDA)
AND The system processes the cargo status update
THEN:
• The system populates held destination and held border location fields in the status index record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with error or hold conditions requiring status tracking.
Trigger Criteria:
Context: A cargo record with error or hold conditions requiring status tracking
Applied to: Insert/Update GCSB1RT Record
Action: The system processes the cargo status update and the status index record exists
Logic Flow:
IF A cargo record with error or hold conditions requiring status tracking
AND The system processes the cargo status update and the status index record exists
THEN:
• The system updates the existing GCSB1RT status index record with current status information
R-GCCUSIO-cbl-00592 (+5)File: GCCUSIO.cblBusiness Rule: Evaluate US Cargo Status Conditions
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with rt11 uscargo status fields.
Trigger Criteria:
Context: A cargo record with RT11 USCARGO status fields
Applied to: Check RT11 USCARGO Status Fields
Action: The system checks for USCARGO-HOLD OR USCARGO-HOLDPCS OR USCARGO-PR-HPCS OR USCARGO-HOLD-D OR USCARGO-PR-H-DE OR USCARGO-HOLDFDA status conditions
Logic Flow:
IF A cargo record with RT11 USCARGO status fields
AND The system checks for USCARGO-HOLD OR USCARGO-HOLDPCS OR USCARGO-PR-HPCS OR USCARGO-HOLD-D OR USCARGO-PR-H-DE OR USCARGO-HOLDFDA status conditions
THEN:
• The system should identify that destination hold index processing is required and proceed with hold field population
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with rt11 uscargo status fields.
Trigger Criteria:
Context: A cargo record with RT11 USCARGO status fields
Applied to: Check RT11 USCARGO Status Fields
Action: The system checks for USCARGO-HOLD-B OR USCARGO-PR-H-BO status conditions
Logic Flow:
IF A cargo record with RT11 USCARGO status fields
AND The system checks for USCARGO-HOLD-B OR USCARGO-PR-H-BO status conditions
THEN:
• The system should identify that border hold index processing is required and proceed with border hold field population
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with rt11 uscargo status fields.
Trigger Criteria:
Context: A cargo record with RT11 USCARGO status fields
Applied to: Check RT11 USCARGO Status Fields
Action: The system checks for USCARGO-ERROR status condition
Logic Flow:
IF A cargo record with RT11 USCARGO status fields
AND The system checks for USCARGO-ERROR status condition
THEN:
• The system should identify that error index processing is required and proceed with error field population
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record being processed for status table updates.
Trigger Criteria:
Context: A cargo record being processed for status table updates
Applied to: Clear Hold Index Fields
Action: The cargo does NOT have USCARGO-HOLD AND NOT USCARGO-HOLDPCS AND NOT USCARGO-PR-HPCS AND NOT USCARGO-HOLD-B AND NOT USCARGO-PR-H-BO AND NOT USCARGO-HOLD-D AND NOT USCARGO-PR-H-DE AND NOT USCARGO-HOLDFDA status conditions
Logic Flow:
IF A cargo record being processed for status table updates
AND The cargo does NOT have USCARGO-HOLD AND NOT USCARGO-HOLDPCS AND NOT USCARGO-PR-HPCS AND NOT USCARGO-HOLD-B AND NOT USCARGO-PR-H-BO AND NOT USCARGO-HOLD-D AND NOT USCARGO-PR-H-DE AND NOT USCARGO-HOLDFDA status conditions
THEN:
• The system should clear the held destination index and held border index fields and determine if status record deletion is required
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with destination hold status conditions.
Trigger Criteria:
Context: A cargo record with destination hold status conditions
Applied to: Set Destination Hold Index Requirements
Action: The cargo has USCARGO-HOLD OR USCARGO-HOLDPCS OR USCARGO-PR-HPCS OR USCARGO-HOLD-D OR USCARGO-PR-H-DE OR USCARGO-HOLDFDA status
Logic Flow:
IF A cargo record with destination hold status conditions
AND The cargo has USCARGO-HOLD OR USCARGO-HOLDPCS OR USCARGO-PR-HPCS OR USCARGO-HOLD-D OR USCARGO-PR-H-DE OR USCARGO-HOLDFDA status
THEN:
• The system should populate the destination hold index with the destination station number and the destination cargo key with the CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with border hold status conditions.
Trigger Criteria:
Context: A cargo record with border hold status conditions
Applied to: Set Border Hold Index Requirements
Action: The cargo has USCARGO-HOLD OR USCARGO-HOLDPCS OR USCARGO-PR-HPCS OR USCARGO-HOLD-B OR USCARGO-PR-H-BO OR USCARGO-HOLDFDA status
Logic Flow:
IF A cargo record with border hold status conditions
AND The cargo has USCARGO-HOLD OR USCARGO-HOLDPCS OR USCARGO-PR-HPCS OR USCARGO-HOLD-B OR USCARGO-PR-H-BO OR USCARGO-HOLDFDA status
THEN:
• The system should retrieve the border station number from the MC table using the location ID and populate the border hold index fields with the station number and CCN key
R-GCCUSIO-cbl-00598 (+12)File: GCCUSIO.cblBusiness Rule: Determine Error Index Action
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists in the gcsb1rt index table and the cargo does not have cpcargo-error status and the cargo does not have cpcargo-pending status and the cargo does not have uscargo-error status.
Trigger Criteria:
Context: A cargo record exists in the GCSB1RT index table AND the cargo does not have CPCARGO-ERROR status AND the cargo does not have CPCARGO-PENDING status AND the cargo does not have USCARGO-ERROR status
Applied to: Clear Error Index Fields
Action: The system processes the cargo status update
Logic Flow:
IF A cargo record exists in the GCSB1RT index table AND the cargo does not have CPCARGO-ERROR status AND the cargo does not have CPCARGO-PENDING status AND the cargo does not have USCARGO-ERROR status
AND The system processes the cargo status update
THEN:
• The system clears the error origin index field AND clears the error destination index field AND clears the error border index field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when error index fields have been cleared and the held destination index field is empty and the held border index field is empty.
Trigger Criteria:
Context: Error index fields have been cleared AND the held destination index field is empty AND the held border index field is empty
Applied to: Delete Index Record
Action: The system evaluates remaining index content
Logic Flow:
IF Error index fields have been cleared AND the held destination index field is empty AND the held border index field is empty
AND The system evaluates remaining index content
THEN:
• The system deletes the GCSB1RT index record completely
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when error index fields have been cleared and either the held destination index field is not empty or the held border index field is not empty.
Trigger Criteria:
Context: Error index fields have been cleared AND either the held destination index field is not empty OR the held border index field is not empty
Applied to: Update Index Record
Action: The system evaluates remaining index content
Logic Flow:
IF Error index fields have been cleared AND either the held destination index field is not empty OR the held border index field is not empty
AND The system evaluates remaining index content
THEN:
• The system updates the existing GCSB1RT index record with the current field values
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists in the gcsb1rt index table and the cargo does not have uscargo-hold status and the cargo does not have uscargo-holdpcs status and the cargo does not have uscargo-pr-hpcs status and the cargo does not have uscargo-hold-b status and the cargo does not have uscargo-pr-h-bo status and the cargo does not have uscargo-hold-d status and the cargo does not have uscargo-pr-h-de status and the cargo does not have uscargo-holdfda status.
Trigger Criteria:
Context: A cargo record exists in the GCSB1RT index table AND the cargo does not have USCARGO-HOLD status AND the cargo does not have USCARGO-HOLDPCS status AND the cargo does not have USCARGO-PR-HPCS status AND the cargo does not have USCARGO-HOLD-B status AND the cargo does not have USCARGO-PR-H-BO status AND the cargo does not have USCARGO-HOLD-D status AND the cargo does not have USCARGO-PR-H-DE status AND the cargo does not have USCARGO-HOLDFDA status
Applied to: Clear Hold Index Fields
Action: The system processes the cargo status update
Logic Flow:
IF A cargo record exists in the GCSB1RT index table AND the cargo does not have USCARGO-HOLD status AND the cargo does not have USCARGO-HOLDPCS status AND the cargo does not have USCARGO-PR-HPCS status AND the cargo does not have USCARGO-HOLD-B status AND the cargo does not have USCARGO-PR-H-BO status AND the cargo does not have USCARGO-HOLD-D status AND the cargo does not have USCARGO-PR-H-DE status AND the cargo does not have USCARGO-HOLDFDA status
AND The system processes the cargo status update
THEN:
• The system clears the held destination index field AND clears the held border index field
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when hold index fields have been cleared and the error destination index field is empty and the error origin index field is empty and the error border index field is empty.
Trigger Criteria:
Context: Hold index fields have been cleared AND the error destination index field is empty AND the error origin index field is empty AND the error border index field is empty
Applied to: Delete Index Record
Action: The system evaluates remaining index content
Logic Flow:
IF Hold index fields have been cleared AND the error destination index field is empty AND the error origin index field is empty AND the error border index field is empty
AND The system evaluates remaining index content
THEN:
• The system deletes the GCSB1RT index record completely
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when hold index fields have been cleared and either the error destination index field is not empty or the error origin index field is not empty or the error border index field is not empty.
Trigger Criteria:
Context: Hold index fields have been cleared AND either the error destination index field is not empty OR the error origin index field is not empty OR the error border index field is not empty
Applied to: Update Index Record
Action: The system evaluates remaining index content
Logic Flow:
IF Hold index fields have been cleared AND either the error destination index field is not empty OR the error origin index field is not empty OR the error border index field is not empty
AND The system evaluates remaining index content
THEN:
• The system updates the existing GCSB1RT index record with the current field values
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has cpcargo-error status or cpcargo-pending status or uscargo-error status.
Trigger Criteria:
Context: A cargo record has CPCARGO-ERROR status OR CPCARGO-PENDING status OR USCARGO-ERROR status
Applied to: Populate Error Index Fields
Action: The system processes the error status update
Logic Flow:
IF A cargo record has CPCARGO-ERROR status OR CPCARGO-PENDING status OR USCARGO-ERROR status
AND The system processes the error status update
THEN:
• The system sets error code origin to 'E' AND sets error origin to origin station number AND sets error origin cargo to CCN key AND sets error code border to 'E' AND retrieves border station from MC table AND sets error border to border station number AND sets error border cargo to CCN key AND sets error code destination to 'E' AND sets error destination to destination station number AND sets error destination cargo to CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo has error or pending status and error index fields have been populated and no existing gcsb1rt index record is found for the cargo.
Trigger Criteria:
Context: Cargo has error or pending status AND error index fields have been populated AND no existing GCSB1RT index record is found for the cargo
Applied to: Create New Index Record
Action: The system attempts to update the index
Logic Flow:
IF Cargo has error or pending status AND error index fields have been populated AND no existing GCSB1RT index record is found for the cargo
AND The system attempts to update the index
THEN:
• The system creates a new GCSB1RT index record with the populated error field values
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo has error or pending status and error index fields have been populated and an existing gcsb1rt index record is found for the cargo.
Trigger Criteria:
Context: Cargo has error or pending status AND error index fields have been populated AND an existing GCSB1RT index record is found for the cargo
Applied to: Update Existing Index Record
Action: The system attempts to update the index
Logic Flow:
IF Cargo has error or pending status AND error index fields have been populated AND an existing GCSB1RT index record is found for the cargo
AND The system attempts to update the index
THEN:
• The system updates the existing GCSB1RT index record with the current error field values
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has uscargo-hold status or uscargo-holdpcs status or uscargo-pr-hpcs status or uscargo-hold-d status or uscargo-pr-h-de status or uscargo-holdfda status.
Trigger Criteria:
Context: A cargo record has USCARGO-HOLD status OR USCARGO-HOLDPCS status OR USCARGO-PR-HPCS status OR USCARGO-HOLD-D status OR USCARGO-PR-H-DE status OR USCARGO-HOLDFDA status
Applied to: Populate Hold Index Fields
Action: The system processes the hold status for destination fields
Logic Flow:
IF A cargo record has USCARGO-HOLD status OR USCARGO-HOLDPCS status OR USCARGO-PR-HPCS status OR USCARGO-HOLD-D status OR USCARGO-PR-H-DE status OR USCARGO-HOLDFDA status
AND The system processes the hold status for destination fields
THEN:
• The system sets held destination to destination station number AND sets held destination cargo to CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has uscargo-hold status or uscargo-holdpcs status or uscargo-pr-hpcs status or uscargo-hold-b status or uscargo-pr-h-bo status or uscargo-holdfda status.
Trigger Criteria:
Context: A cargo record has USCARGO-HOLD status OR USCARGO-HOLDPCS status OR USCARGO-PR-HPCS status OR USCARGO-HOLD-B status OR USCARGO-PR-H-BO status OR USCARGO-HOLDFDA status
Applied to: Populate Hold Index Fields
Action: The system processes the hold status for border fields
Logic Flow:
IF A cargo record has USCARGO-HOLD status OR USCARGO-HOLDPCS status OR USCARGO-PR-HPCS status OR USCARGO-HOLD-B status OR USCARGO-PR-H-BO status OR USCARGO-HOLDFDA status
AND The system processes the hold status for border fields
THEN:
• The system retrieves border station from MC table AND sets held border to border station number AND sets held border cargo to CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo has hold status and hold index fields have been populated and no existing gcsb1rt index record is found for the cargo.
Trigger Criteria:
Context: Cargo has hold status AND hold index fields have been populated AND no existing GCSB1RT index record is found for the cargo
Applied to: Create New Index Record
Action: The system attempts to update the index
Logic Flow:
IF Cargo has hold status AND hold index fields have been populated AND no existing GCSB1RT index record is found for the cargo
AND The system attempts to update the index
THEN:
• The system creates a new GCSB1RT index record with the populated hold field values
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo has hold status and hold index fields have been populated and an existing gcsb1rt index record is found for the cargo.
Trigger Criteria:
Context: Cargo has hold status AND hold index fields have been populated AND an existing GCSB1RT index record is found for the cargo
Applied to: Update Existing Index Record
Action: The system attempts to update the index
Logic Flow:
IF Cargo has hold status AND hold index fields have been populated AND an existing GCSB1RT index record is found for the cargo
AND The system attempts to update the index
THEN:
• The system updates the existing GCSB1RT index record with the current hold field values
R-GCCUSIO-cbl-00611 (+6)File: GCCUSIO.cblBusiness Rule: Determine Hold Index Action
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists in the system.
Trigger Criteria:
Context: A cargo record exists in the system
Applied to: Clear Hold Index Fields
Action: The cargo does not have any hold status conditions (USCARGO-HOLD, USCARGO-HOLDPCS, USCARGO-PR-HPCS, USCARGO-HOLD-B, USCARGO-PR-H-BO, USCARGO-HOLD-D, USCARGO-PR-H-DE, USCARGO-HOLDFDA)
Logic Flow:
IF A cargo record exists in the system
AND The cargo does not have any hold status conditions (USCARGO-HOLD, USCARGO-HOLDPCS, USCARGO-PR-HPCS, USCARGO-HOLD-B, USCARGO-PR-H-BO, USCARGO-HOLD-D, USCARGO-PR-H-DE, USCARGO-HOLDFDA)
THEN:
• The system clears the held destination index and held border index fields by setting them to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo status record exists with hold index fields cleared and no hold conditions present.
Trigger Criteria:
Context: A cargo status record exists with hold index fields cleared and no hold conditions present
Applied to: Delete Hold Index Record
Action: There are no error destination index fields, no error origin index fields, and no error border index fields present
Logic Flow:
IF A cargo status record exists with hold index fields cleared and no hold conditions present
AND There are no error destination index fields, no error origin index fields, and no error border index fields present
THEN:
• The system deletes the entire cargo status record from GCSB1RT
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo status record exists with hold index fields cleared and no hold conditions present.
Trigger Criteria:
Context: A cargo status record exists with hold index fields cleared and no hold conditions present
Applied to: Update Hold Index Record
Action: There are error destination index fields, error origin index fields, or error border index fields present
Logic Flow:
IF A cargo status record exists with hold index fields cleared and no hold conditions present
AND There are error destination index fields, error origin index fields, or error border index fields present
THEN:
• The system updates the existing cargo status record in GCSB1RT with the cleared hold fields while preserving error information
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has hold status conditions.
Trigger Criteria:
Context: A cargo record has hold status conditions
Applied to: Set Destination Hold Index Fields
Action: The cargo has USCARGO-HOLD, USCARGO-HOLDPCS, USCARGO-PR-HPCS, USCARGO-HOLD-D, USCARGO-PR-H-DE, or USCARGO-HOLDFDA status
Logic Flow:
IF A cargo record has hold status conditions
AND The cargo has USCARGO-HOLD, USCARGO-HOLDPCS, USCARGO-PR-HPCS, USCARGO-HOLD-D, USCARGO-PR-H-DE, or USCARGO-HOLDFDA status
THEN:
• The system sets the held destination index to the destination station number and held destination cargo index to the cargo CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has hold status conditions.
Trigger Criteria:
Context: A cargo record has hold status conditions
Applied to: Set Border Hold Index Fields
Action: The cargo has USCARGO-HOLD, USCARGO-HOLDPCS, USCARGO-PR-HPCS, USCARGO-HOLD-B, USCARGO-PR-H-BO, or USCARGO-HOLDFDA status
Logic Flow:
IF A cargo record has hold status conditions
AND The cargo has USCARGO-HOLD, USCARGO-HOLDPCS, USCARGO-PR-HPCS, USCARGO-HOLD-B, USCARGO-PR-H-BO, or USCARGO-HOLDFDA status
THEN:
• The system retrieves the station number from the MC table using the location ID, sets the held border index to this station number, and sets the held border cargo index to the cargo CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo status record exists in gcsb1rt and cargo has hold conditions.
Trigger Criteria:
Context: A cargo status record exists in GCSB1RT and cargo has hold conditions
Applied to: Update Existing Hold Index Record
Action: Hold index fields have been populated with destination and/or border hold information
Logic Flow:
IF A cargo status record exists in GCSB1RT and cargo has hold conditions
AND Hold index fields have been populated with destination and/or border hold information
THEN:
• The system updates the existing cargo status record in GCSB1RT with the new hold index field values
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when no cargo status record exists in gcsb1rt and cargo has hold conditions.
Trigger Criteria:
Context: No cargo status record exists in GCSB1RT and cargo has hold conditions
Applied to: Create New Hold Index Record
Action: Hold index fields have been populated with destination and/or border hold information
Logic Flow:
IF No cargo status record exists in GCSB1RT and cargo has hold conditions
AND Hold index fields have been populated with destination and/or border hold information
THEN:
• The system creates a new cargo status record in GCSB1RT with the hold index field values and cargo key information
R-GCCUSIO-cbl-00618 (+3)File: GCCUSIO.cblBusiness Rule: Execute Car ID Index Search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when primary cargo record exists with car identification information.
Trigger Criteria:
Context: A primary cargo record exists with car identification information
Applied to: Set Car ID Index Key from Primary Record
Action: Car ID index search is requested
Logic Flow:
IF A primary cargo record exists with car identification information
AND Car ID index search is requested
THEN:
• The car ID from the primary record RT071-CAR-ID-INDEX field is set as the search key value
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when search operator is provided in the input parameters.
Trigger Criteria:
Context: A search operator is provided in the input parameters
Applied to: Set Search Operator from Input
Action: Car ID index search is configured
Logic Flow:
IF A search operator is provided in the input parameters
AND Car ID index search is configured
THEN:
• The input operator is applied to the car ID index search criteria
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when car id search key and operator are configured.
Trigger Criteria:
Context: Car ID search key and operator are configured
Applied to: Configure Car ID Index PCB and SSA
Action: Database access is prepared for Car ID index
Logic Flow:
IF Car ID search key and operator are configured
AND Database access is prepared for Car ID index
THEN:
• PCB2 is set for Car ID index access and qualified SSA is configured with search parameters
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when car id index search parameters are configured with pcb and ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Car ID index search parameters are configured with PCB and SSA
Applied to: Execute Database Call via Car ID Index
Action: Database search is executed
Logic Flow:
IF Car ID index search parameters are configured with PCB and SSA
AND Database search is executed
THEN:
• The database management system is called with Car ID search parameters to find matching records
R-GCCUSIO-cbl-00622 (+4)File: GCCUSIO.cblBusiness Rule: Execute Waybill Index Search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill index search operation is initiated.
Trigger Criteria:
Context: A waybill index search operation is initiated
Applied to: Set Waybill PCB for Database Access
Action: The system prepares to access the waybill database
Logic Flow:
IF A waybill index search operation is initiated
AND The system prepares to access the waybill database
THEN:
• The system sets the waybill PCB (GCUS-PCB3) as the database access control block
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with waybill index information exists.
Trigger Criteria:
Context: A cargo record with waybill index information exists
Applied to: Extract Waybill Index Value from Cargo Record
Action: The system performs a waybill index search
Logic Flow:
IF A cargo record with waybill index information exists
AND The system performs a waybill index search
THEN:
• The system extracts the waybill index value from GCUSRT-RT072-WAYBILL-INDEXand assigns it to GCUW-KEY-VALUE
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when input parameters contain a search operator specification.
Trigger Criteria:
Context: Input parameters contain a search operator specification
Applied to: Set Search Operator from Input Parameters
Action: The system prepares a waybill index search
Logic Flow:
IF Input parameters contain a search operator specification
AND The system prepares a waybill index search
THEN:
• The system assigns the operator from GCWUSIO-OPERATOR to GCUW-OPERATOR for the search criteria
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when waybill key value and operator are set. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Waybill key value and operator are set
Applied to: Build Qualified SSA for Waybill Search
Action: The system builds the search criteria
Logic Flow:
IF Waybill key value and operator are set
AND The system builds the search criteria
THEN:
• The system assigns GCUW-SSA-QUAL to WS-SSA-1 to create a qualified search specification
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill search criteria and database access parameters are configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Waybill search criteria and database access parameters are configured
Applied to: Execute Database Call with Waybill Index
Action: The system executes the waybill index search
Logic Flow:
IF Waybill search criteria and database access parameters are configured
AND The system executes the waybill index search
THEN:
• The system performs X1100-CALL-ONE-SSA to execute the database call with the waybill index search criteria
Business Justification: Defines the strict business conditions required to proceed when database operation needs to be executed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database operation needs to be executed
Applied to: Set Function Code
Action: The system prepares database call parameters
Logic Flow:
IF A database operation needs to be executed
AND The system prepares database call parameters
THEN:
• The function code is set to the requested operation type (GU, GN, ISRT, REPL, DLET, GHU, ZAP)
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when database operation is being prepared for a specific segment type. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database operation is being prepared for a specific segment type
Applied to: Set PCB Control Block
Action: The system sets up the database call parameters
Logic Flow:
IF A database operation is being prepared for a specific segment type
AND The system sets up the database call parameters
THEN:
• The appropriate PCB is assigned to the working storage PCB field based on the target segment
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when database search operation is being prepared.
Trigger Criteria:
Context: A database search operation is being prepared
Applied to: Set SSA Search Arguments
Action: The system determines if key values are provided for search criteria
Logic Flow:
IF A database search operation is being prepared
AND The system determines if key values are provided for search criteria
THEN:
• If key values are spaces for GU or GN operations, unqualified SSA is used, otherwise qualified SSA with key values is configured
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when database call parameters are prepared with function code, pcb, and ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Database call parameters are prepared with function code, PCB, and SSA
Applied to: Execute CIMS Database Call
Action: The system executes the database operation
Logic Flow:
IF Database call parameters are prepared with function code, PCB, and SSA
AND The system executes the database operation
THEN:
• The CIMS program is called with the communication area, function code, PCB, IO area, and SSA parameters
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when database operation has been executed through cims. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database operation has been executed through CIMS
Applied to: Database Call Successful?
Action: The system checks the operation result
Logic Flow:
IF A database operation has been executed through CIMS
AND The system checks the operation result
THEN:
• IfCC-STATUS-CODE is spaces, the operation is successful, otherwise it indicates an error or not found condition
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when database retrieval operation completed successfully.
Trigger Criteria:
Context: A database retrieval operation completed successfully
Applied to: Return Retrieved Data
Action: Data is returned from the database
Logic Flow:
IF A database retrieval operation completed successfully
AND Data is returned from the database
THEN:
• The retrieved segment data is available in the GCWUSIO-IO-AREA for further processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when database operation failed or returned not found.
Trigger Criteria:
Context: A database operation failed or returned not found
Applied to: Set Error Status
Action: The system processes the unsuccessful operation result
Logic Flow:
IF A database operation failed or returned not found
AND The system processes the unsuccessful operation result
THEN:
• The error status code is preserved in CC-STATUS-CODE for the calling program to handle appropriately
R-GCCUSIO-cbl-00634 (+5)File: GCCUSIO.cblBusiness Rule: Execute Bond Index Search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with bond index information.
Trigger Criteria:
Context: A cargo record with bond index information
Applied to: Bond Index Data Available?
Action: The system evaluates the bond index field for search operations
Logic Flow:
IF A cargo record with bond index information
AND The system evaluates the bond index field for search operations
THEN:
• The system identifies whether bond index data is available (not empty or spaces) or unavailable (empty or spaces)
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record where bond index field is not empty or spaces.
Trigger Criteria:
Context: A cargo record where bond index field is not empty or spaces
Applied to: Set Bond Index Key Value
Action: The system prepares for bond index search operation
Logic Flow:
IF A cargo record where bond index field is not empty or spaces
AND The system prepares for bond index search operation
THEN:
• The system sets the bond index value as the search key value for qualified search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with valid bond index data and assigned search key value.
Trigger Criteria:
Context: A cargo record with valid bond index data and assigned search key value
Applied to: Set Qualified Search SSA
Action: The system configures search parameters for bond index lookup
Logic Flow:
IF A cargo record with valid bond index data and assigned search key value
AND The system configures search parameters for bond index lookup
THEN:
• The system sets qualified SSA parameters for targeted bond index search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record where bond index field is empty or contains only spaces.
Trigger Criteria:
Context: A cargo record where bond index field is empty or contains only spaces
Applied to: Set Empty Key Value
Action: The system prepares search parameters for bond index operation
Logic Flow:
IF A cargo record where bond index field is empty or contains only spaces
AND The system prepares search parameters for bond index operation
THEN:
• The system sets the search key value to spaces for unqualified search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with empty bond index data and empty search key value.
Trigger Criteria:
Context: A cargo record with empty bond index data and empty search key value
Applied to: Set Unqualified Search SSA
Action: The system configures search parameters for bond index lookup
Logic Flow:
IF A cargo record with empty bond index data and empty search key value
AND The system configures search parameters for bond index lookup
THEN:
• The system sets unqualified SSA parameters for broad bond index search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when configured search parameters (either qualified or unqualified) for bond index lookup. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Configured search parameters (either qualified or unqualified) for bond index lookup
Applied to: Execute Bond Index Database Call
Action: The system executes the bond index database search operation
Logic Flow:
IF Configured search parameters (either qualified or unqualified) for bond index lookup
AND The system executes the bond index database search operation
THEN:
• The system performs database call using the configured SSA parameters to retrieve matching bond records
R-GCCUSIO-cbl-00640 (+6)File: GCCUSIO.cblBusiness Rule: SSA Parameters Built Successfully
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when primary cargo segment (gcsusrt) operation is being processed and the ccn key field contains a valid value (not spaces).
Trigger Criteria:
Context: A primary cargo segment (GCSUSRT) operation is being processed AND the CCN key field contains a valid value (not spaces)
Applied to: Set Qualified SSA with CCN Key
Action: The system builds SSA parameters for database access
Logic Flow:
IF A primary cargo segment (GCSUSRT) operation is being processed AND the CCN key field contains a valid value (not spaces)
AND The system builds SSA parameters for database access
THEN:
• The system creates a qualified SSA using the CCN key value for targeted record retrieval
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when primary cargo segment (gcsusrt) operation is being processed and the ccn key field is empty or contains only spaces.
Trigger Criteria:
Context: A primary cargo segment (GCSUSRT) operation is being processed AND the CCN key field is empty or contains only spaces
Applied to: Set Unqualified SSA
Action: The system builds SSA parameters for database access
Logic Flow:
IF A primary cargo segment (GCSUSRT) operation is being processed AND the CCN key field is empty or contains only spaces
AND The system builds SSA parameters for database access
THEN:
• The system creates an unqualified SSA for broader record access without key constraints
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when secondary cargo segment (gcsa2rt) operation is being processed and the secondary key field contains a valid value (not spaces).
Trigger Criteria:
Context: A secondary cargo segment (GCSA2RT) operation is being processed AND the secondary key field contains a valid value (not spaces)
Applied to: Set Qualified SSA with Secondary Key
Action: The system builds SSA parameters for database access
Logic Flow:
IF A secondary cargo segment (GCSA2RT) operation is being processed AND the secondary key field contains a valid value (not spaces)
AND The system builds SSA parameters for database access
THEN:
• The system creates a qualified SSA using the secondary key value for targeted record retrieval
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary cargo segment (gcsa2rt) retrieval operation (gu or gn) is being processed and the secondary key field is empty or contains only spaces.
Trigger Criteria:
Context: A secondary cargo segment (GCSA2RT) retrieval operation (GU or GN) is being processed AND the secondary key field is empty or contains only spaces
Applied to: Return Error - Key Required
Action: The system attempts to build SSA parameters for database access
Logic Flow:
IF A secondary cargo segment (GCSA2RT) retrieval operation (GU or GN) is being processed AND the secondary key field is empty or contains only spaces
AND The system attempts to build SSA parameters for database access
THEN:
• The system returns error code '0012' with message 'SECN-KEY EQUAL SPACES'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when message segment (gcsa8rt) operation is being processed and the message key field contains a valid value (not spaces).
Trigger Criteria:
Context: A message segment (GCSA8RT) operation is being processed AND the message key field contains a valid value (not spaces)
Applied to: Set Qualified SSA with Message Key
Action: The system builds SSA parameters for database access
Logic Flow:
IF A message segment (GCSA8RT) operation is being processed AND the message key field contains a valid value (not spaces)
AND The system builds SSA parameters for database access
THEN:
• The system creates a qualified SSA using the message key value for targeted record retrieval
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when message segment (gcsa8rt) retrieval operation (gu or gn) is being processed and the message key field is empty or contains only spaces.
Trigger Criteria:
Context: A message segment (GCSA8RT) retrieval operation (GU or GN) is being processed AND the message key field is empty or contains only spaces
Applied to: Return Error - Key Required
Action: The system attempts to build SSA parameters for database access
Logic Flow:
IF A message segment (GCSA8RT) retrieval operation (GU or GN) is being processed AND the message key field is empty or contains only spaces
AND The system attempts to build SSA parameters for database access
THEN:
• The system returns error code '0012' with message 'GCSA8RT-KEY EQUAL SPACES'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when table segment (gcst2rt) operation is being processed.
Trigger Criteria:
Context: A table segment (GCST2RT) operation is being processed
Applied to: Set Qualified SSA with Table Key
Action: The system builds SSA parameters for database access
Logic Flow:
IF A table segment (GCST2RT) operation is being processed
AND The system builds SSA parameters for database access
THEN:
• The system assigns the table key value and creates a qualified SSA for targeted table record retrieval
R-GCCUSIO-cbl-00647 (+2)File: GCCUSIO.cblBusiness Rule: Continue with Normal Processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when request to retrieve secondary cargo data (gcsa2rt segment) with retrieval function codes (gu or gn).
Trigger Criteria:
Context: A request to retrieve secondary cargo data (GCSA2RT segment) with retrieval function codes (GU or GN)
Applied to: Secondary Index Key Provided?
Action: The system checks if a secondary index key (GCWUSIO-INDEX-SECN-KEY) is provided in the request
Logic Flow:
IF A request to retrieve secondary cargo data (GCSA2RT segment) with retrieval function codes (GU or GN)
AND The system checks if a secondary index key (GCWUSIO-INDEX-SECN-KEY) is provided in the request
THEN:
• If secondary index key is provided, route to secondary index search processing, otherwise route to primary key search processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary index key (gcwusio-index-secn-key) is provided for secondary cargo data retrieval.
Trigger Criteria:
Context: A secondary index key (GCWUSIO-INDEX-SECN-KEY) is provided for secondary cargo data retrieval
Applied to: Use Secondary Index Search
Action: The system processes the secondary index search request
Logic Flow:
IF A secondary index key (GCWUSIO-INDEX-SECN-KEY) is provided for secondary cargo data retrieval
AND The system processes the secondary index search request
THEN:
• Set the secondary key value to GCB2-KEY-VALUE, set the operator to GCB2-OPERATOR, use qualified SSA (GCB2-SSA-QUAL), set PCB to GCA2-PCB2, and execute the database call
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when no secondary index key is provided for secondary cargo data retrieval and function code is gu or gn.
Trigger Criteria:
Context: No secondary index key is provided for secondary cargo data retrieval and function code is GU or GN
Applied to: Build Primary Secondary SSA
Action: The system needs to build SSA for primary key search on secondary data
Logic Flow:
IF No secondary index key is provided for secondary cargo data retrieval and function code is GU or GN
AND The system needs to build SSA for primary key search on secondary data
THEN:
• If the secondary key (GCSUSS00-KEY) is spaces, set error '0012' with message 'SECN-KEY EQUAL SPACES', otherwise set GCSUSS00-KEY to GCA2-KEY-VALUE, use qualified SSA (GCA2-SSA-QUAL), and set PCB to GCA2-PCB
Business Justification: Dictates the expected operational logic and validation steps when gcsa8rt segment delete operation is requested with function code 'dlet'.
Trigger Criteria:
Context: A GCSA8RT segment delete operation is requested with function code 'DLET'
Applied to: Delete Operation Completed
Action: The system processes the delete request
Logic Flow:
IF A GCSA8RT segment delete operation is requested with function code 'DLET'
AND The system processes the delete request
THEN:
• The system retrieves the existing record first using 'GHU' function andif the record exists, deletes it using 'DLET' function with unqualified SSA
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when gcsa8rt segment insert operation is requested with function code 'isrt'.
Trigger Criteria:
Context: A GCSA8RT segment insert operation is requested with function code 'ISRT'
Applied to: Insert/Replace Operation Completed
Action: The system processes the insert request
Logic Flow:
IF A GCSA8RT segment insert operation is requested with function code 'ISRT'
AND The system processes the insert request
THEN:
• The system first attempts to retrieve existing record with 'GHU' function, andif record exists performs 'REPL' operation, otherwise performs 'ISRT' operation with the formatted segment data
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when gcsa8rt insert or replace operation is being processed.
Trigger Criteria:
Context: A GCSA8RT insert or replace operation is being processed
Applied to: Insert/Replace Operation Completed
Action: The system prepares the segment data for database operation
Logic Flow:
IF A GCSA8RT insert or replace operation is being processed
AND The system prepares the segment data for database operation
THEN:
• The system moves the GCSA8RT key to the segment key field and moves the saved IO area data to the segment data field, then moves the complete formatted segment to the IO area
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when gcsa8rt segment retrieve operation is requested with function code 'gu'.
Trigger Criteria:
Context: A GCSA8RT segment retrieve operation is requested with function code 'GU'
Applied to: Message Data Formatted for Return
Action: The system successfully retrieves the record
Logic Flow:
IF A GCSA8RT segment retrieve operation is requested with function code 'GU'
AND The system successfully retrieves the record
THEN:
• The system moves the complete IO area to a work segment, extracts only the data portion from the work segment, and moves the extracted data back to the IO area for return
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when gcsa8rt retrieve operation with function code 'gu' or 'gn' is requested.
Trigger Criteria:
Context: A GCSA8RT retrieve operation with function code 'GU' or 'GN' is requested
Applied to: Retrieve Operation Completed
Action: The system validates the input parameters
Logic Flow:
IF A GCSA8RT retrieve operation with function code 'GU' or 'GN' is requested
AND The system validates the input parameters
THEN:
• If the GCSA8RT key equals spaces, the system sets error number '0012' and error message 'GCSA8RT-KEY EQUAL SPACES', otherwise builds qualified SSA with the key value
R-GCCUSIO-cbl-00655 (+4)File: GCCUSIO.cblBusiness Rule: Call Table Lookup Service GCCTBIO
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record contains a location id in rt04-location-id-name field.
Trigger Criteria:
Context: A cargo record contains a location ID in RT04-LOCATION-ID-NAME field
Applied to: 'MC' - Sequence ID from Location
Action: The system needs to retrieve border station information for error processing
Logic Flow:
IF A cargo record contains a location ID in RT04-LOCATION-ID-NAME field
AND The system needs to retrieve border station information for error processing
THEN:
• The system sets up MC table lookup parameters with table ID 'MC' and sequence ID from the location field, calls GCCTBIO service, andif successful extracts the station number for border error indexing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has a status change that requires external notification and contains waybill station information.
Trigger Criteria:
Context: A cargo record has a status change that requires external notification and contains waybill station information
Applied to: 'IH' - Sequence ID from Station
Action: The system processes IH notification in Z2000-PROCESS-IH-NOTIFICATION
Logic Flow:
IF A cargo record has a status change that requires external notification and contains waybill station information
AND The system processes IH notification in Z2000-PROCESS-IH-NOTIFICATION
THEN:
• The system sets up IH table lookup parameters with table ID 'IH' and sequence ID from the waybill station, calls GCCTBIO service, andif found processes the notification through GCCIH
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when any table lookup operation is required regardless of table type.
Trigger Criteria:
Context: Any table lookup operation is required regardless of table type
Applied to: 'GU' - Clear Return Flags
Action: The system initiates a table lookup through Z1900-GET-TABLE-SEGMENT
Logic Flow:
IF Any table lookup operation is required regardless of table type
AND The system initiates a table lookup through Z1900-GET-TABLE-SEGMENT
THEN:
• The system sets function code to 'GU' (Get Unique), clears all return flags and secondary PCB flags, and prepares standard calling parameters for the GCCTBIO service
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when table lookup operation has been performed and gcctbio returns success flag '0'. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A table lookup operation has been performed and GCCTBIO returns success flag '0'
Applied to: Extract Station Information - Station Number - Border Station Data
Action: The system processes the returned table segment data
Logic Flow:
IF A table lookup operation has been performed and GCCTBIO returns success flag '0'
AND The system processes the returned table segment data
THEN:
• The system extracts the relevant business data from WS-TABLE-SEGMENT into the appropriate fields such as station numbers for MC tables or notification settings for IH tables
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when table lookup operation is performed through gcctbio service.
Trigger Criteria:
Context: A table lookup operation is performed through GCCTBIO service
Applied to: Set Return Flag to Not Found
Action: The table lookup returns a non-zero return flag indicating the table entry was not found
Logic Flow:
IF A table lookup operation is performed through GCCTBIO service
AND The table lookup returns a non-zero return flag indicating the table entry was not found
THEN:
• The system continues processing without the table data and does not perform operations that depend on the missing table information
R-GCCUSIO-cbl-00660 (+9)File: GCCUSIO.cblBusiness Rule: Call Table Lookup Service
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when table lookup operation is requested. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A table lookup operation is requested
Applied to: Initialize Table Lookup Parameters
Action: The system prepares to call the table lookup service
Logic Flow:
IF A table lookup operation is requested
AND The system prepares to call the table lookup service
THEN:
• All table lookup parameters are cleared to spaces and flags are reset to ensure clean initialization
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when table lookup operation is being configured.
Trigger Criteria:
Context: A table lookup operation is being configured
Applied to: Set Function Code to 'GU'
Action: The system sets the operation type for table access
Logic Flow:
IF A table lookup operation is being configured
AND The system sets the operation type for table access
THEN:
• The function code is set to 'GU' to indicate a unique record retrieval operation
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when station information lookup is required.
Trigger Criteria:
Context: A station information lookup is required
Applied to: Set Table ID to 'MC'
Action: The system configures the table identifier
Logic Flow:
IF A station information lookup is required
AND The system configures the table identifier
THEN:
• The table ID is set to 'MC' to target the station master table
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record contains a location id.
Trigger Criteria:
Context: A cargo record contains a location ID
Applied to: Set Sequence ID from Location
Action: The system prepares to lookup station information
Logic Flow:
IF A cargo record contains a location ID
AND The system prepares to lookup station information
THEN:
• The location ID from the cargo record is used as the sequence key for table search
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when table lookup operation is about to be executed.
Trigger Criteria:
Context: A table lookup operation is about to be executed
Applied to: Clear Return Flag
Action: The system prepares the return status indicator
Logic Flow:
IF A table lookup operation is about to be executed
AND The system prepares the return status indicator
THEN:
• The return flag is cleared to spaces to enable proper success/failure detection
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when all table lookup parameters are properly configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All table lookup parameters are properly configured
Applied to: Call GCCTBIO Table Service
Action: The system executes the table lookup operation
Logic Flow:
IF All table lookup parameters are properly configured
AND The system executes the table lookup operation
THEN:
• The GCCTBIO service is called with the function code, table identifiers, and search keys to retrieve the requested data
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when table lookup operation has been executed.
Trigger Criteria:
Context: A table lookup operation has been executed
Applied to: Return Flag = '0'?
Action: The system evaluates the operation result
Logic Flow:
IF A table lookup operation has been executed
AND The system evaluates the operation result
THEN:
• If the return flag equals '0', the lookup is considered successful, otherwise it indicates the record was not found
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when table lookup operation returned successfully with return flag '0'.
Trigger Criteria:
Context: A table lookup operation returned successfully with return flag '0'
Applied to: Extract Station Information
Action: The system processes the retrieved table data
Logic Flow:
IF A table lookup operation returned successfully with return flag '0'
AND The system processes the retrieved table data
THEN:
• Station information is extracted from the table segment for use in subsequent processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when table data has been successfully retrieved and station information extracted.
Trigger Criteria:
Context: Table data has been successfully retrieved and station information extracted
Applied to: Move Table Segment to Working Storage
Action: The system prepares to process the station data
Logic Flow:
IF Table data has been successfully retrieved and station information extracted
AND The system prepares to process the station data
THEN:
• The table segment is moved to the MC segment working storage area for further processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when mc table segment data is available in working storage.
Trigger Criteria:
Context: MC table segment data is available in working storage
Applied to: Extract Station Number
Action: The system needs the station number for cargo processing
Logic Flow:
IF MC table segment data is available in working storage
AND The system needs the station number for cargo processing
THEN:
• The station number is extracted from the MC table segment data structure
R-GCCUSIO-cbl-00670 (+9)File: GCCUSIO.cblBusiness Rule: Retrieve N9 Reference Data
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo control number (ccn) exists in the primary cargo record.
Trigger Criteria:
Context: A cargo control number (CCN) exists in the primary cargo record
Applied to: Build Secondary Cargo Key with CCN
Action: The system needs to retrieve N9 reference data for Iron Highway notification
Logic Flow:
IF A cargo control number (CCN) exists in the primary cargo record
AND The system needs to retrieve N9 reference data for Iron Highway notification
THEN:
• The system builds a secondary cargo key using the CCN from the primary record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when system is preparing to retrieve n9 reference data from secondary cargo records.
Trigger Criteria:
Context: The system is preparing to retrieve N9 reference data from secondary cargo records
Applied to: Set Record Type to '02'
Action: Building the access key for secondary cargo data
Logic Flow:
IF The system is preparing to retrieve N9 reference data from secondary cargo records
AND Building the access key for secondary cargo data
THEN:
• The system sets the record type to '02' to identify N9 reference data segments
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when system has identified the record type as '02' for n9 reference data.
Trigger Criteria:
Context: The system has identified the record type as '02' for N9 reference data
Applied to: Set Sequence Number to '0001'
Action: Accessing N9 reference segments in secondary cargo data
Logic Flow:
IF The system has identified the record type as '02' for N9 reference data
AND Accessing N9 reference segments in secondary cargo data
THEN:
• The system sets the sequence number to '0001' to retrieve the first N9 segment
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when complete secondary cargo key has been built with ccn, record type '02', and sequence '0001'. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A complete secondary cargo key has been built with CCN, record type '02', and sequence '0001'
Applied to: Retrieve Secondary Cargo Record GCSUSS02
Action: The system executes the retrieval operation for N9 reference data
Logic Flow:
IF A complete secondary cargo key has been built with CCN, record type '02', and sequence '0001'
AND The system executes the retrieval operation for N9 reference data
THEN:
• The system attempts to read the GCSUSS02 secondary cargo record using the qualified key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when system has attempted to retrieve the secondary cargo record with n9 data.
Trigger Criteria:
Context: The system has attempted to retrieve the secondary cargo record with N9 data
Applied to: Record Found?
Action: The retrieval operation completes
Logic Flow:
IF The system has attempted to retrieve the secondary cargo record with N9 data
AND The retrieval operation completes
THEN:
• The system checks if the record was found successfully to determine N9 data availability
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when n9 reference data record has been successfully retrieved.
Trigger Criteria:
Context: N9 reference data record has been successfully retrieved
Applied to: Initialize N9 Counter to Zero
Action: The system begins processing N9 reference segments
Logic Flow:
IF N9 reference data record has been successfully retrieved
AND The system begins processing N9 reference segments
THEN:
• The system initializes the N9 counter to zero to start processing from the first segment
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when n9 reference data is available and the counter is initialized.
Trigger Criteria:
Context: N9 reference data is available and the counter is initialized
Applied to: Loop Through 20 N9 Reference Segments
Action: Processing N9 reference segments for shipment identification
Logic Flow:
IF N9 reference data is available and the counter is initialized
AND Processing N9 reference segments for shipment identification
THEN:
• The system loops through exactly 20 N9 reference segments to examine each one
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when system is processing an n9 reference segment.
Trigger Criteria:
Context: The system is processing an N9 reference segment
Applied to: Reference Qualifier = 'CN'?
Action: Examining the reference number qualifier in the current segment
Logic Flow:
IF The system is processing an N9 reference segment
AND Examining the reference number qualifier in the current segment
THEN:
• The system checks if the qualifier equals 'CN' to identify shipment ID data
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when n9 reference segment has qualifier 'cn' indicating shipment id data.
Trigger Criteria:
Context: An N9 reference segment has qualifier 'CN' indicating shipment ID data
Applied to: Extract Shipment ID from Reference Number
Action: Processing the reference number field of the segment
Logic Flow:
IF An N9 reference segment has qualifier 'CN' indicating shipment ID data
AND Processing the reference number field of the segment
THEN:
• The system extracts the reference number value as the shipment ID
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when shipment id has been extracted from an n9 reference segment with qualifier 'cn'.
Trigger Criteria:
Context: A shipment ID has been extracted from an N9 reference segment with qualifier 'CN'
Applied to: Store Shipment ID for Iron Highway
Action: Preparing data for Iron Highway notification
Logic Flow:
IF A shipment ID has been extracted from an N9 reference segment with qualifier 'CN'
AND Preparing data for Iron Highway notification
THEN:
• The system stores the shipment ID in the Iron Highway notification data structure
R-GCCUSIO-cbl-00680 (+12)File: GCCUSIO.cblBusiness Rule: Proceed with Iron Highway Notification
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for iron highway notification.
Trigger Criteria:
Context: A cargo record is being processed for Iron Highway notification
Applied to: Check if Both Descriptions Empty
Action: Both RT21 US cargo short description is spaces AND RT10B CP cargo status description is spaces
Logic Flow:
IF A cargo record is being processed for Iron Highway notification
AND Both RT21 US cargo short description is spaces AND RT10B CP cargo status description is spaces
THEN:
• Skip Iron Highway notification processing and exit
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for iron highway notification.
Trigger Criteria:
Context: A cargo record is being processed for Iron Highway notification
Applied to: Check if Status is RELEASE
Action: RT21 US cargo short description equals 'RELEASE'
Logic Flow:
IF A cargo record is being processed for Iron Highway notification
AND RT21 US cargo short description equals 'RELEASE'
THEN:
• Skip Iron Highway notification processing and exit
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for iron highway notification.
Trigger Criteria:
Context: A cargo record is being processed for Iron Highway notification
Applied to: Station Table Found?
Action: Iron Highway station table lookup returns error flag not equal to '0'
Logic Flow:
IF A cargo record is being processed for Iron Highway notification
AND Iron Highway station table lookup returns error flag not equal to '0'
THEN:
• Skip Iron Highway notification processing and exit
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has empty us cargo short description.
Trigger Criteria:
Context: A cargo record has empty US cargo short description
Applied to: Check if SENT Status with Empty Description
Action: RT21 US cargo short description is spaces AND RT10B CP cargo status description equals 'SENT '
Logic Flow:
IF A cargo record has empty US cargo short description
AND RT21 US cargo short description is spaces AND RT10B CP cargo status description equals 'SENT '
THEN:
• Set the saved status to RT10B CP cargo status description for notification
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for status notification and the status is not deleted or release.
Trigger Criteria:
Context: A cargo record is being processed for status notification AND the status is not DELETED or RELEASE
Applied to: Compare Current vs Previous Status
Action: The saved status equals the current RT21 US cargo short description
Logic Flow:
IF A cargo record is being processed for status notification AND the status is not DELETED or RELEASE
AND The saved status equals the current RT21 US cargo short description
THEN:
• Skip Iron Highway notification processing and exit
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record requires iron highway notification.
Trigger Criteria:
Context: A cargo record requires Iron Highway notification
Applied to: Lookup Iron Highway Station Table
Action: Processing Iron Highway notification for a cargo record
Logic Flow:
IF A cargo record requires Iron Highway notification
AND Processing Iron Highway notification for a cargo record
THEN:
• Lookup table 'IH' using saved waybill station as sequence ID to get station configuration
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when iron highway station configuration is found for the cargo.
Trigger Criteria:
Context: Iron Highway station configuration is found for the cargo
Applied to: Extract N9 Reference Numbers
Action: Processing N9 reference data for the cargo CCN key
Logic Flow:
IF Iron Highway station configuration is found for the cargo
AND Processing N9 reference data for the cargo CCN key
THEN:
• Extract shipment ID from N9 reference qualifier 'CN' and store in Iron Highway message
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record requires iron highway notification and station configuration exists.
Trigger Criteria:
Context: A cargo record requires Iron Highway notification AND station configuration exists
Applied to: Set Status to DELETED
Action: RT10B CP cargo status description equals 'DELETED'
Logic Flow:
IF A cargo record requires Iron Highway notification AND station configuration exists
AND RT10B CP cargo status description equals 'DELETED'
THEN:
• Set saved status to 'DELETED' AND set Iron Highway CCN status to 'DELETED'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record requires iron highway notification and station configuration exists and status is not deleted.
Trigger Criteria:
Context: A cargo record requires Iron Highway notification AND station configuration exists AND status is not DELETED
Applied to: Set Status to RELEASE
Action: RT10B CP cargo status description equals 'RELEASE'
Logic Flow:
IF A cargo record requires Iron Highway notification AND station configuration exists AND status is not DELETED
AND RT10B CP cargo status description equals 'RELEASE'
THEN:
• Set saved status to 'RELEASE' AND set Iron Highway CCN status to 'RELEASE'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record requires iron highway notification and station configuration exists and status is not deleted or release.
Trigger Criteria:
Context: A cargo record requires Iron Highway notification AND station configuration exists AND status is not DELETED or RELEASE
Applied to: Set Status to SENT
Action: RT21 US cargo short description is spaces AND RT10B CP cargo status description equals 'SENT '
Logic Flow:
IF A cargo record requires Iron Highway notification AND station configuration exists AND status is not DELETED or RELEASE
AND RT21 US cargo short description is spaces AND RT10B CP cargo status description equals 'SENT '
THEN:
• Set Iron Highway CCN status to 'SENT'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record requires iron highway notification and station configuration exists and status is not deleted or release and condition for sent status is not met.
Trigger Criteria:
Context: A cargo record requires Iron Highway notification AND station configuration exists AND status is not DELETED or RELEASE AND condition for SENT status is not met
Applied to: Set Status from US Cargo Description
Action: Processing status determination for Iron Highway notification
Logic Flow:
IF A cargo record requires Iron Highway notification AND station configuration exists AND status is not DELETED or RELEASE AND condition for SENT status is not met
AND Processing status determination for Iron Highway notification
THEN:
• Set saved status to RT11 US cargo status AND set Iron Highway CCN status to RT21 US cargo short description
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has been determined to require iron highway notification with valid status.
Trigger Criteria:
Context: A cargo record has been determined to require Iron Highway notification with valid status
Applied to: Prepare Iron Highway Message
Action: Preparing the Iron Highway notification message
Logic Flow:
IF A cargo record has been determined to require Iron Highway notification with valid status
AND Preparing the Iron Highway notification message
THEN:
• Set record type to 'UC' AND set car ID from saved car number AND set waybill from saved waybill number AND set CCN from cargo CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when iron highway notification message is prepared with all required cargo information. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Iron Highway notification message is prepared with all required cargo information
Applied to: Call Iron Highway Interface GCCIH
Action: Sending the notification to Iron Highway system
Logic Flow:
IF Iron Highway notification message is prepared with all required cargo information
AND Sending the notification to Iron Highway system
THEN:
• Call external program 'GCCIH' with common control block and Iron Highway message structure
R-GCCUSIO-cbl-00693 (+13)File: GCCUSIO.cblBusiness Rule: Insert/Update GCSB1RT Record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists in the system.
Trigger Criteria:
Context: A cargo record exists in the system
Applied to: Delete GCSB1RT Record
Action: The cargo has no CP cargo error status AND no CP cargo pending status AND no US cargo error status AND no US cargo hold status AND no US cargo hold PCS status AND no US cargo pre-hold PCS status AND no US cargo hold border status AND no US cargo pre-hold border status AND no US cargo hold destination status AND no US cargo pre-hold destination status AND no US cargo hold FDA status
Logic Flow:
IF A cargo record exists in the system
AND The cargo has no CP cargo error status AND no CP cargo pending status AND no US cargo error status AND no US cargo hold status AND no US cargo hold PCS status AND no US cargo pre-hold PCS status AND no US cargo hold border status AND no US cargo pre-hold border status AND no US cargo hold destination status AND no US cargo pre-hold destination status AND no US cargo hold FDA status
THEN:
• The cargo status record should be deleted from GCSB1RT table
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists with a gcsb1rt status record.
Trigger Criteria:
Context: A cargo record exists with a GCSB1RT status record
Applied to: Clear Error Index Fields
Action: The cargo has no CP cargo error status AND no CP cargo pending status AND no US cargo error status
Logic Flow:
IF A cargo record exists with a GCSB1RT status record
AND The cargo has no CP cargo error status AND no CP cargo pending status AND no US cargo error status
THEN:
• The error origin index, error destination index, and error border index fields should be cleared to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists with a gcsb1rt status record.
Trigger Criteria:
Context: A cargo record exists with a GCSB1RT status record
Applied to: Clear Hold Index Fields
Action: The cargo has no US cargo hold status AND no US cargo hold PCS status AND no US cargo pre-hold PCS status AND no US cargo hold border status AND no US cargo pre-hold border status AND no US cargo hold destination status AND no US cargo pre-hold destination status AND no US cargo hold FDA status
Logic Flow:
IF A cargo record exists with a GCSB1RT status record
AND The cargo has no US cargo hold status AND no US cargo hold PCS status AND no US cargo pre-hold PCS status AND no US cargo hold border status AND no US cargo pre-hold border status AND no US cargo hold destination status AND no US cargo pre-hold destination status AND no US cargo hold FDA status
THEN:
• The held destination index and held border index fields should be cleared to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo gcsb1rt record exists with error fields cleared.
Trigger Criteria:
Context: A cargo GCSB1RT record exists with error fields cleared
Applied to: Delete GCSB1RT Record
Action: The held destination index is spaces AND the held border index is spaces
Logic Flow:
IF A cargo GCSB1RT record exists with error fields cleared
AND The held destination index is spaces AND the held border index is spaces
THEN:
• The GCSB1RT record should be deleted
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo gcsb1rt record exists with error fields cleared.
Trigger Criteria:
Context: A cargo GCSB1RT record exists with error fields cleared
Applied to: Update GCSB1RT Record
Action: The held destination index is not spaces OR the held border index is not spaces
Logic Flow:
IF A cargo GCSB1RT record exists with error fields cleared
AND The held destination index is not spaces OR the held border index is not spaces
THEN:
• The GCSB1RT record should be updated with the current field values
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo gcsb1rt record exists with hold fields cleared.
Trigger Criteria:
Context: A cargo GCSB1RT record exists with hold fields cleared
Applied to: Delete GCSB1RT Record
Action: The error destination index is spaces AND the error origin index is spaces AND the error border index is spaces
Logic Flow:
IF A cargo GCSB1RT record exists with hold fields cleared
AND The error destination index is spaces AND the error origin index is spaces AND the error border index is spaces
THEN:
• The GCSB1RT record should be deleted
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo gcsb1rt record exists with hold fields cleared.
Trigger Criteria:
Context: A cargo GCSB1RT record exists with hold fields cleared
Applied to: Update Existing GCSB1RT Record
Action: The error destination index is not spaces OR the error origin index is not spaces OR the error border index is not spaces
Logic Flow:
IF A cargo GCSB1RT record exists with hold fields cleared
AND The error destination index is not spaces OR the error origin index is not spaces OR the error border index is not spaces
THEN:
• The GCSB1RT record should be updated with the current field values
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has error or pending status conditions.
Trigger Criteria:
Context: A cargo record has error or pending status conditions
Applied to: Populate Error Index Fields
Action: The cargo has CP cargo error status OR CP cargo pending status OR US cargo error status
Logic Flow:
IF A cargo record has error or pending status conditions
AND The cargo has CP cargo error status OR CP cargo pending status OR US cargo error status
THEN:
• The error origin index should be set to origin station number, error destination index should be set to destination station number, error border index should be set to border station number from MC table lookup, and all error code fields should be set to 'E'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has error conditions and no existing gcsb1rt record.
Trigger Criteria:
Context: A cargo record has error conditions and no existing GCSB1RT record
Applied to: Create New GCSB1RT Record
Action: The GCSB1RT record retrieval returns not found status
Logic Flow:
IF A cargo record has error conditions and no existing GCSB1RT record
AND The GCSB1RT record retrieval returns not found status
THEN:
• A new GCSB1RT record should be inserted with the cargo CCN key and populated error index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has error conditions and an existing gcsb1rt record is found.
Trigger Criteria:
Context: A cargo record has error conditions and an existing GCSB1RT record is found
Applied to: Update Existing GCSB1RT Record
Action: The GCSB1RT record retrieval returns successful status
Logic Flow:
IF A cargo record has error conditions and an existing GCSB1RT record is found
AND The GCSB1RT record retrieval returns successful status
THEN:
• The existing GCSB1RT record should be updated with the populated error index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has hold status conditions.
Trigger Criteria:
Context: A cargo record has hold status conditions
Applied to: Populate Hold Index Fields
Action: The cargo has US cargo hold status OR US cargo hold PCS status OR US cargo pre-hold PCS status OR US cargo hold destination status OR US cargo pre-hold destination status OR US cargo hold FDA status
Logic Flow:
IF A cargo record has hold status conditions
AND The cargo has US cargo hold status OR US cargo hold PCS status OR US cargo pre-hold PCS status OR US cargo hold destination status OR US cargo pre-hold destination status OR US cargo hold FDA status
THEN:
• The held destination index should be set to destination station number and held destination cargo should be set to cargo CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has border hold status conditions.
Trigger Criteria:
Context: A cargo record has border hold status conditions
Applied to: Populate Hold Index Fields
Action: The cargo has US cargo hold status OR US cargo hold PCS status OR US cargo pre-hold PCS status OR US cargo hold border status OR US cargo pre-hold border status OR US cargo hold FDA status
Logic Flow:
IF A cargo record has border hold status conditions
AND The cargo has US cargo hold status OR US cargo hold PCS status OR US cargo pre-hold PCS status OR US cargo hold border status OR US cargo pre-hold border status OR US cargo hold FDA status
THEN:
• The held border index should be set to border station number from MC table lookup and held border cargo should be set to cargo CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has hold conditions and no existing gcsb1rt record.
Trigger Criteria:
Context: A cargo record has hold conditions and no existing GCSB1RT record
Applied to: Create New GCSB1RT Record
Action: The GCSB1RT record retrieval returns not found status
Logic Flow:
IF A cargo record has hold conditions and no existing GCSB1RT record
AND The GCSB1RT record retrieval returns not found status
THEN:
• A new GCSB1RT record should be inserted with the cargo CCN key and populated hold index fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has hold conditions and an existing gcsb1rt record is found.
Trigger Criteria:
Context: A cargo record has hold conditions and an existing GCSB1RT record is found
Applied to: Update Existing GCSB1RT Record
Action: The GCSB1RT record retrieval returns successful status
Logic Flow:
IF A cargo record has hold conditions and an existing GCSB1RT record is found
AND The GCSB1RT record retrieval returns successful status
THEN:
• The existing GCSB1RT record should be updated with the populated hold index fields
R-GCCUSIO-cbl-00707 (+5)File: GCCUSIO.cblBusiness Rule: Delete GCSB1RT Index Record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo ccn key is provided and an index record exists in gcsb1rt.
Trigger Criteria:
Context: A cargo CCN key is provided and an index record exists in GCSB1RT
Applied to: Delete Index Record from Database
Action: The delete GCSB1RT index record process is executed and the record is found
Logic Flow:
IF A cargo CCN key is provided and an index record exists in GCSB1RT
AND The delete GCSB1RT index record process is executed and the record is found
THEN:
• The system deletes the index record from GCSB1RT database
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when delete gcsb1rt index record process is initiated.
Trigger Criteria:
Context: A delete GCSB1RT index record process is initiated
Applied to: Initialize GCSB1RT Record to Spaces
Action: The process begins
Logic Flow:
IF A delete GCSB1RT index record process is initiated
AND The process begins
THEN:
• The system clears all fields in the GCSB1RT record structure
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when primary cargo record with a ccn key exists.
Trigger Criteria:
Context: A primary cargo record with a CCN key exists
Applied to: Set Cargo Key from Primary Record
Action: The delete GCSB1RT index record process needs to identify the target record
Logic Flow:
IF A primary cargo record with a CCN key exists
AND The delete GCSB1RT index record process needs to identify the target record
THEN:
• The system sets the cargo key value from the primary record's CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo key is set for index record identification.
Trigger Criteria:
Context: A cargo key is set for index record identification
Applied to: Attempt to Retrieve Existing Index Record
Action: The system needs to verify if the index record exists
Logic Flow:
IF A cargo key is set for index record identification
AND The system needs to verify if the index record exists
THEN:
• The system attempts to retrieve the existing index record using the cargo key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when delete gcsb1rt index record process is executed.
Trigger Criteria:
Context: A delete GCSB1RT index record process is executed
Applied to: Clear Status Code
Action: The index record is not found in the database
Logic Flow:
IF A delete GCSB1RT index record process is executed
AND The index record is not found in the database
THEN:
• The system clears the status code to indicate no error condition
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when index record exists in gcsb1rt database.
Trigger Criteria:
Context: An index record exists in GCSB1RT database
Applied to: Delete Index Record from Database
Action: The record has been successfully retrieved and verified
Logic Flow:
IF An index record exists in GCSB1RT database
AND The record has been successfully retrieved and verified
THEN:
• The system executes the delete operation to remove the record from the database
R-GCCUSIO-cbl-00713 (+4)File: GCCUSIO.cblBusiness Rule: Determine Index Database Action Required
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists in the system.
Trigger Criteria:
Context: A cargo record exists in the system
Applied to: Cargo has Error or Hold Status?
Action: The cargo has no CP cargo error status AND no CP cargo pending status AND no US cargo error status AND no US cargo hold status AND no US cargo hold PCS status AND no US cargo pre-hold PCS status AND no US cargo hold border status AND no US cargo pre-hold border status AND no US cargo hold destination status AND no US cargo pre-hold destination status AND no US cargo hold FDA status
Logic Flow:
IF A cargo record exists in the system
AND The cargo has no CP cargo error status AND no CP cargo pending status AND no US cargo error status AND no US cargo hold status AND no US cargo hold PCS status AND no US cargo pre-hold PCS status AND no US cargo hold border status AND no US cargo pre-hold border status AND no US cargo hold destination status AND no US cargo pre-hold destination status AND no US cargo hold FDA status
THEN:
• Delete the cargo from the status index table and exit processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists in the system.
Trigger Criteria:
Context: A cargo record exists in the system
Applied to: Cargo has Both Error and Hold Status?
Action: The cargo has CP cargo error status OR CP cargo pending status OR US cargo error status
Logic Flow:
IF A cargo record exists in the system
AND The cargo has CP cargo error status OR CP cargo pending status OR US cargo error status
THEN:
• Retrieve the current status index record, populate all error index fields with origin station, border station, and destination station information, andif the status record exists then update it, otherwise create a new status record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists in the system.
Trigger Criteria:
Context: A cargo record exists in the system
Applied to: Cargo has Both Error and Hold Status?
Action: The cargo has US cargo hold status OR US cargo hold PCS status OR US cargo pre-hold PCS status OR US cargo hold border status OR US cargo pre-hold border status OR US cargo hold destination status OR US cargo pre-hold destination status OR US cargo hold FDA status
Logic Flow:
IF A cargo record exists in the system
AND The cargo has US cargo hold status OR US cargo hold PCS status OR US cargo pre-hold PCS status OR US cargo hold border status OR US cargo pre-hold border status OR US cargo hold destination status OR US cargo pre-hold destination status OR US cargo hold FDA status
THEN:
• Retrieve the current status index record, populate hold index fields with destination and border station information, andif the status record exists then update it, otherwise create a new status record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with potential error and hold statuses.
Trigger Criteria:
Context: A cargo record exists with potential error and hold statuses
Applied to: Cargo has Error Status Only?
Action: The cargo has no CP cargo error status AND no CP cargo pending status AND no US cargo error status
Logic Flow:
IF A cargo record exists with potential error and hold statuses
AND The cargo has no CP cargo error status AND no CP cargo pending status AND no US cargo error status
THEN:
• Retrieve the current status index record, clear all error index fields, andif no hold index fields remain then delete the status record, otherwise update the status record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with potential error and hold statuses.
Trigger Criteria:
Context: A cargo record exists with potential error and hold statuses
Applied to: Cargo has Hold Status Only?
Action: The cargo has no US cargo hold status AND no US cargo hold PCS status AND no US cargo pre-hold PCS status AND no US cargo hold border status AND no US cargo pre-hold border status AND no US cargo hold destination status AND no US cargo pre-hold destination status AND no US cargo hold FDA status
Logic Flow:
IF A cargo record exists with potential error and hold statuses
AND The cargo has no US cargo hold status AND no US cargo hold PCS status AND no US cargo pre-hold PCS status AND no US cargo hold border status AND no US cargo pre-hold border status AND no US cargo hold destination status AND no US cargo pre-hold destination status AND no US cargo hold FDA status
THEN:
• Retrieve the current status index record andif found, clear all hold index fields, andif no error index fields remain then delete the status record, otherwise update the status record
R-GCCUSIO-cbl-00718 (+8)File: GCCUSIO.cblBusiness Rule: Retrieve Existing GCSB1RT Index Record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when gcsb1rt record area exists in memory.
Trigger Criteria:
Context: A GCSB1RT record area exists in memory
Applied to: Clear GCSB1RT Record Area
Action: The system needs to retrieve an existing GCSB1RT index record
Logic Flow:
IF A GCSB1RT record area exists in memory
AND The system needs to retrieve an existing GCSB1RT index record
THEN:
• The GCSB1RT record area is cleared to spaces to ensure no residual data affects the retrieval operation
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when primary cargo record (gcusrt) exists with a us-ccn-key.
Trigger Criteria:
Context: A primary cargo record (GCUSRT) exists with a US-CCN-KEY
Applied to: Set Cargo Key from Primary Record
Action: The system needs to search for the corresponding GCSB1RT index record
Logic Flow:
IF A primary cargo record (GCUSRT) exists with a US-CCN-KEY
AND The system needs to search for the corresponding GCSB1RT index record
THEN:
• The US-CCN-KEY from the primary cargo record is copied to the GCSB1RT key field (GCB1-KEY-VALUE) to establish the search criteria
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when system is preparing to retrieve a gcsb1rt index record. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is preparing to retrieve a GCSB1RT index record
Applied to: Set Database Status to Accept 'GE'
Action: The database call is about to be executed
Logic Flow:
IF The system is preparing to retrieve a GCSB1RT index record
AND The database call is about to be executed
THEN:
• The database acceptance status is set to 'GE' to allow the system to handle the case where the record is not found without treating it as an error
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when system needs to retrieve and potentially update a gcsb1rt index record.
Trigger Criteria:
Context: The system needs to retrieve and potentially update a GCSB1RT index record
Applied to: Set Function Code to 'GHU'
Action: The database function code is being set for the retrieval operation
Logic Flow:
IF The system needs to retrieve and potentially update a GCSB1RT index record
AND The database function code is being set for the retrieval operation
THEN:
• The function code is set to 'GHU' (Get Hold Unique) to retrieve the record with exclusive access for potential updates
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when search key, function code, and database status are properly configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The search key, function code, and database status are properly configured
Applied to: Call Database with Qualified Search
Action: The system executes the database retrieval operation
Logic Flow:
IF The search key, function code, and database status are properly configured
AND The system executes the database retrieval operation
THEN:
• The database is called using the CIMS interface with the function code, PCB, GCSB1RT record area, and qualified SSA to retrieve the specific index record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when database retrieval operation for gcsb1rt index record has been executed.
Trigger Criteria:
Context: A database retrieval operation for GCSB1RT index record has been executed
Applied to: Record Found?
Action: The system checks the database status code returned from the operation
Logic Flow:
IF A database retrieval operation for GCSB1RT index record has been executed
AND The system checks the database status code returned from the operation
THEN:
• If the status code is spaces (blank), the record was found; if the status code is not spaces, the record was not found
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when database retrieval operation returned a status code of spaces (successful).
Trigger Criteria:
Context: The database retrieval operation returned a status code of spaces (successful)
Applied to: Set Found Flag to TRUE
Action: The system processes the successful retrieval result
Logic Flow:
IF The database retrieval operation returned a status code of spaces (successful)
AND The system processes the successful retrieval result
THEN:
• The SW-GCSB1RT-FOUND flag is set to TRUE to indicate that the GCSB1RT index record exists and was successfully retrieved
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when database retrieval operation returned a non-space status code (record not found).
Trigger Criteria:
Context: The database retrieval operation returned a non-space status code (record not found)
Applied to: Set Not Found Flag to TRUE
Action: The system processes the unsuccessful retrieval result
Logic Flow:
IF The database retrieval operation returned a non-space status code (record not found)
AND The system processes the unsuccessful retrieval result
THEN:
• The SW-GCSB1RT-NOT-FOUND flag is set to TRUE to indicate that the GCSB1RT index record does not exist in the database
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when gcsb1rt index record was not found and the not found flag has been set.
Trigger Criteria:
Context: The GCSB1RT index record was not found and the not found flag has been set
Applied to: Clear Database Status
Action: The system completes processing the not found condition
Logic Flow:
IF The GCSB1RT index record was not found and the not found flag has been set
AND The system completes processing the not found condition
THEN:
• The database status code is cleared to spaces to reset the status for subsequent operations
R-GCCUSIO-cbl-00727 (+3)File: GCCUSIO.cblBusiness Rule: Create New Index Record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when primary cargo record exists with a valid us-ccn-key.
Trigger Criteria:
Context: A primary cargo record exists with a valid US-CCN-KEY
Applied to: Set Cargo Key from Primary Record
Action: The system needs to create a new GCSB1RT index record
Logic Flow:
IF A primary cargo record exists with a valid US-CCN-KEY
AND The system needs to create a new GCSB1RT index record
THEN:
• The cargo key field in the index record must be populated with the US-CCN-KEY from the primary cargo record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when system is preparing to create a new gcsb1rt index record.
Trigger Criteria:
Context: The system is preparing to create a new GCSB1RT index record
Applied to: Clear Database Status Flags
Action: The database operation is about to be initiated
Logic Flow:
IF The system is preparing to create a new GCSB1RT index record
AND The database operation is about to be initiated
THEN:
• The database accept status must be cleared to spaces to ensure proper processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when system needs to create a new gcsb1rt index record.
Trigger Criteria:
Context: The system needs to create a new GCSB1RT index record
Applied to: Set Function Code to ISRT
Action: The database function code is being set
Logic Flow:
IF The system needs to create a new GCSB1RT index record
AND The database function code is being set
THEN:
• The function code must be set to 'ISRT' to indicate an insert operation
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo key is set, database status is cleared, and function code is set to isrt. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The cargo key is set, database status is cleared, and function code is set to ISRT
Applied to: Call Database Insert Operation
Action: The system executes the database insert operation
Logic Flow:
IF The cargo key is set, database status is cleared, and function code is set to ISRT
AND The system executes the database insert operation
THEN:
• The CIMS interface must be called with the common control block, function code, PCB, GCSB1RT record, and unqualified SSA to insert the new index record
R-GCCUSIO-cbl-00731 (+3)File: GCCUSIO.cblBusiness Rule: Update Existing Index Record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when index record update operation is being performed on gcsb1rt.
Trigger Criteria:
Context: An index record update operation is being performed on GCSB1RT
Applied to: Set Accept Status to GE
Action: The system prepares to update an existing index record
Logic Flow:
IF An index record update operation is being performed on GCSB1RT
AND The system prepares to update an existing index record
THEN:
• The accept status must be set to 'GE' to indicate successful processing expectation
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when existing index record needs to be updated in gcsb1rt.
Trigger Criteria:
Context: An existing index record needs to be updated in GCSB1RT
Applied to: Set Function Code to REPL
Action: The system prepares the database operation
Logic Flow:
IF An existing index record needs to be updated in GCSB1RT
AND The system prepares the database operation
THEN:
• The function code must be set to 'REPL' to perform a replace operation
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when function code is set to 'repl' and accept status is set to 'ge'. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The function code is set to 'REPL' and accept status is set to 'GE'
Applied to: Call IMS Database with REPL Function
Action: The system executes the database call using CIMS with REPL function code, PCB, GCSB1RT record, and unqualified SSA
Logic Flow:
IF The function code is set to 'REPL' and accept status is set to 'GE'
AND The system executes the database call using CIMS with REPL function code, PCB, GCSB1RT record, and unqualified SSA
THEN:
• The database management system processes the replace operation on the GCSB1RT index record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when replace operation has been executed on the gcsb1rt index record.
Trigger Criteria:
Context: A replace operation has been executed on the GCSB1RT index record
Applied to: Update Successful?
Action: The system checks the CC-STATUS-CODE after the database operation
Logic Flow:
IF A replace operation has been executed on the GCSB1RT index record
AND The system checks the CC-STATUS-CODE after the database operation
THEN:
• IfCC-STATUS-CODE equals SPACES then the update is successful, otherwise the update failed
R-GCCUSIO-cbl-00735 (+7)File: GCCUSIO.cblBusiness Rule: Check for Existing Hold Index Record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when hold index record search is about to be performed.
Trigger Criteria:
Context: A hold index record search is about to be performed
Applied to: Clear GCSB1RT Record Area
Action: The system prepares to check for existing hold index records
Logic Flow:
IF A hold index record search is about to be performed
AND The system prepares to check for existing hold index records
THEN:
• The GCSB1RT record area must be cleared to spaces
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when primary cargo record exists with a ccn key.
Trigger Criteria:
Context: A primary cargo record exists with a CCN key
Applied to: Set Cargo Key from Primary Record
Action: The system needs to search for hold index records
Logic Flow:
IF A primary cargo record exists with a CCN key
AND The system needs to search for hold index records
THEN:
• The cargo CCN key from the primary record must be copied to the hold index search key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when hold index record search is being performed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A hold index record search is being performed
Applied to: Set Accept Status to 'GE'
Action: The system prepares the database call parameters
Logic Flow:
IF A hold index record search is being performed
AND The system prepares the database call parameters
THEN:
• The accept status must be set to 'GE' to handle both found and not found scenarios
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when hold index record needs to be retrieved for processing.
Trigger Criteria:
Context: A hold index record needs to be retrieved for processing
Applied to: Set Function Code to 'GHU'
Action: The system prepares the database function code
Logic Flow:
IF A hold index record needs to be retrieved for processing
AND The system prepares the database function code
THEN:
• The function code must be set to 'GHU' for Get Hold Unique operation
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when search parameters are set with cargo key, function code, and accept status. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The search parameters are set with cargo key, function code, and accept status
Applied to: Call Database with Qualified Search
Action: The system executes the database search
Logic Flow:
IF The search parameters are set with cargo key, function code, and accept status
AND The system executes the database search
THEN:
• A qualified search must be performed against the GCSB1RT database using the prepared parameters
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when database search for hold index records has been executed.
Trigger Criteria:
Context: A database search for hold index records has been executed
Applied to: Record Found?
Action: The system evaluates the search results
Logic Flow:
IF A database search for hold index records has been executed
AND The system evaluates the search results
THEN:
• If the status code is spaces, the record exists; otherwise, the record does not exist
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when hold index record search has been executed.
Trigger Criteria:
Context: A hold index record search has been executed
Applied to: Set Hold Index Record Found Flag
Action: The database returns a status code of spaces indicating success
Logic Flow:
IF A hold index record search has been executed
AND The database returns a status code of spaces indicating success
THEN:
• The system must set the hold index record found flag to true
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when hold index record search has been executed.
Trigger Criteria:
Context: A hold index record search has been executed
Applied to: Set Hold Index Record Not Found Flag
Action: The database returns a status code other than spaces indicating record not found
Logic Flow:
IF A hold index record search has been executed
AND The database returns a status code other than spaces indicating record not found
THEN:
• The system must set the hold index record not found flag to true
R-GCCUSIO-cbl-00743 (+4)File: GCCUSIO.cblBusiness Rule: Create New Hold Index Record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has hold status conditions detected.
Trigger Criteria:
Context: A cargo record has hold status conditions detected
Applied to: Check Hold Type
Action: The system evaluates the specific hold status types (HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, HOLD-D, PR-H-DE, HOLDFDA)
Logic Flow:
IF A cargo record has hold status conditions detected
AND The system evaluates the specific hold status types (HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, HOLD-D, PR-H-DE, HOLDFDA)
THEN:
• The system identifies whether destination hold fields, border hold fields, or both need to be populated
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has destination hold status (hold, holdpcs, pr-hpcs, hold-d, pr-h-de, or holdfda).
Trigger Criteria:
Context: A cargo record has destination hold status (HOLD, HOLDPCS, PR-HPCS, HOLD-D, PR-H-DE, or HOLDFDA)
Applied to: Set Destination Hold Index Fields
Action: The system processes hold field population
Logic Flow:
IF A cargo record has destination hold status (HOLD, HOLDPCS, PR-HPCS, HOLD-D, PR-H-DE, or HOLDFDA)
AND The system processes hold field population
THEN:
• The system sets the destination station number to the held destination key and sets the cargo CCN key to the held destination cargo key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has border hold status (hold, holdpcs, pr-hpcs, hold-b, pr-h-bo, or holdfda).
Trigger Criteria:
Context: A cargo record has border hold status (HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, or HOLDFDA)
Applied to: Set Border Hold Index Fields
Action: The system processes hold field population
Logic Flow:
IF A cargo record has border hold status (HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, or HOLDFDA)
AND The system processes hold field population
THEN:
• The system retrieves the border station number from MC table lookup and sets it to the held border key, and sets the cargo CCN key to the held border cargo key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record requires border hold index fields and has a location id.
Trigger Criteria:
Context: A cargo record requires border hold index fields and has a location ID
Applied to: Use Border Station Number from MC Table
Action: The system needs to determine the border station number
Logic Flow:
IF A cargo record requires border hold index fields and has a location ID
AND The system needs to determine the border station number
THEN:
• The system calls table lookup service to retrieve MC table segment using the cargo location ID and extracts the station number if lookup is successful
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when hold index fields have been populated for a cargo record.
Trigger Criteria:
Context: Hold index fields have been populated for a cargo record
Applied to: Create New GCSB1RT Hold Index Record
Action: The system needs to persist the hold index information
Logic Flow:
IF Hold index fields have been populated for a cargo record
AND The system needs to persist the hold index information
THEN:
• The system checks if a status record exists, andif found updates it with hold fields, otherwise inserts a new status record with the hold index information
R-GCCUSIO-cbl-00748 (+2)File: GCCUSIO.cblBusiness Rule: Update Existing Hold Index Record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when existing hold index record needs to be updated in gcsb1rt table.
Trigger Criteria:
Context: An existing hold index record needs to be updated in GCSB1RT table
Applied to: Set Function Code to 'REPL'
Action: The system processes a hold index record update operation
Logic Flow:
IF An existing hold index record needs to be updated in GCSB1RT table
AND The system processes a hold index record update operation
THEN:
• The function code must be set to 'REPL' to enable record replacement
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when hold index record update operation is being processed.
Trigger Criteria:
Context: A hold index record update operation is being processed
Applied to: Set Accept Status to 'GE'
Action: The system prepares to update the GCSB1RT record
Logic Flow:
IF A hold index record update operation is being processed
AND The system prepares to update the GCSB1RT record
THEN:
• The accept status must be set to 'GE' before executing the database call
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when function code is set to 'repl' and accept status is set to 'ge'. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The function code is set to 'REPL' and accept status is set to 'GE'
Applied to: Call CIMS with Replace Function
Action: The system needs to update an existing hold index record
Logic Flow:
IF The function code is set to 'REPL' and accept status is set to 'GE'
AND The system needs to update an existing hold index record
THEN:
• The system must call CIMS with the function code, PCB, GCSB1RT record, and unqualified SSA to execute the replace operation
R-GCCUSIO-cbl-00751 (+1)File: GCCUSIO.cblBusiness Rule: Set Car ID Index Key from Primary Record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed for index field updates.
Trigger Criteria:
Context: A cargo record is being processed for index field updates
Applied to: Is Cargo Record Deleted?
Action: The cargo record has a deleted status indicator set to true
Logic Flow:
IF A cargo record is being processed for index field updates
AND The cargo record has a deleted status indicator set to true
THEN:
• The system skips all car ID index field setting operations and exits the process
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is active and not marked as deleted.
Trigger Criteria:
Context: A cargo record is active and not marked as deleted
Applied to: Extract Equipment Car ID from Primary Record
Action: The system processes the cargo record for index field updates
Logic Flow:
IF A cargo record is active and not marked as deleted
AND The system processes the cargo record for index field updates
THEN:
• The equipment car identifier from the primary record is copied to the car ID index field
R-GCCUSIO-cbl-00753 (+10)File: GCCUSIO.cblBusiness Rule: Extract Waybill Index Value from Cargo Record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed for waybill index extraction.
Trigger Criteria:
Context: A cargo record is being processed for waybill index extraction
Applied to: Is Cargo Record Deleted?
Action: The cargo record has a deleted status indicator (88-GCUSRT-RT10-CPCARGO-DELETED is true)
Logic Flow:
IF A cargo record is being processed for waybill index extraction
AND The cargo record has a deleted status indicator (88-GCUSRT-RT10-CPCARGO-DELETED is true)
THEN:
• The system skips all waybill index processing and exits the extraction process
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is active and not deleted.
Trigger Criteria:
Context: A cargo record is active and not deleted
Applied to: Extract Road Number from RT082-ROAD-NUM & Extract Station Number from RT082-STN-NUM & Extract Waybill Number from RT082-WB-NUM & Extract Waybill Date from RT082-WB-DTE
Action: The system processes waybill index extraction
Logic Flow:
IF A cargo record is active and not deleted
AND The system processes waybill index extraction
THEN:
• The road number from GCUSRT-RT082-ROAD-NUM is extracted and prepared for index population
• The station number from GCUSRT-RT082-STN-NUM is extracted and prepared for index population
• The waybill number from GCUSRT-RT082-WB-NUM is extracted and prepared for index population
• The waybill date from GCUSRT-RT082-WB-DTE is extracted and prepared for index population
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when road number has been extracted from rt082-road-num.
Trigger Criteria:
Context: The road number has been extracted from RT082-ROAD-NUM
Applied to: Populate RT072-ROAD-INDEX with Road Number
Action: The system populates waybill index fields
Logic Flow:
IF The road number has been extracted from RT082-ROAD-NUM
AND The system populates waybill index fields
THEN:
• The extracted road number is moved to GCUSRT-RT072-ROAD-INDEX
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when station number has been extracted from rt082-stn-num.
Trigger Criteria:
Context: The station number has been extracted from RT082-STN-NUM
Applied to: Populate RT072-STN-INDEX with Station Number
Action: The system populates waybill index fields
Logic Flow:
IF The station number has been extracted from RT082-STN-NUM
AND The system populates waybill index fields
THEN:
• The extracted station number is moved to GCUSRT-RT072-STN-INDEX
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill number has been extracted from rt082-wb-num.
Trigger Criteria:
Context: The waybill number has been extracted from RT082-WB-NUM
Applied to: Populate RT072-WB-INDEX with Waybill Number
Action: The system populates waybill index fields
Logic Flow:
IF The waybill number has been extracted from RT082-WB-NUM
AND The system populates waybill index fields
THEN:
• The extracted waybill number is moved to GCUSRT-RT072-WB-INDEX
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill date has been extracted from rt082-wb-dte.
Trigger Criteria:
Context: The waybill date has been extracted from RT082-WB-DTE
Applied to: Populate RT072-WB-DTE-INDEX with Waybill Date
Action: The system populates waybill index fields
Logic Flow:
IF The waybill date has been extracted from RT082-WB-DTE
AND The system populates waybill index fields
THEN:
• The extracted waybill date is moved to GCUSRT-RT072-WB-DTE-INDEX
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when all individual waybill components have been populated in rt072 fields.
Trigger Criteria:
Context: All individual waybill components have been populated in RT072 fields
Applied to: Create Complete Waybill Index RT072-WB-NUM-INDEX
Action: The system creates the complete waybill index
Logic Flow:
IF All individual waybill components have been populated in RT072 fields
AND The system creates the complete waybill index
THEN:
• The RT072-WB-NUM-INDEX field contains the complete waybill index structure for primary reference
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when complete waybill index rt072-wb-num-index has been created. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The complete waybill index RT072-WB-NUM-INDEX has been created
Applied to: Copy Waybill Index to RT073-WB-NUM-INDEX for Cross-Reference
Action: The system establishes cross-reference indexing
Logic Flow:
IF The complete waybill index RT072-WB-NUM-INDEX has been created
AND The system establishes cross-reference indexing
THEN:
• The waybill index is copied from GCUSRT-RT072-WB-NUM-INDEX to GCUSRT-RT073-WB-NUM-INDEX
R-GCCUSIO-cbl-00764 (+5)File: GCCUSIO.cblBusiness Rule: Bond Index Data Available?
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with bond index field (gcusrt-rt074-bond-index) and bond search operator (gcwusio-operator).
Trigger Criteria:
Context: A cargo record with bond index field (GCUSRT-RT074-BOND-INDEX) and bond search operator (GCWUSIO-OPERATOR)
Applied to: Bond Index Data Available?
Action: The system processes a bond index search request
Logic Flow:
IF A cargo record with bond index field (GCUSRT-RT074-BOND-INDEX) and bond search operator (GCWUSIO-OPERATOR)
AND The system processes a bond index search request
THEN:
• If bond index is not empty, use qualified search with bond number as key value, otherwise use unqualified search with empty key value
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with non-empty bond index field (gcusrt-rt074-bond-index) and search operator (gcwusio-operator).
Trigger Criteria:
Context: A cargo record with non-empty bond index field (GCUSRT-RT074-BOND-INDEX) and search operator (GCWUSIO-OPERATOR)
Applied to: Set Bond Index Key Value
Action: The system prepares for qualified bond index search
Logic Flow:
IF A cargo record with non-empty bond index field (GCUSRT-RT074-BOND-INDEX) and search operator (GCWUSIO-OPERATOR)
AND The system prepares for qualified bond index search
THEN:
• Set the bond index value to GCUB-KEY-VALUEand assign the operator to GCUB-OPERATOR
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with empty bond index field (gcusrt-rt074-bond-index equals spaces).
Trigger Criteria:
Context: A cargo record with empty bond index field (GCUSRT-RT074-BOND-INDEX equals SPACES)
Applied to: Set Empty Bond Index Key
Action: The system prepares for unqualified bond index search
Logic Flow:
IF A cargo record with empty bond index field (GCUSRT-RT074-BOND-INDEX equals SPACES)
AND The system prepares for unqualified bond index search
THEN:
• Set SPACES to GCUB-KEY-VALUE for the search operation
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when bond index key value is set with actual bond number and qualified search parameters are prepared.
Trigger Criteria:
Context: Bond index key value is set with actual bond number and qualified search parameters are prepared
Applied to: Use Qualified Search with Bond Number
Action: The system executes the bond index search
Logic Flow:
IF Bond index key value is set with actual bond number and qualified search parameters are prepared
AND The system executes the bond index search
THEN:
• Use GCUB-SSA-QUAL for qualified search with the specific bond number
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when bond index key value is set to spaces and unqualified search parameters are prepared.
Trigger Criteria:
Context: Bond index key value is set to SPACES and unqualified search parameters are prepared
Applied to: Use Unqualified Search
Action: The system executes the bond index search
Logic Flow:
IF Bond index key value is set to SPACES and unqualified search parameters are prepared
AND The system executes the bond index search
THEN:
• Use GCUB-SSA-UNQUAL for unqualified search without specific bond criteria
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when search parameters are set with either qualified or unqualified search criteria and pcb5 is assigned to ws-pcb. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Search parameters are set with either qualified or unqualified search criteria and PCB5 is assigned to WS-PCB
Applied to: Execute Bond Index Search
Action: The system executes the bond index search operation
Logic Flow:
IF Search parameters are set with either qualified or unqualified search criteria and PCB5 is assigned to WS-PCB
AND The system executes the bond index search operation
THEN:
• Perform X1100-CALL-ONE-SSA to execute the database search with the prepared parameters
Business Justification: Establishes the required business protocol to be followed when cargo database operation is being performed with a specific function code and primary key (us-ccn-key).
Trigger Criteria:
Context: A cargo database operation is being performed with a specific function code and primary key (US-CCN-KEY)
Applied to: Primary Key Available?
Action: The function code is GU (Get Unique) or GN (Get Next) and the primary key US-CCN-KEY contains spaces
Logic Flow:
IF A cargo database operation is being performed with a specific function code and primary key (US-CCN-KEY)
AND The function code is GU (Get Unique) or GN (Get Next) and the primary key US-CCN-KEY contains spaces
THEN:
• The system uses unqualified SSA for browse operation and sets primary PCB for database access
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo database operation is being performed with function code gu (get unique) or gn (get next).
Trigger Criteria:
Context: A cargo database operation is being performed with function code GU (Get Unique) or GN (Get Next)
Applied to: Primary Key Available?
Action: The primary key US-CCN-KEY is not spaces and contains a valid cargo control number
Logic Flow:
IF A cargo database operation is being performed with function code GU (Get Unique) or GN (Get Next)
AND The primary key US-CCN-KEY is not spaces and contains a valid cargo control number
THEN:
• The system uses qualified SSA with the primary key value and sets primary PCB for targeted database access
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo database operation is being performed.
Trigger Criteria:
Context: A cargo database operation is being performed
Applied to: Primary Key Available?
Action: The function code is not GU (Get Unique) or GN (Get Next) but is ISRT (Insert), REPL (Replace), DLET (Delete), or ZAP
Logic Flow:
IF A cargo database operation is being performed
AND The function code is not GU (Get Unique) or GN (Get Next) but is ISRT (Insert), REPL (Replace), DLET (Delete), or ZAP
THEN:
• The system proceeds directly to database access without primary key validation checks
Business Justification: Ensures correct system behavior and process compliance when secondary database processing request is received.
Trigger Criteria:
Context: A secondary database processing request is received
Applied to: Secondary Key Available?
Action: The system checks if secondary key index flag (GCWUSIO-INDEX-SECN-KEY) is set to true
Logic Flow:
IF A secondary database processing request is received
AND The system checks if secondary key index flag (GCWUSIO-INDEX-SECN-KEY) is set to true
THEN:
• If secondary key index is available, use secondary key index search with GCA2-PCB2and build qualified SSA with GCSUSS00-KEY mapped to GCB2-KEY-VALUE, otherwise use primary key direct access with GCA2-PCBand build qualified SSA with GCSUSS00-KEY mapped to GCA2-KEY-VALUE
Business Justification: Ensures correct system behavior and process compliance when request to process gcsa8rt segment with get unique or get next function code.
Trigger Criteria:
Context: A request to process GCSA8RT segment with Get Unique or Get Next function code
Applied to: Message Key Available?
Action: The system checks if the GCSA8RT key field is empty (contains only spaces)
Logic Flow:
IF A request to process GCSA8RT segment with Get Unique or Get Next function code
AND The system checks if the GCSA8RT key field is empty (contains only spaces)
THEN:
• If the key is empty, set error code '0012' and error message 'GCSA8RT-KEY EQUAL SPACES', otherwise allow processing to continue
R-GCCUSIO-cbl-00775 (+7)File: GCCUSIO.cblBusiness Rule: Extract Station Information
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when request to extract station information is initiated.
Trigger Criteria:
Context: A request to extract station information is initiated
Applied to: Initialize Table Request Parameters
Action: The system prepares for table lookup
Logic Flow:
IF A request to extract station information is initiated
AND The system prepares for table lookup
THEN:
• All table request parameters are cleared including key values and control flags
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when station information lookup is being prepared.
Trigger Criteria:
Context: Station information lookup is being prepared
Applied to: Set Function Code to 'GU'
Action: The system configures the database operation type
Logic Flow:
IF Station information lookup is being prepared
AND The system configures the database operation type
THEN:
• The function code is set to 'GU' for unique record retrieval
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when station information lookup is required.
Trigger Criteria:
Context: A station information lookup is required
Applied to: Set Table ID to 'MC'
Action: The system selects the appropriate data source
Logic Flow:
IF A station information lookup is required
AND The system selects the appropriate data source
THEN:
• The table ID is set to 'MC' to access the station master table
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo location id is available from the cargo record.
Trigger Criteria:
Context: Cargo location ID is available from the cargo record
Applied to: Set Station Sequence ID from Location
Action: The system prepares to search for station information
Logic Flow:
IF Cargo location ID is available from the cargo record
AND The system prepares to search for station information
THEN:
• The location ID is used as the sequence ID search key for the MC table lookup
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when table lookup parameters are being prepared.
Trigger Criteria:
Context: Table lookup parameters are being prepared
Applied to: Clear Return Flag
Action: The system initializes control flags
Logic Flow:
IF Table lookup parameters are being prepared
AND The system initializes control flags
THEN:
• The return flag is cleared to spaces for proper status detection
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when all table lookup parameters are properly configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All table lookup parameters are properly configured
Applied to: Call Table Lookup Service
Action: The system executes the station information retrieval
Logic Flow:
IF All table lookup parameters are properly configured
AND The system executes the station information retrieval
THEN:
• The table lookup service is called with function code, table ID, and search key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when table lookup service has been executed.
Trigger Criteria:
Context: Table lookup service has been executed
Applied to: Station Found?
Action: The system evaluates the lookup result
Logic Flow:
IF Table lookup service has been executed
AND The system evaluates the lookup result
THEN:
• If return flag equals '0' then station information was found successfully, otherwise station was not found
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when station information was successfully found in mc table.
Trigger Criteria:
Context: Station information was successfully found in MC table
Applied to: Extract Station Number from MC Segment
Action: The system processes the retrieved station data
Logic Flow:
IF Station information was successfully found in MC table
AND The system processes the retrieved station data
THEN:
• The station number is extracted from the MC segment for use in border location processing
R-GCCUSIO-cbl-00783 (+9)File: GCCUSIO.cblBusiness Rule: Loop Through 20 N9 Reference Segments
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo control number (ccn) exists in the primary cargo record.
Trigger Criteria:
Context: A cargo control number (CCN) exists in the primary cargo record
Applied to: Build Secondary Key with CCN + Record Type '02' + Sequence '0001'
Action: The system needs to retrieve N9 reference segments from secondary cargo data
Logic Flow:
IF A cargo control number (CCN) exists in the primary cargo record
AND The system needs to retrieve N9 reference segments from secondary cargo data
THEN:
• The system builds a composite key using the CCN, record type '02', and sequence '0001'
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when composite key has been built for n9 reference segment lookup.
Trigger Criteria:
Context: A composite key has been built for N9 reference segment lookup
Applied to: Retrieve First N9 Segment from GCSA2RT
Action: The system executes a database retrieval operation against secondary cargo data
Logic Flow:
IF A composite key has been built for N9 reference segment lookup
AND The system executes a database retrieval operation against secondary cargo data
THEN:
• The system retrieves the first N9 reference segment if it exists
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when database retrieval operation has been executed for n9 reference segments.
Trigger Criteria:
Context: A database retrieval operation has been executed for N9 reference segments
Applied to: N9 Segment Found?
Action: The system checks the operation result status
Logic Flow:
IF A database retrieval operation has been executed for N9 reference segments
AND The system checks the operation result status
THEN:
• If segments are found, continue with N9 processing, otherwise skip N9 processing entirely
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when n9 reference segments have been successfully retrieved.
Trigger Criteria:
Context: N9 reference segments have been successfully retrieved
Applied to: Initialize N9 Counter to Zero
Action: The system begins processing individual N9 reference entries
Logic Flow:
IF N9 reference segments have been successfully retrieved
AND The system begins processing individual N9 reference entries
THEN:
• The system initializes a counter to zero to track the current N9 entry position
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when n9 reference processing is in progress.
Trigger Criteria:
Context: N9 reference processing is in progress
Applied to: Increment N9 Counter
Action: The system moves to examine the next N9 reference entry
Logic Flow:
IF N9 reference processing is in progress
AND The system moves to examine the next N9 reference entry
THEN:
• The system increments the N9 counter by one
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when n9 reference entries are being processed sequentially.
Trigger Criteria:
Context: N9 reference entries are being processed sequentially
Applied to: Counter <= 20?
Action: The system checks the current counter value
Logic Flow:
IF N9 reference entries are being processed sequentially
AND The system checks the current counter value
THEN:
• If counter is 20 or less, continue processing, otherwise terminate N9 processing
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when n9 reference entry is being processed.
Trigger Criteria:
Context: An N9 reference entry is being processed
Applied to: Check Reference Number Qualifier
Action: The system examines the reference number qualifier field
Logic Flow:
IF An N9 reference entry is being processed
AND The system examines the reference number qualifier field
THEN:
• The system reads the qualifier value to determine reference type
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when n9 reference entry qualifier has been examined.
Trigger Criteria:
Context: An N9 reference entry qualifier has been examined
Applied to: Qualifier = 'CN'?
Action: The system compares the qualifier value to 'CN'
Logic Flow:
IF An N9 reference entry qualifier has been examined
AND The system compares the qualifier value to 'CN'
THEN:
• If qualifier equals 'CN', process as customer number reference, otherwise continue to next entry
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when n9 reference entry has qualifier 'cn'.
Trigger Criteria:
Context: An N9 reference entry has qualifier 'CN'
Applied to: Extract Shipment ID from Reference Number
Action: The system processes the reference number field
Logic Flow:
IF An N9 reference entry has qualifier 'CN'
AND The system processes the reference number field
THEN:
• The system extracts the reference number value as the shipment identification number
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when shipment identification number has been extracted from an n9 reference entry.
Trigger Criteria:
Context: A shipment identification number has been extracted from an N9 reference entry
Applied to: Store Shipment ID for Iron Highway Notification
Action: The system needs to prepare data for Iron Highway notification
Logic Flow:
IF A shipment identification number has been extracted from an N9 reference entry
AND The system needs to prepare data for Iron Highway notification
THEN:
• The system stores the shipment ID in the notification data structure
R-GCCUSIO-cbl-00793 (+4)File: GCCUSIO.cblBusiness Rule: Determine Final Status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists with cp cargo status description and us cargo status description.
Trigger Criteria:
Context: A cargo record exists with CP cargo status description and US cargo status description
Applied to: Determine Final Status
Action: The system needs to determine the final status for notification processing
Logic Flow:
IF A cargo record exists with CP cargo status description and US cargo status description
AND The system needs to determine the final status for notification processing
THEN:
• The system should set the final status to DELETED if cargo status is DELETED, or RELEASE if cargo status is RELEASE, or SENT if US cargo description is empty and CP status is SENT, or use the US cargo short description as the final status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has a current us cargo status and a previously saved status from prior notification.
Trigger Criteria:
Context: A cargo record has a current US cargo status and a previously saved status from prior notification
Applied to: Does US Cargo Description Match Saved Status?
Action: The current US cargo status matches the saved status from previous notification
Logic Flow:
IF A cargo record has a current US cargo status and a previously saved status from prior notification
AND The current US cargo status matches the saved status from previous notification
THEN:
• The system should skip sending the notification to avoid duplicate status updates
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has empty us cargo short description and cp cargo status description is sent.
Trigger Criteria:
Context: A cargo record has empty US cargo short description and CP cargo status description is SENT
Applied to: Is US Cargo Description Empty AND CP Status is SENT?
Action: The system determines the final status for notification
Logic Flow:
IF A cargo record has empty US cargo short description and CP cargo status description is SENT
AND The system determines the final status for notification
THEN:
• The system should use SENT as the final status for the notification
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has cp cargo status description set to deleted.
Trigger Criteria:
Context: A cargo record has CP cargo status description set to DELETED
Applied to: Is Cargo Status DELETED?
Action: The system determines the final status for notification
Logic Flow:
IF A cargo record has CP cargo status description set to DELETED
AND The system determines the final status for notification
THEN:
• The system should set the final status to DELETED and use this for the notification regardless of other status values
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has cp cargo status description set to release and is not deleted.
Trigger Criteria:
Context: A cargo record has CP cargo status description set to RELEASE and is not DELETED
Applied to: Is Cargo Status RELEASE?
Action: The system determines the final status for notification
Logic Flow:
IF A cargo record has CP cargo status description set to RELEASE and is not DELETED
AND The system determines the final status for notification
THEN:
• The system should set the final status to RELEASE and use this for the notification
R-GCCUSIO-cbl-00798 (+12)File: GCCUSIO.cblBusiness Rule: Check Cargo Status for Index Requirements
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record exists in the system.
Trigger Criteria:
Context: A cargo record exists in the system
Applied to: Delete Index Database Record - No Index Requirements
Action: The cargo does not have error status (RT10-CPCARGO-ERROR, RT10-CPCARGO-PENDING, RT11-USCARGO-ERROR) AND the cargo does not have hold status (RT11-USCARGO-HOLD, RT11-USCARGO-HOLDPCS, RT11-USCARGO-PR-HPCS, RT11-USCARGO-HOLD-B, RT11-USCARGO-PR-H-BO, RT11-USCARGO-HOLD-D, RT11-USCARGO-PR-H-DE, RT11-USCARGO-HOLDFDA)
Logic Flow:
IF A cargo record exists in the system
AND The cargo does not have error status (RT10-CPCARGO-ERROR, RT10-CPCARGO-PENDING, RT11-USCARGO-ERROR) AND the cargo does not have hold status (RT11-USCARGO-HOLD, RT11-USCARGO-HOLDPCS, RT11-USCARGO-PR-HPCS, RT11-USCARGO-HOLD-B, RT11-USCARGO-PR-H-BO, RT11-USCARGO-HOLD-D, RT11-USCARGO-PR-H-DE, RT11-USCARGO-HOLDFDA)
THEN:
• The system deletes the cargo index record from GCSB1RT database
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with an index record in gcsb1rt.
Trigger Criteria:
Context: A cargo record exists with an index record in GCSB1RT
Applied to: Clear Error Index Fields - Keep Hold Index Fields
Action: The cargo does not have error status (RT10-CPCARGO-ERROR, RT10-CPCARGO-PENDING, RT11-USCARGO-ERROR) AND the cargo has hold status
Logic Flow:
IF A cargo record exists with an index record in GCSB1RT
AND The cargo does not have error status (RT10-CPCARGO-ERROR, RT10-CPCARGO-PENDING, RT11-USCARGO-ERROR) AND the cargo has hold status
THEN:
• The system clears error origin index, error destination index, and error border index fields to spaces while keeping hold index fields intact
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with an index record in gcsb1rt.
Trigger Criteria:
Context: A cargo record exists with an index record in GCSB1RT
Applied to: Clear Hold Index Fields - Keep Error Index Fields
Action: The cargo does not have hold status (RT11-USCARGO-HOLD, RT11-USCARGO-HOLDPCS, RT11-USCARGO-PR-HPCS, RT11-USCARGO-HOLD-B, RT11-USCARGO-PR-H-BO, RT11-USCARGO-HOLD-D, RT11-USCARGO-PR-H-DE, RT11-USCARGO-HOLDFDA) AND the cargo has error status
Logic Flow:
IF A cargo record exists with an index record in GCSB1RT
AND The cargo does not have hold status (RT11-USCARGO-HOLD, RT11-USCARGO-HOLDPCS, RT11-USCARGO-PR-HPCS, RT11-USCARGO-HOLD-B, RT11-USCARGO-PR-H-BO, RT11-USCARGO-HOLD-D, RT11-USCARGO-PR-H-DE, RT11-USCARGO-HOLDFDA) AND the cargo has error status
THEN:
• The system clears held destination index and held border index fields to spaces while keeping error index fields intact
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when error index fields have been cleared from a cargo index record.
Trigger Criteria:
Context: Error index fields have been cleared from a cargo index record
Applied to: Delete Index Database Record
Action: Both held destination index and held border index fields are empty
Logic Flow:
IF Error index fields have been cleared from a cargo index record
AND Both held destination index and held border index fields are empty
THEN:
• The system deletes the entire cargo index record from GCSB1RT database
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when error index fields have been cleared from a cargo index record.
Trigger Criteria:
Context: Error index fields have been cleared from a cargo index record
Applied to: Update Index Database Record
Action: Either held destination index or held border index fields contain data
Logic Flow:
IF Error index fields have been cleared from a cargo index record
AND Either held destination index or held border index fields contain data
THEN:
• The system updates the existing cargo index record in GCSB1RT database with the cleared error fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when hold index fields have been cleared from a cargo index record.
Trigger Criteria:
Context: Hold index fields have been cleared from a cargo index record
Applied to: Delete Index Database Record
Action: Error destination index, error origin index, and error border index fields are all empty
Logic Flow:
IF Hold index fields have been cleared from a cargo index record
AND Error destination index, error origin index, and error border index fields are all empty
THEN:
• The system deletes the entire cargo index record from GCSB1RT database
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when hold index fields have been cleared from a cargo index record.
Trigger Criteria:
Context: Hold index fields have been cleared from a cargo index record
Applied to: Update Index Database Record
Action: Any of error destination index, error origin index, or error border index fields contain data
Logic Flow:
IF Hold index fields have been cleared from a cargo index record
AND Any of error destination index, error origin index, or error border index fields contain data
THEN:
• The system updates the existing cargo index record in GCSB1RT database with the cleared hold fields
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has error status (rt10-cpcargo-error, rt10-cpcargo-pending, or rt11-uscargo-error).
Trigger Criteria:
Context: A cargo record has error status (RT10-CPCARGO-ERROR, RT10-CPCARGO-PENDING, or RT11-USCARGO-ERROR)
Applied to: Populate Error Index Fields - Origin Station, Border Station, Destination Station
Action: The system processes the cargo for index requirements
Logic Flow:
IF A cargo record has error status (RT10-CPCARGO-ERROR, RT10-CPCARGO-PENDING, or RT11-USCARGO-ERROR)
AND The system processes the cargo for index requirements
THEN:
• The system populates error code origin as 'E', error origin with origin station number, error origin cargo with CCN key, error code border as 'E', error border with border station number from MC table lookup, error border cargo with CCN key, error code destination as 'E', error destination with destination station number, and error destination cargo with CCN key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo index record already exists in gcsb1rt database and cargo has error status.
Trigger Criteria:
Context: A cargo index record already exists in GCSB1RT database AND cargo has error status
Applied to: Update Existing Index Record
Action: Error index fields have been populated
Logic Flow:
IF A cargo index record already exists in GCSB1RT database AND cargo has error status
AND Error index fields have been populated
THEN:
• The system updates the existing cargo index record in GCSB1RT database with the error information
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when no cargo index record exists in gcsb1rt database and cargo has error status.
Trigger Criteria:
Context: No cargo index record exists in GCSB1RT database AND cargo has error status
Applied to: Create New Index Record
Action: Error index fields have been populated
Logic Flow:
IF No cargo index record exists in GCSB1RT database AND cargo has error status
AND Error index fields have been populated
THEN:
• The system creates a new cargo index record in GCSB1RT database with the error information
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has hold status (rt11-uscargo-hold, rt11-uscargo-holdpcs, rt11-uscargo-pr-hpcs, rt11-uscargo-hold-b, rt11-uscargo-pr-h-bo, rt11-uscargo-hold-d, rt11-uscargo-pr-h-de, or rt11-uscargo-holdfda).
Trigger Criteria:
Context: A cargo record has hold status (RT11-USCARGO-HOLD, RT11-USCARGO-HOLDPCS, RT11-USCARGO-PR-HPCS, RT11-USCARGO-HOLD-B, RT11-USCARGO-PR-H-BO, RT11-USCARGO-HOLD-D, RT11-USCARGO-PR-H-DE, or RT11-USCARGO-HOLDFDA)
Applied to: Populate Hold Index Fields - Destination Station, Border Station
Action: The system processes the cargo for index requirements
Logic Flow:
IF A cargo record has hold status (RT11-USCARGO-HOLD, RT11-USCARGO-HOLDPCS, RT11-USCARGO-PR-HPCS, RT11-USCARGO-HOLD-B, RT11-USCARGO-PR-H-BO, RT11-USCARGO-HOLD-D, RT11-USCARGO-PR-H-DE, or RT11-USCARGO-HOLDFDA)
AND The system processes the cargo for index requirements
THEN:
• The system populates held destination with destination station number and held destination cargo with CCN key for destination holds (HOLD, HOLDPCS, PR-HPCS, HOLD-D, PR-H-DE, HOLDFDA), and populates held border with border station number from MC table lookup and held border cargo with CCN key for border holds (HOLD, HOLDPCS, PR-HPCS, HOLD-B, PR-H-BO, HOLDFDA)
Rule Belongs to : GCCUSIO.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo index record already exists in gcsb1rt database and cargo has hold status.
Trigger Criteria:
Context: A cargo index record already exists in GCSB1RT database AND cargo has hold status
Applied to: Update Existing Index Record
Action: Hold index fields have been populated
Logic Flow:
IF A cargo index record already exists in GCSB1RT database AND cargo has hold status
AND Hold index fields have been populated
THEN:
• The system updates the existing cargo index record in GCSB1RT database with the hold information
Rule Belongs to : GCCUSIO.cbl
Business Justification: Ensures correct system behavior and process compliance when no cargo index record exists in gcsb1rt database and cargo has hold status.
Trigger Criteria:
Context: No cargo index record exists in GCSB1RT database AND cargo has hold status
Applied to: Create New Index Record
Action: Hold index fields have been populated
Logic Flow:
IF No cargo index record exists in GCSB1RT database AND cargo has hold status
AND Hold index fields have been populated
THEN:
• The system creates a new cargo index record in GCSB1RT database with the hold information
R-GCCUSIO-cbl-00825 (+6)File: GCCUSIO.cblBusiness Rule: Cargo has Error or Hold Status?
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record exists in the system.
Trigger Criteria:
Context: A cargo record exists in the system
Applied to: Delete GCSB1RT Index Record
Action: The cargo has no CP cargo error status AND no CP cargo pending status AND no US cargo error status AND no US cargo hold status AND no US cargo hold PCS status AND no US cargo pre-hold PCS status AND no US cargo hold border status AND no US cargo pre-hold border status AND no US cargo hold destination status AND no US cargo pre-hold destination status AND no US cargo hold FDA status
Logic Flow:
IF A cargo record exists in the system
AND The cargo has no CP cargo error status AND no CP cargo pending status AND no US cargo error status AND no US cargo hold status AND no US cargo hold PCS status AND no US cargo pre-hold PCS status AND no US cargo hold border status AND no US cargo pre-hold border status AND no US cargo hold destination status AND no US cargo pre-hold destination status AND no US cargo hold FDA status
THEN:
• The system deletes the cargo record from the GCSB1RT status index table
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record exists in the system.
Trigger Criteria:
Context: A cargo record exists in the system
Applied to: Continue Processing Error Conditions
Action: The cargo has CP cargo error status OR CP cargo pending status OR US cargo error status
Logic Flow:
IF A cargo record exists in the system
AND The cargo has CP cargo error status OR CP cargo pending status OR US cargo error status
THEN:
• The system retrieves the current GCSB1RT record AND fills error fields with origin station, border station, and destination station information AND if GCSB1RT record exists then replaces the record else inserts a new GCSB1RT record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record exists in the system.
Trigger Criteria:
Context: A cargo record exists in the system
Applied to: Continue Processing Hold Conditions
Action: The cargo has US cargo hold status OR US cargo hold PCS status OR US cargo pre-hold PCS status OR US cargo hold border status OR US cargo pre-hold border status OR US cargo hold destination status OR US cargo pre-hold destination status OR US cargo hold FDA status
Logic Flow:
IF A cargo record exists in the system
AND The cargo has US cargo hold status OR US cargo hold PCS status OR US cargo pre-hold PCS status OR US cargo hold border status OR US cargo pre-hold border status OR US cargo hold destination status OR US cargo pre-hold destination status OR US cargo hold FDA status
THEN:
• The system retrieves the current GCSB1RT record AND fills held fields with destination and border information AND if GCSB1RT record exists then replaces the record else inserts a new GCSB1RT record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed for status index updates.
Trigger Criteria:
Context: A cargo record is being processed for status index updates
Applied to: Has Error Status? & Has Hold Status?
Action: The system evaluates cargo status conditions
Logic Flow:
IF A cargo record is being processed for status index updates
AND The system evaluates cargo status conditions
THEN:
• The system identifies if cargo has CP cargo error status OR CP cargo pending status OR US cargo error status
• The system identifies if cargo has US cargo hold status OR US cargo hold PCS status OR US cargo pre-hold PCS status OR US cargo hold border status OR US cargo pre-hold border status OR US cargo hold destination status OR US cargo pre-hold destination status OR US cargo hold FDA status
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has no cp cargo error status and no cp cargo pending status and no us cargo error status but has hold conditions.
Trigger Criteria:
Context: A cargo record has no CP cargo error status AND no CP cargo pending status AND no US cargo error status but has hold conditions
Applied to: Continue Processing Error Conditions
Action: The system processes the cargo status update
Logic Flow:
IF A cargo record has no CP cargo error status AND no CP cargo pending status AND no US cargo error status but has hold conditions
AND The system processes the cargo status update
THEN:
• The system retrieves the current GCSB1RT record AND clears error origin index AND clears error destination index AND clears error border index AND if no held destination index exists AND no held border index exists then deletes the GCSB1RT record else replaces the GCSB1RT record
Rule Belongs to : GCCUSIO.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has no us cargo hold status and no us cargo hold pcs status and no us cargo pre-hold pcs status and no us cargo hold border status and no us cargo pre-hold border status and no us cargo hold destination status and no us cargo pre-hold destination status and no us cargo hold fda status but has error conditions.
Trigger Criteria:
Context: A cargo record has no US cargo hold status AND no US cargo hold PCS status AND no US cargo pre-hold PCS status AND no US cargo hold border status AND no US cargo pre-hold border status AND no US cargo hold destination status AND no US cargo pre-hold destination status AND no US cargo hold FDA status but has error conditions
Applied to: Continue Processing Hold Conditions
Action: The system processes the cargo status update
Logic Flow:
IF A cargo record has no US cargo hold status AND no US cargo hold PCS status AND no US cargo pre-hold PCS status AND no US cargo hold border status AND no US cargo pre-hold border status AND no US cargo hold destination status AND no US cargo pre-hold destination status AND no US cargo hold FDA status but has error conditions
AND The system processes the cargo status update
THEN:
• The system retrieves the current GCSB1RT record AND if record is found then clears held destination index AND clears held border index AND if no error destination index exists AND no error origin index exists AND no error border index exists then deletes the GCSB1RT record else replaces the GCSB1RT record
R-GCCUSIO-cbl-00832 (+2)File: GCCUSIO.cblBusiness Rule: Check Hold Type
Rule Belongs to : GCCUSIO.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with hold status conditions.
Trigger Criteria:
Context: A cargo record exists with hold status conditions
Applied to: Set Destination Hold Index
Action: The cargo status is USCARGO-HOLD OR USCARGO-HOLDPCS OR USCARGO-PR-HPCS OR USCARGO-HOLD-D OR USCARGO-PR-H-DE OR USCARGO-HOLDFDA
Logic Flow:
IF A cargo record exists with hold status conditions
AND The cargo status is USCARGO-HOLD OR USCARGO-HOLDPCS OR USCARGO-PR-HPCS OR USCARGO-HOLD-D OR USCARGO-PR-H-DE OR USCARGO-HOLDFDA
THEN:
• Set the destination station number from cargo record to held destination key AND set the cargo CCN key to held destination cargo key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists with hold status conditions and mc table lookup is successful.
Trigger Criteria:
Context: A cargo record exists with hold status conditions AND MC table lookup is successful
Applied to: Set Border Hold Index
Action: The cargo status is USCARGO-HOLD OR USCARGO-HOLDPCS OR USCARGO-PR-HPCS OR USCARGO-HOLD-B OR USCARGO-PR-H-BO OR USCARGO-HOLDFDA AND table lookup returns success flag '0'
Logic Flow:
IF A cargo record exists with hold status conditions AND MC table lookup is successful
AND The cargo status is USCARGO-HOLD OR USCARGO-HOLDPCS OR USCARGO-PR-HPCS OR USCARGO-HOLD-B OR USCARGO-PR-H-BO OR USCARGO-HOLDFDA AND table lookup returns success flag '0'
THEN:
• Set the MC station number from table segment to held border key AND set the cargo CCN key to held border cargo key
Rule Belongs to : GCCUSIO.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with location id exists. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record with location ID exists
Applied to: Lookup Border Station from MC Table
Action: Border hold processing is required for the cargo
Logic Flow:
IF A cargo record with location ID exists
AND Border hold processing is required for the cargo
THEN:
• Call table lookup service with function code 'GU', table ID 'MC', and cargo location ID as sequence ID to retrieve station number information
📁 File: GCX126.cbl
Select All in File
R-GCX126-cbl-00037 (+17)File: GCX126R.cblBusiness Rule: Initialize Program Configuration
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when program gcx126 is starting execution.
Trigger Criteria:
Context: The program GCX126 is starting execution
Applied to: Set Program Name and Module Name
Action: The program initialization begins
Logic Flow:
IF The program GCX126 is starting execution
AND The program initialization begins
THEN:
• The current program name from CCCOM is saved to PROG-NAME-SAVEDandMODULE-NAME is moved to CC-PROG in CCCOM
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when program is starting initialization. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The program is starting initialization
Applied to: Initialize Working Storage Fields
Action: Working storage initialization is performed
Logic Flow:
IF The program is starting initialization
AND Working storage initialization is performed
THEN:
• LOG-INDX is set to 1, WS-K1-REMARK-NDX is set to ZEROES, LOG-ARRAY is set to SPACES, WS-PREV-CRN is set to SPACES, WS-MQS-LEN-HEADER is set to LENGTH OF MQS-MESSAGE-HEADER, WS-MQS-LEN-OF-1-ENTRY is set to LENGTH OF MQS-TABLE-ENTRY(1), MRLN-LINE is set to 1, WS-CTR-NEW is set to 1, andMRLN-350-REPORT is set to SPACES
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when program is initializing for message processing. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The program is initializing for message processing
Applied to: Initialize Segment Flags
Action: Segment flags are being initialized
Logic Flow:
IF The program is initializing for message processing
AND Segment flags are being initialized
THEN:
• WS-NO-HEADER-FOUND, WS-NO-TRAILER-FOUND, WS-NO-M10-SEG-FOUND, WS-NO-P4-SEG-FOUND, WS-NO-N7-SEG-FOUND, WS-NO-X4-SEG-FOUND, WS-NO-K1-SEG-FOUND, WS-NO-V9-SEG-FOUND, WS-NO-END-FOUND, andWS-CARGO-NOT-FOUND are all set to TRUE
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when program is initializing merlin notification settings.
Trigger Criteria:
Context: The program is initializing Merlin notification settings
Applied to: Set Merlin Report User Code
Action: The Merlin sender code is being set
Logic Flow:
IF The program is initializing Merlin notification settings
AND The Merlin sender code is being set
THEN:
• EMI-FROM-USERCODE is set to 'OM01247'
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when program needs to access database tables.
Trigger Criteria:
Context: The program needs to access database tables
Applied to: Initialize Working Storage Fields
Action: Database access parameters are initialized
Logic Flow:
IF The program needs to access database tables
AND Database access parameters are initialized
THEN:
• CC-ACCEPT-STATUS in CCCOM is set to 'GE', GCCTBIO-FUNC-CODE is set to GU, GCSTBRT-KEY-VALUE is set to SPACES, GCSTBDP-KEY-VALUE is set to SPACES, GCCTBIO-RETURN-FLAG is set to SPACES, GCSTBRT-AD-SEGMENT is set to SPACES, SECOND-PCB-FLAG is set to SPACES, andUNQUAL-SSA-FLAG is set to SPACES
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when program is preparing to process a new edi 350 message.
Trigger Criteria:
Context: The program is preparing to process a new EDI 350 message
Applied to: Initialize Working Storage Fields
Action: Message segment structures are initialized
Logic Flow:
IF The program is preparing to process a new EDI 350 message
AND Message segment structures are initialized
THEN:
• M10-SEGMENT, P4-SEGMENT, V9-SEGMENT, K1-SEGMENT, X4-SEGMENT, andN7-SEGMENT are all initialized to their default values
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when program needs to determine merlin notification recipients.
Trigger Criteria:
Context: The program needs to determine Merlin notification recipients
Applied to: Retrieve Admin Configuration from GCSTBRT Table
Action: Admin configuration is retrieved with TABLE-ID 'AD' and SEQID 'ADMINID'
Logic Flow:
IF The program needs to determine Merlin notification recipients
AND Admin configuration is retrieved with TABLE-ID 'AD' and SEQID 'ADMINID'
THEN:
• GCCTBIO is called with function GU to retrieve GCSTBRT segment
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when admin configuration has been retrieved from gcstbrt table. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Admin configuration has been retrieved from GCSTBRT table
Applied to: Extract Merlin User Code from Admin Config
Action:GCCTBIO-RETURN-FLAG equals '0'
Logic Flow:
IF Admin configuration has been retrieved from GCSTBRT table
ANDGCCTBIO-RETURN-FLAG equals '0'
THEN:
• 88-AD-SEGMENT-FOUND is set to TRUE, WS-TABLE-SEGMENT is moved to GCSTBRT-AD-SEGMENT, andGCSTBRT-AD-DC-P-MERLIN-1 is moved to WS-EMI-TO-USERCODE
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when program needs the current system date for processing. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The program needs the current system date for processing
Applied to: Format Machine Date - YYYYMMDD
Action: Machine date is being formatted
Logic Flow:
IF The program needs the current system date for processing
AND Machine date is being formatted
THEN:
• CC-MACHINE-YEAR from CCCOM is moved to WS-FMT-MACHINE-YEAR, CC-MACHINE-MONTH from CCCOM is moved to WS-FMT-MACHINE-MONTH, andCC-MACHINE-DAY from CCCOM is moved to WS-FMT-MACHINE-DAY
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when program needs the current system time for processing. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The program needs the current system time for processing
Applied to: Format Machine Time - HHMMSS
Action: Machine time is being formatted
Logic Flow:
IF The program needs the current system time for processing
AND Machine time is being formatted
THEN:
• CC-MACHINE-HOUR from CCCOM is moved to WS-FMT-MACHINE-HOUR, CC-MACHINE-MIN from CCCOM is moved to WS-FMT-MACHINE-MIN, CC-MACHINE-SEC from CCCOM is moved to WS-FMT-MACHINE-SEC, and 01 is moved to WS-FMT-MACHINE-SEQ
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when machine date and time have been formatted. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Machine date and time have been formatted
Applied to: Save Formatted Date/Time for Processing
Action: Formatted values are being saved
Logic Flow:
IF Machine date and time have been formatted
AND Formatted values are being saved
THEN:
• WS-FMT-MACHINE-DATE is moved to WS-SAVE-FMT-MACHINE-DATEandWS-X4-FMT-MACHINE-DATE, andWS-FMT-MACHINE-TIME is moved to WS-SAVE-FMT-MACHINE-TIMEandWS-X4-FMT-MACHINE-TIME
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when current machine date is available in gregorian format. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The current machine date is available in Gregorian format
Applied to: Convert Gregorian Date to Julian Date
Action: Date conversion is performed
Logic Flow:
IF The current machine date is available in Gregorian format
AND Date conversion is performed
THEN:
• DATCV-PARAMETER-LIST is initialized, CC-MACHINE-CENTURYandCC-MACHINE-DATE-X from CCCOM are concatenated into INPUT-DATE-GREGORIAN, IN-FUNC-CODE is set to 2, OUT-FUNC-CODE is set to 1, ISCDATCV is called with DATCV-PARAMETER-LIST, andOUTPUT-1 is moved to WS-DATE
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when date conversion has been attempted using iscdatcv.
Trigger Criteria:
Context: Date conversion has been attempted using ISCDATCV
Applied to: Convert Gregorian Date to Julian Date
Action:DATCV-PARM-ERROR is TRUE
Logic Flow:
IF Date conversion has been attempted using ISCDATCV
ANDDATCV-PARM-ERROR is TRUE
THEN:
• CC-ERROR-MESSAGE in CCCOM is set to 'MODULE ISCDATCV SAID CCCOM CONTAIN INVALID DATE' and the program aborts by performing Z900-ABEND
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when program needs to check the ims message queue. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The program needs to check the IMS message queue
Applied to: Read Initial Message from IMS Queue
Action: Initial queue read is performed
Logic Flow:
IF The program needs to check the IMS message queue
AND Initial queue read is performed
THEN:
• WS-IOAREA is set to SPACES, CC-ACCEPT-STATUS in CCCOM is set to 'QCQD', and CIMS is called with CCCOM, GU function, IO-PCB from CCCOM, andWS-IOAREA
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when program needs to access mq messages.
Trigger Criteria:
Context: The program needs to access MQ messages
Applied to: Establish MQ Connection to Queue Manager
Action: MQ connection is established
Logic Flow:
IF The program needs to access MQ messages
AND MQ connection is established
THEN:
• MQCONNC is called with W03-MQMANAGER, W03-HCONN, W03-COMPCODE, andW03-REASON
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when mq connection has been attempted.
Trigger Criteria:
Context: MQ connection has been attempted
Applied to: Establish MQ Connection to Queue Manager
Action:W03-COMPCODE is not equal to MQCC-OK
Logic Flow:
IF MQ connection has been attempted
ANDW03-COMPCODE is not equal to MQCC-OK
THEN:
• W03-REASON is moved to W03-REASON-CODE, OUTPUT-MESSAGE-TEXT is initialized, GCCMQERR is called with W03-REASON-CODEandOUTPUT-MESSAGE-TEXT, W03-REASON-CODEandOUTPUT-MESSAGE-TEXT are concatenated into MQ-ERROR-TEXT, '355' is moved to MQ-TRANS-SET, 'CONN FAILED' is moved to PGM-ERROR-TEXT, ERROR-MESSAGE2 is moved to CC-ERROR-MESSAGE in CCCOM, and the program aborts by performing Z900-ABEND
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when mq connection has been established successfully.
Trigger Criteria:
Context: MQ connection has been established successfully
Applied to: Open MQ Queue for Input
Action: MQ queue is being opened
Logic Flow:
IF MQ connection has been established successfully
AND MQ queue is being opened
THEN:
• MQOT-Q is moved to MQOD-OBJECTTYPE, MQTMC-QNAME is moved to MQOD-OBJECTNAME, W03-OPTIONS is computed as MQOO-INPUT-AS-Q-DEF, and MQOPEN is called with W03-HCONN, MQOD, W03-OPTIONS, W03-HOBJ-RESPONSE, W03-COMPCODE, andW03-REASON
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when mq queue open has been attempted.
Trigger Criteria:
Context: MQ queue open has been attempted
Applied to: Open MQ Queue for Input
Action:W03-COMPCODE is not equal to MQCC-OK
Logic Flow:
IF MQ queue open has been attempted
ANDW03-COMPCODE is not equal to MQCC-OK
THEN:
• W03-REASON is moved to W03-REASON-CODE, OUTPUT-MESSAGE-TEXT is initialized, GCCMQERR is called with W03-REASON-CODEandOUTPUT-MESSAGE-TEXT, W03-REASON-CODEandOUTPUT-MESSAGE-TEXT are concatenated into MQ-ERROR-TEXT, '355' is moved to MQ-TRANS-SET, 'OPEN FAILED' is moved to PGM-ERROR-TEXT, ERROR-MESSAGE2 is moved to CC-ERROR-MESSAGE in CCCOM, and the program aborts by performing Z900-ABEND
R-GCX126-cbl-00055 (+12)File: GCX126R.cblBusiness Rule: Read EDI 350 Message from Queue
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when program needs to process edi 350 messages from the message queue.
Trigger Criteria:
Context: The program needs to process EDI 350 messages from the message queue
Applied to: Connect to MQ Queue Manager
Action: The system attempts to connect to the MQ Queue Manager
Logic Flow:
IF The program needs to process EDI 350 messages from the message queue
AND The system attempts to connect to the MQ Queue Manager
THEN:
• If connection is successful, proceed to open the queue; If connection fails, generate error message with reason code and abort processing with message 'CONN FAILED' for transaction set '355'
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when connection to mq queue manager is established and queue name is defined.
Trigger Criteria:
Context: Connection to MQ Queue Manager is established and queue name is defined
Applied to: Open MQ Queue for Reading
Action: The system attempts to open the queue with input-as-queue-defined option
Logic Flow:
IF Connection to MQ Queue Manager is established and queue name is defined
AND The system attempts to open the queue with input-as-queue-defined option
THEN:
• If open is successful, proceed to retrieve messages; If open fails, generate error message with reason code and abort processing with message 'OPEN FAILED' for transaction set '355'
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when mq queue is open and ready for message retrieval.
Trigger Criteria:
Context: MQ queue is open and ready for message retrieval
Applied to: Retrieve Message from Queue
Action: The system executes MQGET operation with message buffer length set to the size of MQS-MESSAGE
Logic Flow:
IF MQ queue is open and ready for message retrieval
AND The system executes MQGET operation with message buffer length set to the size of MQS-MESSAGE
THEN:
• The message is retrieved into MQS-MESSAGE buffer with actual data length returned in W03-DATALEN, and completion code and reason code are set to indicate operation status
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when mqget operation has completed and returned completion code in w03-compcode.
Trigger Criteria:
Context: MQGET operation has completed and returned completion code in W03-COMPCODE
Applied to: MQ Operation Successful?
Action: The system evaluates the completion code
Logic Flow:
IF MQGET operation has completed and returned completion code in W03-COMPCODE
AND The system evaluates the completion code
THEN:
• If completion code equals MQCC-OK, proceed to check message status; If completion code equals MQCC-FAILEDand reason equals MQRC-NO-MSG-AVAILABLE, set message not available flag; For any other completion code, set end of queue flag and prepare error message
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when mq get operation returned completion code mqcc-failed with reason code mqrc-no-msg-available (2033).
Trigger Criteria:
Context: MQ GET operation returned completion code MQCC-FAILED with reason code MQRC-NO-MSG-AVAILABLE (2033)
Applied to: Set Message Not Available Flag
Action: The system processes the no message available condition
Logic Flow:
IF MQ GET operation returned completion code MQCC-FAILED with reason code MQRC-NO-MSG-AVAILABLE (2033)
AND The system processes the no message available condition
THEN:
• Set MSG-NOT-AVAILABLE flag to TRUE and exit message retrieval process without error
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when message was successfully retrieved with completion code mqcc-ok and backout count is available in mqmd-backoutcount.
Trigger Criteria:
Context: Message was successfully retrieved with completion code MQCC-OK and backout count is available in MQMD-BACKOUTCOUNT
Applied to: Backout Count > 0?
Action: The system checks if MQMD-BACKOUTCOUNT is not equal to 0
Logic Flow:
IF Message was successfully retrieved with completion code MQCC-OK and backout count is available in MQMD-BACKOUTCOUNT
AND The system checks if MQMD-BACKOUTCOUNT is not equal to 0
THEN:
• If backout count is not equal to 0, set SKIP-MSG-FOUND flag to TRUE; If backout count equals 0, proceed to validate message length
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when message has completion code mqcc-ok and mqmd-backoutcount is not equal to 0.
Trigger Criteria:
Context: Message has completion code MQCC-OK and MQMD-BACKOUTCOUNT is not equal to 0
Applied to: Set Skip Message Flag
Action: The system identifies a previously failed message
Logic Flow:
IF Message has completion code MQCC-OK and MQMD-BACKOUTCOUNT is not equal to 0
AND The system identifies a previously failed message
THEN:
• Set SKIP-MSG-FOUND flag to TRUE and exit message retrieval process without further processing
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when message was successfully retrieved with completion code mqcc-ok and backout count equals 0. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Message was successfully retrieved with completion code MQCC-OK and backout count equals 0
Applied to: Message Length Valid?
Action: The system calculates WS-MAX-MQS-ENTRIES by subtracting header length from total data length and dividing by entry length, and checks if result is less than 1
Logic Flow:
IF Message was successfully retrieved with completion code MQCC-OK and backout count equals 0
AND The system calculates WS-MAX-MQS-ENTRIES by subtracting header length from total data length and dividing by entry length, and checks if result is less than 1
THEN:
• IfWS-MAX-MQS-ENTRIES is less than 1, prepare error message 'USER ABEND 350 MESSAGE TOO SHORT' and abort processing; IfWS-MAX-MQS-ENTRIES is 1 or greater, set GOOD-MSG-FOUND flag to TRUE
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when message has completion code mqcc-ok, backout count equals 0, and calculated segment count is valid.
Trigger Criteria:
Context: Message has completion code MQCC-OK, backout count equals 0, and calculated segment count is valid
Applied to: Set Good Message Found Flag
Action: All message validation checks pass successfully
Logic Flow:
IF Message has completion code MQCC-OK, backout count equals 0, and calculated segment count is valid
AND All message validation checks pass successfully
THEN:
• Set GOOD-MSG-FOUND flag to TRUE and proceed to calculate number of EDI segments
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when valid message is retrieved with data length in w03-datalen, header length in ws-mqs-len-header, and entry length in ws-mqs-len-of-1-entry. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Valid message is retrieved with data length in W03-DATALEN, header length in WS-MQS-LEN-HEADER, and entry length in WS-MQS-LEN-OF-1-ENTRY
Applied to: Calculate Number of EDI Segments
Action: The system computes WS-MAX-MQS-ENTRIES as ((W03-DATALEN minus WS-MQS-LEN-HEADER) divided by WS-MQS-LEN-OF-1-ENTRY) rounded
Logic Flow:
IF Valid message is retrieved with data length in W03-DATALEN, header length in WS-MQS-LEN-HEADER, and entry length in WS-MQS-LEN-OF-1-ENTRY
AND The system computes WS-MAX-MQS-ENTRIES as ((W03-DATALEN minus WS-MQS-LEN-HEADER) divided by WS-MQS-LEN-OF-1-ENTRY) rounded
THEN:
• If calculated WS-MAX-MQS-ENTRIES exceeds CST-MAX-MQS-ENTRIES, set WS-MAX-MQS-ENTRIES to CST-MAX-MQS-ENTRIES; Otherwise, use calculated value for segment count
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when mq get operation returned completion code other than mqcc-ok or returned mqcc-failed with reason other than mqrc-no-msg-available.
Trigger Criteria:
Context: MQ GET operation returned completion code other than MQCC-OK or returned MQCC-FAILED with reason other than MQRC-NO-MSG-AVAILABLE
Applied to: Set End of Queue Flag
Action: The system encounters an unexpected MQ error condition
Logic Flow:
IF MQ GET operation returned completion code other than MQCC-OK or returned MQCC-FAILED with reason other than MQRC-NO-MSG-AVAILABLE
AND The system encounters an unexpected MQ error condition
THEN:
• Set END-OF-MQUEUE flag to TRUE and proceed to prepare error message with reason code
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when mq operation failed with reason code in w03-reason. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: MQ operation failed with reason code in W03-REASON
Applied to: Prepare Error Message
Action: The system needs to report the MQ failure
Logic Flow:
IF MQ operation failed with reason code in W03-REASON
AND The system needs to report the MQ failure
THEN:
• Move W03-REASON to W03-REASON-CODE, call GCCMQERR to get error description into OUTPUT-MESSAGE-TEXT, move error text to MQ-ERROR-TEXT, set MQ-TRANS-SET to '350' or '355', set PGM-ERROR-TEXT to 'OPEN FAILED', 'CLOSE FAILED', 'DISC FAILED', or 'CONN FAILED' as appropriate, and move complete error message to CC-ERROR-MESSAGE
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when error message has been prepared for mq failure condition. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Error message has been prepared for MQ failure condition
Applied to: Abort Processing
Action: The system determines processing cannot continue
Logic Flow:
IF Error message has been prepared for MQ failure condition
AND The system determines processing cannot continue
THEN:
• Call CERR program with CCCOM to abort processing and terminate program execution
R-GCX126-cbl-00068 (+1)File: GCX126R.cblBusiness Rule: Determine Message Type
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when edi 350 message has been retrieved from the mq queue with a message header field mqs-xway-hdr. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An EDI 350 message has been retrieved from the MQ queue with a message header field MQS-XWAY-HDR
Applied to: First 10 Characters = '+++3505040'?
Action: The first 10 characters of MQS-XWAY-HDR equal '+++3505040'
Logic Flow:
IF An EDI 350 message has been retrieved from the MQ queue with a message header field MQS-XWAY-HDR
AND The first 10 characters of MQS-XWAY-HDR equal '+++3505040'
THEN:
• Set the message type indicator WS-CONV-350 to TRUE to identify this as a Conveyance EDI 350 message
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when edi 350 message has been retrieved from the mq queue with a message header field mqs-xway-hdr. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An EDI 350 message has been retrieved from the MQ queue with a message header field MQS-XWAY-HDR
Applied to: First 10 Characters = '+++3505040'?
Action: The first 10 characters of MQS-XWAY-HDR do NOT equal '+++3505040'
Logic Flow:
IF An EDI 350 message has been retrieved from the MQ queue with a message header field MQS-XWAY-HDR
AND The first 10 characters of MQS-XWAY-HDR do NOT equal '+++3505040'
THEN:
• Set the message type indicator WS-CARGO-350 to TRUE to identify this as a Cargo EDI 350 message
R-GCX126-cbl-00070 (+16)File: GCX126R.cblBusiness Rule: Parse EDI Segments
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when edi 350 message is being parsed segment by segment.
Trigger Criteria:
Context: An EDI 350 message is being parsed segment by segment
Applied to: ST - Transaction Set Header Set Header Found Flag
Action: The current segment table ID equals 'ST '
Logic Flow:
IF An EDI 350 message is being parsed segment by segment
AND The current segment table ID equals 'ST '
THEN:
• Set the header found flag to TRUE and set the first X4 segment flag to TRUE to indicate the start of a new transaction set
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when edi 350 message is being parsed and an m10 segment is encountered.
Trigger Criteria:
Context: An EDI 350 message is being parsed and an M10 segment is encountered
Applied to: M10 - Notice/Reference Extract CCN and Notice Info
Action: The current segment table ID equals 'M10'
Logic Flow:
IF An EDI 350 message is being parsed and an M10 segment is encountered
AND The current segment table ID equals 'M10'
THEN:
• Set the M10 segment found flag to TRUE, initialize the M10 segment structure, and move the entire M10 table entry data into the M10 segment structure for subsequent processing
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when edi 350 message is being parsed and a p4 segment is encountered.
Trigger Criteria:
Context: An EDI 350 message is being parsed and a P4 segment is encountered
Applied to: P4 - Port/Location Extract Port Code and Sub-Location
Action: The current segment table ID equals 'P4 '
Logic Flow:
IF An EDI 350 message is being parsed and a P4 segment is encountered
AND The current segment table ID equals 'P4 '
THEN:
• Set the P4 segment found flag to TRUE, initialize the P4 segment structure, and move the entire P4 table entry data into the P4 segment structure for subsequent processing
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when edi 350 message is being parsed and a v9 segment is encountered.
Trigger Criteria:
Context: An EDI 350 message is being parsed and a V9 segment is encountered
Applied to: V9 - Notice Reason Extract Notice Reason Code
Action: The current segment table ID equals 'V9 '
Logic Flow:
IF An EDI 350 message is being parsed and a V9 segment is encountered
AND The current segment table ID equals 'V9 '
THEN:
• Set the V9 segment found flag to TRUE, initialize the V9 segment structure, and move the entire V9 table entry data into the V9 segment structure for subsequent processing
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when edi 350 message is being parsed and a vid segment is encountered.
Trigger Criteria:
Context: An EDI 350 message is being parsed and a VID segment is encountered
Applied to: VID - Vehicle ID Skip Processing
Action: The current segment table ID equals 'VID'
Logic Flow:
IF An EDI 350 message is being parsed and a VID segment is encountered
AND The current segment table ID equals 'VID'
THEN:
• Continue to the next segment without performing any processing or data extraction
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when edi 350 message is being parsed and a k1 segment is encountered.
Trigger Criteria:
Context: An EDI 350 message is being parsed and a K1 segment is encountered
Applied to: K1 - Remarks Store Free-Form Message Increment Remark Index
Action: The current segment table ID equals 'K1 ' and the remark index is less than or equal to the maximum of 50
Logic Flow:
IF An EDI 350 message is being parsed and a K1 segment is encountered
AND The current segment table ID equals 'K1 ' and the remark index is less than or equal to the maximum of 50
THEN:
• Set the K1 segment found flag to TRUE, initialize the K1 segment structure, move the K1 table entry data into the K1 segment structure, increment the remark index by 1, and store the K1 segment in the remark array at the current index position. If the remark index exceeds 50, set it to 50 and overwrite the last remark
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when edi 350 message is being parsed and an x4 segment is encountered.
Trigger Criteria:
Context: An EDI 350 message is being parsed and an X4 segment is encountered
Applied to: X4 - Release/Disposition Extract Release Reference Extract Date and Time
Action: The current segment table ID equals 'X4 '
Logic Flow:
IF An EDI 350 message is being parsed and an X4 segment is encountered
AND The current segment table ID equals 'X4 '
THEN:
• Initialize the K1 comments structure, initialize the X4 segment structure, move the X4 table entry data into the X4 segment structure, and set the X4 segment found flag to TRUE for subsequent processing
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when edi 350 message is being parsed and an n7 segment is encountered.
Trigger Criteria:
Context: An EDI 350 message is being parsed and an N7 segment is encountered
Applied to: N7 - Equipment Extract Equipment Number Store in Log Array
Action: The current segment table ID equals 'N7 ' and the equipment number field is not spaces
Logic Flow:
IF An EDI 350 message is being parsed and an N7 segment is encountered
AND The current segment table ID equals 'N7 ' and the equipment number field is not spaces
THEN:
• Set the N7 segment found flag to TRUE, initialize the N7 segment structure, move the N7 table entry data into the N7 segment structure, move the equipment number to the log data array at the current log index position with log type 'EDI 350 EQP#:', and increment the log index by 1
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when edi 350 message is being parsed and an se segment is encountered.
Trigger Criteria:
Context: An EDI 350 message is being parsed and an SE segment is encountered
Applied to: SE - Transaction Set Trailer Set Trailer Found Flag Set End Found Flag
Action: The current segment table ID equals 'SE '
Logic Flow:
IF An EDI 350 message is being parsed and an SE segment is encountered
AND The current segment table ID equals 'SE '
THEN:
• Set the trailer found flag to TRUE, set the end found flag to TRUE, and perform the rest of message processing which includes logging all K1 remarks and N7 equipment numbers to the cargo information message log
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when edi segments are being parsed and both x4 and v9 segments have been successfully processed.
Trigger Criteria:
Context: EDI segments are being parsed and both X4 and V9 segments have been successfully processed
Applied to: Trigger 350 Message Processing
Action: The X4 segment found flag is TRUE and the V9 segment found flag is TRUE and the first X4 flag is TRUE
Logic Flow:
IF EDI segments are being parsed and both X4 and V9 segments have been successfully processed
AND The X4 segment found flag is TRUE and the V9 segment found flag is TRUE and the first X4 flag is TRUE
THEN:
• Set the first X4 flag to FALSE (not first X4) and perform the 350 message processing routine which evaluates the V9 notice reason code and updates cargo records based on the customs action type
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when edi segments are being parsed and the v9 segment has been processed and the se segment has been encountered.
Trigger Criteria:
Context: EDI segments are being parsed and the V9 segment has been processed and the SE segment has been encountered
Applied to: Trigger 350 Message Processing
Action: The V9 segment found flag is TRUE and the first X4 flag is TRUE and the end found flag is TRUE
Logic Flow:
IF EDI segments are being parsed and the V9 segment has been processed and the SE segment has been encountered
AND The V9 segment found flag is TRUE and the first X4 flag is TRUE and the end found flag is TRUE
THEN:
• Set the first X4 flag to FALSE (not first X4) and perform the 350 message processing routine which evaluates the V9 notice reason code and updates cargo records based on the customs action type
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when segment has been processed in the edi 350 message.
Trigger Criteria:
Context: A segment has been processed in the EDI 350 message
Applied to: Move to Next Segment
Action: The current segment processing is complete
Logic Flow:
IF A segment has been processed in the EDI 350 message
AND The current segment processing is complete
THEN:
• Increment the line counter by 1 and continue the segment processing loop until the line counter exceeds the maximum number of message queue entries or the end found flag is set to TRUE
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when x4 segment is being processed with entry type code equal to '992' and the message type is conventional 350.
Trigger Criteria:
Context: An X4 segment is being processed with entry type code equal to '992' and the message type is conventional 350
Applied to: X4 - Release/Disposition Extract Release Reference Extract Date and Time
Action: The related document ID (CRN) in positions 1-25 is different from the previous CRN
Logic Flow:
IF An X4 segment is being processed with entry type code equal to '992' and the message type is conventional 350
AND The related document ID (CRN) in positions 1-25 is different from the previous CRN
THEN:
• Move the related document ID to the train key value and the previous CRN field, perform train lookup by CRN. If train is not found, prepare an unknown train notification message with the CRN and send it. If train is found, log the arrival acknowledgment at border message, create a log entry with action code 'ZZZ', train CRN, and message '350 ACK - ARRIVAL ACK AT BORDER', and spawn the log entry. Then move the CBSA release reference ID to the cargo key value and perform cargo border update processing. If the cargo is a master manifest, retrieve all follower manifests (maximum 100) linked to the master and update each follower with border arrival acknowledgment
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when x4 segment is being processed with entry type code equal to '992' and the message type is conventional 350.
Trigger Criteria:
Context: An X4 segment is being processed with entry type code equal to '992' and the message type is conventional 350
Applied to: X4 - Release/Disposition Extract Release Reference Extract Date and Time
Action: The related document ID (CRN) in positions 1-25 equals the previous CRN
Logic Flow:
IF An X4 segment is being processed with entry type code equal to '992' and the message type is conventional 350
AND The related document ID (CRN) in positions 1-25 equals the previous CRN
THEN:
• Continue to the next segment without performing any train or cargo processing
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when x4 segment is being processed.
Trigger Criteria:
Context: An X4 segment is being processed
Applied to: X4 - Release/Disposition Extract Release Reference Extract Date and Time
Action: The entry type code is not equal to '992' OR the message type is not conventional 350
Logic Flow:
IF An X4 segment is being processed
AND The entry type code is not equal to '992' OR the message type is not conventional 350
THEN:
• Set the segment previous X4 flag to TRUE and set the X4 segment found flag to TRUE
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when se segment is being processed and the k1 segment found flag is true.
Trigger Criteria:
Context: The SE segment is being processed and the K1 segment found flag is TRUE
Applied to: SE - Transaction Set Trailer Set Trailer Found Flag Set End Found Flag
Action: The remark index is greater than 0 and there are K1 remarks stored in the remark array
Logic Flow:
IF The SE segment is being processed and the K1 segment found flag is TRUE
AND The remark index is greater than 0 and there are K1 remarks stored in the remark array
THEN:
• For each remark from index 1 to the remark index, if the remark is not spaces, initialize the K1 segment structure, move the remark to the K1 segment, initialize the information message field, concatenate 'EDI 350 K1: ' with the first free-form message field and move to the information message field, and log the cargo information message. If the second free-form message field is not spaces, initialize the information message field, concatenate 'EDI 350 K1: ' with the second free-form message field and move to the information message field, and log the cargo information message
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when se segment is being processed and the n7 segment found flag is true.
Trigger Criteria:
Context: The SE segment is being processed and the N7 segment found flag is TRUE
Applied to: SE - Transaction Set Trailer Set Trailer Found Flag Set End Found Flag
Action: There are log entries in the log array from index 1 to 50
Logic Flow:
IF The SE segment is being processed and the N7 segment found flag is TRUE
AND There are log entries in the log array from index 1 to 50
THEN:
• For each log line from index 1 until the log line is spaces or index exceeds 50, initialize the information message field, move the log line to the information message field, and log the cargo information message
R-GCX126-cbl-00087 (+4)File: GCX126R.cblBusiness Rule: Process M10 Notice Segment
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when m10 segment is being processed from the edi 350 message.
Trigger Criteria:
Context: An M10 segment is being processed from the EDI 350 message
Applied to: Set M10 Segment Found Flag
Action: The M10 segment processing begins
Logic Flow:
IF An M10 segment is being processed from the EDI 350 message
AND The M10 segment processing begins
THEN:
• The M10 segment found indicator is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when m10 segment found flag has been set.
Trigger Criteria:
Context: The M10 segment found flag has been set
Applied to: Initialize M10 Segment Structure
Action: Preparing to load M10 segment data
Logic Flow:
IF The M10 segment found flag has been set
AND Preparing to load M10 segment data
THEN:
• The M10 segment data structure is initialized to spaces/zeros
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when m10 segment structure has been initialized and the current line in the message queue table contains an m10 segment.
Trigger Criteria:
Context: The M10 segment structure has been initialized and the current line in the message queue table contains an M10 segment
Applied to: Move MQS Table Entry to M10 Segment
Action: Loading M10 segment data
Logic Flow:
IF The M10 segment structure has been initialized and the current line in the message queue table contains an M10 segment
AND Loading M10 segment data
THEN:
• The message queue table entry at the current line position is moved to the M10 segment structure
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when m10 segment has been loaded with data from the message queue.
Trigger Criteria:
Context: The M10 segment has been loaded with data from the message queue
Applied to: Extract Notice Document Type Code
Action: Extracting customs notice information
Logic Flow:
IF The M10 segment has been loaded with data from the message queue
AND Extracting customs notice information
THEN:
• The notice document type code (M10-05-NOTICE-DOC-TYP-CDE) is available from the M10 segment for business processing
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when m10 segment has been loaded with data from the message queue.
Trigger Criteria:
Context: The M10 segment has been loaded with data from the message queue
Applied to: Extract CBSA Reference/CCN
Action: Extracting cargo identification information
Logic Flow:
IF The M10 segment has been loaded with data from the message queue
AND Extracting cargo identification information
THEN:
• The CCN reference (M10-07-CCN) containing up to 25 characters is available from the M10 segment for cargo lookup and processing
R-GCX126-cbl-00092 (+3)File: GCX126R.cblBusiness Rule: Process P4 Port Segment
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when edi 350 message is being processed and a p4 segment type is identified in the message queue table entry.
Trigger Criteria:
Context: An EDI 350 message is being processed and a P4 segment type is identified in the message queue table entry
Applied to: Set P4 Segment Found Flag to TRUE
Action: The P4 segment processing routine is invoked
Logic Flow:
IF An EDI 350 message is being processed and a P4 segment type is identified in the message queue table entry
AND The P4 segment processing routine is invoked
THEN:
• The system sets the P4 segment found indicator to TRUE to track that port information has been received
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when p4 segment is ready to be processed from the edi 350 message.
Trigger Criteria:
Context: A P4 segment is ready to be processed from the EDI 350 message
Applied to: Initialize P4 Segment Structure
Action: The P4 segment processing begins
Logic Flow:
IF A P4 segment is ready to be processed from the EDI 350 message
AND The P4 segment processing begins
THEN:
• The system initializes the P4 segment data structure by clearing all fields to spaces or zeros
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when p4 segment structure has been initialized and the message queue table contains the p4 segment data at the current line position.
Trigger Criteria:
Context: The P4 segment structure has been initialized and the message queue table contains the P4 segment data at the current line position
Applied to: Move MQ Table Entry to P4 Segment
Action: The system processes the P4 segment entry
Logic Flow:
IF The P4 segment structure has been initialized and the message queue table contains the P4 segment data at the current line position
AND The system processes the P4 segment entry
THEN:
• The system moves the complete message queue table entry data to the P4 segment structure, making port code (P4-01-PORT-CDE) and sub-location code (P4-02-SUB-LOC-CDE) available for use
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when p4 segment data has been successfully moved from the message queue table entry to the p4 segment structure.
Trigger Criteria:
Context: The P4 segment data has been successfully moved from the message queue table entry to the P4 segment structure
Applied to: P4 Segment Ready for Processing
Action: The P4 segment processing completes
Logic Flow:
IF The P4 segment data has been successfully moved from the message queue table entry to the P4 segment structure
AND The P4 segment processing completes
THEN:
• The system has the port code (4-character identifier) and sub-location code available in the P4 segment structure for use in cargo processing, release operations, and notification messages
R-GCX126-cbl-00096 (+16)File: GCX126R.cblBusiness Rule: Process V9 Notice Reason Segment
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when edi 350 message is being processed and a v9 segment has been extracted from the message queue table entry.
Trigger Criteria:
Context: An EDI 350 message is being processed and a V9 segment has been extracted from the message queue table entry
Applied to: MATCHED - Document Matched
Action: The V9 notice reason code indicates MATCHED status (V9-02-MATCHED is true)
Logic Flow:
IF An EDI 350 message is being processed and a V9 segment has been extracted from the message queue table entry
AND The V9 notice reason code indicates MATCHED status (V9-02-MATCHED is true)
THEN:
• The system continues processing without updating cargo status or logging additional messages
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system.
Trigger Criteria:
Context: An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system
Applied to:NOT-MATCHED - Document Not Matched
Action: The V9 notice reason code indicates NOT-MATCHED status (V9-02-NOT-MATCHED is true)
Logic Flow:
IF An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system
AND The V9 notice reason code indicates NOT-MATCHED status (V9-02-NOT-MATCHED is true)
THEN:
• The system logs the message 'EDI 350: DOC NOT MATCHED' to the cargo information log
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system.
Trigger Criteria:
Context: An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system
Applied to:CARGO-COMPLETE - Cargo Complete
Action: The V9 notice reason code indicates CARGO-COMPLETE status (V9-02-CARGO-COMPLETE is true)
Logic Flow:
IF An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system
AND The V9 notice reason code indicates CARGO-COMPLETE status (V9-02-CARGO-COMPLETE is true)
THEN:
• The system logs the message 'EDI 350: CARGO COMPLETE MESSAGE' to the cargo information log
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system.
Trigger Criteria:
Context: An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system
Applied to: REPORTED - Cargo Reported
Action: The V9 notice reason code indicates REPORTED status (V9-02-REPORTED is true)
Logic Flow:
IF An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system
AND The V9 notice reason code indicates REPORTED status (V9-02-REPORTED is true)
THEN:
• The system logs the message 'EDI 350: CARGO REPORTED' to the cargo information log
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system.
Trigger Criteria:
Context: An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system
Applied to: HELD - Goods Held for Examination
Action: The V9 notice reason code indicates HELD status (V9-02-HELD is true)
Logic Flow:
IF An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system
AND The V9 notice reason code indicates HELD status (V9-02-HELD is true)
THEN:
• The system logs the message 'EDI 350: GOODS HELD FOR EXAMINATION', sets cargo status to HOLD, replaces the cargo record in the database, andif the first 4 characters of the cargo CCN equal '6105' then prepares a Merlin hold notification containing equipment ID, waybill number, CCN, destination station name and state, and manifest upon station name, and sends the notification to the Merlin system
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system.
Trigger Criteria:
Context: An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system
Applied to: Other - Invalid Notice Reason
Action: The V9 notice reason code does not match any of the recognized status codes (MATCHED, NOT-MATCHED, CARGO-COMPLETE, DOC-PKG-COMPLETE, DOC-NOT-ON-FILE, REPORTED, ARRIVED, RELEASED, AUTH-TO-DELIVER, HELD, or DECON)
Logic Flow:
IF An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system
AND The V9 notice reason code does not match any of the recognized status codes (MATCHED, NOT-MATCHED, CARGO-COMPLETE, DOC-PKG-COMPLETE, DOC-NOT-ON-FILE, REPORTED, ARRIVED, RELEASED, AUTH-TO-DELIVER, HELD, or DECON)
THEN:
• The system logs the message 'EDI 350: INVALID NOTICE REASON CODE ' concatenated with the first 4 characters of the V9 notice reason code to the cargo information log
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system and x4 segment contains cbsa release reference id.
Trigger Criteria:
Context: An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and X4 segment contains CBSA release reference ID
Action: The V9 notice reason code indicates DOC-PKG-COMPLETE status (V9-02-DOC-PKG-COMPLETE is true) and either the first 15 characters of X4 CBSA release reference ID do not match the broker entry OR the first 14 characters do not match the customs transaction number AND the X4 CBSA release reference ID is not spaces
Logic Flow:
IF An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and X4 segment contains CBSA release reference ID
AND The V9 notice reason code indicates DOC-PKG-COMPLETE status (V9-02-DOC-PKG-COMPLETE is true) and either the first 15 characters of X4 CBSA release reference ID do not match the broker entry OR the first 14 characters do not match the customs transaction number AND the X4 CBSA release reference ID is not spaces
THEN:
• The system updates the cargo broker entry with the first 15 characters of X4 CBSA release reference ID, updates the customs transaction number with the first 14 characters, sets the broker date to current machine date, sets the broker time to current machine time (first 4 digits), logs the message 'EDI 350: DOC PKG COMPLETE : ' concatenated with the first 15 characters of X4 CBSA release reference ID, and replaces the cargo record in the database
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system and x4 segment contains release document type code.
Trigger Criteria:
Context: An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and X4 segment contains release document type code
Applied to:DOC-NOT-ON-FILE - Document Not On File
Action: The V9 notice reason code indicates DOC-NOT-ON-FILE status (V9-02-DOC-NOT-ON-FILE is true) and the first character of X4 release document type code equals 'R'
Logic Flow:
IF An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and X4 segment contains release document type code
AND The V9 notice reason code indicates DOC-NOT-ON-FILE status (V9-02-DOC-NOT-ON-FILE is true) and the first character of X4 release document type code equals 'R'
THEN:
• The system logs the message 'EDI 350: DOC NOT ON FILE FOR RELEASE ' concatenated with the first 15 characters of X4 CBSA release reference ID to the cargo information log
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system and x4 segment contains release document type code.
Trigger Criteria:
Context: An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and X4 segment contains release document type code
Applied to:DOC-NOT-ON-FILE - Document Not On File
Action: The V9 notice reason code indicates DOC-NOT-ON-FILE status (V9-02-DOC-NOT-ON-FILE is true) and the first character of X4 release document type code does not equal 'R'
Logic Flow:
IF An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and X4 segment contains release document type code
AND The V9 notice reason code indicates DOC-NOT-ON-FILE status (V9-02-DOC-NOT-ON-FILE is true) and the first character of X4 release document type code does not equal 'R'
THEN:
• The system logs the message 'EDI 350:DOC NOT ON FILE H-BILL CLOSE ' concatenated with the first 25 characters of X4 CBSA release reference ID to the cargo information log
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system and p4 segment contains port code.
Trigger Criteria:
Context: An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and P4 segment contains port code
Applied to: ARRIVED - Cargo Arrived at Port
Action: The V9 notice reason code indicates ARRIVED status (V9-02-ARRIVED is true)
Logic Flow:
IF An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and P4 segment contains port code
AND The V9 notice reason code indicates ARRIVED status (V9-02-ARRIVED is true)
THEN:
• The system logs the message 'EDI 350: CARGO ARRIVED AT PORT ' concatenated with the first 4 characters of P4 port code to the cargo information log
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system and p4 segment contains port code.
Trigger Criteria:
Context: An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and P4 segment contains port code
Applied to: DECON - Deconsolidation Release
Action: The V9 notice reason code indicates DECON status (V9-02-DECON is true)
Logic Flow:
IF An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and P4 segment contains port code
AND The V9 notice reason code indicates DECON status (V9-02-DECON is true)
THEN:
• The system clears destination station numbers, sets release date to current machine date, sets release time to current machine time, sets release by to current user ID, sets current status to 'RELEASED', sets release status to 'R', sets release type to 'A', clears error or release status index, clears error status, sets release reason to 'DECONSOLIDATION AT ' concatenated with P4 port code (first 4 characters), logs the message 'EDI 350: RELEASE VIA DECON AT PORT ' concatenated with P4 port code (first 4 characters), processes associated US manifest records, replaces the cargo record in the database, andif the cargo is a master manifest then processes all follower manifests (up to 100) with the same release information
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system and x4 segment contains cbsa release reference id and p4 segment contains port code.
Trigger Criteria:
Context: An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and X4 segment contains CBSA release reference ID and P4 segment contains port code
Applied to: RELEASED - Cargo Released
Action: The V9 notice reason code indicates RELEASED status (V9-02-RELEASED is true)
Logic Flow:
IF An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and X4 segment contains CBSA release reference ID and P4 segment contains port code
AND The V9 notice reason code indicates RELEASED status (V9-02-RELEASED is true)
THEN:
• The system clears destination station numbers, sets release date to current machine date, sets release time to current machine time, sets release by to current user ID, sets current status to 'RELEASED', sets release status to 'R', sets release type to 'A', clears error or release status index, clears error status, sets release reason to X4 CBSA release reference ID (first 15 characters) concatenated with '/' and P4 port code (first 4 characters), logs the message 'EDI 350: RELEASE : ' concatenated with X4 CBSA release reference ID (first 15 characters) and ' AT PORT ' and P4 port code (first 4 characters), processes associated US manifest records, replaces the cargo record in the database, andif the cargo is a master manifest then processes all follower manifests (up to 100) with the same release information
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system and the cargo csa indicator is on.
Trigger Criteria:
Context: An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and the cargo CSA indicator is ON
Applied to:AUTH-TO-DELIVER - Authorized to Deliver
Action: The V9 notice reason code indicates AUTH-TO-DELIVER status (V9-02-AUTH-TO-DELIVER is true)
Logic Flow:
IF An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and the cargo CSA indicator is ON
AND The V9 notice reason code indicates AUTH-TO-DELIVER status (V9-02-AUTH-TO-DELIVER is true)
THEN:
• The system logs the message 'EDI 350: ACCEPTED - CSA', sets cargo status to CSA delivery, sets CSA authorization to deliver received flag to true, replaces the cargo record in the database, and processes associated US manifest records
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when edi 350 message is being processing and a v9 segment has been extracted with cargo found in the system and the cargo csa indicator is off.
Trigger Criteria:
Context: An EDI 350 message is being processing and a V9 segment has been extracted with cargo found in the system and the cargo CSA indicator is OFF
Applied to:AUTH-TO-DELIVER - Authorized to Deliver
Action: The V9 notice reason code indicates AUTH-TO-DELIVER status (V9-02-AUTH-TO-DELIVER is true)
Logic Flow:
IF An EDI 350 message is being processing and a V9 segment has been extracted with cargo found in the system and the cargo CSA indicator is OFF
AND The V9 notice reason code indicates AUTH-TO-DELIVER status (V9-02-AUTH-TO-DELIVER is true)
THEN:
• The system logs the message 'EDI 350: NOT ACCEPTED - NON-CSA' and processes associated US manifest records without updating the cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when edi 350 message is being processed and a v9 segment table id has been identified in the message queue table entry.
Trigger Criteria:
Context: An EDI 350 message is being processed and a V9 segment table ID has been identified in the message queue table entry
Applied to: Initialize V9 Segment
Action: The system begins processing the V9 segment
Logic Flow:
IF An EDI 350 message is being processed and a V9 segment table ID has been identified in the message queue table entry
AND The system begins processing the V9 segment
THEN:
• The system initializes the V9 segment data structure to spaces or zeros
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when edi 350 message is being processed and the v9 segment structure has been initialized and the current line in the message queue table contains a v9 segment.
Trigger Criteria:
Context: An EDI 350 message is being processed and the V9 segment structure has been initialized and the current line in the message queue table contains a V9 segment
Applied to: Move MQS Table Entry to V9 Segment
Action: The system processes the V9 segment table entry
Logic Flow:
IF An EDI 350 message is being processed and the V9 segment structure has been initialized and the current line in the message queue table contains a V9 segment
AND The system processes the V9 segment table entry
THEN:
• The system moves the message queue table entry at the current line position to the V9 segment data structure
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when edi 350 message is being processed and the v9 segment data has been extracted from the message queue table entry.
Trigger Criteria:
Context: An EDI 350 message is being processed and the V9 segment data has been extracted from the message queue table entry
Applied to: Set V9 Segment Found Flag
Action: The V9 segment extraction is complete
Logic Flow:
IF An EDI 350 message is being processed and the V9 segment data has been extracted from the message queue table entry
AND The V9 segment extraction is complete
THEN:
• The system sets the V9 segment found flag to true
R-GCX126-cbl-00113 (+3)File: GCX126R.cblBusiness Rule: Process K1 Remarks Segment
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when edi 350 message is being processed and a k1 segment entry is encountered in the message queue table at the current line position.
Trigger Criteria:
Context: An EDI 350 message is being processed and a K1 segment entry is encountered in the message queue table at the current line position
Applied to: Process K1 Remarks Segment - Store up to 9 free-form message segments in array for later logging
Action: The K1 segment is identified and needs to be stored for later logging
Logic Flow:
IF An EDI 350 message is being processed and a K1 segment entry is encountered in the message queue table at the current line position
AND The K1 segment is identified and needs to be stored for later logging
THEN:
• The system sets the K1 segment found indicator to true, initializes the K1 segment structure, copies the message queue table entry to the K1 segment structure, increments the K1 remark index counter by 1, and stores the K1 segment in the remark array at the current index position
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when k1 remark index counter has been incremented after receiving a k1 segment.
Trigger Criteria:
Context: The K1 remark index counter has been incremented after receiving a K1 segment
Applied to: Index Exceeds Maximum of 9?
Action: The K1 remark index counter exceeds the maximum allowed value of 9
Logic Flow:
IF The K1 remark index counter has been incremented after receiving a K1 segment
AND The K1 remark index counter exceeds the maximum allowed value of 9
THEN:
• The system resets the K1 remark index counter to the maximum value of 9, preventing any additional remarks beyond the ninth position from being stored, and the current K1 segment overwrites the remark at position 9
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when k1 remark index counter is within the valid range of 1 to 9 after incrementing.
Trigger Criteria:
Context: The K1 remark index counter is within the valid range of 1 to 9 after incrementing
Applied to: Store K1 Segment in Remark Array at Current Index
Action: The K1 segment needs to be stored in the remark array
Logic Flow:
IF The K1 remark index counter is within the valid range of 1 to 9 after incrementing
AND The K1 segment needs to be stored in the remark array
THEN:
• The system stores the complete K1 segment structure in the remark array at the position indicated by the current K1 remark index counter value
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when k1 segment is identified in the current message queue table entry.
Trigger Criteria:
Context: A K1 segment is identified in the current message queue table entry
Applied to: Set K1 Segment Found Flag
Action: K1 segment processing begins
Logic Flow:
IF A K1 segment is identified in the current message queue table entry
AND K1 segment processing begins
THEN:
• The system sets the K1 segment found indicator flag to true to track that at least one K1 remark segment has been processed in the current transaction
R-GCX126-cbl-00117 (+7)File: GCX126R.cblBusiness Rule: Process N7 Equipment Segment
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when n7 segment is being processed from the edi 350 message queue.
Trigger Criteria:
Context: An N7 segment is being processed from the EDI 350 message queue
Applied to: Set N7 Segment Found Flag
Action: The N7 segment processing begins
Logic Flow:
IF An N7 segment is being processed from the EDI 350 message queue
AND The N7 segment processing begins
THEN:
• The system sets the N7 segment found indicator to TRUE to track that equipment information is present in this transaction
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when n7 segment is ready to be processed.
Trigger Criteria:
Context: An N7 segment is ready to be processed
Applied to: Initialize N7 Segment Structure
Action: The N7 segment found flag has been set
Logic Flow:
IF An N7 segment is ready to be processed
AND The N7 segment found flag has been set
THEN:
• The system initializes the N7 segment structure to spaces to clear any previous data
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when n7 segment structure has been initialized.
Trigger Criteria:
Context: The N7 segment structure has been initialized
Applied to: Move MQ Table Entry to N7 Segment
Action: The current line in the message queue table contains an N7 segment
Logic Flow:
IF The N7 segment structure has been initialized
AND The current line in the message queue table contains an N7 segment
THEN:
• The system moves the message queue table entry data to the N7 segment structure for further processing
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when n7 segment data has been loaded into the working structure.
Trigger Criteria:
Context: The N7 segment data has been loaded into the working structure
Applied to: Equipment Number Present?
Action: The system evaluates the equipment number field in the N7 segment
Logic Flow:
IF The N7 segment data has been loaded into the working structure
AND The system evaluates the equipment number field in the N7 segment
THEN:
• If the equipment number field contains spaces, skip equipment logging; otherwise, proceed to log the equipment number
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when n7 segment contains a non-blank equipment number.
Trigger Criteria:
Context: The N7 segment contains a non-blank equipment number
Applied to: Store Equipment Number in Log Array
Action: The equipment number validation passes
Logic Flow:
IF The N7 segment contains a non-blank equipment number
AND The equipment number validation passes
THEN:
• The system stores the equipment number value from the N7 segment into the log data array at the current log index position
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when equipment number has been stored in the log data array.
Trigger Criteria:
Context: The equipment number has been stored in the log data array
Applied to: '
Action: The log entry is being prepared
Logic Flow:
IF The equipment number has been stored in the log data array
AND The log entry is being prepared
THEN:
• The system sets the log type field to 'EDI 350 EQP#:' to identify this entry as equipment information from an EDI 350 message
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment number and log type have been recorded in the log array.
Trigger Criteria:
Context: The equipment number and log type have been recorded in the log array
Applied to: Increment Log Index Counter
Action: The equipment logging is complete
Logic Flow:
IF The equipment number and log type have been recorded in the log array
AND The equipment logging is complete
THEN:
• The system increments the log index counter by 1 to point to the next available log entry position
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when n7 segment has been loaded and the equipment number field contains only spaces.
Trigger Criteria:
Context: The N7 segment has been loaded and the equipment number field contains only spaces
Applied to: Skip Logging
Action: The equipment number validation determines the field is blank
Logic Flow:
IF The N7 segment has been loaded and the equipment number field contains only spaces
AND The equipment number validation determines the field is blank
THEN:
• The system skips all equipment logging steps and proceeds to end the N7 segment processing
R-GCX126-cbl-00125 (+10)File: GCX126R.cblBusiness Rule: Process Conveyance 350 Train Arrival
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when x4 segment is being processed from the edi 350 message. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An X4 segment is being processed from the EDI 350 message
Applied to: Is X4 Segment Entry Type = '992' AND Conveyance 350?
Action: The X4-03-ENTRY-TYP-CDE equals '992' AND the message type indicator WS-CONV-350 is true
Logic Flow:
IF An X4 segment is being processed from the EDI 350 message
AND The X4-03-ENTRY-TYP-CDE equals '992' AND the message type indicator WS-CONV-350 is true
THEN:
• Proceed with train arrival processing for conveyance 350
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when conveyance 350 message with entry type '992' is being processed and a train id exists in x4-04-rel-doc-id (first 25 characters). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A conveyance 350 message with entry type '992' is being processed AND a train ID exists in X4-04-REL-DOC-ID (first 25 characters)
Applied to: Is Train ID Same as Previous?
Action: The first 25 characters of X4-04-REL-DOC-ID equal the value stored in WS-PREV-CRN
Logic Flow:
IF A conveyance 350 message with entry type '992' is being processed AND a train ID exists in X4-04-REL-DOC-ID (first 25 characters)
AND The first 25 characters of X4-04-REL-DOC-ID equal the value stored in WS-PREV-CRN
THEN:
• Skip processing and continue to the next segment without any updates
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when conveyance 350 message with entry type '992' is being processed and the train id is different from the previous one. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A conveyance 350 message with entry type '992' is being processed AND the train ID is different from the previous one
Applied to: Extract Train ID from X4-04-REL-DOC-ID First 25 Characters
Action: The first 25 characters of X4-04-REL-DOC-ID are extracted
Logic Flow:
IF A conveyance 350 message with entry type '992' is being processed AND the train ID is different from the previous one
AND The first 25 characters of X4-04-REL-DOC-ID are extracted
THEN:
• Store the extracted train ID in B4-KEY-VALUE for database lookup AND store in WS-PREV-CRN for duplicate checking
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when train id has been extracted from x4-04-rel-doc-id (first 25 characters) and stored in b4-key-value.
Trigger Criteria:
Context: A train ID has been extracted from X4-04-REL-DOC-ID (first 25 characters) AND stored in B4-KEY-VALUE
Applied to: Verify Train Exists in System Database
Action: The system performs a database lookup using the train ID
Logic Flow:
IF A train ID has been extracted from X4-04-REL-DOC-ID (first 25 characters) AND stored in B4-KEY-VALUE
AND The system performs a database lookup using the train ID
THEN:
• Return the train record if found OR return a not-found status code in CC-STATUS-CODE
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when train id from x4-04-rel-doc-id (first 25 characters) has been looked up in the database and the train was not found (cc-status-code is not spaces).
Trigger Criteria:
Context: A train ID from X4-04-REL-DOC-ID (first 25 characters) has been looked up in the database AND the train was not found (CC-STATUS-CODE is not SPACES)
Applied to: 'UNKNOWN TRAIN ENTRY IN EDI 350' Include Train ID 'THIS CRN WAS NOT FOUND'
Action: The train verification fails
Logic Flow:
IF A train ID from X4-04-REL-DOC-ID (first 25 characters) has been looked up in the database AND the train was not found (CC-STATUS-CODE is not SPACES)
AND The train verification fails
THEN:
• Prepare error report with message 'UNKNOWN TRAIN ENTRY IN EDI 350' concatenated with the train ID in MRLN-DTL-LINE(01) AND add message 'THIS CRN WAS NOT FOUND.' in MRLN-DTL-LINE(03) AND set MRLN-LINE to 4 AND set message type indicator to unknown (88-Z110-MRLN-TYPE-IS-UNKNOWN)
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when error report has been prepared for an unknown train entry with message type set to unknown.
Trigger Criteria:
Context: An error report has been prepared for an unknown train entry with message type set to unknown
Applied to: Send Error Report to Merlin
Action: The error notification is ready to be sent
Logic Flow:
IF An error report has been prepared for an unknown train entry with message type set to unknown
AND The error notification is ready to be sent
THEN:
• Invoke the Merlin notification preparation process (Z110-PREP-EMCSEND) to send the error report
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when train has been successfully verified in the system database (cc-status-code equals spaces) and the train id is available from x4-04-rel-doc-id (first 25 characters).
Trigger Criteria:
Context: A train has been successfully verified in the system database (CC-STATUS-CODE equals SPACES) AND the train ID is available from X4-04-REL-DOC-ID (first 25 characters)
Applied to: Date: Current Machine Date, Time: Current Machine Time, Action Code: 'ZZZ', Train ID: From X4 Segment, Message: '350 ACK - ARRIVAL ACK AT BORDER'
Action: The arrival acknowledgment needs to be logged
Logic Flow:
IF A train has been successfully verified in the system database (CC-STATUS-CODE equals SPACES) AND the train ID is available from X4-04-REL-DOC-ID (first 25 characters)
AND The arrival acknowledgment needs to be logged
THEN:
• Move log information to GCX105 structure AND set GCX105-DATE to current machine century and date (CC-MACHINE-CENTURY concatenated with CC-MACHINE-DATE-X) AND set GCX105-TIME to current machine time (CC-MACHINE-TIME-X) AND set GCX105-ACTION-CODE to 'ZZZ' AND set GCX105-TRAIN-OR-US-CCN to the train ID from X4-04-REL-DOC-ID (first 25 characters) AND set GCX105-CA-TRAIN indicator to true AND set GCX105-MESSAGE to '350 ACK - ARRIVAL ACK AT BORDER'
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when arrival acknowledgment log information has been prepared in the gcx105 structure with all required fields populated.
Trigger Criteria:
Context: The arrival acknowledgment log information has been prepared in the GCX105 structure with all required fields populated
Applied to: Spawn GCT1051E Transaction to Create Log Entry
Action: The log entry is ready to be persisted
Logic Flow:
IF The arrival acknowledgment log information has been prepared in the GCX105 structure with all required fields populated
AND The log entry is ready to be persisted
THEN:
• Invoke the Z300-SPAWN-GCT1051E process to create the log entry in the system
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when train arrival has been logged successfully and the cargo control number is available in x4-01-cbsa-rel-ref-id (first 25 characters).
Trigger Criteria:
Context: A train arrival has been logged successfully AND the cargo control number is available in X4-01-CBSA-REL-REF-ID (first 25 characters)
Applied to: Update Cargo Border Arrival Status
Action: The cargo border arrival status needs to be updated
Logic Flow:
IF A train arrival has been logged successfully AND the cargo control number is available in X4-01-CBSA-REL-REF-ID (first 25 characters)
AND The cargo border arrival status needs to be updated
THEN:
• Set KEY-VALUE of CCRT-SSAQ to X4-01-CBSA-REL-REF-ID (first 25 characters) AND set KEY-VALUE of A2RT-SSAQ to X4-01-CBSA-REL-REF-ID (first 25 characters) AND perform A351-UPDATE-CARGO-BORDER process to retrieve cargo, set border arrival acknowledgment flag, and replace the cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been retrieved and updated with border arrival acknowledgment.
Trigger Criteria:
Context: A cargo record has been retrieved and updated with border arrival acknowledgment
Applied to: Is Master Manifest?
Action: The system checks the manifest type
Logic Flow:
IF A cargo record has been retrieved and updated with border arrival acknowledgment
AND The system checks the manifest type
THEN:
• IfGCCC-MASTER-MFST indicator is true, proceed to update follower manifests, otherwise continue to next segment
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when current cargo is a master manifest (gccc-master-mfst is true) and the master manifest ccn is available in gccc-ccn-key. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The current cargo is a master manifest (GCCC-MASTER-MFST is true) AND the master manifest CCN is available in GCCC-CCN-KEY
Applied to: Update Border Arrival for All Follower Manifests Up to 100 Followers
Action: Follower manifests need to be updated with border arrival status
Logic Flow:
IF The current cargo is a master manifest (GCCC-MASTER-MFST is true) AND the master manifest CCN is available in GCCC-CCN-KEY
AND Follower manifests need to be updated with border arrival status
THEN:
• Set GCB0RT-CCN-KEY to the master manifest CCN AND initialize follower manifest array (WS-FOLLOWER-MANI-ARRAY) to spaces AND set WS-FOLLOWER-NOT-END-OF-DB indicator AND set counter I to 1 AND perform loop until WS-FOLLOWER-END-OF-DBor I exceeds 100: retrieve next cargo record using GN function with CCRT-B0RT-SSAQ, if status is blank AND master manifest CCN matches X4-01-CBSA-REL-REF-ID (first 25 characters) AND cargo is a follower manifest, store follower CCN in WS-FOLLOWER-MANI(I) and increment I, otherwise set WS-FOLLOWER-END-OF-DB AND after loop, subtract 1 from I AND if I is greater than 0, perform loop varying J from 1 to I: set KEY-VALUE of CCRT-SSAQandA2RT-SSAQ to WS-FOLLOWER-MANI(J) AND perform A351-UPDATE-CARGO-BORDER to update each follower manifest
R-GCX126-cbl-00141 (+18)File: GCX126R.cblBusiness Rule: Process Master Manifest Border Arrival
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been retrieved with release reference id from x4 segment entry type '992'.
Trigger Criteria:
Context: A cargo record has been retrieved with release reference ID from X4 segment entry type '992'
Applied to: Is Cargo a Master Manifest?
Action: The system checks if the cargo is a master manifest
Logic Flow:
IF A cargo record has been retrieved with release reference ID from X4 segment entry type '992'
AND The system checks if the cargo is a master manifest
THEN:
• If cargo is NOT a master manifest, skip follower processing and exit; If cargo IS a master manifest, proceed to initialize follower manifest array and retrieve all associated follower manifests
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is confirmed as a master manifest.
Trigger Criteria:
Context: The cargo is confirmed as a master manifest
Applied to: Initialize Follower Manifest Array, Set Index I = 1
Action: The system begins the process of collecting follower manifests
Logic Flow:
IF The cargo is confirmed as a master manifest
AND The system begins the process of collecting follower manifests
THEN:
• Initialize follower manifest array to spaces, set array index I to 1, and set end-of-database flag to false
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower manifest array has been initialized and the cargo is a master manifest.
Trigger Criteria:
Context: The follower manifest array has been initialized and the cargo is a master manifest
Applied to: Set Search Key to Master CCN
Action: The system prepares to search for follower manifests
Logic Flow:
IF The follower manifest array has been initialized and the cargo is a master manifest
AND The system prepares to search for follower manifests
THEN:
• Set the database search key (GCB0RT-CCN-KEY) to the master manifest's CCN key (GCCC-CCN-KEY)
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when search key has been set to the master ccn and the system is ready to retrieve cargo records. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The search key has been set to the master CCN and the system is ready to retrieve cargo records
Applied to: Get Next Cargo Record from Database
Action: The system executes a Get Next database call
Logic Flow:
IF The search key has been set to the master CCN and the system is ready to retrieve cargo records
AND The system executes a Get Next database call
THEN:
• Retrieve the next cargo report segment from the database using PCB7 with qualified SSA for B0RT segment
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when get next database call has been executed to retrieve a cargo record. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A Get Next database call has been executed to retrieve a cargo record
Applied to: Database Status OK?
Action: The system checks the database status code
Logic Flow:
IF A Get Next database call has been executed to retrieve a cargo record
AND The system checks the database status code
THEN:
• If status code is not blank (spaces), set end-of-database flag to true and stop retrieval; If status code is blank (spaces), proceed to validate the retrieved record
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A cargo record has been successfully retrieved from the database
Applied to: Master CCN Matches?
Action: The system compares the retrieved cargo's master manifest CCN (GCCC-MASTER-MFST-CCN) with the original release reference ID (X4-01-CBSA-REL-REF-ID first 25 characters)
Logic Flow:
IF A cargo record has been successfully retrieved from the database
AND The system compares the retrieved cargo's master manifest CCN (GCCC-MASTER-MFST-CCN) with the original release reference ID (X4-01-CBSA-REL-REF-ID first 25 characters)
THEN:
• If master CCNs do NOT match, set end-of-database flag to true and stop retrieval; If master CCNs match, proceed to check if the record is a follower manifest
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been retrieved and its master ccn matches the search criteria.
Trigger Criteria:
Context: A cargo record has been retrieved and its master CCN matches the search criteria
Applied to: Is Follower Manifest?
Action: The system checks if the cargo is a follower manifest (GCCC-FOLLOWER-MFST)
Logic Flow:
IF A cargo record has been retrieved and its master CCN matches the search criteria
AND The system checks if the cargo is a follower manifest (GCCC-FOLLOWER-MFST)
THEN:
• If cargo is a follower manifest, store its CCN in the follower array; If cargo is the master manifest itself, skip storage and continue to next record
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been identified as a follower manifest. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record has been identified as a follower manifest
Applied to: Store Follower CCN in Array Position I, Increment I
Action: The system stores the follower information
Logic Flow:
IF A cargo record has been identified as a follower manifest
AND The system stores the follower information
THEN:
• Move the follower's CCN key (GCCC-CCN-KEY) to the follower manifest array at position I (WS-FOLLOWER-MANI(I)) and add 1 to index I
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower ccn has been stored in the array and the index has been incremented.
Trigger Criteria:
Context: A follower CCN has been stored in the array and the index has been incremented
Applied to: I > 100?
Action: The system checks if index I is greater than 100
Logic Flow:
IF A follower CCN has been stored in the array and the index has been incremented
AND The system checks if index I is greater than 100
THEN:
• If I is greater than 100, set end-of-database flag to true and stop collecting followers; If I is 100 or less, continue retrieving next cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when one of the following conditions is met: database status is not ok, master ccn does not match, or follower count exceeds 100. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: One of the following conditions is met: database status is not OK, master CCN does not match, or follower count exceeds 100
Applied to: Set End of Database Flag
Action: The system needs to stop the retrieval loop
Logic Flow:
IF One of the following conditions is met: database status is not OK, master CCN does not match, or follower count exceeds 100
AND The system needs to stop the retrieval loop
THEN:
• Set the end-of-database flag (WS-FOLLOWER-END-OF-DB) to true
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when database retrieval loop has completed and end-of-database flag is set.
Trigger Criteria:
Context: The database retrieval loop has completed and end-of-database flag is set
Applied to: Calculate Total Followers Count = I - 1
Action: The system calculates the total number of followers collected
Logic Flow:
IF The database retrieval loop has completed and end-of-database flag is set
AND The system calculates the total number of followers collected
THEN:
• Subtract 1 from index I to get the actual count of follower manifests stored in the array
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when total follower count has been calculated.
Trigger Criteria:
Context: The total follower count has been calculated
Applied to: Count > 0?
Action: The system checks if the count is greater than 0
Logic Flow:
IF The total follower count has been calculated
AND The system checks if the count is greater than 0
THEN:
• If count is 0 or less, exit the process without updating any followers; If count is greater than 0, proceed to loop through each follower for updates
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when at least one follower manifest exists in the array.
Trigger Criteria:
Context: At least one follower manifest exists in the array
Applied to: Loop Through Each Follower in Array J = 1 to Count
Action: The system begins processing followers
Logic Flow:
IF At least one follower manifest exists in the array
AND The system begins processing followers
THEN:
• Loop through the follower array starting at J=1, incrementing by 1 each iteration, until J exceeds the count OR the follower CCN at position I is spaces or low-values OR J exceeds I
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when system is processing follower at array position j. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is processing follower at array position J
Applied to: Set Cargo Key to Follower CCN J
Action: The system prepares to retrieve the follower cargo record
Logic Flow:
IF The system is processing follower at array position J
AND The system prepares to retrieve the follower cargo record
THEN:
• Move the follower CCN from array position J (WS-FOLLOWER-MANI(J)) to both CCRT-SSAQ key value andA2RT-SSAQ key value
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower ccn has been set as the database key. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The follower CCN has been set as the database key
Applied to: Retrieve Follower Cargo Record
Action: The system retrieves the follower cargo record
Logic Flow:
IF The follower CCN has been set as the database key
AND The system retrieves the follower cargo record
THEN:
• Execute Get Hold Unique (GHU) call to retrieve the cargo report segment from the database using the follower's CCN key
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower cargo record has been successfully retrieved.
Trigger Criteria:
Context: The follower cargo record has been successfully retrieved
Applied to: Set Border Arrival Acknowledgment Flag = TRUE
Action: The system updates the border arrival status
Logic Flow:
IF The follower cargo record has been successfully retrieved
AND The system updates the border arrival status
THEN:
• Set the border arrival acknowledgment flag (GCCC-BORDER-ARRIVAL-ACK) to true in the cargo report segment
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when border arrival acknowledgment flag has been set for the follower.
Trigger Criteria:
Context: The border arrival acknowledgment flag has been set for the follower
Applied to: '350 ACK - ARRIVAL ACK AT BORDER'
Action: The system logs the border arrival event
Logic Flow:
IF The border arrival acknowledgment flag has been set for the follower
AND The system logs the border arrival event
THEN:
• Create a log entry with message '350 ACK - ARRIVAL ACK AT BORDER', current CCN key, current date and time, and action code 'ZZZ' for Canadian cargo type
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower cargo record has been updated with border arrival acknowledgment and logged. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The follower cargo record has been updated with border arrival acknowledgment and logged
Applied to: Update Follower Cargo Record in Database
Action: The system saves the changes to the database
Logic Flow:
IF The follower cargo record has been updated with border arrival acknowledgment and logged
AND The system saves the changes to the database
THEN:
• Execute Replace (REPL) call to update the cargo report segment in the database, clear status code and set accept status to blank
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower manifest has been updated in the database.
Trigger Criteria:
Context: A follower manifest has been updated in the database
Applied to: More Followers?
Action: The system checks if more followers exist
Logic Flow:
IF A follower manifest has been updated in the database
AND The system checks if more followers exist
THEN:
• If loop counter J has not exceeded the total count AND the next array position does not contain spaces or low-values, continue to next follower; Otherwise, exit the follower processing loop
R-GCX126-cbl-00160 (+8)File: GCX126R.cblBusiness Rule: Send Train Not Found Error
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when conveyance 350 message is being processed with x4 segment entry type code equal to '992' and the x4 related document id (first 25 characters) is available.
Trigger Criteria:
Context: A conveyance 350 message is being processed with X4 segment entry type code equal to '992' and the X4 related document ID (first 25 characters) is available
Applied to: Train ID Same as Previous CRN?
Action: The X4 related document ID (first 25 characters) matches the previously processed train ID stored in memory
Logic Flow:
IF A conveyance 350 message is being processed with X4 segment entry type code equal to '992' and the X4 related document ID (first 25 characters) is available
AND The X4 related document ID (first 25 characters) matches the previously processed train ID stored in memory
THEN:
• The system skips all processing for this train ID and continues to the next segment without performing train lookup, validation, or border arrival acknowledgment
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when conveyance 350 message with x4 segment entry type code equal to '992' and the x4 related document id (first 25 characters) is different from the previously processed train id.
Trigger Criteria:
Context: A conveyance 350 message with X4 segment entry type code equal to '992' and the X4 related document ID (first 25 characters) is different from the previously processed train ID
Applied to: Lookup Train in System Using Train ID
Action: The system needs to validate the train entry
Logic Flow:
IF A conveyance 350 message with X4 segment entry type code equal to '992' and the X4 related document ID (first 25 characters) is different from the previously processed train ID
AND The system needs to validate the train entry
THEN:
• The system stores the X4 related document ID (first 25 characters) as the current train ID in memory and performs a database lookup using this train ID as the key value to retrieve the train root segment
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when database lookup has been performed for a train id from the x4 segment related document id.
Trigger Criteria:
Context: A database lookup has been performed for a train ID from the X4 segment related document ID
Applied to: Train Exists in System?
Action: The database operation completes
Logic Flow:
IF A database lookup has been performed for a train ID from the X4 segment related document ID
AND The database operation completes
THEN:
• If the database status code is not blank (spaces), the train does not exist and error processing is triggered; if the database status code is blank (spaces), the train exists and normal processing continues
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when train id lookup has failed and the train does not exist in the system.
Trigger Criteria:
Context: A train ID lookup has failed and the train does not exist in the system
Applied to: 'UNKNOWN TRAIN ENTRY IN EDI 350'
Action: The error report preparation begins
Logic Flow:
IF A train ID lookup has failed and the train does not exist in the system
AND The error report preparation begins
THEN:
• The system clears the first detail line of the report and sets the message to 'UNKNOWN TRAIN ENTRY IN EDI 350 ' concatenated with the train ID (first 25 characters of X4 related document ID)
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when error report header message is being prepared for an unknown train.
Trigger Criteria:
Context: The error report header message is being prepared for an unknown train
Applied to: Add Train ID to Report
Action: The train ID needs to be added to the report
Logic Flow:
IF The error report header message is being prepared for an unknown train
AND The train ID needs to be added to the report
THEN:
• The system appends the X4 related document ID (first 25 characters) to the error message 'UNKNOWN TRAIN ENTRY IN EDI 350 ' in the first detail line of the report
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when error report is being prepared for an unknown train id.
Trigger Criteria:
Context: The error report is being prepared for an unknown train ID
Applied to: 'THIS CRN WAS NOT FOUND'
Action: Additional explanation is needed in the report
Logic Flow:
IF The error report is being prepared for an unknown train ID
AND Additional explanation is needed in the report
THEN:
• The system sets the third detail line of the report to the message 'THIS CRN WAS NOT FOUND.'
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when error report has been prepared for a train id that was not found in the system.
Trigger Criteria:
Context: An error report has been prepared for a train ID that was not found in the system
Applied to: UNKNOWN
Action: The report type needs to be set for routing purposes
Logic Flow:
IF An error report has been prepared for a train ID that was not found in the system
AND The report type needs to be set for routing purposes
THEN:
• The system sets the report line count to 4 and marks the report type indicator as 'UNKNOWN' type
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when error report has been fully prepared with message 'unknown train entry in edi 350' followed by the train id, message 'this crn was not found.', report line count set to 4, and report type marked as 'unknown'.
Trigger Criteria:
Context: An error report has been fully prepared with message 'UNKNOWN TRAIN ENTRY IN EDI 350' followed by the train ID, message 'THIS CRN WAS NOT FOUND.', report line count set to 4, and report type marked as 'UNKNOWN'
Applied to: Send Error Report to Merlin
Action: The error report is ready to be sent
Logic Flow:
IF An error report has been fully prepared with message 'UNKNOWN TRAIN ENTRY IN EDI 350' followed by the train ID, message 'THIS CRN WAS NOT FOUND.', report line count set to 4, and report type marked as 'UNKNOWN'
AND The error report is ready to be sent
THEN:
• The system invokes the Merlin notification preparation process to send the error report to the configured recipients
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when either the train id matches the previously processed train id or the train id was successfully found in the system database.
Trigger Criteria:
Context: Either the train ID matches the previously processed train ID OR the train ID was successfully found in the system database
Applied to: Continue Processing
Action: Train validation is complete
Logic Flow:
IF Either the train ID matches the previously processed train ID OR the train ID was successfully found in the system database
AND Train validation is complete
THEN:
• The system proceeds to log the train arrival information, create a log entry with action code 'ZZZ', message '350 ACK - ARRIVAL ACK AT BORDER', and spawns the logging transaction for the train
Business Justification: Defines the strict business conditions required to proceed when edi 350 message segments have been processed and k1 segment found indicator is set to true.
Trigger Criteria:
Context: EDI 350 message segments have been processed and K1 segment found indicator is set to true
Applied to: Check if K1 Segments Were Found
Action: The system begins the K1 remarks logging process
Logic Flow:
IF EDI 350 message segments have been processed and K1 segment found indicator is set to true
AND The system begins the K1 remarks logging process
THEN:
• The system initiates the loop to process all stored K1 remarks from index 1 to the maximum K1 remark index
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when k1 segments were found and the loop counter is within the valid range (counter <= k1 remark index).
Trigger Criteria:
Context: K1 segments were found and the loop counter is within the valid range (counter <= K1 remark index)
Applied to: Check if K1 Segments Were Found, More K1 Remarks to Process?, K1 Remark Empty?
Action: The current K1 remark entry in the array equals spaces
Logic Flow:
IF K1 segments were found and the loop counter is within the valid range (counter <= K1 remark index)
AND The current K1 remark entry in the array equals spaces
THEN:
• The system increments the loop counter and continues to check the next K1 remark without logging
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when non-empty k1 remark exists at the current loop index position.
Trigger Criteria:
Context: A non-empty K1 remark exists at the current loop index position
Applied to: 'EDI 350 K1:' + First Free-Form Message, Log Cargo Information Message
Action: The system retrieves the K1 segment from the remark array
Logic Flow:
IF A non-empty K1 remark exists at the current loop index position
AND The system retrieves the K1 segment from the remark array
THEN:
• The system initializes the K1 segment structure, moves the remark data to K1 segment, clears the information message work area, concatenates 'EDI 350 K1: ' with the first free-form message field (K1-01-FREE-FORM-MESSAGE), stores the result in the information message work area, and invokes the cargo information message logging process
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when first free-form message from the k1 segment has been logged and the k1 segment contains a second free-form message field.
Trigger Criteria:
Context: The first free-form message from the K1 segment has been logged and the K1 segment contains a second free-form message field
Applied to: 'EDI 350 K1:' + Second Free-Form Message, Log Cargo Information Message
Action: The second free-form message field (K1-02-FREE-FORM-MESSAGE) is not equal to spaces
Logic Flow:
IF The first free-form message from the K1 segment has been logged and the K1 segment contains a second free-form message field
AND The second free-form message field (K1-02-FREE-FORM-MESSAGE) is not equal to spaces
THEN:
• The system clears the information message work area, concatenates 'EDI 350 K1: ' with the second free-form message field, stores the result in the information message work area, and invokes the cargo information message logging process
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when k1 remark has been processed (logged or skipped due to being empty).
Trigger Criteria:
Context: A K1 remark has been processed (logged or skipped due to being empty)
Applied to: Increment Loop Counter, More K1 Remarks to Process?
Action: The system increments the loop counter by 1
Logic Flow:
IF A K1 remark has been processed (logged or skipped due to being empty)
AND The system increments the loop counter by 1
THEN:
• The system checks if the loop counter is less than or equal to the K1 remark index andif true, continues to process the next K1 remark, otherwise exits the K1 remarks logging process
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when edi 350 message segments have been processed.
Trigger Criteria:
Context: EDI 350 message segments have been processed
Applied to: Check if K1 Segments Were Found
Action: The K1 segment found indicator is set to false (no K1 segments were found)
Logic Flow:
IF EDI 350 message segments have been processed
AND The K1 segment found indicator is set to false (no K1 segments were found)
THEN:
• The system skips the K1 remarks logging process entirely and proceeds to the next processing step
R-GCX126-cbl-00175 (+11)File: GCX126R.cblBusiness Rule: Log N7 Equipment Information
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when edi 350 message has been processed and all segments have been parsed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An EDI 350 message has been processed and all segments have been parsed
Applied to: N7 Segment Found?
Action: The N7 segment found indicator is set to false (WS-NO-N7-SEG-FOUND)
Logic Flow:
IF An EDI 350 message has been processed and all segments have been parsed
AND The N7 segment found indicator is set to false (WS-NO-N7-SEG-FOUND)
THEN:
• The system skips all N7 equipment logging operations and proceeds to the end of the logging process
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when edi 350 message has been processed and n7 equipment segments were found. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An EDI 350 message has been processed and N7 equipment segments were found
Applied to: N7 Segment Found?
Action: The N7 segment found indicator is set to true (WS-N7-SEGMENT-FOUND)
Logic Flow:
IF An EDI 350 message has been processed and N7 equipment segments were found
AND The N7 segment found indicator is set to true (WS-N7-SEGMENT-FOUND)
THEN:
• The system initiates the loop to process and log all equipment information from the LOG-LINE array starting at index 1
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when n7 equipment segments were found in the edi 350 message.
Trigger Criteria:
Context: N7 equipment segments were found in the EDI 350 message
Applied to: Initialize Loop Counter to 1
Action: The system begins the equipment logging process
Logic Flow:
IF N7 equipment segments were found in the EDI 350 message
AND The system begins the equipment logging process
THEN:
• The loop counter (LOG-INDX) is set to 1 to start processing from the first LOG-LINE entry
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when system is iterating through log-line entries to log equipment information.
Trigger Criteria:
Context: The system is iterating through LOG-LINE entries to log equipment information
Applied to:LOG-LINE Entry Empty?
Action: A LOG-LINE entry at the current loop index contains only spaces
Logic Flow:
IF The system is iterating through LOG-LINE entries to log equipment information
AND A LOG-LINE entry at the current loop index contains only spaces
THEN:
• The system terminates the equipment logging loop and proceeds to completion
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when system is iterating through log-line entries to log equipment information.
Trigger Criteria:
Context: The system is iterating through LOG-LINE entries to log equipment information
Applied to:LOG-LINE Entry Empty?
Action: A LOG-LINE entry at the current loop index contains data (not spaces)
Logic Flow:
IF The system is iterating through LOG-LINE entries to log equipment information
AND A LOG-LINE entry at the current loop index contains data (not spaces)
THEN:
• The system proceeds to check the loop counter limit before retrieving the entry
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when system is iterating through log-line entries with a non-empty entry at the current index.
Trigger Criteria:
Context: The system is iterating through LOG-LINE entries with a non-empty entry at the current index
Applied to: Counter > 50?
Action: The loop counter (LOG-INDX) is greater than 50
Logic Flow:
IF The system is iterating through LOG-LINE entries with a non-empty entry at the current index
AND The loop counter (LOG-INDX) is greater than 50
THEN:
• The system terminates the equipment logging loop and proceeds to completion
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when system is iterating through log-line entries with a non-empty entry at the current index.
Trigger Criteria:
Context: The system is iterating through LOG-LINE entries with a non-empty entry at the current index
Applied to: Counter > 50?
Action: The loop counter (LOG-INDX) is less than or equal to 50
Logic Flow:
IF The system is iterating through LOG-LINE entries with a non-empty entry at the current index
AND The loop counter (LOG-INDX) is less than or equal to 50
THEN:
• The system proceeds to retrieve the LOG-LINE entry for logging
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when loop counter is within valid range (1-50) and the log-line entry at current index is not empty.
Trigger Criteria:
Context: The loop counter is within valid range (1-50) and the LOG-LINE entry at current index is not empty
Applied to: Retrieve LOG-LINE Entry
Action: The system retrieves the LOG-LINE entry at the current loop index position
Logic Flow:
IF The loop counter is within valid range (1-50) and the LOG-LINE entry at current index is not empty
AND The system retrieves the LOG-LINE entry at the current loop index position
THEN:
• The LOG-LINE entry containing equipment information is available for logging
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when log-line entry has been retrieved from the array at the current loop index. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A LOG-LINE entry has been retrieved from the array at the current loop index
Applied to: Move LOG-LINE to Message Field
Action: The system prepares the equipment information for logging
Logic Flow:
IF A LOG-LINE entry has been retrieved from the array at the current loop index
AND The system prepares the equipment information for logging
THEN:
• The LOG-LINE entry content is moved to the WS-GCX105-INFO-MSG field, clearing any previous content in that field
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when equipment information from log-line has been moved to ws-gcx105-info-msg field. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Equipment information from LOG-LINE has been moved to WS-GCX105-INFO-MSG field
Applied to: Log Cargo Information Message
Action: The system invokes the Z150-LOG-CARGO-INFO-MSG procedure
Logic Flow:
IF Equipment information from LOG-LINE has been moved to WS-GCX105-INFO-MSG field
AND The system invokes the Z150-LOG-CARGO-INFO-MSG procedure
THEN:
• The equipment information is logged to cargo history with current date, time, CCN, cargo type indicator, and action code
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment information entry has been successfully logged to cargo history.
Trigger Criteria:
Context: An equipment information entry has been successfully logged to cargo history
Applied to: Increment Loop Counter
Action: The system prepares to process the next LOG-LINE entry
Logic Flow:
IF An equipment information entry has been successfully logged to cargo history
AND The system prepares to process the next LOG-LINE entry
THEN:
• The loop counter (LOG-INDX) is incremented by 1 to point to the next LOG-LINE entry in the array
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when loop counter has been incremented to the next position.
Trigger Criteria:
Context: The loop counter has been incremented to the next position
Applied to:LOG-LINE Entry Empty?
Action: The system continues the equipment logging loop
Logic Flow:
IF The loop counter has been incremented to the next position
AND The system continues the equipment logging loop
THEN:
• The system evaluates whether the LOG-LINE entry at the new counter position is empty or contains data to determine if processing should continue
R-GCX126-cbl-00187 (+16)File: GCX126R.cblBusiness Rule: Lookup Cargo by CCN
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when edi 350 message has been parsed and m10 segment data is available.
Trigger Criteria:
Context: An EDI 350 message has been parsed and M10 segment data is available
Applied to: Extract CCN from M10 Segment M10-07-CCN
Action: The cargo lookup process is initiated
Logic Flow:
IF An EDI 350 message has been parsed and M10 segment data is available
AND The cargo lookup process is initiated
THEN:
• The CCN value from M10-07-CCN field (positions 1-25) is extracted and prepared for database search
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when ccn has been extracted from m10-07-ccn field.
Trigger Criteria:
Context: The CCN has been extracted from M10-07-CCN field
Action: Database search keys need to be established
Logic Flow:
IF The CCN has been extracted from M10-07-CCN field
AND Database search keys need to be established
THEN:
• The CCN value is assigned to both CCRT-SSAQKEY-VALUEandA2RT-SSAQKEY-VALUE for qualified segment search
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when search keys have been set with the ccn value. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The search keys have been set with the CCN value
Applied to: Call Database GHU Function to Retrieve Cargo
Action: The cargo record retrieval is executed
Logic Flow:
IF The search keys have been set with the CCN value
AND The cargo record retrieval is executed
THEN:
• The system calls CIMS with GHU function code against GCCC-PCB using CCRT-SSAQ qualified search to retrieve GCCC-CARGO-REPORT-SEGMENT
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when ghu database call has been executed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The GHU database call has been executed
Applied to: Cargo Record Found?
Action: The database status code is evaluated
Logic Flow:
IF The GHU database call has been executed
AND The database status code is evaluated
THEN:
• IfCC-STATUS-CODE is not SPACES, the cargo is not found; ifCC-STATUS-CODE is SPACES, the cargo is found
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when database ghu call returned a non-space status code. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The database GHU call returned a non-space status code
Applied to:WS-CARGO-NOT-FOUND
Action: The cargo existence check is completed
Logic Flow:
IF The database GHU call returned a non-space status code
AND The cargo existence check is completed
THEN:
• The system sets WS-CARGO-NOT-FOUND to TRUE and terminates the lookup process
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when primary cargo record has been successfully retrieved.
Trigger Criteria:
Context: The primary cargo record has been successfully retrieved
Applied to: Retrieve Secondary Cargo Segment GCSCCS52
Action: Secondary segment retrieval is initiated
Logic Flow:
IF The primary cargo record has been successfully retrieved
AND Secondary segment retrieval is initiated
THEN:
• The system calls CIMS with GHU function code against GCA2-PCB using A2RT-SSAQ qualified search to retrieve GCSCCS52 segment, andif not found (status = 'GE'), initializes GCSCCS52 to SPACES
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when database ghu call returned a space status code. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The database GHU call returned a space status code
Applied to:WS-CARGO-FOUND
Action: The cargo existence check is completed
Logic Flow:
IF The database GHU call returned a space status code
AND The cargo existence check is completed
THEN:
• The system sets WS-CARGO-FOUND to TRUE and proceeds with additional status checks
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has been found and retrieved.
Trigger Criteria:
Context: The cargo record has been found and retrieved
Applied to: Cargo Deleted?
Action: The cargo delete status is evaluated
Logic Flow:
IF The cargo record has been found and retrieved
AND The cargo delete status is evaluated
THEN:
• IfGCCC-DELETE-STATUS equals 'D', the cargo is deleted; otherwise, proceed to check returned status
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record gccc-delete-status field equals 'd'. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The cargo record GCCC-DELETE-STATUS field equals 'D'
Applied to:WS-CARGO-DELETED
Action: The deleted status check is completed
Logic Flow:
IF The cargo record GCCC-DELETE-STATUS field equals 'D'
AND The deleted status check is completed
THEN:
• The system sets WS-CARGO-DELETED to TRUE and proceeds to save cargo data
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is not deleted.
Trigger Criteria:
Context: The cargo record is not deleted
Applied to: Cargo Returned?
Action: The cargo return status is evaluated
Logic Flow:
IF The cargo record is not deleted
AND The cargo return status is evaluated
THEN:
• IfGCCC-STATUS-RETURN is TRUE, the cargo is returned; otherwise, proceed to check released status
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is not deleted.
Trigger Criteria:
Context: The cargo record is not deleted
Applied to: Cargo Released?
Action: The cargo release status is evaluated
Logic Flow:
IF The cargo record is not deleted
AND The cargo release status is evaluated
THEN:
• IfGCCC-RELEASE-STATUS equals 'R', the cargo is released; otherwise, proceed to check if cargo is on a train
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is not deleted.
Trigger Criteria:
Context: The cargo record is not deleted
Applied to: Cargo On Train?
Action: The cargo train assignment is evaluated
Logic Flow:
IF The cargo record is not deleted
AND The cargo train assignment is evaluated
THEN:
• IfGCCC-CP-TRAIN-ID is not SPACES, the cargo is on a train; otherwise, proceed to save cargo data
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record gccc-status-return condition is true. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The cargo record GCCC-STATUS-RETURN condition is TRUE
Applied to:WS-CARGO-RETURNED
Action: The returned status check is completed
Logic Flow:
IF The cargo record GCCC-STATUS-RETURN condition is TRUE
AND The returned status check is completed
THEN:
• The system sets WS-CARGO-RETURNED to TRUE and proceeds to check released status
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record gccc-release-status field equals 'r'. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The cargo record GCCC-RELEASE-STATUS field equals 'R'
Applied to:WS-CARGO-RELEASED
Action: The released status check is completed
Logic Flow:
IF The cargo record GCCC-RELEASE-STATUS field equals 'R'
AND The released status check is completed
THEN:
• The system sets WS-CARGO-RELEASED to TRUE and proceeds to check if cargo is on a train
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record gccc-cp-train-id field is not spaces. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The cargo record GCCC-CP-TRAIN-ID field is not SPACES
Applied to:WS-CARGO-ON-A-TRAIN
Action: The train assignment check is completed
Logic Flow:
IF The cargo record GCCC-CP-TRAIN-ID field is not SPACES
AND The train assignment check is completed
THEN:
• The system sets WS-CARGO-ON-A-TRAIN to TRUE and proceeds to save cargo data
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been successfully retrieved and status checks completed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The cargo record has been successfully retrieved and status checks completed
Applied to: - CCN Key - Equipment Car ID - Waybill Index - Release Information
Action: Cargo data needs to be preserved for processing
Logic Flow:
IF The cargo record has been successfully retrieved and status checks completed
AND Cargo data needs to be preserved for processing
THEN:
• The system saves GCCC-CARGO-REPORT-SEGMENT to WS-SAVE-GCSCCRT, GCCC-CCN-KEY to WS-CURRENT-CCN-KEYandWS-SAVE-CCN, GCCC-EQUIPMENT-CAR to WS-CURRENT-CARID-KEY, GCCC-RELEASE-INFORMATION to WS-SAVE-RELEASE-INFORMATION, andGCCC-WAYBILL-KEY-FOR-INDEX to SAVE-WAYBILL-INDEX
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been found and save-waybill-index is not blank. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The cargo record has been found and SAVE-WAYBILL-INDEX is not blank
Applied to: Cargo Record Found?
Action: Waybill validation is performed
Logic Flow:
IF The cargo record has been found and SAVE-WAYBILL-INDEX is not blank
AND Waybill validation is performed
THEN:
• IfGCCC-WAYBILL-KEY-FOR-INDEX does not equal SAVE-WAYBILL-INDEX, set WS-CARGO-NOT-WB to TRUE; otherwise, proceed with status checks
Business Justification: Dictates the expected operational logic and validation steps when edi 350 message has been received with a ccn (cargo control number) in the m10 segment.
Trigger Criteria:
Context: An EDI 350 message has been received with a CCN (Cargo Control Number) in the M10 segment
Applied to: Cargo Found?
Action: The system attempts to retrieve the cargo record using the CCN
Logic Flow:
IF An EDI 350 message has been received with a CCN (Cargo Control Number) in the M10 segment
AND The system attempts to retrieve the cargo record using the CCN
THEN:
• The system determines if the cargo record exists or not found in the database
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is not found in the database.
Trigger Criteria:
Context: Cargo record is not found in the database
Applied to: Notice Reason = RELEASED?
Action: The V9 segment notice reason code is evaluated
Logic Flow:
IF Cargo record is not found in the database
AND The V9 segment notice reason code is evaluated
THEN:
• The system checks if the notice reason code equals RELEASED (V9-02-RELEASED)
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is not found and notice reason is released.
Trigger Criteria:
Context: Cargo is not found and notice reason is RELEASED
Applied to: Prepare Error Report
Action: The system prepares to send an error notification
Logic Flow:
IF Cargo is not found and notice reason is RELEASED
AND The system prepares to send an error notification
THEN:
• The system initializes the Merlin report structure (MRLN-350-REPORT) with spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when error report structure is initialized.
Trigger Criteria:
Context: The error report structure is initialized
Applied to: 'UNKNOWN EDI 350 RELEASE FROM CBSA' + CCN
Action: The system constructs the error message
Logic Flow:
IF The error report structure is initialized
AND The system constructs the error message
THEN:
• The system sets MRLN-DTL-LINE(01) to 'UNKNOWN EDI 350 RELEASE FROM CBSA ' concatenated with the CCN from M10-07-CCN (first 25 characters)
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when first line of the error message has been set.
Trigger Criteria:
Context: The first line of the error message has been set
Applied to: 'THIS CCN WAS NOT FOUND.'
Action: The system continues building the error message
Logic Flow:
IF The first line of the error message has been set
AND The system continues building the error message
THEN:
• The system sets MRLN-DTL-LINE(03) to 'THIS CCN WAS NOT FOUND.'
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when explanatory text has been added to line 3.
Trigger Criteria:
Context: The explanatory text has been added to line 3
Applied to: 'RELEASE NUMBER:' + Release Reference + 'DONE BY PORT' + Port Code
Action: The system adds release details to the error message
Logic Flow:
IF The explanatory text has been added to line 3
AND The system adds release details to the error message
THEN:
• The system sets MRLN-DTL-LINE(04) by concatenating 'RELEASE NUMBER: ', X4-01-CBSA-REL-REF-ID (first 15 characters), ' DONE BY PORT ', andP4-01-PORT-CDE (first 4 characters)
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when all error message lines have been populated.
Trigger Criteria:
Context: All error message lines have been populated
Applied to: Set Report Line Count = 5
Action: The system finalizes the error report structure
Logic Flow:
IF All error message lines have been populated
AND The system finalizes the error report structure
THEN:
• The system sets MRLN-LINE to 5 indicating the total number of report lines
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when report line count has been set.
Trigger Criteria:
Context: The report line count has been set
Applied to: Set Report Type = UNKNOWN
Action: The system classifies the error report type
Logic Flow:
IF The report line count has been set
AND The system classifies the error report type
THEN:
• The system sets the report type indicator to 88-Z110-MRLN-TYPE-IS-UNKNOWN (TRUE)
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when error report type has been set to unknown.
Trigger Criteria:
Context: The error report type has been set to UNKNOWN
Applied to: Route Email to OM01247
Action: The system prepares to send the email notification
Logic Flow:
IF The error report type has been set to UNKNOWN
AND The system prepares to send the email notification
THEN:
• The system sets EMI-DESTINATION-FILENAME to 'UNKNOWN', clears EMI-TO-USERCODE to spaces, and sets EMI-TO-USERCODES(01) to 'OM01247'
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when email routing has been configured to om01247 with destination unknown.
Trigger Criteria:
Context: The email routing has been configured to OM01247 with destination UNKNOWN
Applied to: Send Email Notification
Action: The system executes the notification process
Logic Flow:
IF The email routing has been configured to OM01247 with destination UNKNOWN
AND The system executes the notification process
THEN:
• The system performs Z115-CALL-EMCSEND to send the email notification with the error report details
Business Justification: Ensures correct system behavior and process compliance when edi 350 message has been received and parsed with v9 segment containing notice reason code indicating decon, and the cargo lookup using the ccn from m10 segment has returned cargo not found status.
Trigger Criteria:
Context: An EDI 350 message has been received and parsed with V9 segment containing notice reason code indicating DECON, and the cargo lookup using the CCN from M10 segment has returned cargo not found status
Applied to: Check Notice Reason is DECON?
Action: The system evaluates the cargo not found condition and the V9-02-DECON notice reason code is true
Logic Flow:
IF An EDI 350 message has been received and parsed with V9 segment containing notice reason code indicating DECON, and the cargo lookup using the CCN from M10 segment has returned cargo not found status
AND The system evaluates the cargo not found condition and the V9-02-DECON notice reason code is true
THEN:
• The system prepares an error report with subject line 'UNKNOWN EDI 350 DCON NOTICE' followed by the CCN from M10-07-CCN field (first 25 characters), sets detail line 3 to 'THIS CCN WAS NOT FOUND.', sets detail line 4 with house bill close number from X4-01-CBSA-REL-REF-ID (first 25 characters) and port code from P4-01-PORT-CDE (first 4 characters) in format 'HOUSE BILL CLOSE NUMBER [value] DONE BY PORT [value]', sets total lines to 5, marks message type as unknown, routes the notification to user OM01247 with filename UNKNOWN, and invokes the email notification process
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo not found condition exists and v9-02-decon notice reason code is true.
Trigger Criteria:
Context: The cargo not found condition exists and V9-02-DECON notice reason code is true
Applied to: Subject, Include CCN, Message
Action: The system begins preparing the error notification
Logic Flow:
IF The cargo not found condition exists and V9-02-DECON notice reason code is true
AND The system begins preparing the error notification
THEN:
• The system clears MRLN-DTL-LINE array element 1, constructs a string 'UNKNOWN EDI 350 DCON NOTICE ' concatenated with M10-07-CCN field positions 1 through 25 and stores it in MRLN-DTL-LINE element 1, and sets MRLN-DTL-LINE element 3 to the literal value 'THIS CCN WAS NOT FOUND.'
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when error report header has been prepared with subject and primary message.
Trigger Criteria:
Context: The error report header has been prepared with subject and primary message
Applied to: House Bill Close Number, Port Code
Action: The system adds detailed information to the error report
Logic Flow:
IF The error report header has been prepared with subject and primary message
AND The system adds detailed information to the error report
THEN:
• The system constructs a string starting with 'HOUSE BILL CLOSE NUMBER' followed by X4-01-CBSA-REL-REF-ID field positions 1 through 25, then ' DONE BY PORT ' followed by P4-01-PORT-CDE field positions 1 through 4, and stores this complete string in MRLN-DTL-LINE array element 4
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when all detail lines for the deconsolidation error report have been populated.
Trigger Criteria:
Context: All detail lines for the deconsolidation error report have been populated
Applied to: Subject, Include CCN, Message
Action: The system finalizes the error report structure
Logic Flow:
IF All detail lines for the deconsolidation error report have been populated
AND The system finalizes the error report structure
THEN:
• The system sets MRLN-LINE to value 5 indicating 5 detail lines are present and sets the 88-level condition 88-Z110-MRLN-TYPE-IS-UNKNOWN to true
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when error report has been fully prepared with all detail lines and message type set to unknown.
Trigger Criteria:
Context: The error report has been fully prepared with all detail lines and message type set to unknown
Applied to: Route to OM01247, Filename UNKNOWN
Action: The system determines the routing for the error notification
Logic Flow:
IF The error report has been fully prepared with all detail lines and message type set to unknown
AND The system determines the routing for the error notification
THEN:
• The system sets EMI-DESTINATION-FILENAME to 'UNKNOWN', clears EMI-TO-USERCODE to spaces, and sets EMI-TO-USERCODES array element 1 to 'OM01247'
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when error report is complete with subject line, detail lines, message type set to unknown, and routing configured to user om01247 with filename unknown. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The error report is complete with subject line, detail lines, message type set to unknown, and routing configured to user OM01247 with filename UNKNOWN
Applied to: Send Error Email Notification via EMCSEND2
Action: The system is ready to send the notification
Logic Flow:
IF The error report is complete with subject line, detail lines, message type set to unknown, and routing configured to user OM01247 with filename UNKNOWN
AND The system is ready to send the notification
THEN:
• The system invokes the Z115-CALL-EMCSEND procedure which calls the EMCSEND2 program passing the from usercode, destination filename, to usercode, copy usercode, subject, keywords, report content, return status flag, segment numbers, and item type parameters
Business Justification: Establishes the required business protocol to be followed when edi 350 message has been processed with m10 segment containing ccn (cargo control number), v9 segment containing notice document type code and notice reason code, and the cargo lookup returned 'cargo not found' status.
Trigger Criteria:
Context: An EDI 350 message has been processed with M10 segment containing CCN (Cargo Control Number), V9 segment containing notice document type code and notice reason code, and the cargo lookup returned 'cargo not found' status
Applied to: Handle Unknown Cargo Entry
Action: The V9 notice reason code is NOT 'RELEASED' AND NOT 'DECON'
Logic Flow:
IF An EDI 350 message has been processed with M10 segment containing CCN (Cargo Control Number), V9 segment containing notice document type code and notice reason code, and the cargo lookup returned 'cargo not found' status
AND The V9 notice reason code is NOT 'RELEASED' AND NOT 'DECON'
THEN:
• The system prepares an error email notification with subject 'UNKNOWN EDI 350 ENTRY FROM CBSA' followed by the CCN, message line 1 contains 'UNKNOWN EDI 350 ENTRY FROM CBSA' with the CCN, message line 3 contains 'THIS CCN WAS NOT FOUND.', message line 4 contains 'NOTICE DOC TYPE: ' followed by the notice document type code, ' WITH REASON CODE ' followed by the first 4 characters of the notice reason code, sets the line count to 5, sets the recipient to 'OM01247', sets the email type indicator to 'UNKNOWN', and sends the email notification
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when edi 350 message has been processed with cargo not found status and v9 segment containing notice reason code.
Trigger Criteria:
Context: An EDI 350 message has been processed with cargo not found status and V9 segment containing notice reason code
Applied to: Check Notice Reason Code
Action: The V9 notice reason code indicates 'RELEASED'
Logic Flow:
IF An EDI 350 message has been processed with cargo not found status and V9 segment containing notice reason code
AND The V9 notice reason code indicates 'RELEASED'
THEN:
• The system skips the unknown entry notification process and exits without sending the generic unknown cargo entry email
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when edi 350 message has been processed with cargo not found status and v9 segment containing notice reason code.
Trigger Criteria:
Context: An EDI 350 message has been processed with cargo not found status and V9 segment containing notice reason code
Applied to: Check Notice Reason Code
Action: The V9 notice reason code indicates 'DECON' (deconsolidation)
Logic Flow:
IF An EDI 350 message has been processed with cargo not found status and V9 segment containing notice reason code
AND The V9 notice reason code indicates 'DECON' (deconsolidation)
THEN:
• The system skips the unknown entry notification process and exits without sending the generic unknown cargo entry email
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when unknown cargo entry notification needs to be sent with ccn from m10 segment.
Trigger Criteria:
Context: An unknown cargo entry notification needs to be sent with CCN from M10 segment
Applied to: 'UNKNOWN EDI 350 ENTRY FROM CBSA'
Action: The email subject is being prepared
Logic Flow:
IF An unknown cargo entry notification needs to be sent with CCN from M10 segment
AND The email subject is being prepared
THEN:
• The system sets the email subject to 'UNKNOWN EDI 350 ENTRY FROM CBSA ' concatenated with the 25-character CCN from M10-07-CCN field
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when unknown cargo entry notification is being prepared with ccn from m10 segment.
Trigger Criteria:
Context: An unknown cargo entry notification is being prepared with CCN from M10 segment
Applied to: Add CCN to Message Line 1
Action: The email message body is being constructed
Logic Flow:
IF An unknown cargo entry notification is being prepared with CCN from M10 segment
AND The email message body is being constructed
THEN:
• The system sets message detail line 1 to 'UNKNOWN EDI 350 ENTRY FROM CBSA ' concatenated with the first 25 characters of M10-07-CCN field
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when unknown cargo entry notification is being prepared.
Trigger Criteria:
Context: An unknown cargo entry notification is being prepared
Applied to: Add 'THIS CCN WAS NOT FOUND' to Message Line 3
Action: The email message body is being constructed
Logic Flow:
IF An unknown cargo entry notification is being prepared
AND The email message body is being constructed
THEN:
• The system sets message detail line 3 to 'THIS CCN WAS NOT FOUND.'
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when unknown cargo entry notification is being prepared with m10 segment containing notice document type code and v9 segment containing notice reason code.
Trigger Criteria:
Context: An unknown cargo entry notification is being prepared with M10 segment containing notice document type code and V9 segment containing notice reason code
Applied to: Add Notice Document Type and Reason Code to Line 4
Action: The email message body is being constructed
Logic Flow:
IF An unknown cargo entry notification is being prepared with M10 segment containing notice document type code and V9 segment containing notice reason code
AND The email message body is being constructed
THEN:
• The system sets message detail line 4 to 'NOTICE DOC TYPE: ' concatenated with M10-05-NOTICE-DOC-TYP-CDE, followed by ' WITH REASON CODE ' concatenated with the first 4 characters of V9-02-NOTICE-RSN-CDE field
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when unknown cargo entry notification email has been prepared with 4 message detail lines.
Trigger Criteria:
Context: An unknown cargo entry notification email has been prepared with 4 message detail lines
Applied to: Add Notice Document Type and Reason Code to Line 4
Action: The email is ready to be sent
Logic Flow:
IF An unknown cargo entry notification email has been prepared with 4 message detail lines
AND The email is ready to be sent
THEN:
• The system sets the message line count to 5
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when unknown cargo entry notification is ready to be sent.
Trigger Criteria:
Context: An unknown cargo entry notification is ready to be sent
Applied to: OM01247
Action: The email recipient is being determined
Logic Flow:
IF An unknown cargo entry notification is ready to be sent
AND The email recipient is being determined
THEN:
• The system sets the recipient user code to 'OM01247'
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when unknown cargo entry notification is ready to be sent.
Trigger Criteria:
Context: An unknown cargo entry notification is ready to be sent
Applied to: UNKNOWN
Action: The email type classification is being set
Logic Flow:
IF An unknown cargo entry notification is ready to be sent
AND The email type classification is being set
THEN:
• The system sets the email type indicator to 'UNKNOWN' (88-Z110-MRLN-TYPE-IS-UNKNOWN)
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when unknown cargo entry notification has been fully prepared with subject, message lines, recipient, and email type.
Trigger Criteria:
Context: An unknown cargo entry notification has been fully prepared with subject, message lines, recipient, and email type
Applied to: Send Email Notification
Action: The notification is ready to be dispatched
Logic Flow:
IF An unknown cargo entry notification has been fully prepared with subject, message lines, recipient, and email type
AND The notification is ready to be dispatched
THEN:
• The system performs the email preparation and sending routine (Z110-PREP-EMCSEND)
R-GCX126-cbl-00231File: GCX126R.cblBusiness Rule: Process Document Not Matched
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists in the system with a valid ccn (cargo control number) and an edi 350 message has been received and parsed with a v9 segment containing a notice reason code.
Trigger Criteria:
Context: A cargo record exists in the system with a valid CCN (Cargo Control Number) and an EDI 350 message has been received and parsed with a V9 segment containing a notice reason code
Applied to: Process Document Not Matched - Log 'DOC NOT MATCHED' message when V9 notice reason is NOT-MATCHED
Action: The V9 segment notice reason code indicates NOT-MATCHED status
Logic Flow:
IF A cargo record exists in the system with a valid CCN (Cargo Control Number) and an EDI 350 message has been received and parsed with a V9 segment containing a notice reason code
AND The V9 segment notice reason code indicates NOT-MATCHED status
THEN:
• The system clears the log information message variable, sets the message text to 'EDI 350: DOC NOT MATCHED', moves the message to the log info variable, and invokes the log cargo information message process to record the message with the current CCN, current machine date, current machine time, current user ID, action code for input message, and cargo type indicator
R-GCX126-cbl-00232File: GCX126R.cblBusiness Rule: Process Cargo Complete
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when edi 350 message has been received and parsed, and a cargo record exists in the system matching the ccn from the m10 segment, and the v9 segment notice reason code indicates cargo-complete status.
Trigger Criteria:
Context: An EDI 350 message has been received and parsed, and a cargo record exists in the system matching the CCN from the M10 segment, and the V9 segment notice reason code indicates CARGO-COMPLETE status
Applied to: Process Cargo Complete - Log 'CARGO COMPLETE MESSAGE' when V9 notice reason is CARGO-COMPLETE
Action: The system processes the V9 segment with CARGO-COMPLETE notice reason code
Logic Flow:
IF An EDI 350 message has been received and parsed, and a cargo record exists in the system matching the CCN from the M10 segment, and the V9 segment notice reason code indicates CARGO-COMPLETE status
AND The system processes the V9 segment with CARGO-COMPLETE notice reason code
THEN:
• The system prepares a log message 'EDI 350: CARGO COMPLETE MESSAGE', sets the log information with current machine date and time, the cargo CCN key, action code for input message, and cargo type as CA-CARGO, and spawns a GCT1051E transaction to record the message in the cargo history log
R-GCX126-cbl-00233 (+9)File: GCX126R.cblBusiness Rule: Process Document Package Complete
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists in the database with current broker entry and customs transaction number, and an edi 350 message with v9 segment indicating document package complete status and x4 segment containing cbsa release reference id.
Trigger Criteria:
Context: A cargo record exists in the database with current broker entry and customs transaction number, and an EDI 350 message with V9 segment indicating Document Package Complete status and X4 segment containing CBSA Release Reference ID
Applied to: Update broker entry, customs transaction number, broker date/time, log 'DOC PKG COMPLETE' message, and update cargo record
Action: The X4 CBSA Release Reference ID (first 15 characters) is different from the current broker entry OR the X4 CBSA Release Reference ID (first 14 characters) is different from the current customs transaction number, AND the X4 CBSA Release Reference ID is not spaces
Logic Flow:
IF A cargo record exists in the database with current broker entry and customs transaction number, and an EDI 350 message with V9 segment indicating Document Package Complete status and X4 segment containing CBSA Release Reference ID
AND The X4 CBSA Release Reference ID (first 15 characters) is different from the current broker entry OR the X4 CBSA Release Reference ID (first 14 characters) is different from the current customs transaction number, AND the X4 CBSA Release Reference ID is not spaces
THEN:
• Update the cargo broker entry with X4 Release Reference ID (first 15 characters), update the customs transaction number with X4 Release Reference ID (first 14 characters), update the broker date with current machine date, update the broker time with current machine time (first 4 characters), build and log the message 'EDI 350: DOC PKG COMPLETE : ' concatenated with X4 Release Reference ID (first 15 characters), and replace the cargo record in the database
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with current broker entry and customs transaction number, and an edi 350 message with v9 segment indicating document package complete status and x4 segment containing cbsa release reference id.
Trigger Criteria:
Context: A cargo record exists with current broker entry and customs transaction number, and an EDI 350 message with V9 segment indicating Document Package Complete status and X4 segment containing CBSA Release Reference ID
Applied to: Skip Update - Values Already Match
Action: The X4 CBSA Release Reference ID (first 15 characters) equals the current broker entry AND the X4 CBSA Release Reference ID (first 14 characters) equals the current customs transaction number
Logic Flow:
IF A cargo record exists with current broker entry and customs transaction number, and an EDI 350 message with V9 segment indicating Document Package Complete status and X4 segment containing CBSA Release Reference ID
AND The X4 CBSA Release Reference ID (first 15 characters) equals the current broker entry AND the X4 CBSA Release Reference ID (first 14 characters) equals the current customs transaction number
THEN:
• Skip all update operations and continue to next processing step without modifying the cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists in the database and an edi 350 message with v9 segment indicating document package complete status and x4 segment.
Trigger Criteria:
Context: A cargo record exists in the database and an EDI 350 message with V9 segment indicating Document Package Complete status and X4 segment
Applied to: Skip Update - Values Already Match
Action: The X4 CBSA Release Reference ID is spaces (blank)
Logic Flow:
IF A cargo record exists in the database and an EDI 350 message with V9 segment indicating Document Package Complete status and X4 segment
AND The X4 CBSA Release Reference ID is spaces (blank)
THEN:
• Skip all update operations and continue to next processing step without modifying the cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when decision to update has been made based on differing release reference values and non-blank x4 release reference id.
Trigger Criteria:
Context: The decision to update has been made based on differing release reference values and non-blank X4 Release Reference ID
Applied to: Update Broker Entry with X4 Release Reference First 15 Characters
Action: Updating cargo broker information
Logic Flow:
IF The decision to update has been made based on differing release reference values and non-blank X4 Release Reference ID
AND Updating cargo broker information
THEN:
• Set the cargo broker entry field to the first 15 characters of X4 CBSA Release Reference ID (X4-01-CBSA-REL-REF-ID positions 1 through 15)
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when decision to update has been made based on differing release reference values and non-blank x4 release reference id.
Trigger Criteria:
Context: The decision to update has been made based on differing release reference values and non-blank X4 Release Reference ID
Applied to: Update Customs Transaction Number with X4 Release Reference First 14 Characters
Action: Updating cargo customs transaction information
Logic Flow:
IF The decision to update has been made based on differing release reference values and non-blank X4 Release Reference ID
AND Updating cargo customs transaction information
THEN:
• Set the customs transaction number field to the first 14 characters of X4 CBSA Release Reference ID (X4-01-CBSA-REL-REF-ID positions 1 through 14)
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when decision to update has been made and broker entry and customs transaction number have been updated.
Trigger Criteria:
Context: The decision to update has been made and broker entry and customs transaction number have been updated
Applied to: Update Broker Date with Current Machine Date
Action: Recording the timestamp of document package completion
Logic Flow:
IF The decision to update has been made and broker entry and customs transaction number have been updated
AND Recording the timestamp of document package completion
THEN:
• Set the cargo broker date field to the current machine date (CC-MACHINE-DATE from CCCOM)
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when decision to update has been made and broker entry, customs transaction number, and broker date have been updated.
Trigger Criteria:
Context: The decision to update has been made and broker entry, customs transaction number, and broker date have been updated
Applied to: Update Broker Time with Current Machine Time First 4 Characters
Action: Recording the time of document package completion
Logic Flow:
IF The decision to update has been made and broker entry, customs transaction number, and broker date have been updated
AND Recording the time of document package completion
THEN:
• Set the cargo broker time field to the first 4 characters of current machine time (CC-MACHINE-TIME from CCCOM, representing hours and minutes in HHMM format)
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been updated with new broker entry, customs transaction number, broker date, and broker time.
Trigger Criteria:
Context: The cargo record has been updated with new broker entry, customs transaction number, broker date, and broker time
Applied to: 'EDI 350: DOC PKG COMPLETE : ' + X4 Release Reference First 15 Characters
Action: Preparing to log the document package completion event
Logic Flow:
IF The cargo record has been updated with new broker entry, customs transaction number, broker date, and broker time
AND Preparing to log the document package completion event
THEN:
• Construct a log message by concatenating the literal text 'EDI 350: DOC PKG COMPLETE : ' with the first 15 characters of X4 CBSA Release Reference ID and store in the log message field
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when log message has been constructed with document package complete details.
Trigger Criteria:
Context: The log message has been constructed with document package complete details
Applied to: Log Cargo Information Message
Action: Recording the document package completion event
Logic Flow:
IF The log message has been constructed with document package complete details
AND Recording the document package completion event
THEN:
• Invoke the log cargo information message process (Z150-LOG-CARGO-INFO-MSG) to write the message to the cargo audit log with current date, time, user ID, CCN, and the constructed message text
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has been updated with new broker entry, customs transaction number, broker date, broker time, and the completion event has been logged.
Trigger Criteria:
Context: The cargo record has been updated with new broker entry, customs transaction number, broker date, broker time, and the completion event has been logged
Applied to: Update Cargo Record - Replace Cargo in Database
Action: Persisting the document package complete changes
Logic Flow:
IF The cargo record has been updated with new broker entry, customs transaction number, broker date, broker time, and the completion event has been logged
AND Persisting the document package complete changes
THEN:
• Invoke the replace cargo process (Z3100-REPL-CARGO) to update the cargo record in the database with all modified fields
R-GCX126-cbl-00243 (+2)File: GCX126R.cblBusiness Rule: Process Document Not On File
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when edi 350 message is being processed with v9 notice reason code indicating 'doc-not-on-file' and x4 segment contains release document type code and cbsa release reference id.
Trigger Criteria:
Context: An EDI 350 message is being processed with V9 notice reason code indicating 'DOC-NOT-ON-FILE' and X4 segment contains release document type code and CBSA release reference ID
Applied to: 'EDI 350: DOC NOT ON FILE FOR RELEASE' with CBSA Release Reference ID
Action: The X4 release document type code (position 1, length 1) starts with 'R' indicating a release type transaction
Logic Flow:
IF An EDI 350 message is being processed with V9 notice reason code indicating 'DOC-NOT-ON-FILE' and X4 segment contains release document type code and CBSA release reference ID
AND The X4 release document type code (position 1, length 1) starts with 'R' indicating a release type transaction
THEN:
• The system logs an informational message 'EDI 350: DOC NOT ON FILE FOR RELEASE' concatenated with the CBSA release reference ID (first 15 characters) to the cargo information log
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when edi 350 message is being processed with v9 notice reason code indicating 'doc-not-on-file' and x4 segment contains release document type code and cbsa release reference id.
Trigger Criteria:
Context: An EDI 350 message is being processed with V9 notice reason code indicating 'DOC-NOT-ON-FILE' and X4 segment contains release document type code and CBSA release reference ID
Applied to: 'EDI 350: DOC NOT ON FILE H-BILL CLOSE' with CBSA Release Reference ID
Action: The X4 release document type code (position 1, length 1) does not start with 'R' indicating a non-release type transaction (house bill close)
Logic Flow:
IF An EDI 350 message is being processed with V9 notice reason code indicating 'DOC-NOT-ON-FILE' and X4 segment contains release document type code and CBSA release reference ID
AND The X4 release document type code (position 1, length 1) does not start with 'R' indicating a non-release type transaction (house bill close)
THEN:
• The system logs an informational message 'EDI 350:DOC NOT ON FILE H-BILL CLOSE' concatenated with the CBSA release reference ID (full 25 characters) to the cargo information log
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when edi 350 message is being processed with cargo found in the system.
Trigger Criteria:
Context: An EDI 350 message is being processed with cargo found in the system
Applied to: Process Document Not On File
Action: The V9 segment notice reason code equals 'DOC-NOT-ON-FILE'
Logic Flow:
IF An EDI 350 message is being processed with cargo found in the system
AND The V9 segment notice reason code equals 'DOC-NOT-ON-FILE'
THEN:
• The system proceeds to check the release document type to determine the appropriate logging message format
R-GCX126-cbl-00246 (+3)File: GCX126R.cblBusiness Rule: Process Cargo Reported
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when edi 350 message has been received and parsed with v9 segment containing notice reason code, and cargo record exists in the database with a valid ccn (cargo control number). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An EDI 350 message has been received and parsed with V9 segment containing notice reason code, and cargo record exists in the database with a valid CCN (Cargo Control Number)
Applied to: Process Cargo Reported - Log 'CARGO REPORTED' message when V9 notice reason is REPORTED
Action: The V9 segment notice reason code indicates REPORTED status
Logic Flow:
IF An EDI 350 message has been received and parsed with V9 segment containing notice reason code, and cargo record exists in the database with a valid CCN (Cargo Control Number)
AND The V9 segment notice reason code indicates REPORTED status
THEN:
• The system clears the message work area (WS-GCX105-INFO-MSG), builds the message string 'EDI 350: CARGO REPORTED', and invokes the log cargo information message process (Z150-LOG-CARGO-INFO-MSG) to record this status change in the cargo history with the current CCN, date, time, and user information
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when edi 350 message v9 segment has been processed and the notice reason code field (v9-02-notice-rsn-cde) is available for evaluation.
Trigger Criteria:
Context: An EDI 350 message V9 segment has been processed and the notice reason code field (V9-02-NOTICE-RSN-CDE) is available for evaluation
Applied to: Process Cargo Reported - Log 'CARGO REPORTED' message when V9 notice reason is REPORTED
Action: The system evaluates the V9 notice reason code against the REPORTED condition (V9-02-REPORTED)
Logic Flow:
IF An EDI 350 message V9 segment has been processed and the notice reason code field (V9-02-NOTICE-RSN-CDE) is available for evaluation
AND The system evaluates the V9 notice reason code against the REPORTED condition (V9-02-REPORTED)
THEN:
• If the condition is true, the system proceeds to log the cargo reported message; otherwise, the system continues to evaluate other notice reason code conditions
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when v9 notice reason code has been confirmed as reported status and the message work area (ws-gcx105-info-msg) is available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The V9 notice reason code has been confirmed as REPORTED status and the message work area (WS-GCX105-INFO-MSG) is available
Applied to: Process Cargo Reported - Log 'CARGO REPORTED' message when V9 notice reason is REPORTED
Action: The system prepares the log message content
Logic Flow:
IF The V9 notice reason code has been confirmed as REPORTED status and the message work area (WS-GCX105-INFO-MSG) is available
AND The system prepares the log message content
THEN:
• The system clears the message work area (WS-GCX105-INFO-MSG) to spaces and builds the message string 'EDI 350: CARGO REPORTED' into the work area
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo reported message 'edi 350: cargo reported' has been prepared in the message work area (ws-gcx105-info-msg), and the current cargo ccn is available in ws-current-ccn-key. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The cargo reported message 'EDI 350: CARGO REPORTED' has been prepared in the message work area (WS-GCX105-INFO-MSG), and the current cargo CCN is available in WS-CURRENT-CCN-KEY
Applied to: Process Cargo Reported - Log 'CARGO REPORTED' message when V9 notice reason is REPORTED
Action: The system invokes the log cargo information message process (Z150-LOG-CARGO-INFO-MSG)
Logic Flow:
IF The cargo reported message 'EDI 350: CARGO REPORTED' has been prepared in the message work area (WS-GCX105-INFO-MSG), and the current cargo CCN is available in WS-CURRENT-CCN-KEY
AND The system invokes the log cargo information message process (Z150-LOG-CARGO-INFO-MSG)
THEN:
• The logging service records the message to cargo history with the current machine date, machine time, user ID (ACF2-USERID), action code (LOG-USE-INPUT-MESSAGE), cargo CCN, cargo type indicator (GCX105-CA-CARGO), and the prepared message text
R-GCX126-cbl-00250 (+3)File: GCX126R.cblBusiness Rule: Process Cargo Arrived
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when edi 350 message has been received and parsed with v9 segment notice reason code indicating arrived status and p4 segment containing a valid port code.
Trigger Criteria:
Context: An EDI 350 message has been received and parsed with V9 segment notice reason code indicating ARRIVED status and P4 segment containing a valid port code
Applied to: Process Cargo Arrived - Log 'CARGO ARRIVED AT PORT' message when V9 notice reason is ARRIVED
Action: The system processes the cargo arrival status
Logic Flow:
IF An EDI 350 message has been received and parsed with V9 segment notice reason code indicating ARRIVED status and P4 segment containing a valid port code
AND The system processes the cargo arrival status
THEN:
• The system prepares a log message 'EDI 350: CARGO ARRIVED AT PORT' concatenated with the 4-character port code from P4 segment, sets the current machine date and time, sets the CCN key as the cargo identifier, sets the action code to indicate input message usage, marks the log as Canadian cargo type, and writes the log message to the IMS message queue via GCT1051E transaction
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when v9 segment indicates arrived status and the p4 segment contains a port code in positions 1 through 4. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The V9 segment indicates ARRIVED status and the P4 segment contains a port code in positions 1 through 4
Applied to: 'EDI 350: CARGO ARRIVED AT PORT'
Action: The system prepares the arrival log message
Logic Flow:
IF The V9 segment indicates ARRIVED status and the P4 segment contains a port code in positions 1 through 4
AND The system prepares the arrival log message
THEN:
• The system initializes the log message field to spaces, concatenates the text 'EDI 350: CARGO ARRIVED AT PORT ' with the 4-character port code from P4-01-PORT-CDE positions 1 through 4, and stores the result in WS-GCX105-INFO-MSG field
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo arrival log message has been prepared with port information and the current ccn key is available in ws-current-ccn-key. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo arrival log message has been prepared with port information and the current CCN key is available in WS-CURRENT-CCN-KEY
Applied to: - Current Date/Time - CCN Key - Action Code
Action: The system sets the log information for the arrival event
Logic Flow:
IF A cargo arrival log message has been prepared with port information and the current CCN key is available in WS-CURRENT-CCN-KEY
AND The system sets the log information for the arrival event
THEN:
• The system clears the GCX105 input area to spaces, sets the security byte to high-value, sets the sending transaction to 'GCT1261E', sets the ACF2 user ID from the common control area, concatenates the machine century with the machine date to form GCX105-DATE, moves the machine time to GCX105-TIME, moves the current CCN key to GCX105-TRAIN-OR-US-CCN, sets the cargo type indicator to Canadian cargo, sets the action code to LOG-USE-INPUT-MESSAGE, and moves the prepared arrival message from WS-GCX105-INFO-MSG to GCX105-MESSAGE
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when gcx105 log structure has been populated with arrival event information including date, time, ccn, and message text, and the message field is not spaces or low-values.
Trigger Criteria:
Context: The GCX105 log structure has been populated with arrival event information including date, time, CCN, and message text, and the message field is not spaces or low-values
Applied to: Log Cargo Information Message to IMS Message Queue
Action: The system writes the log entry to the message queue
Logic Flow:
IF The GCX105 log structure has been populated with arrival event information including date, time, CCN, and message text, and the message field is not spaces or low-values
AND The system writes the log entry to the message queue
THEN:
• The system replaces all spaces in GCX105-DATE with zeroes, replaces all spaces in GCX105-TIME with '1', moves the GCX105-INPUT to GCT1051E-MSG, sets the accept status to blank, calls CIMS with CHNG function for the alternate PCB and GCT1051E segment, calls WRITMSGL with the alternate PCB, message code, message text, message length and module name, and calls CIMS with PURG function for the alternate PCB to commit the message
R-GCX126-cbl-00254 (+34)File: GCX126R.cblBusiness Rule: Process Cargo Release
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with v9 segment indicating released status.
Trigger Criteria:
Context: A cargo record exists with V9 segment indicating RELEASED status
Applied to: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields
Action: The system processes the release notification
Logic Flow:
IF A cargo record exists with V9 segment indicating RELEASED status
AND The system processes the release notification
THEN:
• The cargo destination station number index field is set to spaces AND the cargo destination station number for index field is set to spaces
• The cargo release date is set to current machine date AND the cargo release time is set to current machine time
• The cargo release by field is set to the current user ID from the system
• The cargo current status field is set to 'RELEASED'
• The cargo release status field is set to 'R'
• The cargo release type field is set to 'A'
• The cargo release reason field is set to spaces
• The cargo error or release status index field is set to spaces
• The cargo error status field is set to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with v9 segment indicating released status and x4 segment contains cbsa release reference id and p4 segment contains port code.
Trigger Criteria:
Context: A cargo record exists with V9 segment indicating RELEASED status AND X4 segment contains CBSA release reference ID AND P4 segment contains port code
Applied to: RELEASE: release-ref AT PORT port-code
Action: The system builds the release log message
Logic Flow:
IF A cargo record exists with V9 segment indicating RELEASED status AND X4 segment contains CBSA release reference ID AND P4 segment contains port code
AND The system builds the release log message
THEN:
• The log message is formatted as 'EDI 350: RELEASE : ' concatenated with the first 15 characters of X4 CBSA release reference ID concatenated with ' AT PORT ' concatenated with the first 4 characters of P4 port code
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with v9 segment indicating released status and x4 segment contains cbsa release reference id and p4 segment contains port code.
Trigger Criteria:
Context: A cargo record exists with V9 segment indicating RELEASED status AND X4 segment contains CBSA release reference ID AND P4 segment contains port code
Applied to: release-ref / port-code
Action: The system builds the release reason
Logic Flow:
IF A cargo record exists with V9 segment indicating RELEASED status AND X4 segment contains CBSA release reference ID AND P4 segment contains port code
AND The system builds the release reason
THEN:
• The release reason is formatted as the first 15 characters of X4 CBSA release reference ID concatenated with '/' concatenated with the first 4 characters of P4 port code
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when release reason has been built with format 'release-ref/port-code'.
Trigger Criteria:
Context: The release reason has been built with format 'release-ref/port-code'
Applied to: Update Cargo Release Reason Field
Action: The system updates the cargo record
Logic Flow:
IF The release reason has been built with format 'release-ref/port-code'
AND The system updates the cargo record
THEN:
• The cargo release reason field is set to the constructed release reason string
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when release log message has been constructed and the cargo ccn is known.
Trigger Criteria:
Context: The release log message has been constructed AND the cargo CCN is known
Applied to: Log Release Message to Cargo
Action: The system logs the release information
Logic Flow:
IF The release log message has been constructed AND the cargo CCN is known
AND The system logs the release information
THEN:
• A log entry is created with current system date, current system time, cargo CCN as the reference, cargo type indicator set to Canadian cargo, action code set to use input message, and the message set to the constructed release log message
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when canadian cargo record has been released and the cargo has an equipment car id and waybill number.
Trigger Criteria:
Context: A Canadian cargo record has been released AND the cargo has an equipment car ID and waybill number
Applied to: Match by Car ID, Match by Waybill Number, Verify not deleted, Verify no TR created
Action: The system searches for associated US manifest
Logic Flow:
IF A Canadian cargo record has been released AND the cargo has an equipment car ID and waybill number
AND The system searches for associated US manifest
THEN:
• The system retrieves US cargo records where the car ID number index matches the first 12 characters of the current car ID AND the waybill number index matches the saved waybill index AND the cargo is not deleted AND no train has been created for it
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when system has searched for us cargo records matching the car id and waybill number.
Trigger Criteria:
Context: The system has searched for US cargo records matching the car ID and waybill number
Applied to: US Manifest Found?
Action: The system evaluates the search results
Logic Flow:
IF The system has searched for US cargo records matching the car ID and waybill number
AND The system evaluates the search results
THEN:
• If a US cargo record is found where car ID matches AND waybill matches AND cargo is not deleted AND no train created, then US manifest found indicator is set to true, otherwise it is set to false
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us manifest record has been found that matches the canadian cargo's car id and waybill number.
Trigger Criteria:
Context: A US manifest record has been found that matches the Canadian cargo's car ID and waybill number
Applied to: CDN CCN RLSED BY EDI 350: canadian-ccn
Action: The system logs the release to US cargo
Logic Flow:
IF A US manifest record has been found that matches the Canadian cargo's car ID and waybill number
AND The system logs the release to US cargo
THEN:
• A log entry is created with current system date, current system time, US CCN as the reference, cargo type indicator set to US cargo, action code set to use input message, and the message formatted as 'CDN CCN RLSED BY EDI 350: ' concatenated with the Canadian cargo CCN
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo release date and time have been set from the system clock.
Trigger Criteria:
Context: The cargo release date and time have been set from the system clock
Applied to: Save Release Date/Time for Later Use
Action: The system prepares to update the cargo record
Logic Flow:
IF The cargo release date and time have been set from the system clock
AND The system prepares to update the cargo record
THEN:
• The cargo release date is copied to a hold date field AND the cargo release time is copied to a hold time field
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when all release information has been set in the cargo segment including release date, time, user, status, type, and reason.
Trigger Criteria:
Context: All release information has been set in the cargo segment including release date, time, user, status, type, and reason
Applied to: Update Canadian Cargo Record with Release Information
Action: The system updates the cargo record
Logic Flow:
IF All release information has been set in the cargo segment including release date, time, user, status, type, and reason
AND The system updates the cargo record
THEN:
• The cargo report segment is replaced in the database with the updated release information
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been released.
Trigger Criteria:
Context: A cargo record has been released
Applied to: Is Master Manifest?
Action: The system checks the cargo type
Logic Flow:
IF A cargo record has been released
AND The system checks the cargo type
THEN:
• If the cargo master manifest indicator is true, then proceed to process follower manifests, otherwise end the release process
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is identified as a master manifest with a specific ccn.
Trigger Criteria:
Context: A cargo is identified as a master manifest with a specific CCN
Applied to: Retrieve All Follower Manifests for Master CCN up to 100 records
Action: The system retrieves follower manifests
Logic Flow:
IF A cargo is identified as a master manifest with a specific CCN
AND The system retrieves follower manifests
THEN:
• The system retrieves all cargo records where the master manifest CCN matches the current cargo CCN AND the cargo is a follower manifest (not a master) AND stores up to 100 follower CCN keys in an array AND stops retrieval when end of database is reached OR 100 records are retrieved
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower manifest ccns have been retrieved and stored in an array.
Trigger Criteria:
Context: Follower manifest CCNs have been retrieved and stored in an array
Applied to: For Each Follower Manifest
Action: The system processes follower manifests
Logic Flow:
IF Follower manifest CCNs have been retrieved and stored in an array
AND The system processes follower manifests
THEN:
• For each follower CCN in the array from position 1 to the count of retrieved followers, the system retrieves the cargo record using the follower CCN AND processes it if the CCN is not spaces or low-values
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower manifest cargo record has been retrieved.
Trigger Criteria:
Context: A follower manifest cargo record has been retrieved
Applied to: Set Release Information for Follower
Action: The system sets release information for the follower
Logic Flow:
IF A follower manifest cargo record has been retrieved
AND The system sets release information for the follower
THEN:
• The follower cargo destination station number fields are cleared AND release date is set to current machine date AND release time is set to current machine time AND release by is set to current user ID AND current status is set to 'RELEASED' AND release status is set to 'R' AND release type is set to 'A' AND error fields are cleared
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when follower manifest is being processed and the v9 segment contains a notice reason code.
Trigger Criteria:
Context: A follower manifest is being processed AND the V9 segment contains a notice reason code
Applied to: Build Message Based on Type
Action: The system builds the log message for the follower
Logic Flow:
IF A follower manifest is being processed AND the V9 segment contains a notice reason code
AND The system builds the log message for the follower
THEN:
• If V9 notice reason code indicates RELEASED, then format message as release type, otherwiseif V9 notice reason code indicates DECON, then format message as deconsolidation type
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when follower manifest is being processed and the v9 segment contains a notice reason code.
Trigger Criteria:
Context: A follower manifest is being processed AND the V9 segment contains a notice reason code
Applied to: Build Reason Based on Type
Action: The system builds the release reason for the follower
Logic Flow:
IF A follower manifest is being processed AND the V9 segment contains a notice reason code
AND The system builds the release reason for the follower
THEN:
• If V9 notice reason code indicates RELEASED, then format reason as standard release type, otherwiseif V9 notice reason code indicates DECON, then format reason as deconsolidation type
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower manifest is being processed and v9 segment indicates released status.
Trigger Criteria:
Context: A follower manifest is being processed AND V9 segment indicates RELEASED status
Applied to: release-ref AT PORT port-code
Action: The system builds the release message
Logic Flow:
IF A follower manifest is being processed AND V9 segment indicates RELEASED status
AND The system builds the release message
THEN:
• The log message is formatted as 'EDI 350: RELEASE : ' concatenated with the first 15 characters of X4 CBSA release reference ID concatenated with ' AT PORT ' concatenated with the first 4 characters of P4 port code
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower manifest is being processed and v9 segment indicates released status.
Trigger Criteria:
Context: A follower manifest is being processed AND V9 segment indicates RELEASED status
Applied to: release-ref / port-code
Action: The system builds the release reason
Logic Flow:
IF A follower manifest is being processed AND V9 segment indicates RELEASED status
AND The system builds the release reason
THEN:
• The release reason is formatted as the first 15 characters of X4 CBSA release reference ID concatenated with '/' concatenated with the first 4 characters of P4 port code
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower manifest is being processed and v9 segment indicates decon status.
Trigger Criteria:
Context: A follower manifest is being processed AND V9 segment indicates DECON status
Applied to: RELEASE VIA DECON AT PORT port-code
Action: The system builds the release message
Logic Flow:
IF A follower manifest is being processed AND V9 segment indicates DECON status
AND The system builds the release message
THEN:
• The log message is formatted as 'EDI 350: RELEASE VIA DECON AT PORT ' concatenated with the first 4 characters of P4 port code
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower manifest is being processed and v9 segment indicates decon status.
Trigger Criteria:
Context: A follower manifest is being processed AND V9 segment indicates DECON status
Applied to: DECONSOLIDATION AT port-code
Action: The system builds the release reason
Logic Flow:
IF A follower manifest is being processed AND V9 segment indicates DECON status
AND The system builds the release reason
THEN:
• The release reason is formatted as 'DECONSOLIDATION AT ' concatenated with the first 4 characters of P4 port code
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when release log message has been constructed for the follower and the follower cargo ccn is known.
Trigger Criteria:
Context: The release log message has been constructed for the follower AND the follower cargo CCN is known
Applied to: Log Release Message to Follower Cargo
Action: The system logs the release information
Logic Flow:
IF The release log message has been constructed for the follower AND the follower cargo CCN is known
AND The system logs the release information
THEN:
• A log entry is created with current system date, current system time, follower cargo CCN as the reference, cargo type indicator set to Canadian cargo, action code set to use input message, and the message set to the constructed release log message
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when release reason has been built for the follower manifest.
Trigger Criteria:
Context: The release reason has been built for the follower manifest
Applied to: Update Follower Release Reason
Action: The system updates the follower cargo record
Logic Flow:
IF The release reason has been built for the follower manifest
AND The system updates the follower cargo record
THEN:
• The follower cargo release reason field is set to the constructed release reason string
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower manifest cargo record has been released and the follower has an equipment car id and waybill number.
Trigger Criteria:
Context: A follower manifest cargo record has been released AND the follower has an equipment car ID and waybill number
Applied to: Find Associated US Manifest for Follower
Action: The system searches for associated US manifest
Logic Flow:
IF A follower manifest cargo record has been released AND the follower has an equipment car ID and waybill number
AND The system searches for associated US manifest
THEN:
• The system retrieves US cargo records where the car ID number index matches the first 12 characters of the follower's car ID AND the waybill number index matches the follower's waybill index AND the cargo is not deleted AND no train has been created for it
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when system has searched for us cargo records matching the follower's car id and waybill number.
Trigger Criteria:
Context: The system has searched for US cargo records matching the follower's car ID and waybill number
Applied to: US Manifest Found?
Action: The system evaluates the search results
Logic Flow:
IF The system has searched for US cargo records matching the follower's car ID and waybill number
AND The system evaluates the search results
THEN:
• If a US cargo record is found where car ID matches AND waybill matches AND cargo is not deleted AND no train created, then US manifest found indicator is set to true, otherwise it is set to false
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us manifest record has been found that matches the follower cargo's car id and waybill number.
Trigger Criteria:
Context: A US manifest record has been found that matches the follower cargo's car ID and waybill number
Applied to: CDN CCN RLSED BY EDI 350
Action: The system logs the release to US cargo
Logic Flow:
IF A US manifest record has been found that matches the follower cargo's car ID and waybill number
AND The system logs the release to US cargo
THEN:
• A log entry is created with current system date, current system time, US CCN as the reference, cargo type indicator set to US cargo, action code set to use input message, and the message formatted as 'CDN CCN RLSED BY EDI 350: ' concatenated with the follower Canadian cargo CCN
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when all release information has been set in the follower cargo segment including release date, time, user, status, type, and reason.
Trigger Criteria:
Context: All release information has been set in the follower cargo segment including release date, time, user, status, type, and reason
Applied to: Update Follower Cargo Record
Action: The system updates the follower cargo record
Logic Flow:
IF All release information has been set in the follower cargo segment including release date, time, user, status, type, and reason
AND The system updates the follower cargo record
THEN:
• The follower cargo report segment is replaced in the database with the updated release information
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when follower manifest has been processed and there is an array of follower ccns.
Trigger Criteria:
Context: A follower manifest has been processed AND there is an array of follower CCNs
Applied to: More Followers?
Action: The system checks for more followers
Logic Flow:
IF A follower manifest has been processed AND there is an array of follower CCNs
AND The system checks for more followers
THEN:
• If the current position in the follower array is less than the total count of followers AND the next follower CCN is not spaces or low-values, then continue processing the next follower, otherwise end follower processing
R-GCX126-cbl-00289 (+5)File: GCX126R.cblBusiness Rule: Process Authorized to Deliver
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when edi 350 message with v9 segment notice reason code indicating 'auth to deliver' status.
Trigger Criteria:
Context: An EDI 350 message with V9 segment notice reason code indicating 'AUTH TO DELIVER' status
Applied to: 'EDI 350: AUTHORIZED TO PROCEED'
Action: The authorization to deliver processing begins
Logic Flow:
IF An EDI 350 message with V9 segment notice reason code indicating 'AUTH TO DELIVER' status
AND The authorization to deliver processing begins
THEN:
• The system logs the message 'EDI 350: AUTHORIZED TO PROCEED' to the cargo information log with current date, time, and cargo CCN
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with authorization to deliver status from edi 350.
Trigger Criteria:
Context: A cargo record with authorization to deliver status from EDI 350
Applied to: Is Cargo CSA Manifest?
Action: The system evaluates the cargo's CSA indicator
Logic Flow:
IF A cargo record with authorization to deliver status from EDI 350
AND The system evaluates the cargo's CSA indicator
THEN:
• If CSA indicator is ON, proceed with CSA authorization processing; If CSA indicator is OFF, log non-CSA rejection message
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with csa indicator on and authorization to deliver status from edi 350.
Trigger Criteria:
Context: A cargo record with CSA indicator ON and authorization to deliver status from EDI 350
Applied to: - Log 'EDI 350: ACCEPTED - CSA' - Set Status to CSA-DLV - Set CSA Authorization Flag
Action: The system processes the CSA authorization
Logic Flow:
IF A cargo record with CSA indicator ON and authorization to deliver status from EDI 350
AND The system processes the CSA authorization
THEN:
• The system logs 'EDI 350: ACCEPTED - CSA' message, sets cargo current status to 'CSA-DLV', sets CSA authorization to deliver received flag to TRUE
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with csa status and authorization flag set.
Trigger Criteria:
Context: A cargo record with CSA status and authorization flag set
Applied to: Update Cargo Record with CSA Status
Action: The CSA authorization processing is complete
Logic Flow:
IF A cargo record with CSA status and authorization flag set
AND The CSA authorization processing is complete
THEN:
• The system replaces the cargo record in the database with updated CSA delivery status and authorization received flag
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with csa indicator off and authorization to deliver status from edi 350.
Trigger Criteria:
Context: A cargo record with CSA indicator OFF and authorization to deliver status from EDI 350
Applied to: 'EDI 350: NOT ACCEPTED - NON-CSA'
Action: The system evaluates the non-CSA cargo
Logic Flow:
IF A cargo record with CSA indicator OFF and authorization to deliver status from EDI 350
AND The system evaluates the non-CSA cargo
THEN:
• The system logs 'EDI 350: NOT ACCEPTED - NON-CSA' message to the cargo information log without updating cargo status
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with authorization to deliver status and associated equipment car id and waybill number.
Trigger Criteria:
Context: A cargo record with authorization to deliver status and associated equipment car ID and waybill number
Applied to: - Find US Cargo by Car ID and Waybill - Log Release Message to US CCN - Reference Canadian CCN
Action: The authorization processing is complete
Logic Flow:
IF A cargo record with authorization to deliver status and associated equipment car ID and waybill number
AND The authorization processing is complete
THEN:
• The system searches for US cargo records matching the car ID and waybill number, andif found and not deleted and no train created, logs a message 'CDN CCN RLSED BY EDI 350' with the Canadian CCN to the US cargo log entry
R-GCX126-cbl-00295 (+6)File: GCX126R.cblBusiness Rule: Process Cargo Hold
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when edi 350 message with v9 notice reason code indicating held status has been received for a cargo.
Trigger Criteria:
Context: An EDI 350 message with V9 notice reason code indicating HELD status has been received for a cargo
Applied to: 'EDI 350: GOODS HELD FOR EXAMINATION'
Action: The cargo hold processing is initiated
Logic Flow:
IF An EDI 350 message with V9 notice reason code indicating HELD status has been received for a cargo
AND The cargo hold processing is initiated
THEN:
• The system logs the message 'EDI 350: GOODS HELD FOR EXAMINATION' to the cargo information log
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists in the system and customs has issued a hold notice via edi 350.
Trigger Criteria:
Context: A cargo record exists in the system and customs has issued a hold notice via EDI 350
Applied to: Set Cargo Status to HOLD
Action: The hold status processing is executed
Logic Flow:
IF A cargo record exists in the system and customs has issued a hold notice via EDI 350
AND The hold status processing is executed
THEN:
• The cargo status is set to HOLD in the cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo status has been set to hold.
Trigger Criteria:
Context: The cargo status has been set to HOLD
Applied to: Update Cargo Record in Database
Action: The cargo record update is performed
Logic Flow:
IF The cargo status has been set to HOLD
AND The cargo record update is performed
THEN:
• The cargo record is replaced in the database with the updated hold status
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has been placed on hold by customs.
Trigger Criteria:
Context: A cargo has been placed on hold by customs
Applied to: CCN Prefix = '6105'?
Action: The system checks the first 4 characters of the CCN (Cargo Control Number)
Logic Flow:
IF A cargo has been placed on hold by customs
AND The system checks the first 4 characters of the CCN (Cargo Control Number)
THEN:
• If the CCN starts with '6105', the system proceeds to prepare a hold notification email; otherwise, the hold processing is complete
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo with ccn starting with '6105' has been placed on hold.
Trigger Criteria:
Context: A cargo with CCN starting with '6105' has been placed on hold
Applied to: - Subject: 'CBSA CARGO HOLD' - Equipment ID - Waybill Number - CCN - Destination Station - Manifest Station
Action: The hold notification preparation is executed
Logic Flow:
IF A cargo with CCN starting with '6105' has been placed on hold
AND The hold notification preparation is executed
THEN:
• The system creates an email with subject 'CBSA CARGO HOLD - [CCN]' and body containing: line 1 - 'Cargo on HOLD for inspection by CBSA - EDI350', line 3 - 'Equipment: [Equipment ID]', line 4 - 'Waybill: [Carrier][Origin Station][Waybill Number]', line 5 - 'CCN: [CCN]', line 6 - 'DESTINATION: [Destination Station Name], [State Code]', line 7 - 'MANIFEST UPON: [Manifest Station Name]'
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when hold notification email content has been prepared.
Trigger Criteria:
Context: The hold notification email content has been prepared
Applied to: - Filename: CAHOLD - To: OM01247
Action: The email routing is configured
Logic Flow:
IF The hold notification email content has been prepared
AND The email routing is configured
THEN:
• The system sets the destination filename to 'CAHOLD', sets the primary recipient to 'OM01247', and sets the message type indicator to HOLD
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when hold notification email has been prepared with routing parameters set to cahold destination and om01247 recipient.
Trigger Criteria:
Context: The hold notification email has been prepared with routing parameters set to CAHOLD destination and OM01247 recipient
Applied to: Send Email Notification via EMCSEND2
Action: The email send operation is invoked
Logic Flow:
IF The hold notification email has been prepared with routing parameters set to CAHOLD destination and OM01247 recipient
AND The email send operation is invoked
THEN:
• The system calls EMCSEND2 program to transmit the hold notification email with the prepared content and routing information
R-GCX126-cbl-00302 (+14)File: GCX126R.cblBusiness Rule: Process Deconsolidation Release
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when edi 350 message has been received and parsed with v9 segment containing notice reason code.
Trigger Criteria:
Context: An EDI 350 message has been received and parsed with V9 segment containing notice reason code
Applied to: V9 Notice Reason = DECON?
Action: The system evaluates the V9 notice reason code field
Logic Flow:
IF An EDI 350 message has been received and parsed with V9 segment containing notice reason code
AND The system evaluates the V9 notice reason code field
THEN:
• IfV9-02-DECON is true, proceed with deconsolidation release processing; otherwise, skip deconsolidation processing and continue to next evaluation
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists and v9 notice reason code indicates deconsolidation.
Trigger Criteria:
Context: A cargo record exists and V9 notice reason code indicates deconsolidation
Applied to: Set Release Information - Clear destination station - Set release date/time - Set release by user - Set status to RELEASED - Set release status 'R' - Set release type 'A' - Clear error fields
Action: The system processes the deconsolidation release
Logic Flow:
IF A cargo record exists and V9 notice reason code indicates deconsolidation
AND The system processes the deconsolidation release
THEN:
• Clear GCCC-DESTIN-STN-NUM-INDEXandGCCC-DESTIN-STN-NUM-FOR-INDEX to spaces, set GCCC-RELEASE-DATE to CC-MACHINE-DATE-X, set GCCC-RELEASE-TIME to CC-MACHINE-TIME-X, set GCCC-RELEASE-BY to CC-ACF2-USERID, set GCCC-CURRENT-STATUS to 'RELEASED', set GCCC-RELEASE-STATUS to 'R', set GCCC-RELEASE-TYPE to 'A', clear GCCC-RELEASE-REASON to spaces, clear GCCC-ERR-OR-REL-STATUS-INDEX to spaces, and clear GCCC-ERROR-STATUS to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when deconsolidation release information has been set and p4 segment contains port code. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Deconsolidation release information has been set and P4 segment contains port code
Applied to: 'RELEASE VIA DECON AT PORT' + Port Code
Action: The system logs the deconsolidation release event
Logic Flow:
IF Deconsolidation release information has been set and P4 segment contains port code
AND The system logs the deconsolidation release event
THEN:
• Construct message 'EDI 350: RELEASE VIA DECON AT PORT ' concatenated with P4-01-PORT-CDE (first 4 characters), store in WS-GCX105-INFO-MSG, and perform Z150-LOG-CARGO-INFO-MSG to create audit log entry
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when p4 segment contains the port code where deconsolidation occurred.
Trigger Criteria:
Context: P4 segment contains the port code where deconsolidation occurred
Applied to: 'DECONSOLIDATION AT' + Port Code
Action: The system updates the release reason for deconsolidation
Logic Flow:
IF P4 segment contains the port code where deconsolidation occurred
AND The system updates the release reason for deconsolidation
THEN:
• Construct string 'DECONSOLIDATION AT ' concatenated with P4-01-PORT-CDE (first 4 characters) and store in GCCC-RELEASE-REASON field
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when canadian cargo has been released via deconsolidation with valid equipment car id and waybill number stored in ws-current-carid-key and save-waybill-index. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A Canadian cargo has been released via deconsolidation with valid equipment car ID and waybill number stored in WS-CURRENT-CARID-KEY and SAVE-WAYBILL-INDEX
Applied to: Process Associated US Manifest - Find US manifest by car ID and waybill - Log release message to US CCN - Reference Canadian CCN
Action: The system processes the associated US manifest
Logic Flow:
IF A Canadian cargo has been released via deconsolidation with valid equipment car ID and waybill number stored in WS-CURRENT-CARID-KEY and SAVE-WAYBILL-INDEX
AND The system processes the associated US manifest
THEN:
• Perform Z3300-GU-US-CARGO-BY-CARWB to retrieve US cargo by car ID and waybill, then perform Z3350-GN-US-CARGO-BY-CARWB until WS-US-MFST-FOUND is true orWS-EOF is true; if US manifest found and not EOF, perform Z200-MOVE-LOG-INFORMATION, construct GCX105-DATE from CC-MACHINE-CENTURYandCC-MACHINE-DATE-X, set GCX105-TIME to CC-MACHINE-TIME-X, set GCX105-ACTION-CODE to LOG-USE-INPUT-MESSAGE, set GCX105-TRAIN-OR-US-CCN to GCUSRT-US-CCN-KEY, set GCX105-US-CARGO to true, construct GCX105-MESSAGE as 'CDN CCN RLSED BY EDI 350: ' concatenated with GCCC-CCN-KEY, and perform Z300-SPAWN-GCT1051E
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo release date and time have been set in gccc-release-date and gccc-release-time.
Trigger Criteria:
Context: Cargo release date and time have been set in GCCC-RELEASE-DATE and GCCC-RELEASE-TIME
Applied to: Save Release Date/Time to Hold Variables
Action: The system saves the release date and time
Logic Flow:
IF Cargo release date and time have been set in GCCC-RELEASE-DATE and GCCC-RELEASE-TIME
AND The system saves the release date and time
THEN:
• Move GCCC-RELEASE-DATE to HOLD-DATEand move GCCC-RELEASE-TIME to HOLD-TIME
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record gccc-cargo-report-segment has been updated with release information.
Trigger Criteria:
Context: Cargo record GCCC-CARGO-REPORT-SEGMENT has been updated with release information
Applied to: Update Cargo Record - Replace cargo record in database
Action: The system updates the cargo record
Logic Flow:
IF Cargo record GCCC-CARGO-REPORT-SEGMENT has been updated with release information
AND The system updates the cargo record
THEN:
• Perform Z3100-REPL-CARGO which clears CC-STATUS-CODE, sets CC-ACCEPT-STATUS to spaces, and calls CIMS with REPL function code, GCCC-PCB, andGCCC-CARGO-REPORT-SEGMENT to replace the cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been updated with deconsolidation release information.
Trigger Criteria:
Context: A cargo record has been updated with deconsolidation release information
Applied to: Is Master Manifest?
Action: The system checks the manifest type
Logic Flow:
IF A cargo record has been updated with deconsolidation release information
AND The system checks the manifest type
THEN:
• IfGCCC-MASTER-MFST is true, proceed to process follower manifests; otherwise, end deconsolidation processing
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when current cargo is a master manifest that has been released via deconsolidation with gccc-ccn-key stored in gcb0rt-ccn-key. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Current cargo is a master manifest that has been released via deconsolidation with GCCC-CCN-KEY stored in GCB0RT-CCN-KEY
Applied to: Process Follower Manifests - Retrieve all follower manifests - Set release information for each - Log release message - Update release reason - Process US manifest - Update cargo record
Action: The system processes follower manifests
Logic Flow:
IF Current cargo is a master manifest that has been released via deconsolidation with GCCC-CCN-KEY stored in GCB0RT-CCN-KEY
AND The system processes follower manifests
THEN:
• Save GCCC-CARGO-REPORT-SEGMENT to WS-SAVE-GCSCCRT, set CC-ACCEPT-STATUS to 'GEGB', initialize WS-FOLLOWER-MANI-ARRAY to spaces, set WS-FOLLOWER-NOT-END-OF-DB to true, set I to 1; perform until WS-FOLLOWER-END-OF-DBor I > 100: call CIMS with GN, GCCC-PCB7, GCCC-CARGO-REPORT-SEGMENT, andCCRT-B0RT-SSAQ; ifCC-STATUS-CODE is space andGCCC-MASTER-MFST-CCN equals WS-SAVE-CCN: ifGCCC-FOLLOWER-MFST is true, move GCCC-CCN-KEY to WS-FOLLOWER-MANI(I) and add 1 to I; else set WS-FOLLOWER-END-OF-DB to true; subtract 1 from I; if I > 0, perform varying J from 1 by 1 until WS-FOLLOWER-MANI(I) is spaces or low-values or J > I: move WS-FOLLOWER-MANI(J) to KEY-VALUE of CCRT-SSAQandA2RT-SSAQ, perform Z3000-GHU-CARGO; ifWS-CARGO-FOUND: perform D110-SET-RELEASE-INFORMATION, construct WS-GCX105-INFO-MSG as 'EDI 350: RELEASE VIA DECON AT PORT ' concatenated with P4-01-PORT-CDE (first 4 characters), construct GCCC-RELEASE-REASON as 'DECONSOLIDATION AT ' concatenated with P4-01-PORT-CDE (first 4 characters), move GCCC-CCN-KEY to WS-CURRENT-CCN-KEY, perform Z150-LOG-CARGO-INFO-MSG, move GCCC-WAYBILL-KEY-FOR-INDEX to SAVE-WAYBILL-INDEX, move GCCC-EQUIPMENT-CAR to WS-CURRENT-CARID-KEY, perform D120-PROCESS-US-MFST, clear CC-STATUS-CODE, set CC-ACCEPT-STATUS to spaces, and call CIMS with REPL, GCCC-PCB, andGCCC-CARGO-REPORT-SEGMENT
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when master manifest ccn is stored in gcb0rt-ccn-key and ws-save-ccn. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A master manifest CCN is stored in GCB0RT-CCN-KEY and WS-SAVE-CCN
Applied to: Process Follower Manifests - Retrieve all follower manifests
Action: The system retrieves follower manifests
Logic Flow:
IF A master manifest CCN is stored in GCB0RT-CCN-KEY and WS-SAVE-CCN
AND The system retrieves follower manifests
THEN:
• Set CC-ACCEPT-STATUS to 'GEGB', initialize WS-FOLLOWER-MANI-ARRAY to spaces, set I to 1, set WS-FOLLOWER-NOT-END-OF-DB to true; perform until WS-FOLLOWER-END-OF-DB is true or I > 100: call CIMS with GN function, GCCC-PCB7, GCCC-CARGO-REPORT-SEGMENT, andCCRT-B0RT-SSAQ; ifCC-STATUS-CODE is space andGCCC-MASTER-MFST-CCN equals WS-SAVE-CCN: ifGCCC-FOLLOWER-MFST is true, move GCCC-CCN-KEY to WS-FOLLOWER-MANI(I) and add 1 to I; elseifCC-STATUS-CODE is not space orGCCC-MASTER-MFST-CCN does not equal WS-SAVE-CCN, set WS-FOLLOWER-END-OF-DB to true; subtract 1 from I after loop completes
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower manifest ccn is stored in ws-follower-mani(j) and cargo record has been retrieved. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Follower manifest CCN is stored in WS-FOLLOWER-MANI(J) and cargo record has been retrieved
Applied to: Process Follower Manifests - Set release information for each
Action: The system sets release information for the follower
Logic Flow:
IF Follower manifest CCN is stored in WS-FOLLOWER-MANI(J) and cargo record has been retrieved
AND The system sets release information for the follower
THEN:
• IfWS-CARGO-FOUND is true, perform D110-SET-RELEASE-INFORMATION which clears GCCC-DESTIN-STN-NUM-INDEXandGCCC-DESTIN-STN-NUM-FOR-INDEX to spaces, sets GCCC-RELEASE-DATE to CC-MACHINE-DATE-X, sets GCCC-RELEASE-TIME to CC-MACHINE-TIME-X, sets GCCC-RELEASE-BY to CC-ACF2-USERID, sets GCCC-CURRENT-STATUS to 'RELEASED', sets GCCC-RELEASE-STATUS to 'R', sets GCCC-RELEASE-TYPE to 'A', clears GCCC-RELEASE-REASON to spaces, clears GCCC-ERR-OR-REL-STATUS-INDEX to spaces, and clears GCCC-ERROR-STATUS to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower manifest has been found and release information has been set. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Follower manifest has been found and release information has been set
Applied to: Process Follower Manifests - Log release message
Action: The system logs the release message for the follower
Logic Flow:
IF Follower manifest has been found and release information has been set
AND The system logs the release message for the follower
THEN:
• Clear WS-GCX105-INFO-MSG to spaces, construct message 'EDI 350: RELEASE VIA DECON AT PORT ' concatenated with P4-01-PORT-CDE (first 4 characters) and store in WS-GCX105-INFO-MSG, move GCCC-CCN-KEY to WS-CURRENT-CCN-KEY, and perform Z150-LOG-CARGO-INFO-MSG
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower manifest has been found and p4 segment contains port code.
Trigger Criteria:
Context: Follower manifest has been found and P4 segment contains port code
Applied to: Process Follower Manifests - Update release reason
Action: The system updates the release reason for the follower
Logic Flow:
IF Follower manifest has been found and P4 segment contains port code
AND The system updates the release reason for the follower
THEN:
• Construct string 'DECONSOLIDATION AT ' concatenated with P4-01-PORT-CDE (first 4 characters) and store in GCCC-RELEASE-REASON field
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when follower manifest has been found with valid gccc-waybill-key-for-index and gccc-equipment-car. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Follower manifest has been found with valid GCCC-WAYBILL-KEY-FOR-INDEX and GCCC-EQUIPMENT-CAR
Applied to: Process Follower Manifests - Process US manifest
Action: The system processes the US manifest for the follower
Logic Flow:
IF Follower manifest has been found with valid GCCC-WAYBILL-KEY-FOR-INDEX and GCCC-EQUIPMENT-CAR
AND The system processes the US manifest for the follower
THEN:
• Move GCCC-WAYBILL-KEY-FOR-INDEX to SAVE-WAYBILL-INDEX, move GCCC-EQUIPMENT-CAR to WS-CURRENT-CARID-KEY, and perform D120-PROCESS-US-MFST which sets WS-US-MFST-NOT-FOUND to true, sets WS-NOT-EOF to true, performs Z3300-GU-US-CARGO-BY-CARWB, performs Z3350-GN-US-CARGO-BY-CARWB until WS-US-MFST-FOUNDorWS-EOF; if not EOF: performs Z200-MOVE-LOG-INFORMATION, constructs GCX105-DATE from CC-MACHINE-CENTURYandCC-MACHINE-DATE-X, sets GCX105-TIME to CC-MACHINE-TIME-X, sets GCX105-ACTION-CODE to LOG-USE-INPUT-MESSAGE, sets GCX105-TRAIN-OR-US-CCN to GCUSRT-US-CCN-KEY, sets GCX105-US-CARGO to true, constructs GCX105-MESSAGE as 'CDN CCN RLSED BY EDI 350: ' concatenated with GCCC-CCN-KEY, and performs Z300-SPAWN-GCT1051E
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower cargo record gccc-cargo-report-segment has been updated with release information. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Follower cargo record GCCC-CARGO-REPORT-SEGMENT has been updated with release information
Applied to: Process Follower Manifests - Update cargo record
Action: The system updates the follower cargo record
Logic Flow:
IF Follower cargo record GCCC-CARGO-REPORT-SEGMENT has been updated with release information
AND The system updates the follower cargo record
THEN:
• Clear CC-STATUS-CODE to spaces, set CC-ACCEPT-STATUS to spaces, and call CIMS with REPL function code, GCCC-PCB, andGCCC-CARGO-REPORT-SEGMENT to replace the cargo record
R-GCX126-cbl-00317 (+9)File: GCX126R.cblBusiness Rule: Set Release Information
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists in the system.
Trigger Criteria:
Context: A cargo record exists in the system
Applied to: Clear Destination Station Number
Action: The cargo is being released by customs
Logic Flow:
IF A cargo record exists in the system
AND The cargo is being released by customs
THEN:
• The destination station number index field is set to spaces and the destination station number for index field is set to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being released.
Trigger Criteria:
Context: A cargo record is being released
Applied to: Set Release Date to Current Machine Date & Set Release Time to Current Machine Time & Set Release By User to ACF2 User ID & Initialize Release Reason to Spaces & Clear Error/Release Status Index & Clear Error Status
Action: The release information is being set
Logic Flow:
IF A cargo record is being released
AND The release information is being set
THEN:
• The cargo release date field is populated with the current machine date in CCYYMMDD format
• The cargo release time field is populated with the current machine time in HHMMSS format
• The cargo release by field is populated with the current ACF2 user ID from the system
• The cargo release reason field is set to spaces
• The cargo error or release status index field is set to spaces
• The cargo error status field is set to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being released by customs.
Trigger Criteria:
Context: A cargo record is being released by customs
Applied to: Set Current Status to 'RELEASED' & Set Release Status to 'R'
Action: The release information is being set
Logic Flow:
IF A cargo record is being released by customs
AND The release information is being set
THEN:
• The cargo current status field is set to the literal value 'RELEASED'
• The cargo release status field is set to the character 'R'
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being released through edi 350 message processing.
Trigger Criteria:
Context: A cargo record is being released through EDI 350 message processing
Applied to: Set Release Type to 'A'
Action: The release information is being set
Logic Flow:
IF A cargo record is being released through EDI 350 message processing
AND The release information is being set
THEN:
• The cargo release type field is set to the character 'A'
R-GCX126-cbl-00327 (+16)File: GCX126R.cblBusiness Rule: Process Associated US Manifest
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when canadian cargo record has been processed with release or deconsolidation status.
Trigger Criteria:
Context: A Canadian cargo record has been processed with release or deconsolidation status
Applied to: Initialize US Manifest Search Flags
Action: The system initiates US manifest search process
Logic Flow:
IF A Canadian cargo record has been processed with release or deconsolidation status
AND The system initiates US manifest search process
THEN:
• US manifest found flag is set to false AND end of file flag is set to false
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when canadian cargo record with equipment car id and waybill index exists.
Trigger Criteria:
Context: A Canadian cargo record with equipment car ID and waybill index exists
Applied to: Car ID and Waybill Index
Action: The system prepares to search for US manifest
Logic Flow:
IF A Canadian cargo record with equipment car ID and waybill index exists
AND The system prepares to search for US manifest
THEN:
• US cargo search key car ID is set to current Canadian cargo equipment car ID AND US cargo search key waybill index is set to saved Canadian cargo waybill index
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when us cargo search keys are set with car id and waybill index.
Trigger Criteria:
Context: US cargo search keys are set with car ID and waybill index
Applied to: Retrieve First US Cargo Record by Car ID and Waybill
Action: The system executes first US cargo retrieval using car-waybill index with '>=' operator
Logic Flow:
IF US cargo search keys are set with car ID and waybill index
AND The system executes first US cargo retrieval using car-waybill index with '>=' operator
THEN:
• Database returns first US cargo record matching or exceeding the search criteria
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when first us cargo record retrieval has been attempted.
Trigger Criteria:
Context: First US cargo record retrieval has been attempted
Applied to: Database Status OK?
Action: Database status code is not spaces (indicating error)
Logic Flow:
IF First US cargo record retrieval has been attempted
AND Database status code is not spaces (indicating error)
THEN:
• End of file flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when us cargo record has been successfully retrieved from database.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved from database
Applied to: Car ID and Waybill Match?
Action: The system compares US cargo car ID (first 12 characters) with current car ID key AND compares US cargo waybill index with saved waybill index
Logic Flow:
IF A US cargo record has been successfully retrieved from database
AND The system compares US cargo car ID (first 12 characters) with current car ID key AND compares US cargo waybill index with saved waybill index
THEN:
• If both car ID and waybill match, proceed to deletion check ELSE set end of file flag to true
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record with matching car id and waybill has been retrieved.
Trigger Criteria:
Context: A US cargo record with matching car ID and waybill has been retrieved
Applied to: Cargo Deleted or TR Created?
Action: The system checks US cargo deletion status indicator OR train created indicator
Logic Flow:
IF A US cargo record with matching car ID and waybill has been retrieved
AND The system checks US cargo deletion status indicator OR train created indicator
THEN:
• If cargo is deleted OR train created indicator equals 'Y', skip this record and continue search ELSE set US manifest found flag to true
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record matches car id and waybill and is not deleted and does not have train created.
Trigger Criteria:
Context: A US cargo record matches car ID and waybill AND is not deleted AND does not have train created
Applied to: Set US Manifest Found Flag
Action: The system validates the US cargo record
Logic Flow:
IF A US cargo record matches car ID and waybill AND is not deleted AND does not have train created
AND The system validates the US cargo record
THEN:
• US manifest found flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when first us cargo retrieval and validation has completed.
Trigger Criteria:
Context: First US cargo retrieval and validation has completed
Applied to: US Manifest Found?
Action: The system checks US manifest found flag
Logic Flow:
IF First US cargo retrieval and validation has completed
AND The system checks US manifest found flag
THEN:
• If US manifest found flag is true, proceed to prepare log information ELSE retrieve next US cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when first us cargo record did not meet criteria or was not found.
Trigger Criteria:
Context: First US cargo record did not meet criteria or was not found
Applied to: Retrieve Next US Cargo Record by Car ID and Waybill
Action: The system executes next US cargo retrieval using car-waybill index with '>' operator
Logic Flow:
IF First US cargo record did not meet criteria or was not found
AND The system executes next US cargo retrieval using car-waybill index with '>' operator
THEN:
• Database returns next US cargo record in sequence
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when next us cargo record retrieval has been attempted.
Trigger Criteria:
Context: Next US cargo record retrieval has been attempted
Applied to: Database Status OK?
Action: Database status code is not spaces (indicating error)
Logic Flow:
IF Next US cargo record retrieval has been attempted
AND Database status code is not spaces (indicating error)
THEN:
• End of file flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when next us cargo record has been successfully retrieved from database.
Trigger Criteria:
Context: A next US cargo record has been successfully retrieved from database
Applied to: Car ID and Waybill Match?
Action: The system compares US cargo car ID (first 12 characters) with current car ID key AND compares US cargo waybill index with saved waybill index
Logic Flow:
IF A next US cargo record has been successfully retrieved from database
AND The system compares US cargo car ID (first 12 characters) with current car ID key AND compares US cargo waybill index with saved waybill index
THEN:
• If both car ID and waybill match, proceed to deletion check ELSE set end of file flag to true
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when next us cargo record with matching car id and waybill has been retrieved.
Trigger Criteria:
Context: A next US cargo record with matching car ID and waybill has been retrieved
Applied to: Cargo Deleted or TR Created?
Action: The system checks US cargo deletion status indicator OR train created indicator
Logic Flow:
IF A next US cargo record with matching car ID and waybill has been retrieved
AND The system checks US cargo deletion status indicator OR train created indicator
THEN:
• If cargo is deleted OR train created indicator equals 'Y', check for end of file to continue search ELSE set US manifest found flag to true
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when next us cargo record matches car id and waybill and is not deleted and does not have train created.
Trigger Criteria:
Context: A next US cargo record matches car ID and waybill AND is not deleted AND does not have train created
Applied to: Set US Manifest Found Flag
Action: The system validates the next US cargo record
Logic Flow:
IF A next US cargo record matches car ID and waybill AND is not deleted AND does not have train created
AND The system validates the next US cargo record
THEN:
• US manifest found flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record has been retrieved and validated.
Trigger Criteria:
Context: A US cargo record has been retrieved and validated
Applied to: End of File?
Action: The system checks end of file flag
Logic Flow:
IF A US cargo record has been retrieved and validated
AND The system checks end of file flag
THEN:
• If end of file flag is true, exit US manifest processing ELSE retrieve next US cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when valid us manifest record has been found.
Trigger Criteria:
Context: A valid US manifest record has been found
Applied to: - Current Date/Time - US CCN - Action Code: LOG-USE-INPUT-MESSAGE - Message Type: US Cargo
Action: The system prepares to log the release message
Logic Flow:
IF A valid US manifest record has been found
AND The system prepares to log the release message
THEN:
• Log date is set to current machine century and date AND log time is set to current machine time AND log CCN is set to US cargo CCN AND action code is set to LOG-USE-INPUT-MESSAGE AND cargo type indicator is set to US Cargo
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when log information has been prepared with us cargo details.
Trigger Criteria:
Context: Log information has been prepared with US cargo details
Applied to: 'CDN CCN RLSED BY EDI 350: ' + Canadian CCN
Action: The system builds the release message
Logic Flow:
IF Log information has been prepared with US cargo details
AND The system builds the release message
THEN:
• Message text is set to 'CDN CCN RLSED BY EDI 350: ' concatenated with Canadian cargo CCN key
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when release message has been built with all required log information.
Trigger Criteria:
Context: Release message has been built with all required log information
Applied to: Spawn GCT1051E Transaction to Log Message
Action: The system invokes GCT1051E logging transaction
Logic Flow:
IF Release message has been built with all required log information
AND The system invokes GCT1051E logging transaction
THEN:
• Log entry is created with date, time, US CCN, action code, cargo type, and release message
R-GCX126-cbl-00344 (+7)File: GCX126R.cblBusiness Rule: Process CSA Authorization
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when edi 350 message with v9 segment notice reason code indicating 'authorization to deliver' and the cargo record exists in the database and the cargo has csa indicator turned on (gccc-csa-ind-on is true).
Trigger Criteria:
Context: An EDI 350 message with V9 segment notice reason code indicating 'Authorization to Deliver' AND the cargo record exists in the database AND the cargo has CSA indicator turned ON (GCCC-CSA-IND-ON is true)
Applied to: Is Cargo CSA Manifest?
Action: The system processes the authorization to deliver message
Logic Flow:
IF An EDI 350 message with V9 segment notice reason code indicating 'Authorization to Deliver' AND the cargo record exists in the database AND the cargo has CSA indicator turned ON (GCCC-CSA-IND-ON is true)
AND The system processes the authorization to deliver message
THEN:
• The system logs the message 'EDI 350: ACCEPTED - CSA' AND sets the cargo current status to CSA-DLV (GCCC-STATUS-CSA-DLV) AND sets the CSA authorization to deliver received flag to TRUE (GCCC-CSA-AUTH-DELIVER-RECD) AND updates the cargo record in the database
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when edi 350 message with v9 segment notice reason code indicating 'authorization to deliver' and the cargo record exists in the database and the cargo has csa indicator turned off (gccc-csa-ind-on is false).
Trigger Criteria:
Context: An EDI 350 message with V9 segment notice reason code indicating 'Authorization to Deliver' AND the cargo record exists in the database AND the cargo has CSA indicator turned OFF (GCCC-CSA-IND-ON is false)
Applied to: Is Cargo CSA Manifest?
Action: The system processes the authorization to deliver message
Logic Flow:
IF An EDI 350 message with V9 segment notice reason code indicating 'Authorization to Deliver' AND the cargo record exists in the database AND the cargo has CSA indicator turned OFF (GCCC-CSA-IND-ON is false)
AND The system processes the authorization to deliver message
THEN:
• The system logs the message 'EDI 350: NOT ACCEPTED - NON-CSA' AND does not update the cargo record in the database
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo is a csa manifest (gccc-csa-ind-on is true) and an authorization to deliver message is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The cargo is a CSA manifest (GCCC-CSA-IND-ON is true) AND an authorization to deliver message is being processed
Applied to: 'EDI 350: ACCEPTED - CSA'
Action: The system logs the CSA acceptance
Logic Flow:
IF The cargo is a CSA manifest (GCCC-CSA-IND-ON is true) AND an authorization to deliver message is being processed
AND The system logs the CSA acceptance
THEN:
• The system creates a log message 'EDI 350: ACCEPTED - CSA' AND includes the current machine date in format CCYYMMDD AND includes the current machine time in format HHMMSS AND includes the current CCN key (WS-CURRENT-CCN-KEY) AND sets the cargo type indicator to CA-CARGO AND sets the action code to 'LOG-USE-INPUT-MESSAGE' AND spawns a GCT1051E log entry
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo is not a csa manifest (gccc-csa-ind-on is false) and an authorization to deliver message is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The cargo is not a CSA manifest (GCCC-CSA-IND-ON is false) AND an authorization to deliver message is being processed
Applied to: 'EDI 350: NOT ACCEPTED - NON-CSA'
Action: The system logs the non-CSA rejection
Logic Flow:
IF The cargo is not a CSA manifest (GCCC-CSA-IND-ON is false) AND an authorization to deliver message is being processed
AND The system logs the non-CSA rejection
THEN:
• The system creates a log message 'EDI 350: NOT ACCEPTED - NON-CSA' AND includes the current machine date in format CCYYMMDD AND includes the current machine time in format HHMMSS AND includes the current CCN key (WS-CURRENT-CCN-KEY) AND sets the cargo type indicator to CA-CARGO AND sets the action code to 'LOG-USE-INPUT-MESSAGE' AND spawns a GCT1051E log entry
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is a csa manifest and the authorization to deliver message has been accepted.
Trigger Criteria:
Context: The cargo is a CSA manifest AND the authorization to deliver message has been accepted
Applied to: Set Cargo Status to CSA-DLV
Action: The system updates the cargo status
Logic Flow:
IF The cargo is a CSA manifest AND the authorization to deliver message has been accepted
AND The system updates the cargo status
THEN:
• The system sets the cargo status indicator to GCCC-STATUS-CSA-DLV (CSA delivery authorized status)
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is a csa manifest and the authorization to deliver message has been accepted and the cargo status has been set to csa-dlv.
Trigger Criteria:
Context: The cargo is a CSA manifest AND the authorization to deliver message has been accepted AND the cargo status has been set to CSA-DLV
Applied to: Set CSA Authorization Deliver Flag to TRUE
Action: The system sets the authorization flag
Logic Flow:
IF The cargo is a CSA manifest AND the authorization to deliver message has been accepted AND the cargo status has been set to CSA-DLV
AND The system sets the authorization flag
THEN:
• The system sets the CSA authorization to deliver received flag (GCCC-CSA-AUTH-DELIVER-RECD) to TRUE
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo is a csa manifest and the authorization to deliver has been accepted and the cargo status has been set to csa-dlv and the csa authorization flag has been set to true.
Trigger Criteria:
Context: The cargo is a CSA manifest AND the authorization to deliver has been accepted AND the cargo status has been set to CSA-DLV AND the CSA authorization flag has been set to TRUE
Applied to: Update Cargo Record in Database
Action: The system updates the cargo record
Logic Flow:
IF The cargo is a CSA manifest AND the authorization to deliver has been accepted AND the cargo status has been set to CSA-DLV AND the CSA authorization flag has been set to TRUE
AND The system updates the cargo record
THEN:
• The system replaces the cargo record (GCCC-CARGO-REPORT-SEGMENT) in the database using the REPL function through the GCCC-PCB program control block
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when authorization to deliver message has been processed (either accepted for csa or rejected for non-csa).
Trigger Criteria:
Context: An authorization to deliver message has been processed (either accepted for CSA or rejected for non-CSA)
Applied to: End Process
Action: The system completes the authorization processing
Logic Flow:
IF An authorization to deliver message has been processed (either accepted for CSA or rejected for non-CSA)
AND The system completes the authorization processing
THEN:
• The system performs US manifest processing (D120-PROCESS-US-MFST) to update any associated US cargo records with the Canadian CCN release information
R-GCX126-cbl-00352 (+25)File: GCX126R.cblBusiness Rule: Process Follower Manifests
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when master manifest needs to be processed for follower manifests.
Trigger Criteria:
Context: A master manifest needs to be processed for follower manifests
Applied to: Initialize Follower Array, Set Index I = 1
Action: The follower manifest processing begins
Logic Flow:
IF A master manifest needs to be processed for follower manifests
AND The follower manifest processing begins
THEN:
• The follower manifest array is cleared to spaces and the processing index I is set to 1
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when master manifest ccn exists in the cargo report segment.
Trigger Criteria:
Context: A master manifest CCN exists in the cargo report segment
Applied to: Set Master CCN as Search Key
Action: Preparing to search for follower manifests
Logic Flow:
IF A master manifest CCN exists in the cargo report segment
AND Preparing to search for follower manifests
THEN:
• The master manifest CCN is set as the search key in the database query structure
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when database search key is set to the master manifest ccn.
Trigger Criteria:
Context: The database search key is set to the master manifest CCN
Applied to: Get Next Cargo Record from Database
Action: Retrieving follower manifests
Logic Flow:
IF The database search key is set to the master manifest CCN
AND Retrieving follower manifests
THEN:
• The system calls the database with Get Next function using the cargo PCB and qualified SSA for the master CCN key
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when database get next call has been executed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database Get Next call has been executed
Applied to: Database Status OK?
Action: The database returns a status code
Logic Flow:
IF A database Get Next call has been executed
AND The database returns a status code
THEN:
• If the status code is blank (spaces), the retrieval is successful; otherwise, set the end-of-database flag to true
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A cargo record has been successfully retrieved from the database
Applied to: Same Master CCN?
Action: Checking if the record is associated with the current master manifest
Logic Flow:
IF A cargo record has been successfully retrieved from the database
AND Checking if the record is associated with the current master manifest
THEN:
• If the master manifest CCN in the retrieved record equals the saved master CCN, continue processing; otherwise, set the end-of-database flag to true
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with matching master ccn has been retrieved.
Trigger Criteria:
Context: A cargo record with matching master CCN has been retrieved
Applied to: Is Follower Manifest?
Action: Evaluating the manifest type
Logic Flow:
IF A cargo record with matching master CCN has been retrieved
AND Evaluating the manifest type
THEN:
• If the cargo is a follower manifest (not a master manifest), store its CCN in the follower array; if it is a master manifest, skip to retrieve the next record
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower manifest has been identified.
Trigger Criteria:
Context: A follower manifest has been identified
Applied to: Store Follower CCN in Array Position I
Action: Storing the follower information
Logic Flow:
IF A follower manifest has been identified
AND Storing the follower information
THEN:
• The follower manifest CCN is moved to the follower array at position I
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when follower manifest ccn has been stored in the array.
Trigger Criteria:
Context: A follower manifest CCN has been stored in the array
Applied to: Increment Index I
Action: Preparing to process the next follower
Logic Flow:
IF A follower manifest CCN has been stored in the array
AND Preparing to process the next follower
THEN:
• The index I is incremented by 1
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when follower array index i has been incremented.
Trigger Criteria:
Context: The follower array index I has been incremented
Applied to: I > 100?
Action: Checking if more followers can be stored
Logic Flow:
IF The follower array index I has been incremented
AND Checking if more followers can be stored
THEN:
• If I is greater than 100, set the end-of-database flag to true; otherwise, continue retrieving more followers
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when either the database status is not ok, the master ccn does not match, or the follower limit of 100 is exceeded.
Trigger Criteria:
Context: Either the database status is not OK, the master CCN does not match, or the follower limit of 100 is exceeded
Applied to: Set End of Database Flag
Action: Terminating the follower retrieval loop
Logic Flow:
IF Either the database status is not OK, the master CCN does not match, or the follower limit of 100 is exceeded
AND Terminating the follower retrieval loop
THEN:
• The end-of-database flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower retrieval loop has completed.
Trigger Criteria:
Context: The follower retrieval loop has completed
Applied to: Calculate Total Follower Count = I - 1
Action: Determining how many followers were found
Logic Flow:
IF The follower retrieval loop has completed
AND Determining how many followers were found
THEN:
• The total follower count is calculated as I minus 1
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when total follower count has been calculated.
Trigger Criteria:
Context: The total follower count has been calculated
Applied to: Follower Count > 0?
Action: Deciding whether to process followers
Logic Flow:
IF The total follower count has been calculated
AND Deciding whether to process followers
THEN:
• If the follower count is less than or equal to 0, exit the process; otherwise, proceed to process each follower
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when at least one follower manifest exists in the array.
Trigger Criteria:
Context: At least one follower manifest exists in the array
Applied to: Initialize Loop Index J = 1
Action: Starting to process individual followers
Logic Flow:
IF At least one follower manifest exists in the array
AND Starting to process individual followers
THEN:
• The loop index J is initialized to 1
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when loop index j points to a valid array position.
Trigger Criteria:
Context: The loop index J points to a valid array position
Applied to: Get Follower CCN from Array Position J
Action: Processing a specific follower manifest
Logic Flow:
IF The loop index J points to a valid array position
AND Processing a specific follower manifest
THEN:
• The follower CCN at array position J is retrieved and set as the search key
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when follower ccn has been retrieved from the array. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A follower CCN has been retrieved from the array
Applied to: Lookup Follower Cargo by CCN
Action: Accessing the follower cargo details
Logic Flow:
IF A follower CCN has been retrieved from the array
AND Accessing the follower cargo details
THEN:
• The system performs a Get Hold Unique call to retrieve the follower cargo record using the CCN as the key
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when database lookup has been performed for the follower ccn.
Trigger Criteria:
Context: A database lookup has been performed for the follower CCN
Applied to: Follower Cargo Found?
Action: Checking the retrieval result
Logic Flow:
IF A database lookup has been performed for the follower CCN
AND Checking the retrieval result
THEN:
• If the cargo is found (status indicates found), proceed with release processing; otherwise, skip to the next follower
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when follower cargo record has been found.
Trigger Criteria:
Context: A follower cargo record has been found
Applied to: Clear Destination Station, Set Release Date/Time, Set Release By User, Set Status to RELEASED, Clear Error Fields
Action: Applying release information to the follower
Logic Flow:
IF A follower cargo record has been found
AND Applying release information to the follower
THEN:
• The destination station numbers are cleared to spaces, release date is set to current machine date, release time is set to current machine time, release by is set to current user ID, current status is set to 'RELEASED', release status is set to 'R', release type is set to 'A', error/release status index is cleared to spaces, and error status is cleared to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when release information has been set for the follower.
Trigger Criteria:
Context: Release information has been set for the follower
Applied to: Notice Reason?
Action: Determining the type of release
Logic Flow:
IF Release information has been set for the follower
AND Determining the type of release
THEN:
• If the notice reason code indicates 'Released', log a standard release message; if it indicates 'Decon', log a deconsolidation release message
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when notice reason code indicates a standard release.
Trigger Criteria:
Context: The notice reason code indicates a standard release
Applied to: 'EDI 350: RELEASE' with Release Ref and Port
Action: Logging the release action
Logic Flow:
IF The notice reason code indicates a standard release
AND Logging the release action
THEN:
• A message is logged with the text 'EDI 350: RELEASE : ' concatenated with the release reference ID (first 15 characters) and ' AT PORT ' concatenated with the port code (first 4 characters)
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when standard release message has been logged.
Trigger Criteria:
Context: A standard release message has been logged
Applied to: Release Ref / Port Code
Action: Recording the release reason
Logic Flow:
IF A standard release message has been logged
AND Recording the release reason
THEN:
• The release reason field is set to the release reference ID (first 15 characters) concatenated with '/' and the port code (first 4 characters)
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when notice reason code indicates a deconsolidation release.
Trigger Criteria:
Context: The notice reason code indicates a deconsolidation release
Applied to: 'EDI 350: RELEASE VIA DECON AT PORT' with Port
Action: Logging the deconsolidation action
Logic Flow:
IF The notice reason code indicates a deconsolidation release
AND Logging the deconsolidation action
THEN:
• A message is logged with the text 'EDI 350: RELEASE VIA DECON AT PORT ' concatenated with the port code (first 4 characters)
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when deconsolidation release message has been logged.
Trigger Criteria:
Context: A deconsolidation release message has been logged
Applied to: 'DECONSOLIDATION AT' Port
Action: Recording the deconsolidation reason
Logic Flow:
IF A deconsolidation release message has been logged
AND Recording the deconsolidation reason
THEN:
• The release reason field is set to 'DECONSOLIDATION AT ' concatenated with the port code (first 4 characters)
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when release reason has been set for the follower.
Trigger Criteria:
Context: The release reason has been set for the follower
Applied to: Process Associated US Manifest
Action: Processing related US cargo
Logic Flow:
IF The release reason has been set for the follower
AND Processing related US cargo
THEN:
• The US manifest processing routine is performed to search for and update US cargo records using the equipment car ID and waybill number
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when all release information has been set and us manifest has been processed.
Trigger Criteria:
Context: All release information has been set and US manifest has been processed
Applied to: Update Follower Cargo Record
Action: Persisting the changes to the database
Logic Flow:
IF All release information has been set and US manifest has been processed
AND Persisting the changes to the database
THEN:
• The system calls the database with Replace function to update the follower cargo record, with status code cleared to spaces and accept status set to blank
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when current follower has been processed.
Trigger Criteria:
Context: The current follower has been processed
Applied to: Increment Index J
Action: Moving to the next follower
Logic Flow:
IF The current follower has been processed
AND Moving to the next follower
THEN:
• The loop index J is incremented by 1
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when loop index j has been incremented.
Trigger Criteria:
Context: The loop index J has been incremented
Applied to: J <= Total Follower Count?
Action: Checking if processing should continue
Logic Flow:
IF The loop index J has been incremented
AND Checking if processing should continue
THEN:
• If J is less than or equal to the total follower count, continue processing the next follower; otherwise, exit the follower processing loop
R-GCX126-cbl-00378 (+10)File: GCX126R.cblBusiness Rule: Prepare Cargo Hold Email
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with a ccn (cargo control number).
Trigger Criteria:
Context: A cargo record with a CCN (Cargo Control Number)
Applied to: CCN starts with '6105'?
Action: The system evaluates whether to prepare a hold notification
Logic Flow:
IF A cargo record with a CCN (Cargo Control Number)
AND The system evaluates whether to prepare a hold notification
THEN:
• If the CCN starts with '6105', proceed to prepare the hold notification email; otherwise, skip the notification preparation
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo hold notification is being prepared for ccn starting with '6105'.
Trigger Criteria:
Context: A cargo hold notification is being prepared for CCN starting with '6105'
Applied to: 'Cargo on HOLD for inspection by CBSA - EDI350'
Action: The system constructs the notification message
Logic Flow:
IF A cargo hold notification is being prepared for CCN starting with '6105'
AND The system constructs the notification message
THEN:
• Set the first detail line to 'Cargo on HOLD for inspection by CBSA - EDI350'
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo hold notification message is being constructed.
Trigger Criteria:
Context: A cargo hold notification message is being constructed
Applied to: Blank
Action: The system formats the notification content
Logic Flow:
IF A cargo hold notification message is being constructed
AND The system formats the notification content
THEN:
• Set the second detail line to blank space
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo hold notification is being prepared with cargo equipment information available.
Trigger Criteria:
Context: A cargo hold notification is being prepared with cargo equipment information available
Applied to: Equipment ID
Action: The system constructs the notification details
Logic Flow:
IF A cargo hold notification is being prepared with cargo equipment information available
AND The system constructs the notification details
THEN:
• Set the third detail line to 'Equipment : ' followed by the equipment ID from the cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo hold notification is being prepared with waybill information available.
Trigger Criteria:
Context: A cargo hold notification is being prepared with waybill information available
Applied to: Waybill Number (Carrier + Origin Station + Waybill)
Action: The system constructs the notification details
Logic Flow:
IF A cargo hold notification is being prepared with waybill information available
AND The system constructs the notification details
THEN:
• Set the fourth detail line to 'Waybill : ' followed by the concatenated carrier code, origin station number, and waybill number from the cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo hold notification is being prepared with ccn information available.
Trigger Criteria:
Context: A cargo hold notification is being prepared with CCN information available
Applied to: CCN Number
Action: The system constructs the notification details
Logic Flow:
IF A cargo hold notification is being prepared with CCN information available
AND The system constructs the notification details
THEN:
• Set the fifth detail line to 'CCN : ' followed by the CCN key from the cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo hold notification is being prepared with destination information available.
Trigger Criteria:
Context: A cargo hold notification is being prepared with destination information available
Applied to: Destination Station Name and State
Action: The system constructs the notification details
Logic Flow:
IF A cargo hold notification is being prepared with destination information available
AND The system constructs the notification details
THEN:
• Set the sixth detail line to 'DESTINATION : ' followed by the destination station name, comma, space, and destination station state code from the cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo hold notification is being prepared with manifest station information available.
Trigger Criteria:
Context: A cargo hold notification is being prepared with manifest station information available
Applied to: Manifest Upon Station Name
Action: The system constructs the notification details
Logic Flow:
IF A cargo hold notification is being prepared with manifest station information available
AND The system constructs the notification details
THEN:
• Set the seventh detail line to 'MANIFEST UPON : ' followed by the manifest to station name from the cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo hold notification message has been fully constructed with all detail lines.
Trigger Criteria:
Context: A cargo hold notification message has been fully constructed with all detail lines
Applied to: Set Total Lines to 7
Action: The system finalizes the notification structure
Logic Flow:
IF A cargo hold notification message has been fully constructed with all detail lines
AND The system finalizes the notification structure
THEN:
• Set the line counter to 7 to indicate seven detail lines are included in the notification
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo hold notification has been prepared with all required details.
Trigger Criteria:
Context: A cargo hold notification has been prepared with all required details
Applied to: Set Email Type to HOLD
Action: The system categorizes the notification for routing
Logic Flow:
IF A cargo hold notification has been prepared with all required details
AND The system categorizes the notification for routing
THEN:
• Set the notification type indicator to HOLD type
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo hold notification has been fully prepared with type set to hold and all detail lines populated. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo hold notification has been fully prepared with type set to HOLD and all detail lines populated
Applied to: Call Email Preparation Routine
Action: The system is ready to send the notification
Logic Flow:
IF A cargo hold notification has been fully prepared with type set to HOLD and all detail lines populated
AND The system is ready to send the notification
THEN:
• Call the email preparation routine (Z110-PREP-EMCSEND) to process and send the notification
Business Justification: Establishes the required business protocol to be followed when customs error message needs to be sent for a cargo.
Trigger Criteria:
Context: A customs error message needs to be sent for a cargo
Applied to: Set Email Subject, Append CCN to Subject
Action: The error email preparation process is initiated
Logic Flow:
IF A customs error message needs to be sent for a cargo
AND The error email preparation process is initiated
THEN:
• The email subject is set to 'CUSTOMS RECEIVED ERR MSG' concatenated with the cargo CCN key
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email recipient configuration exists in the system.
Trigger Criteria:
Context: Email recipient configuration exists in the system
Applied to: Save Current Email Recipients, Clear Email Recipients
Action: Error email preparation begins
Logic Flow:
IF Email recipient configuration exists in the system
AND Error email preparation begins
THEN:
• The current email recipient usercode and destination filename are saved to temporary storage and the email recipient usercode field is cleared to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when admin segment has been successfully retrieved and the admin segment found indicator is true.
Trigger Criteria:
Context: The admin segment has been successfully retrieved and the admin segment found indicator is true
Applied to: Admin Config Available?, Set Primary Recipient from Admin Config, Set Secondary Recipient from Admin Config
Action: Email recipients need to be configured for error notification
Logic Flow:
IF The admin segment has been successfully retrieved and the admin segment found indicator is true
AND Email recipients need to be configured for error notification
THEN:
• The first email recipient usercode is set to the primary Merlin user ID from admin table field AD-DC-P-MERLIN-1and the second email recipient usercode is set to the secondary Merlin user ID from admin table field AD-DC-P-MERLIN-5
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when admin segment was not successfully retrieved or the admin segment found indicator is false.
Trigger Criteria:
Context: The admin segment was not successfully retrieved or the admin segment found indicator is false
Applied to: Admin Config Available?, Set Default Recipient OM01247
Action: Email recipients need to be configured for error notification
Logic Flow:
IF The admin segment was not successfully retrieved or the admin segment found indicator is false
AND Email recipients need to be configured for error notification
THEN:
• The first email recipient usercode is set to the default value 'OM01247' and the second email recipient usercode is set to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when email keywords field is empty or contains low-values and cargo was found in the database with a non-empty ccn key.
Trigger Criteria:
Context: Email keywords field is empty or contains low-values and cargo was found in the database with a non-empty CCN key
Applied to: Set Email Keywords, Keywords Empty?, Cargo Found?, Use Cargo CCN as Keywords
Action: Email keywords need to be assigned
Logic Flow:
IF Email keywords field is empty or contains low-values and cargo was found in the database with a non-empty CCN key
AND Email keywords need to be assigned
THEN:
• The email keywords field is set to the cargo CCN key from the cargo report segment
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when email keywords field is empty or contains low-values and cargo was not found in the database.
Trigger Criteria:
Context: Email keywords field is empty or contains low-values and cargo was not found in the database
Applied to: Set Email Keywords, Keywords Empty?, Cargo Found?, Use Current CCN as Keywords
Action: Email keywords need to be assigned
Logic Flow:
IF Email keywords field is empty or contains low-values and cargo was not found in the database
AND Email keywords need to be assigned
THEN:
• The email keywords field is set to the current CCN key from working storage
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when error email has been prepared with subject and keywords. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An error email has been prepared with subject and keywords
Applied to: Set Destination Filename to CAERROR, Clear Email Recipients, Set Recipient to OM01247, Call Email Send Service
Action: The error email needs to be sent to the error monitoring destination
Logic Flow:
IF An error email has been prepared with subject and keywords
AND The error email needs to be sent to the error monitoring destination
THEN:
• The email destination filename is set to 'CAERROR', the email recipient usercode is cleared to spaces, the first email recipient usercode is set to 'OM01247', and the email send service is invoked with the configured parameters
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when error email has been successfully sent to caerror destination. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The error email has been successfully sent to CAERROR destination
Applied to: Set Destination Filename to IN, Clear Email Recipients, Set Recipient to OM01247, Call Email Send Service
Action: A copy of the error email needs to be sent to the general inbox
Logic Flow:
IF The error email has been successfully sent to CAERROR destination
AND A copy of the error email needs to be sent to the general inbox
THEN:
• The email destination filename is set to 'IN', the email recipient usercode is cleared to spaces, the first email recipient usercode is set to 'OM01247', and the email send service is invoked again with the configured parameters
R-GCX126-cbl-00397 (+6)File: GCX126R.cblBusiness Rule: Prepare Info Email
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when info email type notification needs to be prepared.
Trigger Criteria:
Context: An info email type notification needs to be prepared
Applied to: Set Email Subject to 'BROKER/MANIFEST MISMATCH' with CCN
Action: The system is setting up the email subject for a broker/manifest mismatch scenario
Logic Flow:
IF An info email type notification needs to be prepared
AND The system is setting up the email subject for a broker/manifest mismatch scenario
THEN:
• The email subject is set to 'BROKER/MANIFEST MISMATCH ' concatenated with the cargo CCN key
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when info email notification is being prepared.
Trigger Criteria:
Context: An info email notification is being prepared
Applied to: Set Email Recipient to OM01247
Action: The email recipient needs to be set
Logic Flow:
IF An info email notification is being prepared
AND The email recipient needs to be set
THEN:
• The email recipient user code is set to 'OM01247' in the first position of the recipient array and the email TO usercode field is cleared
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when info email notification is being prepared.
Trigger Criteria:
Context: An info email notification is being prepared
Applied to: Set Destination Filename to 'IN'
Action: The destination filename needs to be set for routing
Logic Flow:
IF An info email notification is being prepared
AND The destination filename needs to be set for routing
THEN:
• The email destination filename is set to 'IN'
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email keywords field is empty or contains low-values and cargo record was found in the database and cargo ccn key is not empty.
Trigger Criteria:
Context: Email keywords field is empty or contains low-values AND cargo record was found in the database AND cargo CCN key is not empty
Applied to: Use Cargo CCN as Keywords
Action: The system needs to set email keywords
Logic Flow:
IF Email keywords field is empty or contains low-values AND cargo record was found in the database AND cargo CCN key is not empty
AND The system needs to set email keywords
THEN:
• The email keywords field is populated with the cargo CCN key from the cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email keywords field is empty or contains low-values and (cargo record was not found or cargo ccn key is empty).
Trigger Criteria:
Context: Email keywords field is empty or contains low-values AND (cargo record was not found OR cargo CCN key is empty)
Applied to: Use Current CCN Key as Keywords
Action: The system needs to set email keywords
Logic Flow:
IF Email keywords field is empty or contains low-values AND (cargo record was not found OR cargo CCN key is empty)
AND The system needs to set email keywords
THEN:
• The email keywords field is populated with the current CCN key from working storage
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when email subject is set to 'broker/manifest mismatch' with ccn and email recipient is set to 'om01247' and destination filename is set to 'in' and email keywords are populated. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Email subject is set to 'BROKER/MANIFEST MISMATCH' with CCN AND email recipient is set to 'OM01247' AND destination filename is set to 'IN' AND email keywords are populated
Applied to: Call EMCSEND2 to Send Email
Action: The system calls the email sending service EMCSEND2
Logic Flow:
IF Email subject is set to 'BROKER/MANIFEST MISMATCH' with CCN AND email recipient is set to 'OM01247' AND destination filename is set to 'IN' AND email keywords are populated
AND The system calls the email sending service EMCSEND2
THEN:
• The email is sent with from-usercode 'OM01247', destination filename 'IN', recipient usercode 'OM01247', the prepared subject line, keywords, and the 350 report message content
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email notification has been successfully sent via emcsend2. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email notification has been successfully sent via EMCSEND2
Applied to: Reset Email Report Fields
Action: The system performs post-send cleanup
Logic Flow:
IF An email notification has been successfully sent via EMCSEND2
AND The system performs post-send cleanup
THEN:
• The 350 report area is cleared, line counter is reset to zero, email subject is cleared, destination filename is reset to 'IN', email keywords are cleared, machine sequence number is incremented by 1, copy usercode is cleared, TO usercode is cleared, and recipient usercodes are reset to configured values from admin table or default 'OM01247'
Business Justification: Dictates the expected operational logic and validation steps when edi 350 release message is received with notice reason code indicating released status and the ccn from m10 segment does not exist in the cargo database.
Trigger Criteria:
Context: An EDI 350 release message is received with notice reason code indicating RELEASED status AND the CCN from M10 segment does not exist in the cargo database
Applied to: Prepare Release Error Email
Action: The system attempts to process the release notification
Logic Flow:
IF An EDI 350 release message is received with notice reason code indicating RELEASED status AND the CCN from M10 segment does not exist in the cargo database
AND The system attempts to process the release notification
THEN:
• Prepare email notification with subject 'UNKNOWN EDI 350 RELEASE FROM CBSA' AND message line 1 contains 'UNKNOWN EDI 350 RELEASE FROM CBSA' followed by the CCN AND message line 3 contains 'THIS CCN WAS NOT FOUND.' AND message line 4 contains 'RELEASE NUMBER: ' followed by the CBSA release reference ID and ' DONE BY PORT ' followed by the port code AND set message line count to 5 AND set destination filename to 'UNKNOWN' AND set recipient to 'OM01247' AND route the notification
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when edi 350 message is received with notice reason code indicating decon status and the ccn from m10 segment does not exist in the cargo database.
Trigger Criteria:
Context: An EDI 350 message is received with notice reason code indicating DECON status AND the CCN from M10 segment does not exist in the cargo database
Applied to: Prepare Deconsolidation Error Email
Action: The system attempts to process the deconsolidation notification
Logic Flow:
IF An EDI 350 message is received with notice reason code indicating DECON status AND the CCN from M10 segment does not exist in the cargo database
AND The system attempts to process the deconsolidation notification
THEN:
• Prepare email notification with subject 'UNKNOWN EDI 350 DCON NOTICE' AND message line 1 contains 'UNKNOWN EDI 350 DCON NOTICE' followed by the CCN AND message line 3 contains 'THIS CCN WAS NOT FOUND.' AND message line 4 contains 'HOUSE BILL CLOSE NUMBER' followed by the CBSA release reference ID and ' DONE BY PORT ' followed by the port code AND set message line count to 5 AND set destination filename to 'UNKNOWN' AND set recipient to 'OM01247' AND route the notification
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when edi 350 message is received with a notice reason code that is not released or decon and the ccn from m10 segment does not exist in the cargo database.
Trigger Criteria:
Context: An EDI 350 message is received with a notice reason code that is not RELEASED or DECON AND the CCN from M10 segment does not exist in the cargo database
Applied to: Prepare General Entry Error Email
Action: The system attempts to process the notification
Logic Flow:
IF An EDI 350 message is received with a notice reason code that is not RELEASED or DECON AND the CCN from M10 segment does not exist in the cargo database
AND The system attempts to process the notification
THEN:
• Prepare email notification with subject from message line 1 AND message line 1 contains 'UNKNOWN EDI 350 ENTRY FROM CBSA' followed by the CCN AND message line 3 contains 'THIS CCN WAS NOT FOUND.' AND message line 4 contains 'NOTICE DOC TYPE: ' followed by the notice document type code and ' WITH REASON CODE ' followed by the notice reason code AND set message line count to 5 AND set destination filename to 'UNKNOWN' AND set recipient to 'OM01247' AND route the notification
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when edi 350 message has been received and the ccn does not exist in the cargo database.
Trigger Criteria:
Context: An EDI 350 message has been received AND the CCN does not exist in the cargo database
Applied to: Check Notice Reason Code
Action: The system evaluates the V9 segment notice reason code
Logic Flow:
IF An EDI 350 message has been received AND the CCN does not exist in the cargo database
AND The system evaluates the V9 segment notice reason code
THEN:
• If notice reason code indicates RELEASED then prepare release error notification OR if notice reason code indicates DECON then prepare deconsolidation error notification OR if notice reason code is any other value then prepare general entry error notification
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when unknown cargo notification has been prepared with all message details.
Trigger Criteria:
Context: An unknown cargo notification has been prepared with all message details
Applied to: UNKNOWN
Action: The system configures routing parameters
Logic Flow:
IF An unknown cargo notification has been prepared with all message details
AND The system configures routing parameters
THEN:
• Set the destination filename to 'UNKNOWN' to route the message to the unknown message queue
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when unknown cargo notification has been prepared and the destination filename has been set to 'unknown'.
Trigger Criteria:
Context: An unknown cargo notification has been prepared AND the destination filename has been set to 'UNKNOWN'
Applied to: OM01247
Action: The system assigns the notification recipient
Logic Flow:
IF An unknown cargo notification has been prepared AND the destination filename has been set to 'UNKNOWN'
AND The system assigns the notification recipient
THEN:
• Set the recipient user code to 'OM01247' as the default operations mailbox
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when unknown cargo notification has been fully prepared with subject, message lines, destination filename set to 'unknown', and recipient set to 'om01247'. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An unknown cargo notification has been fully prepared with subject, message lines, destination filename set to 'UNKNOWN', and recipient set to 'OM01247'
Applied to: Call Email Send Process
Action: The system invokes the email send process
Logic Flow:
IF An unknown cargo notification has been fully prepared with subject, message lines, destination filename set to 'UNKNOWN', and recipient set to 'OM01247'
AND The system invokes the email send process
THEN:
• Call the email notification service with all prepared notification parameters to deliver the message to the recipient
R-GCX126-cbl-00411 (+13)File: GCX126R.cblBusiness Rule: Prepare Hold Email
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists with a ccn (cargo control number), equipment id, waybill information (carrier, origin station, waybill number), destination station details (name and state code), and manifest station name.
Trigger Criteria:
Context: A cargo record exists with a CCN (Cargo Control Number), equipment ID, waybill information (carrier, origin station, waybill number), destination station details (name and state code), and manifest station name
Applied to: CCN starts with '6105'?
Action: The cargo status is set to HELD and the CCN starts with '6105'
Logic Flow:
IF A cargo record exists with a CCN (Cargo Control Number), equipment ID, waybill information (carrier, origin station, waybill number), destination station details (name and state code), and manifest station name
AND The cargo status is set to HELD and the CCN starts with '6105'
THEN:
• The system prepares a hold notification email with subject 'CBSA CARGO HOLD - [CCN]', body containing cargo on hold message, equipment details, waybill information, CCN, destination station, and manifest upon station, and routes it to recipient OM01247 with destination filename CAHOLD
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with a ccn that does not start with '6105'.
Trigger Criteria:
Context: A cargo record exists with a CCN that does not start with '6105'
Applied to: CCN starts with '6105'?
Action: The cargo status is set to HELD
Logic Flow:
IF A cargo record exists with a CCN that does not start with '6105'
AND The cargo status is set to HELD
THEN:
• The system skips the hold notification email preparation and continues processing without sending a hold notification
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with a valid ccn that starts with '6105'.
Trigger Criteria:
Context: A cargo record with a valid CCN that starts with '6105'
Applied to: 'CBSA CARGO HOLD - ' + CCN
Action: The hold notification email is being prepared
Logic Flow:
IF A cargo record with a valid CCN that starts with '6105'
AND The hold notification email is being prepared
THEN:
• The system creates the email subject by combining 'CBSA CARGO HOLD - ' with the CCN value
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when hold notification email is being prepared.
Trigger Criteria:
Context: A hold notification email is being prepared
Applied to: 'Cargo on HOLD for inspection by CBSA - EDI350'
Action: The email body content is being constructed
Logic Flow:
IF A hold notification email is being prepared
AND The email body content is being constructed
THEN:
• The system adds 'Cargo on HOLD for inspection by CBSA - EDI350' as the first detail line in the email body
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when primary hold message has been added to the email body.
Trigger Criteria:
Context: The primary hold message has been added to the email body
Applied to: Blank
Action: The email body content is being constructed
Logic Flow:
IF The primary hold message has been added to the email body
AND The email body content is being constructed
THEN:
• The system adds a blank line as the second line in the email body
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with equipment id information.
Trigger Criteria:
Context: A cargo record with equipment ID information
Applied to: 'Equipment: ' + Equipment ID
Action: The email body content is being constructed
Logic Flow:
IF A cargo record with equipment ID information
AND The email body content is being constructed
THEN:
• The system adds a line containing 'Equipment : ' followed by the equipment ID value as the third line in the email body
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with waybill information including carrier code, origin station number, and waybill number.
Trigger Criteria:
Context: A cargo record with waybill information including carrier code, origin station number, and waybill number
Applied to: 'Waybill: ' + Carrier + Origin Station + Waybill Number
Action: The email body content is being constructed
Logic Flow:
IF A cargo record with waybill information including carrier code, origin station number, and waybill number
AND The email body content is being constructed
THEN:
• The system adds a line containing 'Waybill : ' followed by the concatenated carrier code, origin station number, and waybill number as the fourth line in the email body
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with a ccn key.
Trigger Criteria:
Context: A cargo record with a CCN key
Applied to: 'CCN: ' + CCN Key
Action: The email body content is being constructed
Logic Flow:
IF A cargo record with a CCN key
AND The email body content is being constructed
THEN:
• The system adds a line containing 'CCN : ' followed by the CCN key value as the fifth line in the email body
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with destination station name and state code.
Trigger Criteria:
Context: A cargo record with destination station name and state code
Applied to: 'DESTINATION: ' + Destination Station Name + State Code
Action: The email body content is being constructed
Logic Flow:
IF A cargo record with destination station name and state code
AND The email body content is being constructed
THEN:
• The system adds a line containing 'DESTINATION : ' followed by the destination station name, ', ', and state code as the sixth line in the email body
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with manifest to station name.
Trigger Criteria:
Context: A cargo record with manifest to station name
Applied to: 'MANIFEST UPON: ' + Manifest To Station Name
Action: The email body content is being constructed
Logic Flow:
IF A cargo record with manifest to station name
AND The email body content is being constructed
THEN:
• The system adds a line containing 'MANIFEST UPON : ' followed by the manifest to station name as the seventh line in the email body
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when hold notification email has been prepared with all cargo details.
Trigger Criteria:
Context: A hold notification email has been prepared with all cargo details
Applied to: OM01247
Action: The email routing information is being configured
Logic Flow:
IF A hold notification email has been prepared with all cargo details
AND The email routing information is being configured
THEN:
• The system sets the email recipient to 'OM01247'
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when hold notification email has been prepared with recipient information.
Trigger Criteria:
Context: A hold notification email has been prepared with recipient information
Applied to: CAHOLD
Action: The email routing information is being configured
Logic Flow:
IF A hold notification email has been prepared with recipient information
AND The email routing information is being configured
THEN:
• The system sets the destination filename to 'CAHOLD'
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when hold notification email has been prepared with all cargo details and routing information.
Trigger Criteria:
Context: A hold notification email has been prepared with all cargo details and routing information
Applied to: 7
Action: The email is ready to be sent
Logic Flow:
IF A hold notification email has been prepared with all cargo details and routing information
AND The email is ready to be sent
THEN:
• The system sets the line count to 7 indicating the number of detail lines in the email body
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when hold notification email has been fully prepared with subject, body content, recipient om01247, destination filename cahold, and line count 7. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A hold notification email has been fully prepared with subject, body content, recipient OM01247, destination filename CAHOLD, and line count 7
Applied to: Call Email Send Process
Action: All email preparation is complete
Logic Flow:
IF A hold notification email has been fully prepared with subject, body content, recipient OM01247, destination filename CAHOLD, and line count 7
AND All email preparation is complete
THEN:
• The system calls the email send preparation process (Z110-PREP-EMCSEND) to deliver the notification
Business Justification: Ensures correct system behavior and process compliance when email parameters are prepared with from usercode, destination filename, to usercode, copy usercode, subject, keywords, and report content. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Email parameters are prepared with FROM usercode, destination filename, TO usercode, COPY usercode, subject, keywords, and report content
Applied to: Call EMCSEND2 to Send Email
Action: EMCSEND2 is called with these parameters
Logic Flow:
IF Email parameters are prepared with FROM usercode, destination filename, TO usercode, COPY usercode, subject, keywords, and report content
AND EMCSEND2 is called with these parameters
THEN:
• The email is transmitted through the messaging system
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when email has been sent successfully through emcsend2 and the return status flag indicates no errors.
Trigger Criteria:
Context: An email has been sent successfully through EMCSEND2 and the return status flag indicates no errors
Applied to: Purge IMS Message Queue
Action: The email send operation completes without errors
Logic Flow:
IF An email has been sent successfully through EMCSEND2 and the return status flag indicates no errors
AND The email send operation completes without errors
THEN:
• The system calls CIMS with PURG function to purge the alternate PCB message queue
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when email send attempt has been made through emcsend2.
Trigger Criteria:
Context: An email send attempt has been made through EMCSEND2
Applied to: Invalid FROM User
Action: The return status flag indicates FROM user not found
Logic Flow:
IF An email send attempt has been made through EMCSEND2
AND The return status flag indicates FROM user not found
THEN:
• The system sets error message 'EMI - INVALID MERLIN FROM' and calls CERR to abort the program
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when email send attempt has been made through emcsend2.
Trigger Criteria:
Context: An email send attempt has been made through EMCSEND2
Applied to: Invalid Filename
Action: The return status flag indicates filename is invalid
Logic Flow:
IF An email send attempt has been made through EMCSEND2
AND The return status flag indicates filename is invalid
THEN:
• The system sets error message 'EMI - INVALID MERLIN FILENAME' and calls CERR to abort the program
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when email send attempt has failed because to or copy usercode was not found. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email send attempt has failed because TO or COPY usercode was not found
Applied to: Resend Failed Email to OM01247
Action: The return status flag indicates TO or COPY user not found
Logic Flow:
IF An email send attempt has failed because TO or COPY usercode was not found
AND The return status flag indicates TO or COPY user not found
THEN:
• The system clears TO usercode, sets TO usercode to OM01247, sets destination filename to IN, and calls the resend email procedure
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when email send attempt has failed because to or copy usercode was not found. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email send attempt has failed because TO or COPY usercode was not found
Applied to: Resend Failed Email to OM01247
Action: The system determines which recipient was invalid based on message type
Logic Flow:
IF An email send attempt has failed because TO or COPY usercode was not found
AND The system determines which recipient was invalid based on message type
THEN:
• If message type is UNRLSE, store the second TO usercode as the bad Merlin ID, otherwise store the first TO usercode as the bad Merlin ID
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when email has been successfully rerouted to om01247 after the original recipient was not found and the resend operation returned no errors.
Trigger Criteria:
Context: An email has been successfully rerouted to OM01247 after the original recipient was not found and the resend operation returned no errors
Applied to: Resend Failed Email to OM01247
Action: The rerouted email send completes successfully
Logic Flow:
IF An email has been successfully rerouted to OM01247 after the original recipient was not found and the resend operation returned no errors
AND The rerouted email send completes successfully
THEN:
• The system clears the subject, constructs a new subject containing the invalid Merlin ID and text 'INVALID MERLIN TO - REPORT REROUTE', and calls the resend email procedure again
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when email is being resent to the default user om01247 after initial recipient failure. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email is being resent to the default user OM01247 after initial recipient failure
Applied to: Resend Failed Email to OM01247
Action: The resend operation return status flag indicates TO or COPY user not found
Logic Flow:
IF An email is being resent to the default user OM01247 after initial recipient failure
AND The resend operation return status flag indicates TO or COPY user not found
THEN:
• The system sets error message 'EMI - INVALID MERLIN TO OR COPY' and calls CERR to abort the program
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email is being resent after initial failure.
Trigger Criteria:
Context: An email is being resent after initial failure
Applied to: Resend Failed Email to OM01247
Action: The resend operation return status flag indicates FROM user not found
Logic Flow:
IF An email is being resent after initial failure
AND The resend operation return status flag indicates FROM user not found
THEN:
• The system sets error message 'EMI - INVALID MERLIN FROM' and calls CERR to abort the program
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email is being resent after initial failure.
Trigger Criteria:
Context: An email is being resent after initial failure
Applied to: Resend Failed Email to OM01247
Action: The resend operation return status flag indicates filename is invalid
Logic Flow:
IF An email is being resent after initial failure
AND The resend operation return status flag indicates filename is invalid
THEN:
• The system sets error message 'EMI - INVALID MERLIN FILENAME' and calls CERR to abort the program
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when email send operation has completed through emcsend2. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email send operation has completed through EMCSEND2
Applied to: Call EMCSEND2 to Send Email
Action: The email processing finishes regardless of success or reroute
Logic Flow:
IF An email send operation has completed through EMCSEND2
AND The email processing finishes regardless of success or reroute
THEN:
• The system adds 1 to the formatted machine sequence number
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when email has been resent successfully and the return status flag indicates no errors.
Trigger Criteria:
Context: An email has been resent successfully and the return status flag indicates no errors
Applied to: Resend Failed Email to OM01247
Action: The resend operation completes without errors
Logic Flow:
IF An email has been resent successfully and the return status flag indicates no errors
AND The resend operation completes without errors
THEN:
• The system calls CIMS with PURG function to purge the alternate PCB message queue
Business Justification: Establishes the required business protocol to be followed when email send operation has failed with error status emi-to-or-copy-not-found. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email send operation has failed with error status EMI-TO-OR-COPY-NOT-FOUND
Applied to: Email Send Failed
Action: The system detects the recipient not found error
Logic Flow:
IF An email send operation has failed with error status EMI-TO-OR-COPY-NOT-FOUND
AND The system detects the recipient not found error
THEN:
• The system saves the invalid recipient ID, clears the TO recipient field, sets the TO recipient to OM01247, sets the destination filename to IN, resends the original email, andif successful, sends a reroute notification with subject containing the invalid Merlin ID and message 'INVALID MERLIN TO - REPORT REROUTE'
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when email send has failed with emi-to-or-copy-not-found error status. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email send has failed with EMI-TO-OR-COPY-NOT-FOUND error status
Applied to: Save Failed Recipient ID
Action: The system needs to identify the invalid recipient
Logic Flow:
IF An email send has failed with EMI-TO-OR-COPY-NOT-FOUND error status
AND The system needs to identify the invalid recipient
THEN:
• If the message type is unrelease (88-Z110-MRLN-TYPE-IS-UNRLSE), save EMI-TO-USERCODES(02) as the bad Merlin ID, otherwise save EMI-TO-USERCODES(01) as the bad Merlin ID
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when invalid recipient id has been saved to ws-bad-merlin-id. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The invalid recipient ID has been saved to WS-BAD-MERLIN-ID
Applied to: Clear Recipient Field
Action: The system prepares to resend the email
Logic Flow:
IF The invalid recipient ID has been saved to WS-BAD-MERLIN-ID
AND The system prepares to resend the email
THEN:
• Clear EMI-TO-USERCODE field to spaces, set EMI-TO-USERCODES(01) to OM01247, and set EMI-DESTINATION-FILENAME to IN
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when email recipients have been reset with emi-to-usercodes(01) set to om01247 and emi-destination-filename set to in. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Email recipients have been reset with EMI-TO-USERCODES(01) set to OM01247 and EMI-DESTINATION-FILENAME set to IN
Applied to: Call EMCSEND2 to Resend Email
Action: The system calls the Z116-RESEND-MERLIN procedure
Logic Flow:
IF Email recipients have been reset with EMI-TO-USERCODES(01) set to OM01247 and EMI-DESTINATION-FILENAME set to IN
AND The system calls the Z116-RESEND-MERLIN procedure
THEN:
• The system invokes EMCSEND2 program with all email parameters including FROM usercode, destination filename, TO usercode, COPY usercode, subject, keywords, report content, return status flag, segment numbers, and item type
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when emcsend2 program has been called to resend the email. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The EMCSEND2 program has been called to resend the email
Applied to: Resend Successful?
Action: The system evaluates the EMI-RETURN-STATUS-FLAG
Logic Flow:
IF The EMCSEND2 program has been called to resend the email
AND The system evaluates the EMI-RETURN-STATUS-FLAG
THEN:
• IfEMI-NO-ERRORS is true, proceed to prepare reroute notification; otherwiseifEMI-FROM-NOT-FOUND, abend with error 'EMI - INVALID MERLIN FROM'; ifEMI-TO-OR-COPY-NOT-FOUND, abend with error 'EMI - INVALID MERLIN TO OR COPY'; ifEMI-FILENAME-INVALID, abend with error 'EMI - INVALID MERLIN FILENAME'
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when email has been successfully resent to om01247 and ws-bad-merlin-id contains the invalid recipient id. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The email has been successfully resent to OM01247 and WS-BAD-MERLIN-ID contains the invalid recipient ID
Applied to: Bad Merlin ID + INVALID MERLIN TO - REPORT REROUTE
Action: The system prepares the reroute notification
Logic Flow:
IF The email has been successfully resent to OM01247 and WS-BAD-MERLIN-ID contains the invalid recipient ID
AND The system prepares the reroute notification
THEN:
• Clear EMI-SUBJECT to spaces and build a new subject by concatenating WS-BAD-MERLIN-ID, a space, and the text 'INVALID MERLIN TO - REPORT REROUTE'
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when reroute notification subject has been built with the invalid merlin id and reroute message.
Trigger Criteria:
Context: The reroute notification subject has been built with the invalid Merlin ID and reroute message
Applied to: Send Reroute Notification Email
Action: The system calls the Z116-RESEND-MERLIN procedure again
Logic Flow:
IF The reroute notification subject has been built with the invalid Merlin ID and reroute message
AND The system calls the Z116-RESEND-MERLIN procedure again
THEN:
• The system invokes EMCSEND2 program with the reroute notification subject and all other email parameters to send the notification to OM01247
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when reroute notification email has been sent via emcsend2. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The reroute notification email has been sent via EMCSEND2
Applied to: Final Send Successful?
Action: The system evaluates the EMI-RETURN-STATUS-FLAG
Logic Flow:
IF The reroute notification email has been sent via EMCSEND2
AND The system evaluates the EMI-RETURN-STATUS-FLAG
THEN:
• IfEMI-NO-ERRORS is true, the reroute process completes successfully; ifEMI-FROM-NOT-FOUND, abend with error 'EMI - INVALID MERLIN FROM'; ifEMI-TO-OR-COPY-NOT-FOUND, abend with error 'EMI - INVALID MERLIN TO OR COPY'; ifEMI-FILENAME-INVALID, abend with error 'EMI - INVALID MERLIN FILENAME'
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when email has been successfully sent via emcsend2 with emi-no-errors status. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email has been successfully sent via EMCSEND2 with EMI-NO-ERRORS status
Applied to: Email Successfully Rerouted
Action: The Z116-RESEND-MERLIN procedure completes
Logic Flow:
IF An email has been successfully sent via EMCSEND2 with EMI-NO-ERRORS status
AND The Z116-RESEND-MERLIN procedure completes
THEN:
• Add 1 to WS-FMT-MACHINE-SEQ to increment the sequence number
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when email has been successfully sent with emi-no-errors status. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email has been successfully sent with EMI-NO-ERRORS status
Applied to: Email Successfully Rerouted
Action: The system completes the email send operation in Z116-RESEND-MERLIN
Logic Flow:
IF An email has been successfully sent with EMI-NO-ERRORS status
AND The system completes the email send operation in Z116-RESEND-MERLIN
THEN:
• Call CIMS program with PURG function code andALT-PCB to remove the message from the queue
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when emcsend2 program has returned with emi-from-not-found status. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The EMCSEND2 program has returned with EMI-FROM-NOT-FOUND status
Applied to: Invalid FROM User
Action: The system evaluates the return status in Z116-RESEND-MERLIN
Logic Flow:
IF The EMCSEND2 program has returned with EMI-FROM-NOT-FOUND status
AND The system evaluates the return status in Z116-RESEND-MERLIN
THEN:
• Move 'EMI - INVALID MERLIN FROM' to CC-ERROR-MESSAGEand call CERR program to abend the transaction
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when emcsend2 program has returned with emi-to-or-copy-not-found status. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The EMCSEND2 program has returned with EMI-TO-OR-COPY-NOT-FOUND status
Applied to: Invalid TO/COPY User
Action: The system evaluates the return status in Z116-RESEND-MERLIN
Logic Flow:
IF The EMCSEND2 program has returned with EMI-TO-OR-COPY-NOT-FOUND status
AND The system evaluates the return status in Z116-RESEND-MERLIN
THEN:
• Move 'EMI - INVALID MERLIN TO OR COPY' to CC-ERROR-MESSAGEand call CERR program to abend the transaction
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when emcsend2 program has returned with emi-filename-invalid status. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The EMCSEND2 program has returned with EMI-FILENAME-INVALID status
Applied to: Invalid Filename
Action: The system evaluates the return status in Z116-RESEND-MERLIN
Logic Flow:
IF The EMCSEND2 program has returned with EMI-FILENAME-INVALID status
AND The system evaluates the return status in Z116-RESEND-MERLIN
THEN:
• Move 'EMI - INVALID MERLIN FILENAME' to CC-ERROR-MESSAGEand call CERR program to abend the transaction
Business Justification: Governs the functional prerequisites and system routing when need to retrieve merlin contact information from the customs table.
Trigger Criteria:
Context: A need to retrieve Merlin contact information from the customs table
Applied to: Initialize Function Code to GU, Clear Key Values and Flags
Action: The Merlin contact fetch process is initiated
Logic Flow:
IF A need to retrieve Merlin contact information from the customs table
AND The Merlin contact fetch process is initiated
THEN:
• The function code should be set to 'GU' (Get Unique), all key values (GCSTBRT-KEY-VALUE, GCSTBDP-KEY-VALUE) should be cleared to spaces, the return flag (GCCTBIO-RETURN-FLAG) should be cleared to spaces, the MC segment (GCSTBRT-MC-SEGMENT) should be cleared to spaces, and both SECOND-PCB-FLAGandUNQUAL-SSA-FLAG should be cleared to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when retrieval parameters have been initialized.
Trigger Criteria:
Context: The retrieval parameters have been initialized
Applied to: Set Table ID to MC Customs Table
Action: Preparing to fetch Merlin contact information
Logic Flow:
IF The retrieval parameters have been initialized
AND Preparing to fetch Merlin contact information
THEN:
• The table identifier (GCSTBRT-KEY-TABLE-ID) should be set to 'MC-TABLE-ID' to identify the Merlin contact segment in the customs table
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when table identifier has been set to mc and a cargo record with manifest-to station name exists.
Trigger Criteria:
Context: The table identifier has been set to MC and a cargo record with manifest-to station name exists
Applied to: Set Sequence ID to Manifest-To Station Name
Action: Setting up the search criteria for Merlin contact
Logic Flow:
IF The table identifier has been set to MC and a cargo record with manifest-to station name exists
AND Setting up the search criteria for Merlin contact
THEN:
• The sequence ID (GCSTBRT-KEY-SEQID) should be set to the manifest-to station name (GCCC-MANIF-TO-STATION-NAME) from the cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when function code is 'gu', table id is 'mc', and sequence id is set to manifest-to station name. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The function code is 'GU', table ID is 'MC', and sequence ID is set to manifest-to station name
Applied to: Call GCCTBIO to Retrieve MC Segment
Action: The table I/O service is invoked
Logic Flow:
IF The function code is 'GU', table ID is 'MC', and sequence ID is set to manifest-to station name
AND The table I/O service is invoked
THEN:
• The GCCTBIO program should be called with parameters: CCCOM, SECOND-PCB-FLAG, UNQUAL-SSA-FLAG, GCCTBIO-FUNC-CODE, GCSTBRT-LIT, GCSTBRT-KEY-VALUE, GCSTBDP-KEY-VALUE, WS-TABLE-SEGMENT, andGCCTBIO-RETURN-FLAG to retrieve the MC segment
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when gcctbio service has been called to retrieve the mc segment. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The GCCTBIO service has been called to retrieve the MC segment
Applied to: Move Retrieved Segment to MC Segment Structure, Extract Merlin Email ID from MC Segment
Action: The return flag (GCCTBIO-RETURN-FLAG) equals '0' indicating successful retrieval
Logic Flow:
IF The GCCTBIO service has been called to retrieve the MC segment
AND The return flag (GCCTBIO-RETURN-FLAG) equals '0' indicating successful retrieval
THEN:
• The retrieved segment (WS-TABLE-SEGMENT) should be moved to the MC segment structure (GCSTBRT-MC-SEGMENT), making the Merlin email ID (GCSTBRT-MC-MERLIN-ID) available for use in notification routing
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when gcctbio service has been called to retrieve the mc segment.
Trigger Criteria:
Context: The GCCTBIO service has been called to retrieve the MC segment
Applied to: Clear MC Segment Set to Spaces
Action: The return flag (GCCTBIO-RETURN-FLAG) does not equal '0' indicating retrieval failure
Logic Flow:
IF The GCCTBIO service has been called to retrieve the MC segment
AND The return flag (GCCTBIO-RETURN-FLAG) does not equal '0' indicating retrieval failure
THEN:
• The MC segment structure (GCSTBRT-MC-SEGMENT) should be cleared to spaces, indicating that no Merlin email ID is available for the manifest-to station
R-GCX126-cbl-00456 (+11)File: GCX126R.cblBusiness Rule: Log Cargo Information Message
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when request to log cargo information message is received.
Trigger Criteria:
Context: A request to log cargo information message is received
Applied to: Prepare Log Information Structure
Action: The log information structure is being prepared
Logic Flow:
IF A request to log cargo information message is received
AND The log information structure is being prepared
THEN:
• The log input structure should be cleared to spaces, security byte should be set to HIGH-VALUE, sending transaction should be set to 'GCT1261E', and ACF2 user ID should be populated from the common control area
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when log information structure has been initialized with security and transaction details.
Trigger Criteria:
Context: The log information structure has been initialized with security and transaction details
Applied to: Format Date and Time
Action: Date and time formatting is performed
Logic Flow:
IF The log information structure has been initialized with security and transaction details
AND Date and time formatting is performed
THEN:
• The log date should be formatted by concatenating machine century and machine date, and the log time should be set to the machine time
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when date and time have been formatted for the log entry.
Trigger Criteria:
Context: Date and time have been formatted for the log entry
Applied to: Set CCN/Train ID
Action: The cargo or train identifier is being set
Logic Flow:
IF Date and time have been formatted for the log entry
AND The cargo or train identifier is being set
THEN:
• The current CCN key should be moved to the train or US CCN field in the log structure
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when ccn or train identifier has been set in the log structure.
Trigger Criteria:
Context: The CCN or train identifier has been set in the log structure
Applied to: Set Cargo Type - CA Cargo or US Cargo
Action: The cargo type is being determined
Logic Flow:
IF The CCN or train identifier has been set in the log structure
AND The cargo type is being determined
THEN:
• The cargo type indicator should be set to CA-CARGO to indicate this is a Canadian cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo type has been identified as canadian cargo.
Trigger Criteria:
Context: The cargo type has been identified as Canadian cargo
Applied to: Set Action Code to LOG-USE-INPUT-MESSAGE
Action: The action code is being assigned
Logic Flow:
IF The cargo type has been identified as Canadian cargo
AND The action code is being assigned
THEN:
• The action code should be set to LOG-USE-INPUT-MESSAGE to indicate this is an input message log
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when action code has been set to log-use-input-message.
Trigger Criteria:
Context: The action code has been set to LOG-USE-INPUT-MESSAGE
Applied to: Set Message Text
Action: The message text is being populated
Logic Flow:
IF The action code has been set to LOG-USE-INPUT-MESSAGE
AND The message text is being populated
THEN:
• The information message content should be moved to the log message field
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when message text has been populated in the log structure.
Trigger Criteria:
Context: The message text has been populated in the log structure
Applied to: Message Text Empty?
Action: Message text validation is performed
Logic Flow:
IF The message text has been populated in the log structure
AND Message text validation is performed
THEN:
• If the message text is spaces or low-values, exit without creating a log entry; otherwise, proceed with log creation
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when message text validation has passed and message is not empty.
Trigger Criteria:
Context: The message text validation has passed and message is not empty
Applied to: Replace Spaces with Zeroes in Date, Replace Spaces with '1' in Time
Action: Date and time normalization is performed
Logic Flow:
IF The message text validation has passed and message is not empty
AND Date and time normalization is performed
THEN:
• All spaces in the date field should be replaced with zeroes, and all spaces in the time field should be replaced with '1'
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when date and time values have been normalized.
Trigger Criteria:
Context: Date and time values have been normalized
Applied to: Move Log Input to GCT1051E Message
Action: The log data is being transferred to the message structure
Logic Flow:
IF Date and time values have been normalized
AND The log data is being transferred to the message structure
THEN:
• The complete log input structure should be moved to the GCT1051E message field
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when log data has been transferred to the gct1051e message structure.
Trigger Criteria:
Context: The log data has been transferred to the GCT1051E message structure
Applied to: Change Alternate PCB Status
Action: The alternate PCB status is being changed
Logic Flow:
IF The log data has been transferred to the GCT1051E message structure
AND The alternate PCB status is being changed
THEN:
• The CIMS program should be called with CHNG function for the alternate PCB using the GCT1051E message
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when alternate pcb status has been changed successfully. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The alternate PCB status has been changed successfully
Applied to: Call WRITMSGL to Write Message
Action: The message writing is invoked
Logic Flow:
IF The alternate PCB status has been changed successfully
AND The message writing is invoked
THEN:
• The WRITMSGL program should be called with the common control area, alternate PCB, message code, message text, message length, and module name parameters
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when log message has been written using writmsgl.
Trigger Criteria:
Context: The log message has been written using WRITMSGL
Applied to: Purge Alternate PCB
Action: The alternate PCB is being purged
Logic Flow:
IF The log message has been written using WRITMSGL
AND The alternate PCB is being purged
THEN:
• The CIMS program should be called with PURG function for the alternate PCB to complete the logging transaction
R-GCX126-cbl-00468 (+3)File: GCX126R.cblBusiness Rule: Update Cargo Record
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been retrieved and modified with updated customs status, release information, or other edi 350 message data.
Trigger Criteria:
Context: A cargo record has been retrieved and modified with updated customs status, release information, or other EDI 350 message data
Applied to: Update Cargo Record - Replace cargo record in database with updated information
Action: The system needs to persist the changes to the cargo database
Logic Flow:
IF A cargo record has been retrieved and modified with updated customs status, release information, or other EDI 350 message data
AND The system needs to persist the changes to the cargo database
THEN:
• The system clears the status code, sets the accept status to blank, and replaces the cargo record in the GCSCCRT cargo database using the IMS REPL function
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is ready to be updated in the database.
Trigger Criteria:
Context: A cargo record is ready to be updated in the database
Applied to: Clear Status Code
Action: The update process is initiated
Logic Flow:
IF A cargo record is ready to be updated in the database
AND The update process is initiated
THEN:
• The system sets the status code field to spaces to clear any previous status information
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when status code has been cleared and the cargo record is ready for update. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The status code has been cleared and the cargo record is ready for update
Applied to: Set Accept Status to Blank
Action: The system prepares to call the IMS replace function
Logic Flow:
IF The status code has been cleared and the cargo record is ready for update
AND The system prepares to call the IMS replace function
THEN:
• The system sets the accept status field to two blank spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when status code is cleared, accept status is set to blank, and the cargo record contains all updated information. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The status code is cleared, accept status is set to blank, and the cargo record contains all updated information
Applied to: Call IMS REPL Function
Action: The system calls the IMS CIMS program with the REPL function
Logic Flow:
IF The status code is cleared, accept status is set to blank, and the cargo record contains all updated information
AND The system calls the IMS CIMS program with the REPL function
THEN:
• The system passes the common communication area, REPL function code, cargo PCB, and the cargo report segment to update the GCSCCRT cargo database record
R-GCX126-cbl-00472 (+13)File: GCX126R.cblBusiness Rule: Retrieve US Cargo by Car and Waybill
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when current cargo record with equipment car identification and a saved waybill index value.
Trigger Criteria:
Context: A current cargo record with equipment car identification and a saved waybill index value
Applied to: Set Car ID from Current Cargo, Set Waybill Index from Saved Value, Set US CCN to Low Values
Action: Preparing to search for associated US cargo records
Logic Flow:
IF A current cargo record with equipment car identification and a saved waybill index value
AND Preparing to search for associated US cargo records
THEN:
• The car ID index is set to the current cargo's equipment car key, the waybill index is set to the saved waybill index value, and the US CCN key index is initialized to low values for the search operation
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when search parameters are set with car id index, waybill index, and us ccn key initialized to low values.
Trigger Criteria:
Context: Search parameters are set with car ID index, waybill index, and US CCN key initialized to low values
Applied to: Initialize Search with >= Operator, Retrieve First US Cargo Record
Action: Initiating the US cargo search using the car-waybill index with greater-than-or-equal-to operator
Logic Flow:
IF Search parameters are set with car ID index, waybill index, and US CCN key initialized to low values
AND Initiating the US cargo search using the car-waybill index with greater-than-or-equal-to operator
THEN:
• The system retrieves the first US cargo record from GCSUSRT table matching or exceeding the search criteria
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when initial retrieval attempt for us cargo by car and waybill has been executed.
Trigger Criteria:
Context: An initial retrieval attempt for US cargo by car and waybill has been executed
Applied to: Record Found? - Not Found, Set End of File Flag
Action: The database returns a status indicating no record was found
Logic Flow:
IF An initial retrieval attempt for US cargo by car and waybill has been executed
AND The database returns a status indicating no record was found
THEN:
• The end-of-file flag is set to true indicating no matching US cargo exists
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when us cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved from the database
Applied to: Car ID Matches Current Cargo?
Action: Comparing the first 12 characters of the retrieved US cargo's car ID index with the current cargo's equipment car key
Logic Flow:
IF A US cargo record has been successfully retrieved from the database
AND Comparing the first 12 characters of the retrieved US cargo's car ID index with the current cargo's equipment car key
THEN:
• If the car IDs match, continue validation; if they do not match, set the end-of-file flag to terminate the search
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when us cargo record has been retrieved and the car id has been validated as matching.
Trigger Criteria:
Context: A US cargo record has been retrieved and the car ID has been validated as matching
Applied to: Waybill Matches Saved Index?
Action: Comparing the retrieved US cargo's waybill number index with the saved waybill index value
Logic Flow:
IF A US cargo record has been retrieved and the car ID has been validated as matching
AND Comparing the retrieved US cargo's waybill number index with the saved waybill index value
THEN:
• If the waybill numbers match, proceed to check cargo status; if they do not match, set the end-of-file flag to terminate the search
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when us cargo record has been retrieved with matching car id and waybill number.
Trigger Criteria:
Context: A US cargo record has been retrieved with matching car ID and waybill number
Applied to: Cargo Deleted or TR Created?
Action: Evaluating the cargo's deletion status indicator and the train-created-for-it flag
Logic Flow:
IF A US cargo record has been retrieved with matching car ID and waybill number
AND Evaluating the cargo's deletion status indicator and the train-created-for-it flag
THEN:
• If the cargo is marked as deleted OR the train-created-for-it flag equals 'Y', skip this record and continue searching; if both conditions are false, mark the US manifest as found
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when us cargo record has been retrieved with matching car id and waybill, and the cargo is not deleted and has no train record created.
Trigger Criteria:
Context: A US cargo record has been retrieved with matching car ID and waybill, and the cargo is not deleted and has no train record created
Applied to: Mark US Manifest Found
Action: All validation checks pass successfully
Logic Flow:
IF A US cargo record has been retrieved with matching car ID and waybill, and the cargo is not deleted and has no train record created
AND All validation checks pass successfully
THEN:
• The US manifest found flag is set to true and the search process completes successfully
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when current us cargo record was skipped due to deletion or train creation status, and the search should continue.
Trigger Criteria:
Context: The current US cargo record was skipped due to deletion or train creation status, and the search should continue
Applied to: Get Next US Cargo Record
Action: Executing a get-next operation using the car-waybill index with greater-than operator
Logic Flow:
IF The current US cargo record was skipped due to deletion or train creation status, and the search should continue
AND Executing a get-next operation using the car-waybill index with greater-than operator
THEN:
• The system retrieves the next US cargo record in sequence from the GCSUSRT table
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when get-next retrieval attempt for us cargo by car and waybill has been executed.
Trigger Criteria:
Context: A get-next retrieval attempt for US cargo by car and waybill has been executed
Applied to: Record Found? - Not Found (from Get Next), Set End of File Flag
Action: The database returns a status indicating no more records exist
Logic Flow:
IF A get-next retrieval attempt for US cargo by car and waybill has been executed
AND The database returns a status indicating no more records exist
THEN:
• The end-of-file flag is set to true indicating the search is complete with no valid US cargo found
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when subsequent us cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A subsequent US cargo record has been successfully retrieved from the database
Applied to: Car ID Matches Current Cargo? (from Get Next)
Action: Comparing the first 12 characters of the retrieved US cargo's car ID index with the current cargo's equipment car key
Logic Flow:
IF A subsequent US cargo record has been successfully retrieved from the database
AND Comparing the first 12 characters of the retrieved US cargo's car ID index with the current cargo's equipment car key
THEN:
• If the car IDs match, continue validation; if they do not match, set the end-of-file flag to terminate the search
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when subsequent us cargo record has been retrieved and the car id has been validated as matching.
Trigger Criteria:
Context: A subsequent US cargo record has been retrieved and the car ID has been validated as matching
Applied to: Waybill Matches Saved Index? (from Get Next)
Action: Comparing the retrieved US cargo's waybill number index with the saved waybill index value
Logic Flow:
IF A subsequent US cargo record has been retrieved and the car ID has been validated as matching
AND Comparing the retrieved US cargo's waybill number index with the saved waybill index value
THEN:
• If the waybill numbers match, proceed to check cargo status; if they do not match, set the end-of-file flag to terminate the search
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when subsequent us cargo record has been retrieved with matching car id and waybill number.
Trigger Criteria:
Context: A subsequent US cargo record has been retrieved with matching car ID and waybill number
Applied to: Cargo Deleted or TR Created? (from Get Next)
Action: Evaluating the cargo's deletion status indicator and the train-created-for-it flag
Logic Flow:
IF A subsequent US cargo record has been retrieved with matching car ID and waybill number
AND Evaluating the cargo's deletion status indicator and the train-created-for-it flag
THEN:
• If the cargo is marked as deleted OR the train-created-for-it flag equals 'Y', continue the search loop; if both conditions are false, mark the US manifest as found
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when subsequent us cargo record has been retrieved with matching car id and waybill, and the cargo is not deleted and has no train record created.
Trigger Criteria:
Context: A subsequent US cargo record has been retrieved with matching car ID and waybill, and the cargo is not deleted and has no train record created
Applied to: Mark US Manifest Found (from Get Next)
Action: All validation checks pass successfully on the subsequent record
Logic Flow:
IF A subsequent US cargo record has been retrieved with matching car ID and waybill, and the cargo is not deleted and has no train record created
AND All validation checks pass successfully on the subsequent record
THEN:
• The US manifest found flag is set to true and the search process completes successfully
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record has been processed and either found valid or skipped.
Trigger Criteria:
Context: A US cargo record has been processed and either found valid or skipped
Applied to: Continue Search?
Action: The US manifest found flag is false AND the end-of-file flag is false
Logic Flow:
IF A US cargo record has been processed and either found valid or skipped
AND The US manifest found flag is false AND the end-of-file flag is false
THEN:
• Continue the search loop to retrieve the next US cargo record; otherwise, exit the search process
R-GCX126-cbl-00486 (+7)File: GCX126R.cblBusiness Rule: Set Cargo Status Flags
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo status evaluation process is starting. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The cargo status evaluation process is starting
Applied to: Initialize All Cargo Status Flags to Space
Action: The system begins to set cargo status flags
Logic Flow:
IF The cargo status evaluation process is starting
AND The system begins to set cargo status flags
THEN:
• All four cargo status switches (WS-SWITCH1-CARGO, WS-SWITCH2-CARGO, WS-SWITCH3-CARGO, WS-SWITCH4-CARGO) are set to SPACE
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo database query has been executed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo database query has been executed
Applied to: Cargo Not Found
Action: The database status code is not equal to SPACES
Logic Flow:
IF A cargo database query has been executed
AND The database status code is not equal to SPACES
THEN:
• The cargo not found flag (WS-CARGO-NOT-FOUND) is set to TRUE
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo database query has been executed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo database query has been executed
Applied to: Cargo Found
Action: The database status code equals SPACES
Logic Flow:
IF A cargo database query has been executed
AND The database status code equals SPACES
THEN:
• The cargo found flag (WS-CARGO-FOUND) is set to TRUE
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been found in the database and a saved waybill index exists (not blank). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Cargo record has been found in the database AND a saved waybill index exists (not blank)
Applied to: Cargo Not Waybill Match
Action: The cargo waybill key for index does not equal the saved waybill index
Logic Flow:
IF Cargo record has been found in the database AND a saved waybill index exists (not blank)
AND The cargo waybill key for index does not equal the saved waybill index
THEN:
• The cargo not waybill match flag (WS-CARGO-NOT-WB) is set to TRUE
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has been found in the database and waybill validation has passed (or no waybill index was provided). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Cargo record has been found in the database AND waybill validation has passed (or no waybill index was provided)
Applied to: Cargo Deleted
Action: The cargo delete status field equals 'D'
Logic Flow:
IF Cargo record has been found in the database AND waybill validation has passed (or no waybill index was provided)
AND The cargo delete status field equals 'D'
THEN:
• The cargo deleted flag (WS-CARGO-DELETED) is set to TRUE
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been found in the database and is not deleted and waybill validation has passed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Cargo record has been found in the database AND is not deleted AND waybill validation has passed
Applied to: Cargo Returned
Action: The cargo status return indicator (GCCC-STATUS-RETURN) is TRUE
Logic Flow:
IF Cargo record has been found in the database AND is not deleted AND waybill validation has passed
AND The cargo status return indicator (GCCC-STATUS-RETURN) is TRUE
THEN:
• The cargo returned flag (WS-CARGO-RETURNED) is set to TRUE
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been found in the database and is not deleted and waybill validation has passed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Cargo record has been found in the database AND is not deleted AND waybill validation has passed
Applied to: Cargo Released
Action: The cargo release status field equals 'R'
Logic Flow:
IF Cargo record has been found in the database AND is not deleted AND waybill validation has passed
AND The cargo release status field equals 'R'
THEN:
• The cargo released flag (WS-CARGO-RELEASED) is set to TRUE
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been found in the database and is not deleted and waybill validation has passed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Cargo record has been found in the database AND is not deleted AND waybill validation has passed
Applied to: Cargo On A Train
Action: The cargo train ID field (GCCC-CP-TRAIN-ID) is not equal to SPACES
Logic Flow:
IF Cargo record has been found in the database AND is not deleted AND waybill validation has passed
AND The cargo train ID field (GCCC-CP-TRAIN-ID) is not equal to SPACES
THEN:
• The cargo on a train flag (WS-CARGO-ON-A-TRAIN) is set to TRUE
Business Justification: Dictates the expected operational logic and validation steps when conventional 350 edi message is being processed and the x4 segment contains entry type code '992' and the x4 segment contains a consist release number (crn) in the related document id field (positions 1-25).
Trigger Criteria:
Context: A Conventional 350 EDI message is being processed AND the X4 segment contains entry type code '992' AND the X4 segment contains a Consist Release Number (CRN) in the related document ID field (positions 1-25)
Applied to: Verify Train Exists - Retrieve Canadian train information from database using train ID to verify train exists in system
Action: The system attempts to retrieve the train record from the train database using the CRN as the search key
Logic Flow:
IF A Conventional 350 EDI message is being processed AND the X4 segment contains entry type code '992' AND the X4 segment contains a Consist Release Number (CRN) in the related document ID field (positions 1-25)
AND The system attempts to retrieve the train record from the train database using the CRN as the search key
THEN:
• IF the train record is found in the database (indicated by blank status code) THEN the train is confirmed to exist in the system and processing continues with logging arrival acknowledgment at border ELSE IF the train record is not found in the database (indicated by non-blank status code) THEN the system identifies the train as not existing and generates an unknown train notification message containing the CRN with text 'UNKNOWN TRAIN ENTRY IN EDI 350' and 'THIS CRN WAS NOT FOUND'
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when x4 segment has been parsed from the edi 350 message and the related document id field contains the consist release number in positions 1-25. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The X4 segment has been parsed from the EDI 350 message AND the related document ID field contains the Consist Release Number in positions 1-25
Applied to: Set Train ID as Search Key
Action: The system prepares to query the train database
Logic Flow:
IF The X4 segment has been parsed from the EDI 350 message AND the related document ID field contains the Consist Release Number in positions 1-25
AND The system prepares to query the train database
THEN:
• The system sets the train database search key (B4-KEY-VALUE) to the value from X4 related document ID positions 1-25 AND stores this value as the previous CRN (WS-PREV-CRN) for duplicate checking
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when train search key (b4-key-value) has been set to the consist release number from the x4 segment. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The train search key (B4-KEY-VALUE) has been set to the Consist Release Number from the X4 segment
Applied to: Retrieve Train Record from Database
Action: The system executes the database retrieval operation
Logic Flow:
IF The train search key (B4-KEY-VALUE) has been set to the Consist Release Number from the X4 segment
AND The system executes the database retrieval operation
THEN:
• The system performs a GU (Get Unique) function call to retrieve the train root segment (GCB4R-TRAIN-ROOT-SEGMENT) from the train database (GCB4-PCB) using the qualified search key (B4RT-SSAQ) AND the database returns a status code indicating whether the record was found or not found
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when database retrieval operation has been executed for the train record.
Trigger Criteria:
Context: The database retrieval operation has been executed for the train record
Applied to: Train Record Found?
Action: The system evaluates the database status code
Logic Flow:
IF The database retrieval operation has been executed for the train record
AND The system evaluates the database status code
THEN:
• IF the status code is blank (spaces) THEN the train record was successfully found and exists in the system ELSE IF the status code is not blank (contains any value) THEN the train record was not found and does not exist in the system
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when train record retrieval returned a blank status code indicating the train exists in the database.
Trigger Criteria:
Context: The train record retrieval returned a blank status code indicating the train exists in the database
Applied to: Train Exists in System
Action: The system confirms train existence
Logic Flow:
IF The train record retrieval returned a blank status code indicating the train exists in the database
AND The system confirms train existence
THEN:
• The system prepares log information with current machine date (CC-MACHINE-CENTURYandCC-MACHINE-DATE-X concatenated into GCX105-DATE) AND current machine time (CC-MACHINE-TIME-X into GCX105-TIME) AND action code 'ZZZ' (into GCX105-ACTION-CODE) AND the Consist Release Number from X4 positions 1-25 (into GCX105-TRAIN-OR-US-CCN) AND sets the cargo type indicator to Canadian train (GCX105-CA-TRAIN) AND sets the message text to '350 ACK - ARRIVAL ACK AT BORDER' (into GCX105-MESSAGE) AND spawns the GCT1051E log entry process
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when train record retrieval returned a non-blank status code indicating the train does not exist in the database.
Trigger Criteria:
Context: The train record retrieval returned a non-blank status code indicating the train does not exist in the database
Applied to: Train Not Found
Action: The system confirms train non-existence
Logic Flow:
IF The train record retrieval returned a non-blank status code indicating the train does not exist in the database
AND The system confirms train non-existence
THEN:
• The system clears the first detail line (MRLN-DTL-LINE 01 to spaces) AND constructs an error message by concatenating 'UNKNOWN TRAIN ENTRY IN EDI 350 ' with the Consist Release Number from X4 positions 1-25 into the first detail line AND sets the third detail line to 'THIS CRN WAS NOT FOUND.' AND sets the report line counter (MRLN-LINE) to 4 AND sets the message type indicator to unknown (88-Z110-MRLN-TYPE-IS-UNKNOWN) AND invokes the email send preparation process (Z110-PREP-EMCSEND)
R-GCX126-cbl-00500 (+7)File: GCX126R.cblBusiness Rule: Retrieve Admin Configuration from GCSTBRT Table
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when system needs to retrieve admin configuration data.
Trigger Criteria:
Context: The system needs to retrieve admin configuration data
Applied to: Initialize Table Access Fields
Action: The initialization process begins
Logic Flow:
IF The system needs to retrieve admin configuration data
AND The initialization process begins
THEN:
• All table access parameters are cleared (GCSTBRT-KEY-VALUE, GCSTBDP-KEY-VALUE, GCCTBIO-RETURN-FLAG, GCSTBRT-AD-SEGMENT) and control flags (SECOND-PCB-FLAG, UNQUAL-SSA-FLAG) are set to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when system is preparing to access the gcstbrt table.
Trigger Criteria:
Context: The system is preparing to access the GCSTBRT table
Applied to: Set Table ID to 'ADMINID'
Action: The table identifier needs to be specified
Logic Flow:
IF The system is preparing to access the GCSTBRT table
AND The table identifier needs to be specified
THEN:
• The table ID is set to 'AD-TABLE-ID' value in GCSTBRT-KEY-TABLE-ID
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when table id has been set to admin table.
Trigger Criteria:
Context: The table ID has been set to admin table
Applied to: Set Sequence ID to 'ADMINID'
Action: The specific record needs to be identified
Logic Flow:
IF The table ID has been set to admin table
AND The specific record needs to be identified
THEN:
• The sequence ID is set to 'ADMINID' in GCSTBRT-KEY-SEQID
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when table and sequence identifiers are set. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The table and sequence identifiers are set
Applied to: Call GCCTBIO to Read GCSTBRT Table
Action: The database operation type needs to be specified
Logic Flow:
IF The table and sequence identifiers are set
AND The database operation type needs to be specified
THEN:
• The function code is set to 'GU' in GCCTBIO-FUNC-CODE
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when function code is 'gu', table id is set to admin table identifier, sequence id is 'adminid', and all access parameters are initialized. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The function code is 'GU', table ID is set to admin table identifier, sequence ID is 'ADMINID', and all access parameters are initialized
Applied to: Call GCCTBIO to Read GCSTBRT Table
Action: The GCCTBIO program is called with parameters CCCOM, SECOND-PCB-FLAG, UNQUAL-SSA-FLAG, GCCTBIO-FUNC-CODE, GCSTBRT-LIT, GCSTBRT-KEY-VALUE, GCSTBDP-KEY-VALUE, WS-TABLE-SEGMENT, and GCCTBIO-RETURN-FLAG
Logic Flow:
IF The function code is 'GU', table ID is set to admin table identifier, sequence ID is 'ADMINID', and all access parameters are initialized
AND The GCCTBIO program is called with parameters CCCOM, SECOND-PCB-FLAG, UNQUAL-SSA-FLAG, GCCTBIO-FUNC-CODE, GCSTBRT-LIT, GCSTBRT-KEY-VALUE, GCSTBDP-KEY-VALUE, WS-TABLE-SEGMENT, and GCCTBIO-RETURN-FLAG
THEN:
• The admin configuration record is retrieved and stored in WS-TABLE-SEGMENT with operation status returned in GCCTBIO-RETURN-FLAG
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when gcctbio program has completed execution.
Trigger Criteria:
Context: The GCCTBIO program has completed execution
Applied to: Return Flag = '0'?
Action: The return flag is evaluated
Logic Flow:
IF The GCCTBIO program has completed execution
AND The return flag is evaluated
THEN:
• IfGCCTBIO-RETURN-FLAG equals '0', the retrieval was successful; otherwise, the retrieval failed
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when gcctbio-return-flag equals '0' indicating successful retrieval.
Trigger Criteria:
Context: The GCCTBIO-RETURN-FLAG equals '0' indicating successful retrieval
Applied to: Set Admin Segment Found Flag
Action: The admin segment status needs to be recorded
Logic Flow:
IF The GCCTBIO-RETURN-FLAG equals '0' indicating successful retrieval
AND The admin segment status needs to be recorded
THEN:
• The condition 88-AD-SEGMENT-FOUND is set to TRUE
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when admin segment has been successfully found (88-ad-segment-found is true) and ws-table-segment contains the retrieved data. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The admin segment has been successfully found (88-AD-SEGMENT-FOUND is TRUE) and WS-TABLE-SEGMENT contains the retrieved data
Applied to: Move Merlin User Code from Admin Config to EMI-TO-USERCODE
Action: The Merlin user code needs to be extracted
Logic Flow:
IF The admin segment has been successfully found (88-AD-SEGMENT-FOUND is TRUE) and WS-TABLE-SEGMENT contains the retrieved data
AND The Merlin user code needs to be extracted
THEN:
• WS-TABLE-SEGMENT is moved to GCSTBRT-AD-SEGMENTandGCSTBRT-AD-DC-P-MERLIN-1 is moved to WS-EMI-TO-USERCODE
R-GCX126-cbl-00508 (+6)File: GCX126R.cblBusiness Rule: Establish MQ Connection to Queue Manager
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when system needs to process edi 350 customs messages from the message queue. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system needs to process EDI 350 customs messages from the message queue
Applied to: Call MQCONNC API with Queue Manager Name
Action: The system initiates connection to the MQ Queue Manager
Logic Flow:
IF The system needs to process EDI 350 customs messages from the message queue
AND The system initiates connection to the MQ Queue Manager
THEN:
• The system calls the MQCONNC API with the Queue Manager name and receives a connection handle and completion status
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when mqconnc api has been called to establish connection to the queue manager.
Trigger Criteria:
Context: The MQCONNC API has been called to establish connection to the Queue Manager
Applied to: MQ Completion Code = OK?
Action: The system receives the completion code from the MQCONNC API
Logic Flow:
IF The MQCONNC API has been called to establish connection to the Queue Manager
AND The system receives the completion code from the MQCONNC API
THEN:
• The system checks if the completion code equals MQCC-OK to determine connection success
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when mq connection completion code indicates failure (not equal to mqcc-ok).
Trigger Criteria:
Context: The MQ connection completion code indicates failure (not equal to MQCC-OK)
Applied to: Retrieve MQ Reason Code
Action: The system needs to identify the specific cause of connection failure
Logic Flow:
IF The MQ connection completion code indicates failure (not equal to MQCC-OK)
AND The system needs to identify the specific cause of connection failure
THEN:
• The system retrieves the MQ reason code from the connection response
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when mq reason code has been retrieved indicating connection failure. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An MQ reason code has been retrieved indicating connection failure
Applied to: Call GCCMQERR to Get Error Message Text
Action: The system needs to provide a descriptive error message for the failure
Logic Flow:
IF An MQ reason code has been retrieved indicating connection failure
AND The system needs to provide a descriptive error message for the failure
THEN:
• The system calls the GCCMQERR program with the reason code and receives the corresponding error message text
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when mq connection has failed and the reason code and error text have been retrieved.
Trigger Criteria:
Context: The MQ connection has failed and the reason code and error text have been retrieved
Action: The system prepares to report the connection failure
Logic Flow:
IF The MQ connection has failed and the reason code and error text have been retrieved
AND The system prepares to report the connection failure
THEN:
• The system builds an error message containing: the MQ reason code concatenated with the error message text, transaction set value '355', and error type 'CONN FAILED'
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when mq connection has failed and a comprehensive error message has been constructed.
Trigger Criteria:
Context: The MQ connection has failed and a comprehensive error message has been constructed
Applied to: Abend Program with Error Message
Action: The system cannot proceed without a valid MQ connection
Logic Flow:
IF The MQ connection has failed and a comprehensive error message has been constructed
AND The system cannot proceed without a valid MQ connection
THEN:
• The system abends the program with the error message containing the reason code, error text, transaction set '355', and error type 'CONN FAILED'
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when mqconnc api has been called to connect to the queue manager.
Trigger Criteria:
Context: The MQCONNC API has been called to connect to the Queue Manager
Applied to: Connection Established Successfully
Action: The completion code returned equals MQCC-OK
Logic Flow:
IF The MQCONNC API has been called to connect to the Queue Manager
AND The completion code returned equals MQCC-OK
THEN:
• The system confirms the connection is established successfully and proceeds with message processing operations
R-GCX126-cbl-00515 (+4)File: GCX126R.cblBusiness Rule: Calculate Number of EDI Segments
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when ['an edi 350 message has been retrieved from the mq queue', 'the message data length (w03-datalen) is available from the mq get operation', 'the message header length (ws-mqs-len-header) equals the length of mqs-message-header structure', 'the single entry length (ws-mqs-len-of-1-entry) equals the length of one mqs-table-entry']. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: ['An EDI 350 message has been retrieved from the MQ queue', 'The message data length (W03-DATALEN) is available from the MQ GET operation', 'The message header length (WS-MQS-LEN-HEADER) equals the length of MQS-MESSAGE-HEADER structure', 'The single entry length (WS-MQS-LEN-OF-1-ENTRY) equals the length of one MQS-TABLE-ENTRY']
Applied to: Segments = Data Length - Header Length / Entry Length
Action: ['The system calculates the number of segments']
Logic Flow:
IF ['An EDI 350 message has been retrieved from the MQ queue', 'The message data length (W03-DATALEN) is available from the MQ GET operation', 'The message header length (WS-MQS-LEN-HEADER) equals the length of MQS-MESSAGE-HEADER structure', 'The single entry length (WS-MQS-LEN-OF-1-ENTRY) equals the length of one MQS-TABLE-ENTRY']
AND ['The system calculates the number of segments']
THEN:
• ['Subtract the header length from the total message data length to get net data length', 'Divide the net data length by the single entry length', 'Round the result to get the number of complete segments', 'Store the calculated value in WS-MAX-MQS-ENTRIES']
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when ['the number of segments has been calculated and stored in ws-max-mqs-entries', 'a maximum allowed segment count is defined as cst-max-mqs-entries']. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: ['The number of segments has been calculated and stored in WS-MAX-MQS-ENTRIES', 'A maximum allowed segment count is defined as CST-MAX-MQS-ENTRIES']
Applied to: Calculated Segments > Maximum Allowed?
Action: ['The calculated number of segments (WS-MAX-MQS-ENTRIES) exceeds the maximum allowed (CST-MAX-MQS-ENTRIES)']
Logic Flow:
IF ['The number of segments has been calculated and stored in WS-MAX-MQS-ENTRIES', 'A maximum allowed segment count is defined as CST-MAX-MQS-ENTRIES']
AND ['The calculated number of segments (WS-MAX-MQS-ENTRIES) exceeds the maximum allowed (CST-MAX-MQS-ENTRIES)']
THEN:
• ['Set WS-MAX-MQS-ENTRIES to the maximum allowed value CST-MAX-MQS-ENTRIES', 'Discard any segments beyond the maximum limit']
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when ['the edi message structure includes a fixed-length header (mqs-message-header)', 'the system needs to calculate net data length for segment counting']. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: ['The EDI message structure includes a fixed-length header (MQS-MESSAGE-HEADER)', 'The system needs to calculate net data length for segment counting']
Applied to: Get Header Length
Action: ['The system initializes message processing parameters']
Logic Flow:
IF ['The EDI message structure includes a fixed-length header (MQS-MESSAGE-HEADER)', 'The system needs to calculate net data length for segment counting']
AND ['The system initializes message processing parameters']
THEN:
• ['Set WS-MQS-LEN-HEADER to the length of MQS-MESSAGE-HEADER structure', 'This value will be used to subtract header length from total message length']
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when ['each edi segment in the message has a fixed structure (mqs-table-entry)', 'the system needs to calculate how many segments fit in the net data length']. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: ['Each EDI segment in the message has a fixed structure (MQS-TABLE-ENTRY)', 'The system needs to calculate how many segments fit in the net data length']
Applied to: Get Single Entry Length
Action: ['The system initializes message processing parameters']
Logic Flow:
IF ['Each EDI segment in the message has a fixed structure (MQS-TABLE-ENTRY)', 'The system needs to calculate how many segments fit in the net data length']
AND ['The system initializes message processing parameters']
THEN:
• ['Set WS-MQS-LEN-OF-1-ENTRY to the length of one MQS-TABLE-ENTRY structure', 'This value will be used as the divisor to calculate segment count']
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when ['an edi 350 message exists in the mq queue', 'the mq get operation has been invoked with buffer length set to the length of mqs-message']. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: ['An EDI 350 message exists in the MQ queue', 'The MQ GET operation has been invoked with buffer length set to the length of MQS-MESSAGE']
Applied to: Get Message Data Length from MQ
Action: ['The MQGET call completes successfully']
Logic Flow:
IF ['An EDI 350 message exists in the MQ queue', 'The MQ GET operation has been invoked with buffer length set to the length of MQS-MESSAGE']
AND ['The MQGET call completes successfully']
THEN:
• ['The actual data length of the retrieved message is returned in W03-DATALEN', 'This length includes both the message header and all segment entries', 'W03-DATALEN will be used to calculate the number of segments in the message']
R-GCX126-cbl-00520 (+11)File: GCX126R.cblBusiness Rule: Process X4 Release/Disposition Segment
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when x4 segment is being processed from an edi 350 message. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An X4 segment is being processed from an EDI 350 message
Applied to: Is Conveyance 350 AND Entry Type = 992?
Action: The message type is Conveyance 350 (WS-CONV-350 is true) AND the X4 entry type code (X4-03-ENTRY-TYP-CDE) equals '992'
Logic Flow:
IF An X4 segment is being processed from an EDI 350 message
AND The message type is Conveyance 350 (WS-CONV-350 is true) AND the X4 entry type code (X4-03-ENTRY-TYP-CDE) equals '992'
THEN:
• Process as train arrival acknowledgment at border, otherwise process as cargo release segment and set X4 segment found flag for cargo processing
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when conveyance 350 message with entry type 992 is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A conveyance 350 message with entry type 992 is being processed
Applied to: Is Train ID Same as Previous?
Action: The train release document ID from X4-04-REL-DOC-ID (first 25 characters) equals the previously processed CRN stored in WS-PREV-CRN
Logic Flow:
IF A conveyance 350 message with entry type 992 is being processed
AND The train release document ID from X4-04-REL-DOC-ID (first 25 characters) equals the previously processed CRN stored in WS-PREV-CRN
THEN:
• Skip processing this X4 segment and continue to next segment, otherwise proceed with train verification
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when new train release number is identified in the x4 segment. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A new train release number is identified in the X4 segment
Applied to: Extract Train ID from X4-04-REL-DOC-ID
Action: The X4-04-REL-DOC-ID (first 25 characters) is different from the previous CRN
Logic Flow:
IF A new train release number is identified in the X4 segment
AND The X4-04-REL-DOC-ID (first 25 characters) is different from the previous CRN
THEN:
• Move X4-04-REL-DOC-ID (first 25 characters) to B4-KEY-VALUE for train lookup and to WS-PREV-CRN for duplicate tracking
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when train release number (crn) has been extracted from the x4 segment.
Trigger Criteria:
Context: A train release number (CRN) has been extracted from the X4 segment
Applied to: Verify Train Exists in System
Action: The system performs a database lookup using the CRN as the key value in the train root segment (B4RT)
Logic Flow:
IF A train release number (CRN) has been extracted from the X4 segment
AND The system performs a database lookup using the CRN as the key value in the train root segment (B4RT)
THEN:
• Return the train record if found, otherwise return a not found status code in CC-STATUS-CODE
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when train lookup has been performed using the crn from x4-04-rel-doc-id.
Trigger Criteria:
Context: A train lookup has been performed using the CRN from X4-04-REL-DOC-ID
Applied to: UNKNOWN TRAIN ENTRY IN EDI 350
Action: The train is not found (CC-STATUS-CODE is not spaces)
Logic Flow:
IF A train lookup has been performed using the CRN from X4-04-REL-DOC-ID
AND The train is not found (CC-STATUS-CODE is not spaces)
THEN:
• Prepare error message 'UNKNOWN TRAIN ENTRY IN EDI 350' concatenated with the CRN in detail line 1, add message 'THIS CRN WAS NOT FOUND.' in detail line 3, set message line count to 4, and set message type to unknown
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when unknown train error message has been prepared with crn details.
Trigger Criteria:
Context: An unknown train error message has been prepared with CRN details
Applied to: Send Error to Merlin
Action: The error preparation is complete
Logic Flow:
IF An unknown train error message has been prepared with CRN details
AND The error preparation is complete
THEN:
• Invoke the Merlin email send process (Z110-PREP-EMCSEND) to transmit the error notification to the configured recipients
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when train has been successfully verified in the system using the crn.
Trigger Criteria:
Context: A train has been successfully verified in the system using the CRN
Applied to: ZZZ Message: 350 ACK - ARRIVAL ACK AT BORDER
Action: The train record exists (CC-STATUS-CODE equals spaces)
Logic Flow:
IF A train has been successfully verified in the system using the CRN
AND The train record exists (CC-STATUS-CODE equals spaces)
THEN:
• Create a log entry with current machine date in GCX105-DATE, current machine time in GCX105-TIME, action code 'ZZZ' in GCX105-ACTION-CODE, the CRN (first 25 characters of X4-04-REL-DOC-ID) in GCX105-TRAIN-OR-US-CCN, set cargo type to Canadian train (GCX105-CA-TRAIN), message '350 ACK - ARRIVAL ACK AT BORDER' in GCX105-MESSAGE, and spawn the log entry process (Z300-SPAWN-GCT1051E)
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when valid train arrival has been logged and cargo exists for the release reference id.
Trigger Criteria:
Context: A valid train arrival has been logged and cargo exists for the release reference ID
Applied to: Update Cargo Border Arrival Status
Action: The cargo is found using X4-01-CBSA-REL-REF-ID (first 25 characters) as the CCN key
Logic Flow:
IF A valid train arrival has been logged and cargo exists for the release reference ID
AND The cargo is found using X4-01-CBSA-REL-REF-ID (first 25 characters) as the CCN key
THEN:
• Log the message '350 ACK - ARRIVAL ACK AT BORDER' to cargo information, set the cargo border arrival acknowledgment flag (GCCC-BORDER-ARRIVAL-ACK) to true, and replace the cargo record in the database
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has been updated with border arrival acknowledgment.
Trigger Criteria:
Context: A cargo record has been updated with border arrival acknowledgment
Applied to: Is Master Manifest?
Action: The cargo master manifest indicator (GCCC-MASTER-MFST) is true
Logic Flow:
IF A cargo record has been updated with border arrival acknowledgment
AND The cargo master manifest indicator (GCCC-MASTER-MFST) is true
THEN:
• Proceed to retrieve and update all follower manifests, otherwise skip follower processing and continue to next segment
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when master manifest has been identified with ccn key stored in gccc-ccn-key. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A master manifest has been identified with CCN key stored in GCCC-CCN-KEY
Applied to: Retrieve All Follower Manifests for Master up to 100
Action: The system performs sequential reads of cargo records using the master CCN as parent key (GCCC-MASTER-MFST-CCN)
Logic Flow:
IF A master manifest has been identified with CCN key stored in GCCC-CCN-KEY
AND The system performs sequential reads of cargo records using the master CCN as parent key (GCCC-MASTER-MFST-CCN)
THEN:
• Collect all follower manifest CCN keys (where GCCC-FOLLOWER-MFST is true and master CCN matches X4-01-CBSA-REL-REF-ID first 25 characters) into WS-FOLLOWER-MANI array up to a maximum of 100 entries, stopping when no more followers are found or limit is reached
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when list of follower manifest ccn keys has been retrieved and stored in ws-follower-mani array. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A list of follower manifest CCN keys has been retrieved and stored in WS-FOLLOWER-MANI array
Applied to: Update Border Arrival for Each Follower
Action: Processing each follower CCN from index 1 to the count of followers found
Logic Flow:
IF A list of follower manifest CCN keys has been retrieved and stored in WS-FOLLOWER-MANI array
AND Processing each follower CCN from index 1 to the count of followers found
THEN:
• For each follower CCN: retrieve the cargo record using the CCN as key, if cargo is found then log message '350 ACK - ARRIVAL ACK AT BORDER', set the border arrival acknowledgment flag (GCCC-BORDER-ARRIVAL-ACK) to true, and replace the cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when x4 segment is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An X4 segment is being processed
Applied to: Set X4 Segment Found Flag for Cargo Processing
Action: The message is not a conveyance 350 (WS-CONV-350 is false) OR the entry type code is not '992'
Logic Flow:
IF An X4 segment is being processed
AND The message is not a conveyance 350 (WS-CONV-350 is false) OR the entry type code is not '992'
THEN:
• Set the previous X4 segment indicator (WS-SEGMENT-PREV-X4) to true and set the X4 segment found flag (WS-X4-SEGMENT-FOUND) to true to enable cargo release processing in subsequent steps
R-GCX126-cbl-00532 (+16)File: GCX126R.cblBusiness Rule: Update Border Arrival for All Follower Manifests
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when master manifest cargo record has been identified for border arrival acknowledgment.
Trigger Criteria:
Context: A master manifest cargo record has been identified for border arrival acknowledgment
Applied to: Save Master CCN Key, Initialize Follower Manifest Array, Set Index to 1
Action: The system begins processing follower manifests
Logic Flow:
IF A master manifest cargo record has been identified for border arrival acknowledgment
AND The system begins processing follower manifests
THEN:
• The master manifest CCN key is saved, the follower manifest array is cleared of any previous data, the follower manifest counter is set to 1, and the end-of-database flag is set to indicate more records may exist
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when system is searching for follower manifests associated with a master manifest ccn.
Trigger Criteria:
Context: The system is searching for follower manifests associated with a master manifest CCN
Applied to: Get Next Cargo Record
Action: The system requests the next cargo record using the Get Next function with the master manifest CCN as the search key
Logic Flow:
IF The system is searching for follower manifests associated with a master manifest CCN
AND The system requests the next cargo record using the Get Next function with the master manifest CCN as the search key
THEN:
• The next cargo record is retrieved from the cargo table and made available for evaluation
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has been retrieved from the database.
Trigger Criteria:
Context: A cargo record has been retrieved from the database
Applied to: Status Code = Blank AND Master CCN Matches?
Action: The system evaluates the cargo record
Logic Flow:
IF A cargo record has been retrieved from the database
AND The system evaluates the cargo record
THEN:
• If the database status code is blank (indicating successful retrieval) AND the cargo record's master manifest CCN equals the saved master CCN, the record is considered valid for further processing; otherwise, the record is skipped
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been validated as belonging to the master manifest group.
Trigger Criteria:
Context: A cargo record has been validated as belonging to the master manifest group
Applied to: Is Follower Manifest?
Action: The system checks the manifest type indicator
Logic Flow:
IF A cargo record has been validated as belonging to the master manifest group
AND The system checks the manifest type indicator
THEN:
• If the cargo record is identified as a follower manifest (not the master manifest), it is selected for inclusion in the follower array; otherwise, it is skipped
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been identified as a follower manifest.
Trigger Criteria:
Context: A cargo record has been identified as a follower manifest
Applied to: Store Follower CCN in Array, Increment Index
Action: The system stores the follower information
Logic Flow:
IF A cargo record has been identified as a follower manifest
AND The system stores the follower information
THEN:
• The follower manifest's CCN key is stored in the follower manifest array at the current index position, and the index counter is incremented by 1
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when system is collecting follower manifest ccns.
Trigger Criteria:
Context: The system is collecting follower manifest CCNs
Applied to: End of Database OR Index > 100?
Action: The system checks whether to continue retrieving more cargo records
Logic Flow:
IF The system is collecting follower manifest CCNs
AND The system checks whether to continue retrieving more cargo records
THEN:
• If the end of database is reached OR the index counter exceeds 100, the collection process stops; otherwise, the system continues to retrieve the next cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when system has completed collecting follower manifest ccns.
Trigger Criteria:
Context: The system has completed collecting follower manifest CCNs
Applied to: Subtract 1 from Index
Action: The collection loop terminates
Logic Flow:
IF The system has completed collecting follower manifest CCNs
AND The collection loop terminates
THEN:
• The index counter is decremented by 1 to convert from a 1-based counter to the actual count of follower manifests stored in the array
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when follower manifest collection process has completed and the index has been adjusted.
Trigger Criteria:
Context: The follower manifest collection process has completed and the index has been adjusted
Applied to: Index <= 0?
Action: The system checks if any follower manifests were found
Logic Flow:
IF The follower manifest collection process has completed and the index has been adjusted
AND The system checks if any follower manifests were found
THEN:
• If the adjusted index is less than or equal to 0, no follower manifests exist and processing terminates; otherwise, the system proceeds to update each follower manifest
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when at least one follower manifest ccn has been collected in the array.
Trigger Criteria:
Context: At least one follower manifest CCN has been collected in the array
Applied to: Set Loop Counter J to 1
Action: The system prepares to update follower manifests
Logic Flow:
IF At least one follower manifest CCN has been collected in the array
AND The system prepares to update follower manifests
THEN:
• The loop counter J is set to 1 to begin processing from the first follower manifest in the array
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when system is iterating through the follower manifest array.
Trigger Criteria:
Context: The system is iterating through the follower manifest array
Applied to: Follower CCN Empty OR J > Index?
Action: The system checks whether to process the next follower manifest
Logic Flow:
IF The system is iterating through the follower manifest array
AND The system checks whether to process the next follower manifest
THEN:
• If the current follower CCN position is empty (spaces or low-values) OR the loop counter J exceeds the total count of follower manifests (Index), the update loop terminates; otherwise, processing continues with the current follower CCN
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when loop counter j points to a valid position in the follower manifest array.
Trigger Criteria:
Context: The loop counter J points to a valid position in the follower manifest array
Applied to: Get Follower CCN from Array
Action: The system prepares to update a follower manifest
Logic Flow:
IF The loop counter J points to a valid position in the follower manifest array
AND The system prepares to update a follower manifest
THEN:
• The follower manifest CCN at position J is retrieved from the array and set as the search key for cargo record retrieval
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower manifest ccn has been retrieved from the array.
Trigger Criteria:
Context: A follower manifest CCN has been retrieved from the array
Applied to: Retrieve Follower Cargo Record by CCN
Action: The system requests the cargo record using the Get Hold Update function with the follower CCN as the key
Logic Flow:
IF A follower manifest CCN has been retrieved from the array
AND The system requests the cargo record using the Get Hold Update function with the follower CCN as the key
THEN:
• The follower cargo record is retrieved from the cargo table and locked for update
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when system has attempted to retrieve a follower cargo record by ccn.
Trigger Criteria:
Context: The system has attempted to retrieve a follower cargo record by CCN
Applied to: Cargo Found?
Action: The system evaluates the retrieval result
Logic Flow:
IF The system has attempted to retrieve a follower cargo record by CCN
AND The system evaluates the retrieval result
THEN:
• If the cargo record is found (cargo-found flag is true), the system proceeds to update the border arrival acknowledgment; otherwise, the system skips to the next follower manifest
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when follower cargo record has been successfully retrieved.
Trigger Criteria:
Context: A follower cargo record has been successfully retrieved
Applied to: '350 ACK - ARRIVAL ACK AT BORDER'
Action: The system prepares to update the border arrival status
Logic Flow:
IF A follower cargo record has been successfully retrieved
AND The system prepares to update the border arrival status
THEN:
• An information message '350 ACK - ARRIVAL ACK AT BORDER' is logged to the cargo history with the current follower CCN as the reference
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when border arrival message has been logged for the follower manifest.
Trigger Criteria:
Context: The border arrival message has been logged for the follower manifest
Applied to: Set Border Arrival Acknowledgment Flag
Action: The system updates the cargo record status
Logic Flow:
IF The border arrival message has been logged for the follower manifest
AND The system updates the cargo record status
THEN:
• The border arrival acknowledgment flag in the cargo record is set to true to indicate customs has acknowledged the cargo's arrival at the border
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when follower cargo record has been updated with the border arrival acknowledgment flag.
Trigger Criteria:
Context: The follower cargo record has been updated with the border arrival acknowledgment flag
Applied to: Update Follower Cargo Record
Action: The system commits the changes
Logic Flow:
IF The follower cargo record has been updated with the border arrival acknowledgment flag
AND The system commits the changes
THEN:
• The updated cargo record is written back to the cargo table using the Replace function to persist the border arrival acknowledgment
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when follower manifest has been processed (either updated or skipped).
Trigger Criteria:
Context: A follower manifest has been processed (either updated or skipped)
Applied to: Increment Loop Counter J
Action: The system prepares to process the next follower
Logic Flow:
IF A follower manifest has been processed (either updated or skipped)
AND The system prepares to process the next follower
THEN:
• The loop counter J is incremented by 1 to point to the next follower manifest CCN in the array
R-GCX126-cbl-00549 (+23)File: GCX126R.cblBusiness Rule: Retrieve All Follower Manifests for Master CCN
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when master manifest cargo record needs to have its follower manifests retrieved.
Trigger Criteria:
Context: A master manifest cargo record needs to have its follower manifests retrieved
Applied to: Initialize Follower Manifest Array, Set Index I = 1, Set Not End of Database Flag
Action: The follower manifest retrieval process begins
Logic Flow:
IF A master manifest cargo record needs to have its follower manifests retrieved
AND The follower manifest retrieval process begins
THEN:
• The follower manifest array is cleared to spaces, the array index is set to 1, and the end-of-database flag is set to indicate more records may exist
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has been identified as a master manifest with a valid ccn key.
Trigger Criteria:
Context: A cargo record has been identified as a master manifest with a valid CCN key
Applied to: Set Master CCN Key from Current Cargo Record
Action: The system prepares to search for follower manifests
Logic Flow:
IF A cargo record has been identified as a master manifest with a valid CCN key
AND The system prepares to search for follower manifests
THEN:
• The master manifest's CCN key is set as the search criterion for retrieving related follower manifests from the cargo database
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when master ccn key has been established as the search criterion.
Trigger Criteria:
Context: A master CCN key has been established as the search criterion
Applied to: Get Next Cargo Record Using Master CCN Key
Action: The system requests the next cargo record from the database
Logic Flow:
IF A master CCN key has been established as the search criterion
AND The system requests the next cargo record from the database
THEN:
• The database returns the next cargo record where the master manifest CCN matches the search key, and the database status code is set to indicate success or failure
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when database call has been executed to retrieve a cargo record. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database call has been executed to retrieve a cargo record
Applied to: Database Status OK?
Action: The system evaluates the database status code
Logic Flow:
IF A database call has been executed to retrieve a cargo record
AND The system evaluates the database status code
THEN:
• If the status code is blank (spaces), the retrieval was successful and processing continues; otherwise, the end-of-database flag is set to terminate the retrieval loop
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A cargo record has been successfully retrieved from the database
Applied to: Master CCN Matches?
Action: The system compares the retrieved record's master manifest CCN with the search key
Logic Flow:
IF A cargo record has been successfully retrieved from the database
AND The system compares the retrieved record's master manifest CCN with the search key
THEN:
• If the master manifest CCN in the retrieved record equals the search key, processing continues to check if it is a follower; otherwise, the end-of-database flag is set to terminate the retrieval loop
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been successfully retrieved from the database. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record has been successfully retrieved from the database
Applied to: Master Manifest CCN Matches Current CCN?
Action: The master manifest CCN field (GCCC-MASTER-MFST-CCN) in the cargo record is compared with the current master CCN (WS-SAVE-CCN)
Logic Flow:
IF A cargo record has been successfully retrieved from the database
AND The master manifest CCN field (GCCC-MASTER-MFST-CCN) in the cargo record is compared with the current master CCN (WS-SAVE-CCN)
THEN:
• If they match, the cargo is part of the master manifest hierarchy and processing continues; otherwise, the end of database flag is set to true indicating no more related records
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been retrieved and its master ccn has been verified to match the search key.
Trigger Criteria:
Context: A cargo record has been retrieved and its master CCN has been verified to match the search key
Applied to: Is Follower Manifest?
Action: The system checks the manifest type indicator of the cargo record
Logic Flow:
IF A cargo record has been retrieved and its master CCN has been verified to match the search key
AND The system checks the manifest type indicator of the cargo record
THEN:
• If the cargo record is identified as a follower manifest, its CCN is stored in the follower array; if it is the master manifest itself, the system skips storage and checks the array size limit
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has been confirmed as a follower manifest with a valid ccn.
Trigger Criteria:
Context: A cargo record has been confirmed as a follower manifest with a valid CCN
Applied to: Store Follower CCN in Array Position I
Action: The system stores the follower information
Logic Flow:
IF A cargo record has been confirmed as a follower manifest with a valid CCN
AND The system stores the follower information
THEN:
• The follower manifest's CCN is moved to the array position indicated by the current index value I
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower manifest ccn has been successfully stored in the array.
Trigger Criteria:
Context: A follower manifest CCN has been successfully stored in the array
Applied to: Increment Index I
Action: The system prepares to process the next potential follower
Logic Flow:
IF A follower manifest CCN has been successfully stored in the array
AND The system prepares to process the next potential follower
THEN:
• The array index I is incremented by 1
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when array index i has been incremented after storing a follower ccn or skipping a master record.
Trigger Criteria:
Context: The array index I has been incremented after storing a follower CCN or skipping a master record
Applied to: Index I > 100?
Action: The system checks the current value of index I
Logic Flow:
IF The array index I has been incremented after storing a follower CCN or skipping a master record
AND The system checks the current value of index I
THEN:
• If index I is greater than 100, the end-of-database flag is set to terminate the retrieval loop; otherwise, the system continues to retrieve the next cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when one of the following conditions has occurred: database status is not ok, master ccn does not match, or the follower array limit has been exceeded.
Trigger Criteria:
Context: One of the following conditions has occurred: database status is not OK, master CCN does not match, or the follower array limit has been exceeded
Applied to: Set End of Database Flag
Action: The system sets the end-of-database flag
Logic Flow:
IF One of the following conditions has occurred: database status is not OK, master CCN does not match, or the follower array limit has been exceeded
AND The system sets the end-of-database flag
THEN:
• The end-of-database flag is set to true, which will cause the retrieval loop to terminate
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when retrieval loop has terminated with the end-of-database flag set.
Trigger Criteria:
Context: The retrieval loop has terminated with the end-of-database flag set
Applied to: Subtract 1 from Index I - Final Count of Followers
Action: The system calculates the final count of follower manifests
Logic Flow:
IF The retrieval loop has terminated with the end-of-database flag set
AND The system calculates the final count of follower manifests
THEN:
• The value 1 is subtracted from index I to obtain the actual count of follower manifests stored in the array
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when final follower count has been calculated by subtracting 1 from index i.
Trigger Criteria:
Context: The final follower count has been calculated by subtracting 1 from index I
Applied to: Follower Count > 0?
Action: The system checks if any followers were found
Logic Flow:
IF The final follower count has been calculated by subtracting 1 from index I
AND The system checks if any followers were found
THEN:
• If the adjusted index I is less than or equal to 0, no follower manifests were found and the process exits; if I is greater than 0, follower manifests exist and are available for further processing
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when master manifest ccn needs to be processed for follower manifests.
Trigger Criteria:
Context: A master manifest CCN needs to be processed for follower manifests
Applied to: Initialize Follower Manifest Array
Action: The follower manifest retrieval process begins
Logic Flow:
IF A master manifest CCN needs to be processed for follower manifests
AND The follower manifest retrieval process begins
THEN:
• The follower manifest array is cleared to spaces, the counter I is set to 1, and the database end flag is set to indicate not end of database
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower manifests are being retrieved for a master manifest.
Trigger Criteria:
Context: Follower manifests are being retrieved for a master manifest
Applied to: End of Database OR Counter > 100?
Action: The counter I exceeds 100 OR the end of database flag is set to true
Logic Flow:
IF Follower manifests are being retrieved for a master manifest
AND The counter I exceeds 100 OR the end of database flag is set to true
THEN:
• The retrieval loop terminates and proceeds to finalize the count
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when master manifest ccn is stored in gcb0rt-ccn-key. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The master manifest CCN is stored in GCB0RT-CCN-KEY
Applied to: Get Next Cargo Record Using Master CCN
Action: The system needs to find the next cargo record in the hierarchy
Logic Flow:
IF The master manifest CCN is stored in GCB0RT-CCN-KEY
AND The system needs to find the next cargo record in the hierarchy
THEN:
• A database call is made using function code GN (Get Next) with the cargo report segment and the master CCN qualifier to retrieve the next record
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when database call has been made to retrieve the next cargo record. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database call has been made to retrieve the next cargo record
Applied to: Status Code = Blank?
Action: The status code from the database call is evaluated
Logic Flow:
IF A database call has been made to retrieve the next cargo record
AND The status code from the database call is evaluated
THEN:
• If the status code is blank (spaces), the retrieval was successful and processing continues; otherwise, the end of database flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been retrieved and verified to belong to the master manifest hierarchy.
Trigger Criteria:
Context: A cargo record has been retrieved and verified to belong to the master manifest hierarchy
Applied to: Is Follower Manifest?
Action: The manifest type indicator (GCCC-FOLLOWER-MFST) is evaluated
Logic Flow:
IF A cargo record has been retrieved and verified to belong to the master manifest hierarchy
AND The manifest type indicator (GCCC-FOLLOWER-MFST) is evaluated
THEN:
• If the cargo record is identified as a follower manifest (not a master manifest), it is eligible for collection; otherwise, the loop continues to the next record
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been identified as a follower manifest belonging to the master manifest. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record has been identified as a follower manifest belonging to the master manifest
Applied to: Store Follower CCN in Array Position I
Action: The follower manifest CCN needs to be stored
Logic Flow:
IF A cargo record has been identified as a follower manifest belonging to the master manifest
AND The follower manifest CCN needs to be stored
THEN:
• The CCN key (GCCC-CCN-KEY) is moved to the follower manifest array at position I (WS-FOLLOWER-MANI(I))
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when follower manifest ccn has been stored in the array.
Trigger Criteria:
Context: A follower manifest CCN has been stored in the array
Applied to: Increment Counter I
Action: The counter needs to be updated for the next iteration
Logic Flow:
IF A follower manifest CCN has been stored in the array
AND The counter needs to be updated for the next iteration
THEN:
• The counter I is incremented by 1
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower manifest retrieval loop has completed (either by reaching end of database or maximum count).
Trigger Criteria:
Context: The follower manifest retrieval loop has completed (either by reaching end of database or maximum count)
Applied to: Subtract 1 from Counter I
Action: The final count needs to be determined
Logic Flow:
IF The follower manifest retrieval loop has completed (either by reaching end of database or maximum count)
AND The final count needs to be determined
THEN:
• The counter I is decremented by 1 to represent the actual number of follower manifests stored in the array
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when follower manifest retrieval process has completed and the counter has been adjusted.
Trigger Criteria:
Context: The follower manifest retrieval process has completed and the counter has been adjusted
Applied to: Counter I <= 0?
Action: The final count (I) is evaluated
Logic Flow:
IF The follower manifest retrieval process has completed and the counter has been adjusted
AND The final count (I) is evaluated
THEN:
• If I is less than or equal to 0, no follower manifests were found and processing exits; if I is greater than 0, the follower manifest array contains valid entries for processing
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when follower manifest count is zero or negative.
Trigger Criteria:
Context: The follower manifest count is zero or negative
Applied to: No Follower Manifests Found
Action: The system needs to complete the retrieval process
Logic Flow:
IF The follower manifest count is zero or negative
AND The system needs to complete the retrieval process
THEN:
• Control returns to the calling process with an empty follower manifest array, and no further follower processing occurs
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower manifest count is greater than zero and the array contains valid follower ccns.
Trigger Criteria:
Context: The follower manifest count is greater than zero and the array contains valid follower CCNs
Applied to: Follower Manifests Array Populated
Action: The system needs to apply release information to follower manifests
Logic Flow:
IF The follower manifest count is greater than zero and the array contains valid follower CCNs
AND The system needs to apply release information to follower manifests
THEN:
• Control proceeds to iterate through the follower manifest array and apply the same release information to each follower that was applied to the master manifest
R-GCX126-cbl-00561 (+19)File: GCX126R.cblBusiness Rule: Update Border Arrival for Each Follower Manifest
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when master manifest cargo record exists with a valid ccn.
Trigger Criteria:
Context: A master manifest cargo record exists with a valid CCN
Applied to: Set Master CCN as Search Key
Action: The system needs to find all follower manifests associated with this master
Logic Flow:
IF A master manifest cargo record exists with a valid CCN
AND The system needs to find all follower manifests associated with this master
THEN:
• The system sets the master manifest CCN as the search key for database retrieval
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when system is about to collect follower manifest ccns.
Trigger Criteria:
Context: The system is about to collect follower manifest CCNs
Applied to: Initialize Follower Manifest Array
Action: The collection process begins
Logic Flow:
IF The system is about to collect follower manifest CCNs
AND The collection process begins
THEN:
• The system clears the follower manifest array by setting all entries to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower manifest collection process is starting.
Trigger Criteria:
Context: The follower manifest collection process is starting
Applied to: Set Counter to 1
Action: The system prepares to iterate through cargo records
Logic Flow:
IF The follower manifest collection process is starting
AND The system prepares to iterate through cargo records
THEN:
• The system sets the counter variable to 1 to begin indexing from the first position
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when master manifest ccn is set as the search key.
Trigger Criteria:
Context: A master manifest CCN is set as the search key
Applied to: Retrieve Next Cargo Record
Action: The system executes a database retrieval operation
Logic Flow:
IF A master manifest CCN is set as the search key
AND The system executes a database retrieval operation
THEN:
• The system retrieves the next cargo record that matches or follows the master CCN in the database hierarchy
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record retrieval operation has been executed.
Trigger Criteria:
Context: A cargo record retrieval operation has been executed
Applied to: Status Code Blank?
Action: The system checks the database operation status code
Logic Flow:
IF A cargo record retrieval operation has been executed
AND The system checks the database operation status code
THEN:
• If the status code is blank (spaces), the retrieval was successful and processing continues; otherwise, the system marks end of database and stops searching for more followers
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A cargo record has been successfully retrieved from the database
Applied to: Master CCN Matches?
Action: The system compares the master manifest CCN field in the retrieved record with the search key master CCN
Logic Flow:
IF A cargo record has been successfully retrieved from the database
AND The system compares the master manifest CCN field in the retrieved record with the search key master CCN
THEN:
• If the master manifest CCN in the retrieved record matches the search key, the record is potentially a follower manifest and processing continues; otherwise, the system marks end of database and stops searching
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been retrieved and its master ccn matches the search key.
Trigger Criteria:
Context: A cargo record has been retrieved and its master CCN matches the search key
Applied to: Is Follower Manifest?
Action: The system checks the manifest type indicator in the cargo record
Logic Flow:
IF A cargo record has been retrieved and its master CCN matches the search key
AND The system checks the manifest type indicator in the cargo record
THEN:
• If the cargo record is identified as a follower manifest (not a master manifest), it is added to the collection; if it is a master manifest, it is skipped and the system retrieves the next record
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been identified as a follower manifest.
Trigger Criteria:
Context: A cargo record has been identified as a follower manifest
Applied to: Store Follower CCN in Array
Action: The system needs to collect this follower for later processing
Logic Flow:
IF A cargo record has been identified as a follower manifest
AND The system needs to collect this follower for later processing
THEN:
• The system stores the follower manifest CCN in the array at the position indicated by the current counter value
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower manifest ccn has been stored in the array.
Trigger Criteria:
Context: A follower manifest CCN has been stored in the array
Applied to: Increment Counter
Action: The system prepares to continue searching for more followers
Logic Flow:
IF A follower manifest CCN has been stored in the array
AND The system prepares to continue searching for more followers
THEN:
• The system adds 1 to the counter variable to move to the next array position
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when counter has been incremented after storing a follower manifest ccn.
Trigger Criteria:
Context: The counter has been incremented after storing a follower manifest CCN
Applied to: Counter > 100?
Action: The system checks if the maximum limit has been reached
Logic Flow:
IF The counter has been incremented after storing a follower manifest CCN
AND The system checks if the maximum limit has been reached
THEN:
• If the counter exceeds 100, the system stops searching for more followers and proceeds to calculate the total count; otherwise, it continues retrieving the next cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when system has attempted to retrieve a cargo record.
Trigger Criteria:
Context: The system has attempted to retrieve a cargo record
Applied to: End of Database?
Action: The database operation returns a non-blank status code or the master CCN no longer matches
Logic Flow:
IF The system has attempted to retrieve a cargo record
AND The database operation returns a non-blank status code or the master CCN no longer matches
THEN:
• The system sets the end-of-database flag and stops searching for more follower manifests
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when search for follower manifests has completed (either by reaching the limit, end of database, or no more matches).
Trigger Criteria:
Context: The search for follower manifests has completed (either by reaching the limit, end of database, or no more matches)
Applied to: Calculate Total Follower Count
Action: The system needs to determine how many followers were actually found
Logic Flow:
IF The search for follower manifests has completed (either by reaching the limit, end of database, or no more matches)
AND The system needs to determine how many followers were actually found
THEN:
• The system subtracts 1 from the counter variable to get the accurate count of follower manifests stored in the array
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when follower manifest search has completed and the count has been calculated.
Trigger Criteria:
Context: The follower manifest search has completed and the count has been calculated
Applied to: Any Followers Found?
Action: The system checks if any followers were collected
Logic Flow:
IF The follower manifest search has completed and the count has been calculated
AND The system checks if any followers were collected
THEN:
• If the count is less than or equal to 0, the system exits the process without performing any updates; if the count is greater than 0, the system proceeds to process each follower
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when at least one follower manifest ccn exists in the collection array.
Trigger Criteria:
Context: At least one follower manifest CCN exists in the collection array
Applied to: Get Next Follower CCN from Array
Action: The system begins or continues the update process
Logic Flow:
IF At least one follower manifest CCN exists in the collection array
AND The system begins or continues the update process
THEN:
• The system retrieves the next follower manifest CCN from the array based on the current iteration position
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower manifest ccn has been retrieved from the collection array.
Trigger Criteria:
Context: A follower manifest CCN has been retrieved from the collection array
Applied to: Retrieve Follower Cargo Record
Action: The system needs to update the follower manifest
Logic Flow:
IF A follower manifest CCN has been retrieved from the collection array
AND The system needs to update the follower manifest
THEN:
• The system retrieves the complete cargo record from the database using the follower CCN as the key
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when system has attempted to retrieve a follower cargo record by ccn.
Trigger Criteria:
Context: The system has attempted to retrieve a follower cargo record by CCN
Applied to: Cargo Found?
Action: The system checks if the cargo record was found
Logic Flow:
IF The system has attempted to retrieve a follower cargo record by CCN
AND The system checks if the cargo record was found
THEN:
• If the cargo record is found, the system proceeds with logging and updating; if not found, the system skips to the next follower in the collection
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower manifest cargo record has been successfully retrieved.
Trigger Criteria:
Context: A follower manifest cargo record has been successfully retrieved
Applied to: '350 ACK - ARRIVAL ACK AT BORDER'
Action: The system prepares to update the cargo record with border arrival acknowledgment
Logic Flow:
IF A follower manifest cargo record has been successfully retrieved
AND The system prepares to update the cargo record with border arrival acknowledgment
THEN:
• The system creates a log entry with the message '350 ACK - ARRIVAL ACK AT BORDER' associated with the follower manifest CCN
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower manifest cargo record has been retrieved and logged.
Trigger Criteria:
Context: A follower manifest cargo record has been retrieved and logged
Applied to: Set Border Arrival Flag to TRUE
Action: The system updates the cargo status
Logic Flow:
IF A follower manifest cargo record has been retrieved and logged
AND The system updates the cargo status
THEN:
• The system sets the border arrival acknowledgment flag to TRUE in the cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower cargo record has been modified with the border arrival acknowledgment flag set to true.
Trigger Criteria:
Context: The follower cargo record has been modified with the border arrival acknowledgment flag set to TRUE
Applied to: Update Follower Cargo Record
Action: The system commits the changes
Logic Flow:
IF The follower cargo record has been modified with the border arrival acknowledgment flag set to TRUE
AND The system commits the changes
THEN:
• The system updates the cargo record in the database with the new border arrival acknowledgment status
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when one follower manifest has been processed (either updated or skipped).
Trigger Criteria:
Context: One follower manifest has been processed (either updated or skipped)
Applied to: More Followers to Process?
Action: The system checks the iteration status
Logic Flow:
IF One follower manifest has been processed (either updated or skipped)
AND The system checks the iteration status
THEN:
• If there are more follower CCNs in the array that have not been processed (not spaces or low-values), the system retrieves the next follower CCN; otherwise, the process completes
R-GCX126-cbl-00581 (+7)File: GCX126R.cblBusiness Rule: Set Cargo Status Flags Based on Database Return
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when system needs to evaluate cargo status from database retrieval. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system needs to evaluate cargo status from database retrieval
Applied to: Initialize All Status Flags to Space
Action: The cargo status flag initialization process begins
Logic Flow:
IF The system needs to evaluate cargo status from database retrieval
AND The cargo status flag initialization process begins
THEN:
• All four cargo status switches (WS-SWITCH1-CARGO, WS-SWITCH2-CARGO, WS-SWITCH3-CARGO, WS-SWITCH4-CARGO) are set to space character
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo lookup has been performed in the database.
Trigger Criteria:
Context: A cargo lookup has been performed in the database
Applied to: Set Cargo Not Found Flag
Action: The database status code is not equal to spaces
Logic Flow:
IF A cargo lookup has been performed in the database
AND The database status code is not equal to spaces
THEN:
• The cargo-not-found indicator flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo lookup has been performed in the database.
Trigger Criteria:
Context: A cargo lookup has been performed in the database
Applied to: Set Cargo Found Flag
Action: The database status code equals spaces
Logic Flow:
IF A cargo lookup has been performed in the database
AND The database status code equals spaces
THEN:
• The cargo-found indicator flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo has been found in the database with cargo-found flag set to true.
Trigger Criteria:
Context: Cargo has been found in the database with cargo-found flag set to true
Applied to: Set Cargo Not Waybill Flag
Action: The cargo waybill key for index does not equal the saved waybill index AND the saved waybill index is not equal to space
Logic Flow:
IF Cargo has been found in the database with cargo-found flag set to true
AND The cargo waybill key for index does not equal the saved waybill index AND the saved waybill index is not equal to space
THEN:
• The cargo-not-waybill indicator flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo has been found in the database and waybill validation has passed (either matched or saved index is blank).
Trigger Criteria:
Context: Cargo has been found in the database AND waybill validation has passed (either matched or saved index is blank)
Applied to: Set Cargo Deleted Flag
Action: The cargo delete status field equals 'D'
Logic Flow:
IF Cargo has been found in the database AND waybill validation has passed (either matched or saved index is blank)
AND The cargo delete status field equals 'D'
THEN:
• The cargo-deleted indicator flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo has been found in the database and waybill validation has passed and cargo delete status is not 'd'.
Trigger Criteria:
Context: Cargo has been found in the database AND waybill validation has passed AND cargo delete status is not 'D'
Applied to: Set Cargo Returned Flag
Action: The cargo status indicates a return status condition
Logic Flow:
IF Cargo has been found in the database AND waybill validation has passed AND cargo delete status is not 'D'
AND The cargo status indicates a return status condition
THEN:
• The cargo-returned indicator flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo has been found in the database and waybill validation has passed and cargo delete status is not 'd'.
Trigger Criteria:
Context: Cargo has been found in the database AND waybill validation has passed AND cargo delete status is not 'D'
Applied to: Set Cargo Released Flag
Action: The cargo release status field equals 'R'
Logic Flow:
IF Cargo has been found in the database AND waybill validation has passed AND cargo delete status is not 'D'
AND The cargo release status field equals 'R'
THEN:
• The cargo-released indicator flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo has been found in the database and waybill validation has passed and cargo delete status is not 'd'.
Trigger Criteria:
Context: Cargo has been found in the database AND waybill validation has passed AND cargo delete status is not 'D'
Applied to: Set Cargo On-A-Train Flag
Action: The cargo train ID field is not equal to spaces
Logic Flow:
IF Cargo has been found in the database AND waybill validation has passed AND cargo delete status is not 'D'
AND The cargo train ID field is not equal to spaces
THEN:
• The cargo-on-a-train indicator flag is set to true
R-GCX126-cbl-00589 (+8)File: GCX126R.cblBusiness Rule: Search for Associated US Manifest by Car ID and Waybill
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been processed and current cargo equipment car id and waybill index are available.
Trigger Criteria:
Context: A cargo record has been processed and current cargo equipment car ID and waybill index are available
Applied to: Set Car ID from Current Cargo, Set Waybill Index from Current Cargo, Set US CCN to Low Values
Action: The system initiates a search for associated US manifest records
Logic Flow:
IF A cargo record has been processed and current cargo equipment car ID and waybill index are available
AND The system initiates a search for associated US manifest records
THEN:
• The search parameters are initialized with car ID from current cargo equipment car key, waybill index from saved waybill index, and US CCN key index set to low values
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when search parameters have been initialized with car id and waybill index.
Trigger Criteria:
Context: Search parameters have been initialized with car ID and waybill index
Applied to: Function: Get Unique GU, Index Type: Car-Waybill, Operator: Greater Than or Equal
Action: The system prepares to execute the database search
Logic Flow:
IF Search parameters have been initialized with car ID and waybill index
AND The system prepares to execute the database search
THEN:
• The search function is set to Get Unique (GU), segment type is set to US cargo record (GCSUSRT), index type is set to Car-Waybill, and operator is set to greater than or equal (>=)
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when search criteria are configured with function gu, segment gcsusrt, index car-waybill, and operator >=. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Search criteria are configured with function GU, segment GCSUSRT, index Car-Waybill, and operator >=
Applied to: Execute Database Search on US Cargo Table
Action: The system executes the database call
Logic Flow:
IF Search criteria are configured with function GU, segment GCSUSRT, index Car-Waybill, and operator >=
AND The system executes the database call
THEN:
• The GCCUSIO program is invoked with the search parameters to retrieve US cargo records from GCSUSRT table
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when database search has been executed on us cargo table.
Trigger Criteria:
Context: A database search has been executed on US cargo table
Applied to: Database Status OK? - Error Path
Action: The database status code is not blank (indicating an error)
Logic Flow:
IF A database search has been executed on US cargo table
AND The database status code is not blank (indicating an error)
THEN:
• The end-of-file flag is set to true to terminate the search process
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when us cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved from the database
Applied to: Car ID and Waybill Match?
Action: The system validates the retrieved record
Logic Flow:
IF A US cargo record has been successfully retrieved from the database
AND The system validates the retrieved record
THEN:
• The first 12 characters of the US cargo car ID number index are compared with current cargo equipment car key AND the US cargo waybill number index is compared with saved waybill index, andif either comparison fails, the end-of-file flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record has been retrieved and validated for car id and waybill match.
Trigger Criteria:
Context: A US cargo record has been retrieved and validated for car ID and waybill match
Applied to: Cargo Deleted OR TR Created?
Action: The system checks the cargo processing eligibility
Logic Flow:
IF A US cargo record has been retrieved and validated for car ID and waybill match
AND The system checks the cargo processing eligibility
THEN:
• If the US cargo is marked as deleted OR the train-created-for-it indicator equals 'Y', the record is skipped and search continues, otherwise the US manifest found flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record matches car id and waybill and is not deleted and does not have train created.
Trigger Criteria:
Context: A US cargo record matches car ID and waybill AND is not deleted AND does not have train created
Applied to: Set US Manifest Found Flag
Action: The system completes validation checks
Logic Flow:
IF A US cargo record matches car ID and waybill AND is not deleted AND does not have train created
AND The system completes validation checks
THEN:
• The US manifest found flag is set to true to indicate a valid associated US manifest has been located
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record has been found but is marked as deleted or has train created indicator set to 'y'. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A US cargo record has been found but is marked as deleted OR has train created indicator set to 'Y'
Applied to: Continue to Next Record
Action: The system needs to continue searching for valid records
Logic Flow:
IF A US cargo record has been found but is marked as deleted OR has train created indicator set to 'Y'
AND The system needs to continue searching for valid records
THEN:
• The search function is set to Get Next (GN), segment type remains GCSUSRT, index type remains Car-Waybill, operator is set to greater than (>), and the database call is executed to retrieve the next record in sequence
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when next us cargo record has been retrieved using get next function.
Trigger Criteria:
Context: A next US cargo record has been retrieved using Get Next function
Applied to: Car ID and Waybill Match? - After Continue
Action: The system validates the continued search result
Logic Flow:
IF A next US cargo record has been retrieved using Get Next function
AND The system validates the continued search result
THEN:
• The first 12 characters of the US cargo car ID number index are compared with current cargo equipment car key AND the US cargo waybill number index is compared with saved waybill index, andif either comparison fails, the end-of-file flag is set to true, otherwise the cargo deletion and train creation checks are performed again
R-GCX126-cbl-00598 (+21)File: GCX126R.cblBusiness Rule: Process Follower Manifests for Master Release
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been retrieved and processed for release or deconsolidation.
Trigger Criteria:
Context: A cargo record has been retrieved and processed for release or deconsolidation
Applied to: Is Cargo a Master Manifest?
Action: The system evaluates whether to process associated follower manifests
Logic Flow:
IF A cargo record has been retrieved and processed for release or deconsolidation
AND The system evaluates whether to process associated follower manifests
THEN:
• If the cargo is not a master manifest, skip follower processing and exit; If the cargo is a master manifest, proceed to save master information and process followers
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is confirmed as a master manifest.
Trigger Criteria:
Context: The cargo is confirmed as a master manifest
Applied to: Save Master Cargo Information
Action: The system prepares to process follower manifests
Logic Flow:
IF The cargo is confirmed as a master manifest
AND The system prepares to process follower manifests
THEN:
• Save the complete master cargo report segment to working storage; Save the master CCN key; Save the master waybill key for index; Save the master equipment car identifier
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when master cargo information has been saved.
Trigger Criteria:
Context: Master cargo information has been saved
Applied to: Initialize Follower Array, Set Counter to 1, Max 100 Followers
Action: The system begins collecting follower manifests
Logic Flow:
IF Master cargo information has been saved
AND The system begins collecting follower manifests
THEN:
• Clear the follower manifest array (set all entries to spaces); Set the follower array counter to 1; Set the end-of-database flag to false (not end of database); Establish maximum limit of 100 follower manifests
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower collection process is active and the counter is within the 100-follower limit.
Trigger Criteria:
Context: The follower collection process is active and the counter is within the 100-follower limit
Applied to: Get Next Follower Manifest Using Master CCN
Action: The system requests the next follower manifest record
Logic Flow:
IF The follower collection process is active and the counter is within the 100-follower limit
AND The system requests the next follower manifest record
THEN:
• Execute database Get Next operation using master CCN key; Set database accept status to 'GEGB'; Use cargo report segment PCB7; Use qualified SSA with master CCN key (CCRT-B0RT-SSAQ)
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when get next operation has been executed to retrieve a follower manifest.
Trigger Criteria:
Context: A Get Next operation has been executed to retrieve a follower manifest
Applied to: Database Status OK?
Action: The system evaluates the database return status code
Logic Flow:
IF A Get Next operation has been executed to retrieve a follower manifest
AND The system evaluates the database return status code
THEN:
• If status code is blank (spaces), the retrieval was successful and processing continues; If status code is not blank, set the end-of-database flag to true and stop retrieving followers
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A cargo record has been successfully retrieved from the database
Applied to: Follower's Master CCN Matches Current Master?
Action: The system validates the master-follower relationship
Logic Flow:
IF A cargo record has been successfully retrieved from the database
AND The system validates the master-follower relationship
THEN:
• If the retrieved cargo's master manifest CCN equals the saved master CCN key, the relationship is valid and processing continues; If the master manifest CCN does not match, set the end-of-database flag to true and stop retrieving followers
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has been retrieved and validated as belonging to the current master.
Trigger Criteria:
Context: A cargo record has been retrieved and validated as belonging to the current master
Applied to: Is This a Follower Manifest?
Action: The system checks the manifest type indicator
Logic Flow:
IF A cargo record has been retrieved and validated as belonging to the current master
AND The system checks the manifest type indicator
THEN:
• If the cargo is identified as a follower manifest, store its CCN in the follower array; If the cargo is identified as a master manifest, skip storage and continue to check for more followers
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been confirmed as a follower manifest of the current master.
Trigger Criteria:
Context: A cargo record has been confirmed as a follower manifest of the current master
Applied to: Store Follower CCN in Array, Increment Counter
Action: The system stores the follower information
Logic Flow:
IF A cargo record has been confirmed as a follower manifest of the current master
AND The system stores the follower information
THEN:
• Move the follower's CCN key to the follower manifest array at position indicated by counter; Add 1 to the counter
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when system has encountered a database error, a non-matching master ccn, or reached the end of available records. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system has encountered a database error, a non-matching master CCN, or reached the end of available records
Applied to: Set End of Database Flag
Action: The system needs to stop retrieving additional followers
Logic Flow:
IF The system has encountered a database error, a non-matching master CCN, or reached the end of available records
AND The system needs to stop retrieving additional followers
THEN:
• Set the end-of-database flag to true (WS-FOLLOWER-END-OF-DB)
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower has been processed or a continuation condition has been evaluated.
Trigger Criteria:
Context: A follower has been processed or a continuation condition has been evaluated
Applied to: More Followers to Retrieve?
Action: The system determines whether to retrieve the next follower
Logic Flow:
IF A follower has been processed or a continuation condition has been evaluated
AND The system determines whether to retrieve the next follower
THEN:
• If the end-of-database flag is false AND the counter is less than or equal to 100, continue to get the next follower; If the end-of-database flag is true OR the counter exceeds 100, stop retrieval and proceed to count validation
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower retrieval loop has completed.
Trigger Criteria:
Context: The follower retrieval loop has completed
Applied to: Any Followers Found?
Action: The system validates the number of followers collected
Logic Flow:
IF The follower retrieval loop has completed
AND The system validates the number of followers collected
THEN:
• Subtract 1 from the counter to get the actual count of followers; If the count is less than or equal to 0, no followers were found and processing exits; If the count is greater than 0, proceed to process each follower in the array
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when at least one follower manifest has been collected in the array.
Trigger Criteria:
Context: At least one follower manifest has been collected in the array
Applied to: Loop Through Each Follower in Array
Action: The system begins processing the collected followers
Logic Flow:
IF At least one follower manifest has been collected in the array
AND The system begins processing the collected followers
THEN:
• Start loop with index J at position 1; Continue loop incrementing J by 1 each iteration; Stop loop when follower manifest array entry at position I is spaces or low-values OR when J exceeds I (the total count of followers)
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when follower ccn has been retrieved from the processing array at position j.
Trigger Criteria:
Context: A follower CCN has been retrieved from the processing array at position J
Applied to: Retrieve Follower Cargo by CCN
Action: The system retrieves the follower cargo record
Logic Flow:
IF A follower CCN has been retrieved from the processing array at position J
AND The system retrieves the follower cargo record
THEN:
• Move the follower CCN to the cargo report segment key value (CCRT-SSAQ); Move the follower CCN to the alternate segment key value (A2RT-SSAQ); Execute Get Hold Unique database operation (Z3000-GHU-CARGO); Evaluate cargo found status based on database return
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when database retrieval operation has been executed for a follower cargo record. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database retrieval operation has been executed for a follower cargo record
Applied to: Follower Cargo Found?
Action: The system evaluates the retrieval result
Logic Flow:
IF A database retrieval operation has been executed for a follower cargo record
AND The system evaluates the retrieval result
THEN:
• If cargo found flag is true (WS-CARGO-FOUND), proceed to set release information; If cargo found flag is false, skip this follower and check if there are more followers to process
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower cargo record has been successfully retrieved. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A follower cargo record has been successfully retrieved
Applied to: Clear Destination Station, Set Release Date/Time, Set Release By User, Set Status to RELEASED, Clear Error Fields
Action: The system updates the follower with release information
Logic Flow:
IF A follower cargo record has been successfully retrieved
AND The system updates the follower with release information
THEN:
• Move spaces to destination station number index; Move spaces to destination station number for index; Move current machine date to release date; Move current machine time to release time; Move current user ID to release by field; Move 'RELEASED' to current status field; Move 'R' to release status field; Move 'A' to release type field; Move spaces to release reason field; Move spaces to error or release status index; Move spaces to error status field
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when release information has been set for the follower manifest.
Trigger Criteria:
Context: Release information has been set for the follower manifest
Applied to: Notice Reason Type?
Action: The system determines the type of release message to log
Logic Flow:
IF Release information has been set for the follower manifest
AND The system determines the type of release message to log
THEN:
• If the V9 notice reason code indicates RELEASED, proceed to log release message; If the V9 notice reason code indicates DECONSOLIDATION, proceed to log deconsolidation message
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower manifest is being released through standard release process.
Trigger Criteria:
Context: The follower manifest is being released through standard release process
Applied to: 'EDI 350: RELEASE : [Ref] AT PORT [Port]', Set Release Reason: '[Ref]/[Port]'
Action: The system logs the release information
Logic Flow:
IF The follower manifest is being released through standard release process
AND The system logs the release information
THEN:
• Clear the information message field to spaces; Build message string: 'EDI 350: RELEASE : ' concatenated with CBSA release reference ID (first 15 characters) concatenated with ' AT PORT ' concatenated with port code (first 4 characters); Move the built message to information message field; Build release reason string: CBSA release reference ID (first 15 characters) concatenated with '/' concatenated with port code (first 4 characters); Move the built reason to cargo release reason field; Set current CCN key to information message CCN key; Execute log cargo information message procedure (Z150-LOG-CARGO-INFO-MSG)
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower manifest is being released through deconsolidation process.
Trigger Criteria:
Context: The follower manifest is being released through deconsolidation process
Applied to: 'EDI 350: RELEASE VIA DECON AT PORT [Port]', Set Release Reason: 'DECONSOLIDATION AT [Port]'
Action: The system logs the deconsolidation information
Logic Flow:
IF The follower manifest is being released through deconsolidation process
AND The system logs the deconsolidation information
THEN:
• Clear the information message field to spaces; Build message string: 'EDI 350: RELEASE VIA DECON AT PORT ' concatenated with port code (first 4 characters); Move the built message to information message field; Build release reason string: 'DECONSOLIDATION AT ' concatenated with port code (first 4 characters); Move the built reason to cargo release reason field; Set current CCN key to information message CCN key; Execute log cargo information message procedure (Z150-LOG-CARGO-INFO-MSG)
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower manifest has been released or deconsolidated.
Trigger Criteria:
Context: A follower manifest has been released or deconsolidated
Applied to: Find US Cargo by Car ID and Waybill, Log Release to US CCN
Action: The system processes associated US manifest
Logic Flow:
IF A follower manifest has been released or deconsolidated
AND The system processes associated US manifest
THEN:
• Set US manifest not found flag to true; Set not end-of-file flag to true; Move current equipment car ID key to US cargo car ID index; Move saved waybill index to US cargo waybill index; Execute Get Unique US cargo by car and waybill (Z3300-GU-US-CARGO-BY-CARWB); Execute Get Next US cargo by car and waybill repeatedly (Z3350-GN-US-CARGO-BY-CARWB) until US manifest found or end-of-file; If end-of-file reached, exit US manifest processing; If US manifest found: move log information, build date string from machine century and date, move machine time to log time, set action code to use input message, move US CCN key to train or US CCN field, set US cargo indicator to true, build message string 'CDN CCN RLSED BY EDI 350: ' concatenated with Canadian CCN key, execute spawn log entry procedure (Z300-SPAWN-GCT1051E)
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when all release information has been set for the follower manifest and us manifest processing is complete. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All release information has been set for the follower manifest and US manifest processing is complete
Applied to: Update Follower Cargo Record in Database
Action: The system updates the follower cargo record
Logic Flow:
IF All release information has been set for the follower manifest and US manifest processing is complete
AND The system updates the follower cargo record
THEN:
• Move spaces to database status code; Move blank to database accept status; Execute database Replace operation using cargo PCB; Pass cargo report segment for update
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower manifest has been processed and updated.
Trigger Criteria:
Context: A follower manifest has been processed and updated
Applied to: More Followers in Array?
Action: The system determines whether to continue the processing loop
Logic Flow:
IF A follower manifest has been processed and updated
AND The system determines whether to continue the processing loop
THEN:
• If the current loop index J is less than the total follower count I, continue loop to process next follower; If the current loop index J equals or exceeds the total follower count I, exit loop and proceed to restore master information
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when all follower manifests have been processed and updated.
Trigger Criteria:
Context: All follower manifests have been processed and updated
Applied to: Restore Master Cargo Information
Action: The system completes follower processing
Logic Flow:
IF All follower manifests have been processed and updated
AND The system completes follower processing
THEN:
• Move saved master cargo report segment to current cargo report segment; Move saved master waybill key to current waybill index; Move saved master equipment car to current car ID key
R-GCX126-cbl-00620 (+18)File: GCX126R.cblBusiness Rule: Process Follower Manifests for Master Deconsolidation
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when master manifest cargo record has been identified for deconsolidation processing.
Trigger Criteria:
Context: A master manifest cargo record has been identified for deconsolidation processing
Applied to: Save Master Cargo Information
Action: The system begins processing follower manifests
Logic Flow:
IF A master manifest cargo record has been identified for deconsolidation processing
AND The system begins processing follower manifests
THEN:
• The master cargo segment, master CCN key, and master waybill index are saved to temporary storage for later restoration
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when master manifest ccn exists and follower manifest array is initialized with index starting at 1.
Trigger Criteria:
Context: A master manifest CCN exists and follower manifest array is initialized with index starting at 1
Applied to: Get Next Cargo Record
Action: The system retrieves the next cargo record using the master CCN as the parent reference
Logic Flow:
IF A master manifest CCN exists and follower manifest array is initialized with index starting at 1
AND The system retrieves the next cargo record using the master CCN as the parent reference
THEN:
• The system continues retrieving cargo records until either end of database is reached OR the index exceeds 100 follower manifests
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has been retrieved from the database.
Trigger Criteria:
Context: A cargo record has been retrieved from the database
Applied to: Status Code = Blank AND Master CCN Matches?
Action: The system validates the cargo record
Logic Flow:
IF A cargo record has been retrieved from the database
AND The system validates the cargo record
THEN:
• The cargo record is considered valid if the database status code is blank (successful retrieval) AND the cargo's master manifest CCN matches the current master CCN being processed
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been validated as belonging to the master manifest ccn.
Trigger Criteria:
Context: A cargo record has been validated as belonging to the master manifest CCN
Applied to: Is Follower Manifest?
Action: The system checks the manifest type indicator
Logic Flow:
IF A cargo record has been validated as belonging to the master manifest CCN
AND The system checks the manifest type indicator
THEN:
• The cargo is identified as a follower manifest if it is NOT flagged as a master manifest
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been identified as a valid follower manifest.
Trigger Criteria:
Context: A cargo record has been identified as a valid follower manifest
Applied to: Store Follower CCN in Array
Action: The system stores the follower CCN
Logic Flow:
IF A cargo record has been identified as a valid follower manifest
AND The system stores the follower CCN
THEN:
• The follower manifest CCN key is stored in the follower array at the current index position AND the index is incremented by 1
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower manifest retrieval process has completed and the index has been decremented by 1.
Trigger Criteria:
Context: The follower manifest retrieval process has completed and the index has been decremented by 1
Applied to: Index <= 0?
Action: The system checks if any follower manifests were found
Logic Flow:
IF The follower manifest retrieval process has completed and the index has been decremented by 1
AND The system checks if any follower manifests were found
THEN:
• If the adjusted index is less than or equal to 0, exit the process as no follower manifests exist for this master
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when at least one follower manifest ccn has been stored in the follower array.
Trigger Criteria:
Context: At least one follower manifest CCN has been stored in the follower array
Applied to: Initialize Loop Counter J to 1
Action: The system prepares to process each follower manifest
Logic Flow:
IF At least one follower manifest CCN has been stored in the follower array
AND The system prepares to process each follower manifest
THEN:
• The loop counter J is set to 1 to begin processing from the first follower manifest in the array
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when system is iterating through the follower manifest array.
Trigger Criteria:
Context: The system is iterating through the follower manifest array
Applied to: Follower CCN Empty OR J > Index?
Action: The system checks the loop continuation condition
Logic Flow:
IF The system is iterating through the follower manifest array
AND The system checks the loop continuation condition
THEN:
• The loop continues if the follower CCN at position J is not empty (not spaces or low-values) AND the counter J has not exceeded the total number of followers (index)
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower manifest ccn exists at the current array position j.
Trigger Criteria:
Context: A follower manifest CCN exists at the current array position J
Applied to: Retrieve Follower Cargo by CCN
Action: The system retrieves the cargo record
Logic Flow:
IF A follower manifest CCN exists at the current array position J
AND The system retrieves the cargo record
THEN:
• The follower CCN is used as the key value to retrieve the cargo report segment from the database
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when system has attempted to retrieve a follower cargo record by ccn.
Trigger Criteria:
Context: The system has attempted to retrieve a follower cargo record by CCN
Applied to: Cargo Found?
Action: The system checks the retrieval result
Logic Flow:
IF The system has attempted to retrieve a follower cargo record by CCN
AND The system checks the retrieval result
THEN:
• The cargo is considered found if the cargo found indicator is set to true, otherwise skip to the next follower manifest
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A follower cargo record has been successfully retrieved from the database
Applied to: Set Release Information for Follower
Action: The system applies release information
Logic Flow:
IF A follower cargo record has been successfully retrieved from the database
AND The system applies release information
THEN:
• The destination station numbers are cleared, release date is set to current machine date, release time is set to current machine time, release by is set to current user ID, current status is set to 'RELEASED', release status is set to 'R', release type is set to 'A', error/release status index is cleared, and error status is cleared
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when release information has been applied to the follower cargo record.
Trigger Criteria:
Context: Release information has been applied to the follower cargo record
Applied to: Build Release Message
Action: The system builds the release message
Logic Flow:
IF Release information has been applied to the follower cargo record
AND The system builds the release message
THEN:
• The message is formatted as 'EDI 350: RELEASE VIA DECON AT PORT' followed by the port code from the P4 segment (first 4 characters)
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when release message has been built for the follower manifest.
Trigger Criteria:
Context: The release message has been built for the follower manifest
Applied to: Set Release Reason with Deconsolidation Port
Action: The system sets the release reason
Logic Flow:
IF The release message has been built for the follower manifest
AND The system sets the release reason
THEN:
• The release reason field is populated with 'DECONSOLIDATION AT' followed by the port code from the P4 segment (first 4 characters)
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when release reason has been set for the follower cargo record.
Trigger Criteria:
Context: The release reason has been set for the follower cargo record
Applied to: Log Release Message to Follower CCN
Action: The system logs the release message
Logic Flow:
IF The release reason has been set for the follower cargo record
AND The system logs the release message
THEN:
• The current follower CCN key is set as the current CCN key AND the release message is logged to the cargo information message log with current date, time, user ID, and action code
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when release message has been logged for the follower cargo.
Trigger Criteria:
Context: The release message has been logged for the follower cargo
Applied to: Save Follower Waybill Index
Action: The system prepares to process the US manifest
Logic Flow:
IF The release message has been logged for the follower cargo
AND The system prepares to process the US manifest
THEN:
• The follower's waybill key for index is saved to the waybill index variable AND the follower's equipment car ID is saved to the current car ID key variable
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower cargo waybill index and equipment car id have been saved.
Trigger Criteria:
Context: The follower cargo waybill index and equipment car ID have been saved
Applied to: Process Associated US Manifest for Follower
Action: The system processes the US manifest
Logic Flow:
IF The follower cargo waybill index and equipment car ID have been saved
AND The system processes the US manifest
THEN:
• The system searches for US cargo records matching the equipment car ID and waybill number, andif found (not deleted and no train created), logs a message indicating the Canadian CCN was released by EDI 350 with the US CCN reference
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when all release information has been applied to the follower cargo record and us manifest has been processed.
Trigger Criteria:
Context: All release information has been applied to the follower cargo record and US manifest has been processed
Applied to: Update Follower Cargo Record
Action: The system updates the database
Logic Flow:
IF All release information has been applied to the follower cargo record and US manifest has been processed
AND The system updates the database
THEN:
• The cargo report segment is replaced in the database with the updated follower cargo information
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when current follower manifest has been fully processed and updated.
Trigger Criteria:
Context: The current follower manifest has been fully processed and updated
Applied to: Increment Loop Counter J
Action: The system advances to the next follower
Logic Flow:
IF The current follower manifest has been fully processed and updated
AND The system advances to the next follower
THEN:
• The loop counter J is incremented by 1 to point to the next follower CCN in the array
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when all follower manifests in the array have been processed or an empty follower ccn position was encountered.
Trigger Criteria:
Context: All follower manifests in the array have been processed OR an empty follower CCN position was encountered
Applied to: Restore Master Cargo Information
Action: The system completes follower processing
Logic Flow:
IF All follower manifests in the array have been processed OR an empty follower CCN position was encountered
AND The system completes follower processing
THEN:
• The saved master cargo segment is restored to the cargo report segment, the saved master waybill index is restored to the waybill index variable, and the saved master equipment car ID is restored to the current car ID key variable
R-GCX126-cbl-00639 (+6)File: GCX126R.cblBusiness Rule: Retrieve First US Cargo Record by Car ID and Waybill
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when canadian cargo record is being processed with a valid equipment car id key and waybill index.
Trigger Criteria:
Context: A Canadian cargo record is being processed with a valid equipment car ID key and waybill index
Applied to: Set Car ID from Current Cargo Equipment
Action: The system prepares to search for associated US cargo records
Logic Flow:
IF A Canadian cargo record is being processed with a valid equipment car ID key and waybill index
AND The system prepares to search for associated US cargo records
THEN:
• The system sets the US cargo search car ID to the current cargo's equipment car ID key, sets the US cargo search waybill index to the current cargo's waybill index, and initializes the US CCN key index to low values to start from the beginning of the index
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when search parameters are initialized with car id, waybill index, and us ccn key set to low values, and the search operator is set to '>='. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The search parameters are initialized with car ID, waybill index, and US CCN key set to low values, and the search operator is set to '>='
Applied to: Call Database to Get First US Cargo Record
Action: The system calls the database I/O module to retrieve US cargo using the car ID and waybill index
Logic Flow:
IF The search parameters are initialized with car ID, waybill index, and US CCN key set to low values, and the search operator is set to '>='
AND The system calls the database I/O module to retrieve US cargo using the car ID and waybill index
THEN:
• The system executes a GU (Get Unique) function against the US cargo segment with the specified search criteria and returns the first matching or next higher record
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when database retrieval operation has been executed for us cargo.
Trigger Criteria:
Context: A database retrieval operation has been executed for US cargo
Applied to: Record Found?
Action: The system checks the database status code
Logic Flow:
IF A database retrieval operation has been executed for US cargo
AND The system checks the database status code
THEN:
• If the status code is blank (spaces), the record is found and processing continues; if the status code is not blank, no record exists and the end-of-database flag is set
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved from the database
Applied to: Car ID and Waybill Match?
Action: The system compares the retrieved US cargo's car ID index (first 12 characters) with the current cargo equipment car ID key and compares the US cargo's waybill index with the current cargo's waybill index
Logic Flow:
IF A US cargo record has been successfully retrieved from the database
AND The system compares the retrieved US cargo's car ID index (first 12 characters) with the current cargo equipment car ID key and compares the US cargo's waybill index with the current cargo's waybill index
THEN:
• If both the car ID (first 12 characters) and waybill index match exactly, the record is valid for processing; if either does not match, the end-of-database flag is set
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record has been retrieved and validated for car id and waybill match.
Trigger Criteria:
Context: A US cargo record has been retrieved and validated for car ID and waybill match
Applied to: Cargo Deleted or TR Created?
Action: The system checks the US cargo's deletion status indicator and the train-created indicator
Logic Flow:
IF A US cargo record has been retrieved and validated for car ID and waybill match
AND The system checks the US cargo's deletion status indicator and the train-created indicator
THEN:
• If the cargo deletion status is 'D' (deleted) or the train-created-for-it indicator is 'Y', the record is skipped and end-of-database flag is set; if both conditions are false, the US manifest found flag is set
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record exists that matches the car id and waybill, is not deleted, and does not have a train already created.
Trigger Criteria:
Context: A US cargo record exists that matches the car ID and waybill, is not deleted, and does not have a train already created
Applied to: Mark US Manifest Found
Action: All validation checks pass successfully
Logic Flow:
IF A US cargo record exists that matches the car ID and waybill, is not deleted, and does not have a train already created
AND All validation checks pass successfully
THEN:
• The system sets the US manifest found indicator to true, allowing the US cargo to be processed for release updates
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when database retrieval operation has completed.
Trigger Criteria:
Context: The database retrieval operation has completed
Applied to: Mark End of Database
Action: Any of the following conditions occur: database status is not blank, car ID or waybill does not match, cargo is deleted, or train is already created
Logic Flow:
IF The database retrieval operation has completed
AND Any of the following conditions occur: database status is not blank, car ID or waybill does not match, cargo is deleted, or train is already created
THEN:
• The system sets the end-of-database flag to true, indicating no valid US cargo record is available for processing
R-GCX126-cbl-00646 (+7)File: GCX126R.cblBusiness Rule: Retrieve Next US Cargo Record by Car ID and Waybill
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when current cargo record exists with a car identification key and waybill index.
Trigger Criteria:
Context: A current cargo record exists with a car identification key and waybill index
Applied to: - Car ID from Current Cargo - Waybill Index from Current Cargo - Operator: Greater Than
Action: The system prepares to retrieve the next US cargo record by car and waybill
Logic Flow:
IF A current cargo record exists with a car identification key and waybill index
AND The system prepares to retrieve the next US cargo record by car and waybill
THEN:
• The search parameters are set with car ID from current cargo's car identification key, waybill index from saved waybill index, function code set to Get Next, segment type set to US cargo, index type set to car-waybill, and operator set to greater than ('>') for sequential retrieval
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when search parameters are configured with car id, waybill index, get next function, us cargo segment type, car-waybill index type, and greater-than operator. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Search parameters are configured with car ID, waybill index, Get Next function, US cargo segment type, car-waybill index type, and greater-than operator
Applied to: Call Database to Get Next US Cargo Record by Car/Waybill Index
Action: The database retrieval operation is invoked
Logic Flow:
IF Search parameters are configured with car ID, waybill index, Get Next function, US cargo segment type, car-waybill index type, and greater-than operator
AND The database retrieval operation is invoked
THEN:
• The system calls the cargo input/output module to retrieve the next US cargo record based on the car-waybill index
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when database retrieval operation has been executed for the next us cargo record.
Trigger Criteria:
Context: A database retrieval operation has been executed for the next US cargo record
Applied to: Database Status OK? - No - Not Found
Action: The database status code is not blank (indicating no record found or error condition)
Logic Flow:
IF A database retrieval operation has been executed for the next US cargo record
AND The database status code is not blank (indicating no record found or error condition)
THEN:
• The end-of-database flag is set to true to indicate no more records are available
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when us cargo record has been successfully retrieved from the database with car identification index and waybill number index.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved from the database with car identification index and waybill number index
Applied to: Car ID and Waybill Match Current Cargo?
Action: The system validates the retrieved record against the current cargo
Logic Flow:
IF A US cargo record has been successfully retrieved from the database with car identification index and waybill number index
AND The system validates the retrieved record against the current cargo
THEN:
• If the first 12 characters of the retrieved car identification index match the current cargo's car identification key AND the waybill number index matches the saved waybill index, the validation passes; otherwise, the end-of-database flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record has been retrieved and validated for car id and waybill match.
Trigger Criteria:
Context: A US cargo record has been retrieved and validated for car ID and waybill match
Applied to: Cargo Deleted?
Action: The system checks the cargo's deletion status
Logic Flow:
IF A US cargo record has been retrieved and validated for car ID and waybill match
AND The system checks the cargo's deletion status
THEN:
• If the cargo record has a deletion status indicator showing it is deleted, the record is skipped and processing continues to the next iteration; otherwise, proceed to check transfer receipt status
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when us cargo record has been retrieved, validated for match, and confirmed as not deleted.
Trigger Criteria:
Context: A US cargo record has been retrieved, validated for match, and confirmed as not deleted
Applied to: Transfer Receipt Created?
Action: The system checks if a transfer receipt exists for this cargo
Logic Flow:
IF A US cargo record has been retrieved, validated for match, and confirmed as not deleted
AND The system checks if a transfer receipt exists for this cargo
THEN:
• If the transfer receipt created indicator equals 'Y', the record is skipped and processing continues to the next iteration; otherwise, the US manifest found flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when us cargo record has been retrieved that matches car id and waybill, is not deleted, and has no transfer receipt created.
Trigger Criteria:
Context: A US cargo record has been retrieved that matches car ID and waybill, is not deleted, and has no transfer receipt created
Applied to: Set US Manifest Found Flag
Action: All validation checks pass successfully
Logic Flow:
IF A US cargo record has been retrieved that matches car ID and waybill, is not deleted, and has no transfer receipt created
AND All validation checks pass successfully
THEN:
• The US manifest found flag is set to true to indicate a valid matching record has been located
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record has been retrieved from the database.
Trigger Criteria:
Context: A US cargo record has been retrieved from the database
Applied to: Car ID and Waybill Match Current Cargo? - No - Different Cargo
Action: The first 12 characters of the car identification index do not match the current cargo's car identification key OR the waybill number index does not match the saved waybill index
Logic Flow:
IF A US cargo record has been retrieved from the database
AND The first 12 characters of the car identification index do not match the current cargo's car identification key OR the waybill number index does not match the saved waybill index
THEN:
• The end-of-database flag is set to true to terminate the search loop
R-GCX126-cbl-00666 (+15)File: GCX126R.cblBusiness Rule: Process Each Follower Manifest Release
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when follower manifest array exists with potential follower ccns.
Trigger Criteria:
Context: A follower manifest array exists with potential follower CCNs
Applied to: Initialize Follower Array Index J = 1
Action: The system begins processing follower manifests for a master manifest release
Logic Flow:
IF A follower manifest array exists with potential follower CCNs
AND The system begins processing follower manifests for a master manifest release
THEN:
• The array index J is initialized to 1 to start processing from the first follower manifest
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when follower manifest array with index j and a maximum limit of 100 follower manifests.
Trigger Criteria:
Context: The follower manifest array with index J and a maximum limit of 100 follower manifests
Applied to: Follower Manifest Available?
Action: The system checks if more follower manifests need to be processed
Logic Flow:
IF The follower manifest array with index J and a maximum limit of 100 follower manifests
AND The system checks if more follower manifests need to be processed
THEN:
• Processing continues if the follower manifest at index J is not spaces or low-values AND J is less than or equal to the total number of followers AND J does not exceed 100
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower manifest array with index j pointing to a valid entry.
Trigger Criteria:
Context: A follower manifest array with index J pointing to a valid entry
Applied to: Get Follower CCN from Array
Action: The system needs to process a specific follower manifest
Logic Flow:
IF A follower manifest array with index J pointing to a valid entry
AND The system needs to process a specific follower manifest
THEN:
• The follower CCN at array position J is moved to the cargo lookup key fields (CCRT-SSAQandA2RT-SSAQ)
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower manifest ccn has been retrieved from the array.
Trigger Criteria:
Context: A follower manifest CCN has been retrieved from the array
Applied to: Lookup Cargo by Follower CCN
Action: The system performs a cargo lookup using the follower CCN
Logic Flow:
IF A follower manifest CCN has been retrieved from the array
AND The system performs a cargo lookup using the follower CCN
THEN:
• The cargo record is retrieved from GCSCCRT table using GHU operation AND cargo status switches are set to indicate if cargo was found, deleted, or has other status conditions
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo lookup has been performed for the follower manifest ccn. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo lookup has been performed for the follower manifest CCN
Applied to: Cargo Found?
Action: The system evaluates the cargo lookup result
Logic Flow:
IF A cargo lookup has been performed for the follower manifest CCN
AND The system evaluates the cargo lookup result
THEN:
• Processing continues if cargo is found (WS-CARGO-FOUND is true) AND cargo is not deleted AND cargo is not returned AND waybill matches (if applicable), otherwise skip to next follower
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when valid cargo record exists for the follower manifest and the v9 segment contains a notice reason code.
Trigger Criteria:
Context: A valid cargo record exists for the follower manifest AND the V9 segment contains a notice reason code
Applied to: Notice Reason Type?
Action: The system determines the type of release message to create
Logic Flow:
IF A valid cargo record exists for the follower manifest AND the V9 segment contains a notice reason code
AND The system determines the type of release message to create
THEN:
• IfV9-02-RELEASED is true, process as standard release, otherwiseifV9-02-DECON is true, process as deconsolidation release
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower manifest has a standard release notice reason code (v9-02-released) and x4 segment contains release reference id and p4 segment contains port code. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The follower manifest has a standard release notice reason code (V9-02-RELEASED) AND X4 segment contains release reference ID AND P4 segment contains port code
Applied to: Build Release Message with Release Reference and Port
Action: The system builds the release message for logging
Logic Flow:
IF The follower manifest has a standard release notice reason code (V9-02-RELEASED) AND X4 segment contains release reference ID AND P4 segment contains port code
AND The system builds the release message for logging
THEN:
• The message 'EDI 350: RELEASE : ' is concatenated with X4-01-CBSA-REL-REF-ID (first 15 characters) and ' AT PORT ' andP4-01-PORT-CDE (first 4 characters) into WS-GCX105-INFO-MSG
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower manifest has a standard release notice reason code (v9-02-released) and x4 segment contains release reference id and p4 segment contains port code.
Trigger Criteria:
Context: The follower manifest has a standard release notice reason code (V9-02-RELEASED) AND X4 segment contains release reference ID AND P4 segment contains port code
Applied to: Set Release Reason with Release Reference and Port
Action: The system updates the cargo release reason field
Logic Flow:
IF The follower manifest has a standard release notice reason code (V9-02-RELEASED) AND X4 segment contains release reference ID AND P4 segment contains port code
AND The system updates the cargo release reason field
THEN:
• X4-01-CBSA-REL-REF-ID (first 15 characters) and '/' andP4-01-PORT-CDE (first 4 characters) are concatenated into GCCC-RELEASE-REASON
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when follower manifest has a deconsolidation notice reason code (v9-02-decon) and p4 segment contains port code. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The follower manifest has a deconsolidation notice reason code (V9-02-DECON) AND P4 segment contains port code
Applied to: Build Decon Release Message with Port
Action: The system builds the deconsolidation release message for logging
Logic Flow:
IF The follower manifest has a deconsolidation notice reason code (V9-02-DECON) AND P4 segment contains port code
AND The system builds the deconsolidation release message for logging
THEN:
• The message 'EDI 350: RELEASE VIA DECON AT PORT ' is concatenated with P4-01-PORT-CDE (first 4 characters) into WS-GCX105-INFO-MSG
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when follower manifest has a deconsolidation notice reason code (v9-02-decon) and p4 segment contains port code.
Trigger Criteria:
Context: The follower manifest has a deconsolidation notice reason code (V9-02-DECON) AND P4 segment contains port code
Applied to: Set Release Reason with Deconsolidation Port
Action: The system updates the cargo release reason field
Logic Flow:
IF The follower manifest has a deconsolidation notice reason code (V9-02-DECON) AND P4 segment contains port code
AND The system updates the cargo release reason field
THEN:
• The text 'DECONSOLIDATION AT ' is concatenated with P4-01-PORT-CDE (first 4 characters) into GCCC-RELEASE-REASON
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when release message has been built in ws-gcx105-info-msg and the follower cargo ccn is in ws-current-ccn-key. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A release message has been built in WS-GCX105-INFO-MSG AND the follower cargo CCN is in WS-CURRENT-CCN-KEY
Applied to: Log Cargo Information Message
Action: The system logs the release information
Logic Flow:
IF A release message has been built in WS-GCX105-INFO-MSG AND the follower cargo CCN is in WS-CURRENT-CCN-KEY
AND The system logs the release information
THEN:
• A GCT1051E log entry is created with current machine date in GCX105-DATE, current machine time in GCX105-TIME, follower CCN in GCX105-TRAIN-OR-US-CCN, cargo type set to CA-CARGO, action code set to LOG-USE-INPUT-MESSAGE, and the release message in GCX105-MESSAGE
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower manifest has been released and the cargo record contains equipment car id and waybill number.
Trigger Criteria:
Context: A follower manifest has been released AND the cargo record contains equipment car ID and waybill number
Applied to: Process Associated US Manifest
Action: The system searches for associated US cargo manifest
Logic Flow:
IF A follower manifest has been released AND the cargo record contains equipment car ID and waybill number
AND The system searches for associated US cargo manifest
THEN:
• The system retrieves US cargo from GCSUSRT table using equipment car ID and waybill number AND if a matching US cargo is found that is not deleted and has no train created, a log entry is created with message 'CDN CCN RLSED BY EDI 350: ' concatenated with the Canadian follower CCN
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when all release information has been set in the follower cargo segment (gccc-cargo-report-segment) including release date, time, user, status, type, and reason.
Trigger Criteria:
Context: All release information has been set in the follower cargo segment (GCCC-CARGO-REPORT-SEGMENT) including release date, time, user, status, type, and reason
Applied to: Update Cargo Record
Action: The system updates the follower cargo record
Logic Flow:
IF All release information has been set in the follower cargo segment (GCCC-CARGO-REPORT-SEGMENT) including release date, time, user, status, type, and reason
AND The system updates the follower cargo record
THEN:
• The cargo record is replaced in GCSCCRT table using REPL operation with the updated cargo segment data
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when current follower manifest has been processed (whether successfully or skipped).
Trigger Criteria:
Context: The current follower manifest has been processed (whether successfully or skipped)
Applied to: Increment Array Index J
Action: The system prepares to process the next follower manifest
Logic Flow:
IF The current follower manifest has been processed (whether successfully or skipped)
AND The system prepares to process the next follower manifest
THEN:
• The array index J is incremented by 1
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when array index j has been incremented and there is a follower manifest array with potential entries.
Trigger Criteria:
Context: The array index J has been incremented AND there is a follower manifest array with potential entries
Applied to: More Followers or Max 100 Reached?
Action: The system evaluates whether to continue the processing loop
Logic Flow:
IF The array index J has been incremented AND there is a follower manifest array with potential entries
AND The system evaluates whether to continue the processing loop
THEN:
• The loop continues if the follower manifest at index J is not spaces or low-values AND J is less than or equal to the total number of followers AND J does not exceed 100, otherwise the loop terminates
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when all follower manifests in the array have been processed or the maximum limit of 100 has been reached or no more valid follower ccns exist in the array.
Trigger Criteria:
Context: All follower manifests in the array have been processed OR the maximum limit of 100 has been reached OR no more valid follower CCNs exist in the array
Applied to: End Process Follower Manifests
Action: The system completes the follower manifest processing loop
Logic Flow:
IF All follower manifests in the array have been processed OR the maximum limit of 100 has been reached OR no more valid follower CCNs exist in the array
AND The system completes the follower manifest processing loop
THEN:
• Control returns to the calling procedure and the follower manifest processing section exits
Business Justification: Ensures correct system behavior and process compliance when email notification has been prepared with from usercode, destination filename, to usercode, copy usercode, subject, keywords, and report content. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email notification has been prepared with FROM usercode, destination filename, TO usercode, COPY usercode, subject, keywords, and report content
Applied to: Email Sent Successfully
Action: The EMCSEND2 service returns EMI-NO-ERRORS status indicating successful email delivery
Logic Flow:
IF An email notification has been prepared with FROM usercode, destination filename, TO usercode, COPY usercode, subject, keywords, and report content
AND The EMCSEND2 service returns EMI-NO-ERRORS status indicating successful email delivery
THEN:
• The system purges the IMS alternate PCB message queue and completes the email send process successfully
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email notification is being sent with a from usercode.
Trigger Criteria:
Context: An email notification is being sent with a FROM usercode
Applied to: FROM User Not Found Error
Action: The EMCSEND2 service returns EMI-FROM-NOT-FOUND status indicating the FROM usercode does not exist in the system
Logic Flow:
IF An email notification is being sent with a FROM usercode
AND The EMCSEND2 service returns EMI-FROM-NOT-FOUND status indicating the FROM usercode does not exist in the system
THEN:
• The system sets error message 'EMI - INVALID MERLIN FROM' and aborts the program execution
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when email notification is being sent with a destination filename.
Trigger Criteria:
Context: An email notification is being sent with a destination filename
Applied to: Invalid Filename Error
Action: The EMCSEND2 service returns EMI-FILENAME-INVALID status indicating the destination filename is not valid
Logic Flow:
IF An email notification is being sent with a destination filename
AND The EMCSEND2 service returns EMI-FILENAME-INVALID status indicating the destination filename is not valid
THEN:
• The system sets error message 'EMI - INVALID MERLIN FILENAME' and aborts the program execution
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when email notification fails with emi-to-or-copy-not-found status and the invalid recipient usercode is identified. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email notification fails with EMI-TO-OR-COPY-NOT-FOUND status and the invalid recipient usercode is identified
Applied to: Resend Failed Email to OM01247
Action: The email type is UNRLSE and TO usercode at position 2 is invalid, or for other email types TO usercode at position 1 is invalid
Logic Flow:
IF An email notification fails with EMI-TO-OR-COPY-NOT-FOUND status and the invalid recipient usercode is identified
AND The email type is UNRLSE and TO usercode at position 2 is invalid, or for other email types TO usercode at position 1 is invalid
THEN:
• The system saves the invalid Merlin ID, clears the TO usercode, sets TO usercode to 'OM01247', sets destination filename to 'IN', and resends the email notification
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email was successfully rerouted to default user om01247 after initial recipient was not found and the resend returned emi-no-errors status.
Trigger Criteria:
Context: An email was successfully rerouted to default user OM01247 after initial recipient was not found and the resend returned EMI-NO-ERRORS status
Applied to: Resend Email with Reroute Notice
Action: The system prepares a new email with subject containing the invalid Merlin ID and message 'INVALID MERLIN TO - REPORT REROUTE'
Logic Flow:
IF An email was successfully rerouted to default user OM01247 after initial recipient was not found and the resend returned EMI-NO-ERRORS status
AND The system prepares a new email with subject containing the invalid Merlin ID and message 'INVALID MERLIN TO - REPORT REROUTE'
THEN:
• The system sends the reroute notification email to OM01247 with destination filename 'IN' and purges the IMS message queue upon successful delivery
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when email was rerouted to default user om01247 after initial recipient was not found. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email was rerouted to default user OM01247 after initial recipient was not found
Applied to: Abort with Invalid TO/COPY Error
Action: The resend attempt returns EMI-TO-OR-COPY-NOT-FOUND status indicating even the default recipient OM01247 is invalid
Logic Flow:
IF An email was rerouted to default user OM01247 after initial recipient was not found
AND The resend attempt returns EMI-TO-OR-COPY-NOT-FOUND status indicating even the default recipient OM01247 is invalid
THEN:
• The system sets error message 'EMI - INVALID MERLIN TO OR COPY' and aborts the program execution
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when email is being rerouted to default user om01247 after initial recipient was not found.
Trigger Criteria:
Context: An email is being rerouted to default user OM01247 after initial recipient was not found
Applied to: FROM User Not Found Error
Action: The resend attempt returns EMI-FROM-NOT-FOUND status indicating the FROM usercode does not exist
Logic Flow:
IF An email is being rerouted to default user OM01247 after initial recipient was not found
AND The resend attempt returns EMI-FROM-NOT-FOUND status indicating the FROM usercode does not exist
THEN:
• The system sets error message 'EMI - INVALID MERLIN FROM' and aborts the program execution
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when email is being rerouted to default user om01247 after initial recipient was not found.
Trigger Criteria:
Context: An email is being rerouted to default user OM01247 after initial recipient was not found
Applied to: Invalid Filename Error
Action: The resend attempt returns EMI-FILENAME-INVALID status indicating the destination filename is not valid
Logic Flow:
IF An email is being rerouted to default user OM01247 after initial recipient was not found
AND The resend attempt returns EMI-FILENAME-INVALID status indicating the destination filename is not valid
THEN:
• The system sets error message 'EMI - INVALID MERLIN FILENAME' and aborts the program execution
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when email notification fails with emi-to-or-copy-not-found status. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email notification fails with EMI-TO-OR-COPY-NOT-FOUND status
Applied to: Resend Failed Email to OM01247
Action: The email type is 88-Z110-MRLN-TYPE-IS-UNRLSE
Logic Flow:
IF An email notification fails with EMI-TO-OR-COPY-NOT-FOUND status
AND The email type is 88-Z110-MRLN-TYPE-IS-UNRLSE
THEN:
• The system saves the TO usercode at position 2 as the invalid Merlin ID, otherwise saves the TO usercode at position 1 as the invalid Merlin ID
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when email notification has been processed through emcsend2 service.
Trigger Criteria:
Context: An email notification has been processed through EMCSEND2 service
Applied to: End Email Send Process
Action: The email send process completes (either successfully or after successful reroute)
Logic Flow:
IF An email notification has been processed through EMCSEND2 service
AND The email send process completes (either successfully or after successful reroute)
THEN:
• The system increments the machine format sequence number by 1 for tracking purposes
R-GCX126-cbl-00692 (+6)File: GCX126R.cblBusiness Rule: Validate US Cargo Record Match Criteria
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when us cargo record has been retrieved with a car id number index.
Trigger Criteria:
Context: A US cargo record has been retrieved with a car ID number index
Applied to: Car ID Matches Current Car ID?
Action: The system compares the first 12 characters of the US cargo car ID number index with the current car ID key
Logic Flow:
IF A US cargo record has been retrieved with a car ID number index
AND The system compares the first 12 characters of the US cargo car ID number index with the current car ID key
THEN:
• If the car IDs do not match, set end of database flag and stop validation; if they match, continue to waybill validation
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record's car id matches the current car id.
Trigger Criteria:
Context: The US cargo record's car ID matches the current car ID
Applied to: Waybill Index Matches Saved Waybill?
Action: The system compares the US cargo waybill number index with the saved waybill index
Logic Flow:
IF The US cargo record's car ID matches the current car ID
AND The system compares the US cargo waybill number index with the saved waybill index
THEN:
• If the waybill numbers do not match, set end of database flag and stop validation; if they match, continue to cargo status validation
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record matches both car id and waybill number criteria.
Trigger Criteria:
Context: The US cargo record matches both car ID and waybill number criteria
Applied to: Cargo Deleted?
Action: The system checks if the US cargo record has a deleted status indicator
Logic Flow:
IF The US cargo record matches both car ID and waybill number criteria
AND The system checks if the US cargo record has a deleted status indicator
THEN:
• If the cargo is deleted, continue searching for next record without setting US manifest found flag; if not deleted, proceed to train creation check
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when us cargo record is not deleted and matches car id and waybill criteria.
Trigger Criteria:
Context: The US cargo record is not deleted and matches car ID and waybill criteria
Applied to: TR Created for Cargo?
Action: The system checks if the train created indicator equals 'Y'
Logic Flow:
IF The US cargo record is not deleted and matches car ID and waybill criteria
AND The system checks if the train created indicator equals 'Y'
THEN:
• If train record exists (indicator = 'Y'), continue searching for next record without setting US manifest found flag; if no train record exists, set US manifest found flag
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record matches car id and waybill, is not deleted, and has no existing train record.
Trigger Criteria:
Context: The US cargo record matches car ID and waybill, is not deleted, and has no existing train record
Applied to: Set US Manifest Found
Action: All validation criteria are satisfied
Logic Flow:
IF The US cargo record matches car ID and waybill, is not deleted, and has no existing train record
AND All validation criteria are satisfied
THEN:
• Set the US manifest found indicator to true to enable further processing of this US cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record has been retrieved during search.
Trigger Criteria:
Context: A US cargo record has been retrieved during search
Applied to: Set End of Database
Action: Either the car ID does not match the current car ID or the waybill number does not match the saved waybill index
Logic Flow:
IF A US cargo record has been retrieved during search
AND Either the car ID does not match the current car ID or the waybill number does not match the saved waybill index
THEN:
• Set the end of database flag to true to terminate the search process
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record matches car id and waybill criteria.
Trigger Criteria:
Context: The US cargo record matches car ID and waybill criteria
Applied to: Continue Search
Action: The cargo is either marked as deleted or has a train record already created (indicator = 'Y')
Logic Flow:
IF The US cargo record matches car ID and waybill criteria
AND The cargo is either marked as deleted or has a train record already created (indicator = 'Y')
THEN:
• Continue to the next iteration of the search without setting the US manifest found flag
R-GCX126-cbl-00699 (+8)File: GCX126R.cblBusiness Rule: Search Next US Cargo Record Until Match Found
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when current cargo record with equipment car id and waybill index.
Trigger Criteria:
Context: A current cargo record with equipment car ID and waybill index
Applied to: Car ID from current cargo, Waybill index from current cargo, Set status to GEGB
Action: Initiating a search for matching US cargo records
Logic Flow:
IF A current cargo record with equipment car ID and waybill index
AND Initiating a search for matching US cargo records
THEN:
• The search parameters are set with car ID from current cargo equipment key, waybill index from saved waybill index, and search function set to Get Next with Car-Waybill index
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when search parameters are configured with car id, waybill index, segment type gcsusrt, function get next, and index type car-waybill. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Search parameters are configured with car ID, waybill index, segment type GCSUSRT, function Get Next, and index type Car-Waybill
Applied to: Call Get Next US Cargo by Car and Waybill Index
Action: The US cargo retrieval function is invoked
Logic Flow:
IF Search parameters are configured with car ID, waybill index, segment type GCSUSRT, function Get Next, and index type Car-Waybill
AND The US cargo retrieval function is invoked
THEN:
• The system calls GCCUSIO to retrieve the next US cargo record matching the car and waybill criteria
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when database call to retrieve us cargo has been executed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database call to retrieve US cargo has been executed
Applied to: Database Status OK?
Action: The database status code is not blank (indicating an error or no records found)
Logic Flow:
IF A database call to retrieve US cargo has been executed
AND The database status code is not blank (indicating an error or no records found)
THEN:
• Set the end of database flag to true and exit the search process
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when database retrieval operation returned a non-blank status code.
Trigger Criteria:
Context: The database retrieval operation returned a non-blank status code
Applied to: Set End of Database Flag
Action: Processing the error condition
Logic Flow:
IF The database retrieval operation returned a non-blank status code
AND Processing the error condition
THEN:
• Set the end of file flag to true to stop further search iterations
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when us cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved from the database
Applied to: Car ID and Waybill Match Current Cargo?
Action: Comparing the retrieved record's car ID (first 12 characters) and waybill index against the current cargo's car ID key and saved waybill index
Logic Flow:
IF A US cargo record has been successfully retrieved from the database
AND Comparing the retrieved record's car ID (first 12 characters) and waybill index against the current cargo's car ID key and saved waybill index
THEN:
• If both car ID and waybill index match, proceed to check cargo status; otherwise, set end of database flag to indicate no match found
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when us cargo record that matches the car id and waybill criteria.
Trigger Criteria:
Context: A US cargo record that matches the car ID and waybill criteria
Applied to: Cargo Deleted OR TR Created?
Action: Checking the cargo's deletion status indicator or train creation flag
Logic Flow:
IF A US cargo record that matches the car ID and waybill criteria
AND Checking the cargo's deletion status indicator or train creation flag
THEN:
• If cargo is marked as deleted OR train created flag equals 'Y', skip this record and continue search; otherwise, mark as valid US manifest found
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record that matches car id and waybill, is not deleted, and has no train created.
Trigger Criteria:
Context: A US cargo record that matches car ID and waybill, is not deleted, and has no train created
Applied to: Set US Manifest Found Flag
Action: All validation checks pass successfully
Logic Flow:
IF A US cargo record that matches car ID and waybill, is not deleted, and has no train created
AND All validation checks pass successfully
THEN:
• Set the US manifest found flag to true to indicate a valid match has been located
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record has been retrieved but its car id or waybill index does not match the current cargo.
Trigger Criteria:
Context: A US cargo record has been retrieved but its car ID or waybill index does not match the current cargo
Applied to: Set End of Database Flag No Match Found
Action: The comparison of car ID and waybill fails
Logic Flow:
IF A US cargo record has been retrieved but its car ID or waybill index does not match the current cargo
AND The comparison of car ID and waybill fails
THEN:
• Set the end of file flag to true to stop the search as no matching record exists
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record that matches car id and waybill but is either deleted or has a train created.
Trigger Criteria:
Context: A US cargo record that matches car ID and waybill but is either deleted or has a train created
Applied to: Continue Search Skip This Record
Action: The cargo status check determines the record should be skipped
Logic Flow:
IF A US cargo record that matches car ID and waybill but is either deleted or has a train created
AND The cargo status check determines the record should be skipped
THEN:
• Continue to the next iteration of the search without setting the found flag, allowing the loop to retrieve the next record
R-GCX126-cbl-00708 (+8)File: GCX126R.cblBusiness Rule: Call GCCTBIO to Read GCSTBRT Table
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when system needs to route edi 350 notifications to merlin users. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system needs to route EDI 350 notifications to Merlin users
Applied to: Call GCCTBIO to Read GCSTBRT Table
Action: The system calls GCCTBIO to retrieve the administrative configuration with Table ID 'AD-TABLE-ID' and Sequence ID 'ADMINID'
Logic Flow:
IF The system needs to route EDI 350 notifications to Merlin users
AND The system calls GCCTBIO to retrieve the administrative configuration with Table ID 'AD-TABLE-ID' and Sequence ID 'ADMINID'
THEN:
• If the configuration record is found (return flag equals '0'), the system extracts the Merlin user code from GCSTBRT-AD-DC-P-MERLIN-1 field and sets the admin segment found indicator to true; otherwise, the system continues without the administrative configuration
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when system is preparing to retrieve administrative configuration data.
Trigger Criteria:
Context: The system is preparing to retrieve administrative configuration data
Applied to: Set Function Code to GU - Get Unique
Action: The initialization process begins
Logic Flow:
IF The system is preparing to retrieve administrative configuration data
AND The initialization process begins
THEN:
• The system sets the function code to 'GU' (Get Unique), clears all key values (GCSTBRT-KEY-VALUE, GCSTBDP-KEY-VALUE), clears the return flag (GCCTBIO-RETURN-FLAG), clears the segment data (GCSTBRT-AD-SEGMENT), and clears all control flags (SECOND-PCB-FLAG, UNQUAL-SSA-FLAG)
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when system has initialized the table access parameters.
Trigger Criteria:
Context: The system has initialized the table access parameters
Applied to: Set Table ID to AD-TABLE-ID
Action: The table identifier needs to be specified
Logic Flow:
IF The system has initialized the table access parameters
AND The table identifier needs to be specified
THEN:
• The system sets GCSTBRT-KEY-TABLE-ID to the value of AD-TABLE-ID constant
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when table identifier has been set to ad-table-id.
Trigger Criteria:
Context: The table identifier has been set to AD-TABLE-ID
Applied to: Set Sequence ID to 'ADMINID'
Action: The specific record within the administrative table needs to be identified
Logic Flow:
IF The table identifier has been set to AD-TABLE-ID
AND The specific record within the administrative table needs to be identified
THEN:
• The system sets GCSTBRT-KEY-SEQID to 'ADMINID'
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when all table access parameters have been initialized with function code 'gu', table id 'ad-table-id', and sequence id 'adminid'. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All table access parameters have been initialized with function code 'GU', table ID 'AD-TABLE-ID', and sequence ID 'ADMINID'
Applied to: Call GCCTBIO Program
Action: The system calls GCCTBIO program with parameters CCCOM, SECOND-PCB-FLAG, UNQUAL-SSA-FLAG, GCCTBIO-FUNC-CODE, GCSTBRT-LIT, GCSTBRT-KEY-VALUE, GCSTBDP-KEY-VALUE, WS-TABLE-SEGMENT, and GCCTBIO-RETURN-FLAG
Logic Flow:
IF All table access parameters have been initialized with function code 'GU', table ID 'AD-TABLE-ID', and sequence ID 'ADMINID'
AND The system calls GCCTBIO program with parameters CCCOM, SECOND-PCB-FLAG, UNQUAL-SSA-FLAG, GCCTBIO-FUNC-CODE, GCSTBRT-LIT, GCSTBRT-KEY-VALUE, GCSTBDP-KEY-VALUE, WS-TABLE-SEGMENT, and GCCTBIO-RETURN-FLAG
THEN:
• The GCCTBIO program executes the database operation and returns the result in GCCTBIO-RETURN-FLAG with the retrieved data in WS-TABLE-SEGMENTif successful
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when gcctbio program has completed execution.
Trigger Criteria:
Context: The GCCTBIO program has completed execution
Applied to: Return Flag = '0'?
Action: The system checks the GCCTBIO-RETURN-FLAG value
Logic Flow:
IF The GCCTBIO program has completed execution
AND The system checks the GCCTBIO-RETURN-FLAG value
THEN:
• IfGCCTBIO-RETURN-FLAG equals '0', the retrieval was successful and processing continues to extract configuration data; otherwise, the system proceeds without administrative configuration
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when administrative configuration record was successfully retrieved (gcctbio-return-flag equals '0'). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The administrative configuration record was successfully retrieved (GCCTBIO-RETURN-FLAG equals '0')
Applied to: Move Table Segment to GCSTBRT-AD-SEGMENT
Action: The system processes the retrieved data
Logic Flow:
IF The administrative configuration record was successfully retrieved (GCCTBIO-RETURN-FLAG equals '0')
AND The system processes the retrieved data
THEN:
• The system moves the contents of WS-TABLE-SEGMENT to GCSTBRT-AD-SEGMENT
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when administrative segment data has been successfully loaded into gcstbrt-ad-segment. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The administrative segment data has been successfully loaded into GCSTBRT-AD-SEGMENT
Applied to: Extract Merlin User Code from Admin Config
Action: The system extracts the Merlin routing information
Logic Flow:
IF The administrative segment data has been successfully loaded into GCSTBRT-AD-SEGMENT
AND The system extracts the Merlin routing information
THEN:
• The system moves the value from GCSTBRT-AD-DC-P-MERLIN-1 to WS-EMI-TO-USERCODE for use in message routing
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when merlin user code has been successfully extracted from the administrative configuration.
Trigger Criteria:
Context: The Merlin user code has been successfully extracted from the administrative configuration
Applied to: Set Admin Segment Found Flag
Action: The system completes the administrative configuration retrieval process
Logic Flow:
IF The Merlin user code has been successfully extracted from the administrative configuration
AND The system completes the administrative configuration retrieval process
THEN:
• The system sets the condition name 88-AD-SEGMENT-FOUND to true, indicating that valid administrative configuration is available
R-GCX126-cbl-00717 (+3)File: GCX126R.cblBusiness Rule: Calculate: Segments = Data Length
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when edi 350 message has been retrieved from the mq queue with a specific data length (w03-datalen), a known message header length (ws-mqs-len-header), and a known single entry length (ws-mqs-len-of-1-entry). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An EDI 350 message has been retrieved from the MQ queue with a specific data length (W03-DATALEN), a known message header length (WS-MQS-LEN-HEADER), and a known single entry length (WS-MQS-LEN-OF-1-ENTRY)
Applied to: Segments = Data Length - Header Length / Entry Length
Action: The system calculates the number of message segments
Logic Flow:
IF An EDI 350 message has been retrieved from the MQ queue with a specific data length (W03-DATALEN), a known message header length (WS-MQS-LEN-HEADER), and a known single entry length (WS-MQS-LEN-OF-1-ENTRY)
AND The system calculates the number of message segments
THEN:
• The number of segments (WS-MAX-MQS-ENTRIES) is calculated as: (Data Length minus Header Length) divided by Entry Length, rounded to the nearest whole number
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when calculated number of message segments (ws-max-mqs-entries) has been determined and a maximum allowed segment count (cst-max-mqs-entries) is defined. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The calculated number of message segments (WS-MAX-MQS-ENTRIES) has been determined and a maximum allowed segment count (CST-MAX-MQS-ENTRIES) is defined
Applied to: Segments > Maximum Allowed?
Action: The calculated number of segments exceeds the maximum allowed segment count
Logic Flow:
IF The calculated number of message segments (WS-MAX-MQS-ENTRIES) has been determined and a maximum allowed segment count (CST-MAX-MQS-ENTRIES) is defined
AND The calculated number of segments exceeds the maximum allowed segment count
THEN:
• The number of segments to process (WS-MAX-MQS-ENTRIES) is set to the maximum allowed value (CST-MAX-MQS-ENTRIES)
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when system needs to process an edi 350 message structure. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system needs to process an EDI 350 message structure
IF The system needs to process an EDI 350 message structure
AND Initializing message processing parameters
THEN:
• The header length (WS-MQS-LEN-HEADER) is set to the length of the MQS-MESSAGE-HEADER structure
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when system needs to process an edi 350 message with multiple data entries. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system needs to process an EDI 350 message with multiple data entries
IF The system needs to process an EDI 350 message with multiple data entries
AND Initializing message processing parameters
THEN:
• The single entry length (WS-MQS-LEN-OF-1-ENTRY) is set to the length of one MQS-TABLE-ENTRY structure
R-GCX126-cbl-00721 (+10)File: GCX126R.cblBusiness Rule: Verify Train Exists in System
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when x4 segment is being processed with entry type code '992' in a conventional 350 message.
Trigger Criteria:
Context: An X4 segment is being processed with entry type code '992' in a CONVENTIONAL 350 message
Applied to: Receive Train ID from X4 Segment
Action: The system extracts the related document ID from position 1 to 25 of the X4-04-REL-DOC-ID field
Logic Flow:
IF An X4 segment is being processed with entry type code '992' in a CONVENTIONAL 350 message
AND The system extracts the related document ID from position 1 to 25 of the X4-04-REL-DOC-ID field
THEN:
• The extracted train ID is stored as the search key for train record lookup
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when train id has been extracted from the x4 segment related document id (positions 1-25).
Trigger Criteria:
Context: A train ID has been extracted from the X4 segment related document ID (positions 1-25)
Applied to: Set Train ID as Search Key
Action: The system prepares to search for the train record in the database
Logic Flow:
IF A train ID has been extracted from the X4 segment related document ID (positions 1-25)
AND The system prepares to search for the train record in the database
THEN:
• The train ID is moved to the B4-KEY-VALUE field for database query
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when b4-key-value contains a valid train id from the x4 segment. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The B4-KEY-VALUE contains a valid train ID from the X4 segment
Applied to: Call Database to Retrieve Train Record
Action: The system executes the Z5000-GU-B4-TRAIN procedure
Logic Flow:
IF The B4-KEY-VALUE contains a valid train ID from the X4 segment
AND The system executes the Z5000-GU-B4-TRAIN procedure
THEN:
• A database GET UNIQUE operation is performed on the train root segment using the provided train ID
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when database retrieval operation has been executed for a train id.
Trigger Criteria:
Context: A database retrieval operation has been executed for a train ID
Applied to: Train Record Found?
Action: The system checks the status code returned from the database operation
Logic Flow:
IF A database retrieval operation has been executed for a train ID
AND The system checks the status code returned from the database operation
THEN:
• If the status code is blank (spaces), the train record is found; otherwise, the train record is not found
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when database retrieval operation has been executed for a train id.
Trigger Criteria:
Context: A database retrieval operation has been executed for a train ID
Applied to: Set Train Not Found Status
Action: The status code returned from the database operation is not blank (not spaces)
Logic Flow:
IF A database retrieval operation has been executed for a train ID
AND The status code returned from the database operation is not blank (not spaces)
THEN:
• The system determines that the train record does not exist and proceeds to error handling
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when train record has been successfully retrieved from the database with a blank status code.
Trigger Criteria:
Context: A train record has been successfully retrieved from the database with a blank status code
Applied to: Set Train Found Status
Action: The system processes the found train record
Logic Flow:
IF A train record has been successfully retrieved from the database with a blank status code
AND The system processes the found train record
THEN:
• The system logs an arrival acknowledgment message with action code 'ZZZ', the train ID, and the message '350 ACK - ARRIVAL ACK AT BORDER' by spawning the GCT1051E process
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when train record was not found in the database.
Trigger Criteria:
Context: A train record was not found in the database
Applied to: Prepare Error Report
Action: The system begins error notification preparation
Logic Flow:
IF A train record was not found in the database
AND The system begins error notification preparation
THEN:
• The first detail line of the Merlin report is cleared to spaces to prepare for the error message
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when error report is being prepared for a train not found in the system.
Trigger Criteria:
Context: An error report is being prepared for a train not found in the system
Applied to: Add Train ID to Error Message
Action: The system constructs the error message
Logic Flow:
IF An error report is being prepared for a train not found in the system
AND The system constructs the error message
THEN:
• The message 'UNKNOWN TRAIN ENTRY IN EDI 350 ' concatenated with the train ID (positions 1-25 of X4-04-REL-DOC-ID) is placed in the first detail line of the Merlin report
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when primary error message with the train id has been constructed.
Trigger Criteria:
Context: The primary error message with the train ID has been constructed
Applied to: Add 'Train Not Found' Message
Action: The system adds supplementary error information
Logic Flow:
IF The primary error message with the train ID has been constructed
AND The system adds supplementary error information
THEN:
• The message 'THIS CRN WAS NOT FOUND.' is placed in the third detail line of the Merlin report and the line counter is set to 4
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when error report has been prepared with the unknown train details.
Trigger Criteria:
Context: An error report has been prepared with the unknown train details
Applied to: Route Error to Merlin System
Action: The system routes the error notification
Logic Flow:
IF An error report has been prepared with the unknown train details
AND The system routes the error notification
THEN:
• The error type is set to 'UNKNOWN', and the Z110-PREP-EMCSEND procedure is executed to send the notification to the Merlin system
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when x4 segment with entry type '992' is being processed in a conventional 350 message. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An X4 segment with entry type '992' is being processed in a CONVENTIONAL 350 message
Applied to: Verify Train Exists in System
Action: The related document ID (positions 1-25) matches the previously processed train ID stored in WS-PREV-CRN
Logic Flow:
IF An X4 segment with entry type '992' is being processed in a CONVENTIONAL 350 message
AND The related document ID (positions 1-25) matches the previously processed train ID stored in WS-PREV-CRN
THEN:
• The system skips all train verification and processing steps and continues to the next segment
R-GCX126-cbl-00732 (+18)File: GCX126R.cblBusiness Rule: Update Cargo Border Arrival Status
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when x4 segment contains a cbsa release reference id in position 1-25.
Trigger Criteria:
Context: An X4 segment contains a CBSA Release Reference ID in position 1-25
Applied to: Retrieve Cargo Record by CCN from X4 Segment
Action: The system processes the X4 segment for border arrival acknowledgment
Logic Flow:
IF An X4 segment contains a CBSA Release Reference ID in position 1-25
AND The system processes the X4 segment for border arrival acknowledgment
THEN:
• The system retrieves the cargo record using the CBSA Release Reference ID as the CCN key
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo retrieval operation has been performed using the ccn from x4 segment.
Trigger Criteria:
Context: A cargo retrieval operation has been performed using the CCN from X4 segment
Applied to: Cargo Found?
Action: The system checks the cargo record status
Logic Flow:
IF A cargo retrieval operation has been performed using the CCN from X4 segment
AND The system checks the cargo record status
THEN:
• If cargo is found and not deleted, proceed with border arrival update; otherwise, skip the update process
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when valid cargo record has been retrieved and confirmed to exist.
Trigger Criteria:
Context: A valid cargo record has been retrieved and confirmed to exist
Applied to: Set Border Arrival Acknowledgment Flag
Action: The system processes the border arrival acknowledgment
Logic Flow:
IF A valid cargo record has been retrieved and confirmed to exist
AND The system processes the border arrival acknowledgment
THEN:
• The system sets the border arrival acknowledgment flag to TRUE on the cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when border arrival acknowledgment flag has been set on the cargo record.
Trigger Criteria:
Context: The border arrival acknowledgment flag has been set on the cargo record
Applied to: '350 ACK - ARRIVAL ACK AT BORDER'
Action: The system logs the border arrival event
Logic Flow:
IF The border arrival acknowledgment flag has been set on the cargo record
AND The system logs the border arrival event
THEN:
• The system creates a log entry with message '350 ACK - ARRIVAL ACK AT BORDER' including the CCN and current date/time
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has been updated with border arrival acknowledgment flag.
Trigger Criteria:
Context: The cargo record has been updated with border arrival acknowledgment flag
Applied to: Update Cargo Record in Database
Action: The system commits the changes
Logic Flow:
IF The cargo record has been updated with border arrival acknowledgment flag
AND The system commits the changes
THEN:
• The system replaces the cargo record in the database with the updated border arrival status
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been successfully updated with border arrival acknowledgment.
Trigger Criteria:
Context: A cargo record has been successfully updated with border arrival acknowledgment
Applied to: Is Master Manifest?
Action: The system evaluates the manifest type
Logic Flow:
IF A cargo record has been successfully updated with border arrival acknowledgment
AND The system evaluates the manifest type
THEN:
• If the cargo is a master manifest, proceed to retrieve and update all associated follower manifests; otherwise, complete the process
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is identified as a master manifest.
Trigger Criteria:
Context: The cargo record is identified as a master manifest
Applied to: Retrieve All Follower Manifests for Master CCN
Action: The system initiates follower manifest retrieval
Logic Flow:
IF The cargo record is identified as a master manifest
AND The system initiates follower manifest retrieval
THEN:
• The system retrieves all follower manifests where the master manifest CCN matches the current cargo CCN, up to a maximum of 100 followers
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when follower manifests are being retrieved for a master manifest.
Trigger Criteria:
Context: Follower manifests are being retrieved for a master manifest
Applied to: More Followers? Max 100
Action: The system checks for the next follower manifest
Logic Flow:
IF Follower manifests are being retrieved for a master manifest
AND The system checks for the next follower manifest
THEN:
• If more follower manifests exist and the count is less than or equal to 100, continue processing; otherwise, complete the follower processing
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when there are more follower manifests to process and the maximum limit has not been reached.
Trigger Criteria:
Context: There are more follower manifests to process and the maximum limit has not been reached
Applied to: Get Next Follower Manifest CCN
Action: The system advances to the next follower
Logic Flow:
IF There are more follower manifests to process and the maximum limit has not been reached
AND The system advances to the next follower
THEN:
• The system retrieves the CCN of the next follower manifest from the follower manifest array
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower manifest ccn has been identified.
Trigger Criteria:
Context: A follower manifest CCN has been identified
Applied to: Retrieve Follower Cargo Record
Action: The system retrieves the follower cargo record
Logic Flow:
IF A follower manifest CCN has been identified
AND The system retrieves the follower cargo record
THEN:
• The system performs a cargo retrieval operation using the follower CCN as the key
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when follower cargo retrieval operation has been performed.
Trigger Criteria:
Context: A follower cargo retrieval operation has been performed
Applied to: Follower Cargo Found?
Action: The system checks the follower cargo record status
Logic Flow:
IF A follower cargo retrieval operation has been performed
AND The system checks the follower cargo record status
THEN:
• If the follower cargo is found and not deleted, proceed with border arrival update; otherwise, skip to the next follower
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when valid follower cargo record has been retrieved and confirmed to exist.
Trigger Criteria:
Context: A valid follower cargo record has been retrieved and confirmed to exist
Applied to: Set Border Arrival Flag for Follower
Action: The system processes the border arrival acknowledgment for the follower
Logic Flow:
IF A valid follower cargo record has been retrieved and confirmed to exist
AND The system processes the border arrival acknowledgment for the follower
THEN:
• The system sets the border arrival acknowledgment flag to TRUE on the follower cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when border arrival acknowledgment flag has been set on the follower cargo record.
Trigger Criteria:
Context: The border arrival acknowledgment flag has been set on the follower cargo record
Applied to: Log Arrival Message for Follower CCN
Action: The system logs the border arrival event for the follower
Logic Flow:
IF The border arrival acknowledgment flag has been set on the follower cargo record
AND The system logs the border arrival event for the follower
THEN:
• The system creates a log entry with message '350 ACK - ARRIVAL ACK AT BORDER' including the follower CCN and current date/time
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower cargo record has been updated with border arrival acknowledgment flag.
Trigger Criteria:
Context: The follower cargo record has been updated with border arrival acknowledgment flag
Applied to: Update Follower Cargo Record
Action: The system commits the changes for the follower
Logic Flow:
IF The follower cargo record has been updated with border arrival acknowledgment flag
AND The system commits the changes for the follower
THEN:
• The system replaces the follower cargo record in the database with the updated border arrival status
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when ccn (cargo control number) is provided in the ccrt-ssaq key value and a2rt-ssaq key value.
Trigger Criteria:
Context: A CCN (Cargo Control Number) is provided in the CCRT-SSAQ key value and A2RT-SSAQ key value
Applied to: Retrieve Cargo Record by CCN
Action: The system performs a Get Hold Unique operation on the cargo database using the CCN key
Logic Flow:
IF A CCN (Cargo Control Number) is provided in the CCRT-SSAQ key value and A2RT-SSAQ key value
AND The system performs a Get Hold Unique operation on the cargo database using the CCN key
THEN:
• The cargo record segment (GCCC-CARGO-REPORT-SEGMENT) is retrieved if it exists, and the cargo status switches are set to indicate whether the cargo was found, deleted, or has other status conditions
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo retrieval operation has been performed using the ccn. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo retrieval operation has been performed using the CCN
Applied to: Cargo Found?
Action: The system evaluates the cargo status switches after the database call
Logic Flow:
IF A cargo retrieval operation has been performed using the CCN
AND The system evaluates the cargo status switches after the database call
THEN:
• IfWS-CARGO-FOUND is true, the system proceeds with border arrival updates; otherwise, the process terminates without updates
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when valid cargo record exists in the database.
Trigger Criteria:
Context: A valid cargo record exists in the database
Applied to: Set Border Arrival Acknowledgment Flag
Action: The system processes a border arrival acknowledgment from the EDI 350 message
Logic Flow:
IF A valid cargo record exists in the database
AND The system processes a border arrival acknowledgment from the EDI 350 message
THEN:
• The GCCC-BORDER-ARRIVAL-ACK flag is set to true in the cargo record segment
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been identified for border arrival acknowledgment and the current ccn key is stored in ws-current-ccn-key. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record has been identified for border arrival acknowledgment and the current CCN key is stored in WS-CURRENT-CCN-KEY
Applied to: '350 ACK - ARRIVAL ACK AT BORDER'
Action: The system prepares to log the border arrival event
Logic Flow:
IF A cargo record has been identified for border arrival acknowledgment and the current CCN key is stored in WS-CURRENT-CCN-KEY
AND The system prepares to log the border arrival event
THEN:
• The message '350 ACK - ARRIVAL ACK AT BORDER' is moved to WS-GCX105-INFO-MSG, the log information is populated with current machine date, time, user ID, and CCN, the action code is set to LOG-USE-INPUT-MESSAGE, the cargo type is set to GCX105-CA-CARGO, and the GCT1051E transaction is spawned to create the log entry
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record segment (gccc-cargo-report-segment) has been updated with the border arrival acknowledgment flag.
Trigger Criteria:
Context: The cargo record segment (GCCC-CARGO-REPORT-SEGMENT) has been updated with the border arrival acknowledgment flag
Applied to: Update Cargo Record in Database
Action: The system executes the replace operation
Logic Flow:
IF The cargo record segment (GCCC-CARGO-REPORT-SEGMENT) has been updated with the border arrival acknowledgment flag
AND The system executes the replace operation
THEN:
• The CIMS program is called with REPL function code, GCCC-PCB, andGCCC-CARGO-REPORT-SEGMENT to update the cargo record in the database, and the accept status is cleared
R-GCX126-cbl-00746 (+14)File: GCX126R.cblBusiness Rule: Get Next Cargo Record
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when request to retrieve the next us cargo record from the database.
Trigger Criteria:
Context: A request to retrieve the next US cargo record from the database
Applied to: Set Accept Status to 'GEGB'
Action: The system prepares to execute a Get Next operation
Logic Flow:
IF A request to retrieve the next US cargo record from the database
AND The system prepares to execute a Get Next operation
THEN:
• The system sets Accept Status to 'GEGB', Segment Type to GCSUSRT, Function to GN (Get Next), Index Type to CAR-WB (Car ID and Waybill), and Operator to '>' (greater than)
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when query parameters are set with accept status 'gegb', segment gcsusrt, function gn, index car-wb, and operator '>'. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Query parameters are set with Accept Status 'GEGB', Segment GCSUSRT, Function GN, Index CAR-WB, and Operator '>'
Applied to: Call GCCUSIO to Get Next Record
Action: The system calls GCCUSIO program
Logic Flow:
IF Query parameters are set with Accept Status 'GEGB', Segment GCSUSRT, Function GN, Index CAR-WB, and Operator '>'
AND The system calls GCCUSIO program
THEN:
• The system retrieves the next US cargo record from GCSUSRT table based on Car ID and Waybill index
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when database query has been executed to retrieve the next us cargo record.
Trigger Criteria:
Context: A database query has been executed to retrieve the next US cargo record
Applied to: Status Code = Spaces?
Action: The system checks the status code returned from the query
Logic Flow:
IF A database query has been executed to retrieve the next US cargo record
AND The system checks the status code returned from the query
THEN:
• If status code equals spaces, the query was successful and processing continues; otherwise, set End of Database flag to indicate no more records available
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record has been successfully retrieved from the database with current car id key and saved waybill index.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved from the database with current Car ID key and saved Waybill index
Applied to: Car ID and Waybill Match?
Action: The system compares the retrieved record's Car ID (first 12 characters) and Waybill number against the current processing context
Logic Flow:
IF A US cargo record has been successfully retrieved from the database with current Car ID key and saved Waybill index
AND The system compares the retrieved record's Car ID (first 12 characters) and Waybill number against the current processing context
THEN:
• If both Car ID (first 12 characters of RT073-CAR-ID-NUM-INDEX) equals current Car ID key AND RT073-WB-NUM-INDEX equals saved Waybill index, the record matches and processing continues; otherwise, set End of Database flag to indicate no matching records found
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when matching us cargo record has been found based on car id and waybill.
Trigger Criteria:
Context: A matching US cargo record has been found based on Car ID and Waybill
Applied to: Cargo Deleted or TR Created?
Action: The system checks the cargo record's deletion status and train creation indicator
Logic Flow:
IF A matching US cargo record has been found based on Car ID and Waybill
AND The system checks the cargo record's deletion status and train creation indicator
THEN:
• If cargo is marked as deleted (RT10-CPCARGO-DELETED is true) OR train has already been created for it (TR-CREATED-FOR-IT equals 'Y'), skip this record and continue to next; otherwise, set US Manifest Found flag to indicate a valid record has been located
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when database query to retrieve the next us cargo record has been executed.
Trigger Criteria:
Context: A database query to retrieve the next US cargo record has been executed
Applied to: Set End of Database Flag
Action: The status code returned is not spaces (indicating an error or end of data)
Logic Flow:
IF A database query to retrieve the next US cargo record has been executed
AND The status code returned is not spaces (indicating an error or end of data)
THEN:
• The system sets the End of Database flag to true to stop further record retrieval attempts
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when us cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved from the database
Applied to: Set End of Database Flag
Action: The retrieved record's Car ID (first 12 characters) does not equal current Car ID key OR Waybill number does not equal saved Waybill index
Logic Flow:
IF A US cargo record has been successfully retrieved from the database
AND The retrieved record's Car ID (first 12 characters) does not equal current Car ID key OR Waybill number does not equal saved Waybill index
THEN:
• The system sets the End of Database flag to true to stop further record retrieval attempts as no more matching records exist
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when us cargo record matches the current car id and waybill and is not deleted and does not have a train created for it.
Trigger Criteria:
Context: A US cargo record matches the current Car ID and Waybill AND is not deleted AND does not have a train created for it
Applied to: Set US Manifest Found Flag
Action: The system completes all validation checks successfully
Logic Flow:
IF A US cargo record matches the current Car ID and Waybill AND is not deleted AND does not have a train created for it
AND The system completes all validation checks successfully
THEN:
• The system sets the US Manifest Found flag to true to indicate a valid record is available for processing
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when current equipment car id and waybill number are available for search. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A current equipment car ID and waybill number are available for search
Applied to: Call GCCUSIO to Get Next US Cargo
Action: The system requests the next US cargo record using the car ID and waybill index with greater than operator
Logic Flow:
IF A current equipment car ID and waybill number are available for search
AND The system requests the next US cargo record using the car ID and waybill index with greater than operator
THEN:
• The system retrieves the next sequential US cargo record from the database
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record retrieval operation has been executed.
Trigger Criteria:
Context: A US cargo record retrieval operation has been executed
Applied to: Status Code = Spaces?
Action: The system checks the operation status code
Logic Flow:
IF A US cargo record retrieval operation has been executed
AND The system checks the operation status code
THEN:
• If status code is spaces, the retrieval was successful and processing continues; otherwise, the end of database is reached
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record retrieval operation has failed with non-space status code.
Trigger Criteria:
Context: A US cargo record retrieval operation has failed with non-space status code
Applied to: Set End of Database Flag
Action: The system processes the failed retrieval result
Logic Flow:
IF A US cargo record retrieval operation has failed with non-space status code
AND The system processes the failed retrieval result
THEN:
• The end of database flag is set to true indicating no more records exist
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record has been successfully retrieved and current equipment car id (first 12 characters) and waybill number are known.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved and current equipment car ID (first 12 characters) and waybill number are known
Applied to: Car ID and Waybill Match Current?
Action: The system compares the retrieved record's car ID (first 12 characters) and waybill number against current values
Logic Flow:
IF A US cargo record has been successfully retrieved and current equipment car ID (first 12 characters) and waybill number are known
AND The system compares the retrieved record's car ID (first 12 characters) and waybill number against current values
THEN:
• If both car ID and waybill match, the record is valid for processing; otherwise, it indicates end of matching records
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record has been retrieved but its equipment car id or waybill number does not match current search criteria.
Trigger Criteria:
Context: A US cargo record has been retrieved but its equipment car ID or waybill number does not match current search criteria
Applied to: Set End of Database Flag
Action: The system detects the mismatch in equipment or waybill
Logic Flow:
IF A US cargo record has been retrieved but its equipment car ID or waybill number does not match current search criteria
AND The system detects the mismatch in equipment or waybill
THEN:
• The end of database flag is set to true indicating no more matching records exist
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record has been retrieved that matches equipment and waybill criteria.
Trigger Criteria:
Context: A US cargo record has been retrieved that matches equipment and waybill criteria
Applied to: Cargo Deleted or TR Created?
Action: The system checks if the cargo is marked as deleted or has train created indicator set to 'Y'
Logic Flow:
IF A US cargo record has been retrieved that matches equipment and waybill criteria
AND The system checks if the cargo is marked as deleted or has train created indicator set to 'Y'
THEN:
• If cargo is deleted or train created indicator is 'Y', the record is skipped; otherwise, it is marked as found for processing
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record has been retrieved that matches equipment and waybill, is not deleted, and does not have train created.
Trigger Criteria:
Context: A US cargo record has been retrieved that matches equipment and waybill, is not deleted, and does not have train created
Applied to: Set US Manifest Found Flag
Action: The system completes all validation checks successfully
Logic Flow:
IF A US cargo record has been retrieved that matches equipment and waybill, is not deleted, and does not have train created
AND The system completes all validation checks successfully
THEN:
• The US manifest found flag is set to true indicating a valid record is available for processing
R-GCX126-cbl-00754 (+13)File: GCX126R.cblBusiness Rule: Get Next Cargo Record Using Master CCN Key
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when master manifest cargo record is being processed.
Trigger Criteria:
Context: A master manifest cargo record is being processed
Applied to: Set Accept Status to 'GEGB'
Action: The system needs to retrieve all associated follower manifests
Logic Flow:
IF A master manifest cargo record is being processed
AND The system needs to retrieve all associated follower manifests
THEN:
• The database access status is set to 'GEGB' to enable hierarchical navigation through cargo records
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when master manifest cargo record with a valid ccn key is currently loaded.
Trigger Criteria:
Context: A master manifest cargo record with a valid CCN key is currently loaded
Applied to: Set Master CCN Key from Current Cargo
Action: The system prepares to search for follower manifests
Logic Flow:
IF A master manifest cargo record with a valid CCN key is currently loaded
AND The system prepares to search for follower manifests
THEN:
• The master manifest's CCN key is stored as the search reference key for subsequent follower manifest retrieval
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when system is about to search for follower manifests.
Trigger Criteria:
Context: The system is about to search for follower manifests
Applied to: Initialize Follower Manifest Array
Action: The follower manifest collection process begins
Logic Flow:
IF The system is about to search for follower manifests
AND The follower manifest collection process begins
THEN:
• The follower manifest array is initialized to spaces to ensure no residual data from previous processing
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when follower manifest search is about to begin.
Trigger Criteria:
Context: The follower manifest search is about to begin
Applied to: Set Follower Not End of DB Flag
Action: The system initializes the database navigation state
Logic Flow:
IF The follower manifest search is about to begin
AND The system initializes the database navigation state
THEN:
• The end-of-database flag is set to 'Not End of DB' to allow record retrieval to proceed
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower manifest array has been initialized.
Trigger Criteria:
Context: The follower manifest array has been initialized
Applied to: Set Index I to 1
Action: The system prepares to store follower manifest CCNs
Logic Flow:
IF The follower manifest array has been initialized
AND The system prepares to store follower manifest CCNs
THEN:
• The array index counter is set to 1 to point to the first available storage position
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when system is in the process of collecting follower manifests and the current array index position and database status are known.
Trigger Criteria:
Context: The system is in the process of collecting follower manifests AND the current array index position and database status are known
Applied to: End of DB OR Index > 100?
Action: The system checks if more follower manifests can be retrieved
Logic Flow:
IF The system is in the process of collecting follower manifests AND the current array index position and database status are known
AND The system checks if more follower manifests can be retrieved
THEN:
• The search continues if the end of database has not been reached AND the array index is 100 or less, otherwise the search terminates
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when database access is initialized with 'gegb' status and the master ccn key is set and the search should continue. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The database access is initialized with 'GEGB' status AND the master CCN key is set AND the search should continue
Applied to: Call CIMS with GN Function to Get Next Cargo Record
Action: The system requests the next cargo record
Logic Flow:
IF The database access is initialized with 'GEGB' status AND the master CCN key is set AND the search should continue
AND The system requests the next cargo record
THEN:
• The database management system retrieves the next cargo record in the hierarchy using the GN (Get Next) function with the master CCN qualification
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when database call to retrieve the next cargo record has been executed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database call to retrieve the next cargo record has been executed
Applied to: Status Code = Blank?
Action: The system evaluates the database operation result
Logic Flow:
IF A database call to retrieve the next cargo record has been executed
AND The system evaluates the database operation result
THEN:
• If the status code is blank (spaces), the retrieval was successful and processing continues, otherwise the end-of-database flag is set
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been successfully retrieved from the database and the master ccn key is known.
Trigger Criteria:
Context: A cargo record has been successfully retrieved from the database AND the master CCN key is known
Applied to: Master CCN Matches Current CCN?
Action: The system validates the cargo record's master manifest association
Logic Flow:
IF A cargo record has been successfully retrieved from the database AND the master CCN key is known
AND The system validates the cargo record's master manifest association
THEN:
• If the retrieved cargo's master manifest CCN matches the stored master CCN key, the record is validated for further processing, otherwise the end-of-database flag is set
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been retrieved and validated as belonging to the current master manifest.
Trigger Criteria:
Context: A cargo record has been retrieved AND validated as belonging to the current master manifest
Applied to: Is Follower Manifest?
Action: The system checks the cargo record's manifest type
Logic Flow:
IF A cargo record has been retrieved AND validated as belonging to the current master manifest
AND The system checks the cargo record's manifest type
THEN:
• If the cargo is a follower manifest, its CCN is stored in the array, if it is a master manifest, it is skipped and the loop continues
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has been identified as a follower manifest and the current array index is within capacity (1-100).
Trigger Criteria:
Context: A cargo record has been identified as a follower manifest AND the current array index is within capacity (1-100)
Applied to: Store Follower CCN in Array at Index I
Action: The system stores the follower manifest information
Logic Flow:
IF A cargo record has been identified as a follower manifest AND the current array index is within capacity (1-100)
AND The system stores the follower manifest information
THEN:
• The follower manifest's CCN key is stored in the array at the position indicated by the current index value
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower manifest ccn has been successfully stored in the array.
Trigger Criteria:
Context: A follower manifest CCN has been successfully stored in the array
Applied to: Increment Index I by 1
Action: The system prepares for the next follower manifest
Logic Flow:
IF A follower manifest CCN has been successfully stored in the array
AND The system prepares for the next follower manifest
THEN:
• The array index counter is incremented by 1 to point to the next available storage position
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when either the database retrieval returned a non-blank status code or the retrieved cargo's master ccn does not match the current master ccn.
Trigger Criteria:
Context: Either the database retrieval returned a non-blank status code OR the retrieved cargo's master CCN does not match the current master CCN
Applied to: Set Follower End of DB Flag
Action: The system determines that no more valid follower manifests can be retrieved
Logic Flow:
IF Either the database retrieval returned a non-blank status code OR the retrieved cargo's master CCN does not match the current master CCN
AND The system determines that no more valid follower manifests can be retrieved
THEN:
• The end-of-database flag is set to 'End of DB' to terminate the search loop
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when either the end-of-database has been reached or the array capacity limit of 100 has been reached or all follower manifests have been collected.
Trigger Criteria:
Context: Either the end-of-database has been reached OR the array capacity limit of 100 has been reached OR all follower manifests have been collected
Applied to: Return to Calling Process
Action: The follower manifest search loop terminates
Logic Flow:
IF Either the end-of-database has been reached OR the array capacity limit of 100 has been reached OR all follower manifests have been collected
AND The follower manifest search loop terminates
THEN:
• Control returns to the calling process with the follower manifest array containing all collected follower CCNs (up to 100 entries)
R-GCX126-cbl-00768 (+10)File: GCX126R.cblBusiness Rule: Retrieve Follower Cargo Record by CCN
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when master manifest ccn has been identified for processing.
Trigger Criteria:
Context: A master manifest CCN has been identified for processing
Applied to: Initialize Loop Counter I = 1
Action: The system begins to retrieve follower manifests
Logic Flow:
IF A master manifest CCN has been identified for processing
AND The system begins to retrieve follower manifests
THEN:
• The loop counter I is set to 1 and the follower manifest array is initialized to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when system is ready to retrieve the next follower manifest record.
Trigger Criteria:
Context: The system is ready to retrieve the next follower manifest record
Applied to: Set Accept Status to 'GEGB'
Action: Database access is initiated
Logic Flow:
IF The system is ready to retrieve the next follower manifest record
AND Database access is initiated
THEN:
• The accept status is set to 'GEGB' to enable Get Next operation
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when accept status is set to 'gegb' and the master ccn key is positioned. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The accept status is set to 'GEGB' and the master CCN key is positioned
Applied to: Call CIMS with GN Function
Action: The CIMS program is called with GN (Get Next) function using PCB7 and qualified SSA for master CCN
Logic Flow:
IF The accept status is set to 'GEGB' and the master CCN key is positioned
AND The CIMS program is called with GN (Get Next) function using PCB7 and qualified SSA for master CCN
THEN:
• The next cargo report segment is retrieved into the cargo report segment area
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when database get next operation has been executed.
Trigger Criteria:
Context: A database Get Next operation has been executed
Applied to: Status Code = Blank?
Action: The status code is evaluated
Logic Flow:
IF A database Get Next operation has been executed
AND The status code is evaluated
THEN:
• If status code is blank (spaces), continue processing; otherwise set end of database flag to true
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A cargo record has been successfully retrieved from the database
Applied to: Master CCN Matches Saved CCN?
Action: The master manifest CCN field of the retrieved record is compared to the saved CCN
Logic Flow:
IF A cargo record has been successfully retrieved from the database
AND The master manifest CCN field of the retrieved record is compared to the saved CCN
THEN:
• If the master manifest CCN equals the saved CCN, continue processing; otherwise set end of database flag to true
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with matching master ccn has been retrieved.
Trigger Criteria:
Context: A cargo record with matching master CCN has been retrieved
Applied to: Is Follower Manifest?
Action: The manifest type indicator is evaluated
Logic Flow:
IF A cargo record with matching master CCN has been retrieved
AND The manifest type indicator is evaluated
THEN:
• If the record is a follower manifest (not a master), store its CCN; if it is a master manifest, skip and continue to next record
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when follower manifest record has been identified.
Trigger Criteria:
Context: A follower manifest record has been identified
Applied to: Store Follower CCN in Array Position I
Action: The CCN needs to be stored for later processing
Logic Flow:
IF A follower manifest record has been identified
AND The CCN needs to be stored for later processing
THEN:
• The cargo CCN key is moved to the follower manifest array at position I
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when follower manifest ccn has been stored in the array.
Trigger Criteria:
Context: A follower manifest CCN has been stored in the array
Applied to: Increment Counter I
Action: The system prepares to retrieve the next follower manifest
Logic Flow:
IF A follower manifest CCN has been stored in the array
AND The system prepares to retrieve the next follower manifest
THEN:
• The counter I is incremented by 1
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when system is processing follower manifests in a loop.
Trigger Criteria:
Context: The system is processing follower manifests in a loop
Applied to: I > 100 or End of Database?
Action: The loop termination conditions are evaluated
Logic Flow:
IF The system is processing follower manifests in a loop
AND The loop termination conditions are evaluated
THEN:
• If counter I exceeds 100 OR the end of database flag is true, exit the loop; otherwise continue retrieving next record
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when either the database status code is not blank or the master ccn does not match the saved ccn.
Trigger Criteria:
Context: Either the database status code is not blank OR the master CCN does not match the saved CCN
Applied to: Set End of Database Flag
Action: The error or mismatch condition is detected
Logic Flow:
IF Either the database status code is not blank OR the master CCN does not match the saved CCN
AND The error or mismatch condition is detected
THEN:
• The end of database flag is set to true to terminate the retrieval loop
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when loop has processed all available follower manifests or reached the maximum limit of 100 or encountered end of database.
Trigger Criteria:
Context: The loop has processed all available follower manifests OR reached the maximum limit of 100 OR encountered end of database
Applied to: End Loop
Action: The loop termination point is reached
Logic Flow:
IF The loop has processed all available follower manifests OR reached the maximum limit of 100 OR encountered end of database
AND The loop termination point is reached
THEN:
• The counter I is decremented by 1 to reflect the actual count of follower manifests retrieved
R-GCX126-cbl-00779File: GCX126R.cblBusiness Rule: Initialize All Status Flags to Space
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when system is about to evaluate cargo status switches. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is about to evaluate cargo status switches
Applied to: Initialize All Status Flags to Space
Action: The cargo status flag initialization process is invoked
Logic Flow:
IF The system is about to evaluate cargo status switches
AND The cargo status flag initialization process is invoked
THEN:
• All four cargo status switches (WS-SWITCH1-CARGO, WS-SWITCH2-CARGO, WS-SWITCH3-CARGO, WS-SWITCH4-CARGO) are set to space character to clear any previous status indicators
R-GCX126-cbl-00780 (+12)File: GCX126R.cblBusiness Rule: Execute Database Search on US Cargo Table
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when canadian cargo record is being processed with an equipment car id and waybill index.
Trigger Criteria:
Context: A Canadian cargo record is being processed with an equipment car ID and waybill index
Applied to: Set Search Parameters
Action: The system prepares to search for associated US cargo records
Logic Flow:
IF A Canadian cargo record is being processed with an equipment car ID and waybill index
AND The system prepares to search for associated US cargo records
THEN:
• The search parameters are initialized with the current cargo's equipment car ID in the car ID number index field and the saved waybill index in the waybill number index field
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when car id and waybill search parameters are set.
Trigger Criteria:
Context: The car ID and waybill search parameters are set
Applied to: Set US CCN Key to Low Values
Action: The system needs to search for all US cargo records matching the equipment and waybill
Logic Flow:
IF The car ID and waybill search parameters are set
AND The system needs to search for all US cargo records matching the equipment and waybill
THEN:
• The US CCN key index field is set to low values to start the search from the beginning of the range
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when search parameters for car id, waybill, and us ccn are initialized.
Trigger Criteria:
Context: Search parameters for car ID, waybill, and US CCN are initialized
Applied to: Set Function to GU - Get Unique
Action: The system executes the initial database search
Logic Flow:
IF Search parameters for car ID, waybill, and US CCN are initialized
AND The system executes the initial database search
THEN:
• The function code is set to GU (Get Unique) to retrieve the first matching record
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when database function is set to get unique.
Trigger Criteria:
Context: The database function is set to Get Unique
Applied to: Set Index Type to CAR-WB
Action: The system needs to specify which index to use for the search
Logic Flow:
IF The database function is set to Get Unique
AND The system needs to specify which index to use for the search
THEN:
• The index type is set to CAR-WB (Car-Waybill composite index)
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when search index is set to car-wb and search keys are initialized.
Trigger Criteria:
Context: The search index is set to CAR-WB and search keys are initialized
Applied to: Set Operator to Greater Than or Equal
Action: The system defines the comparison logic for the database search
Logic Flow:
IF The search index is set to CAR-WB and search keys are initialized
AND The system defines the comparison logic for the database search
THEN:
• The operator is set to '>=' (greater than or equal) to include exact matches and subsequent records
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when all search parameters are configured with segment type gcsusrt, function gu, index car-wb, operator '>=', car id, waybill index, and us ccn key. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All search parameters are configured with segment type GCSUSRT, function GU, index CAR-WB, operator '>=', car ID, waybill index, and US CCN key
Applied to: Call GCCUSIO to Search US Cargo
Action: The system executes the database search
Logic Flow:
IF All search parameters are configured with segment type GCSUSRT, function GU, index CAR-WB, operator '>=', car ID, waybill index, and US CCN key
AND The system executes the database search
THEN:
• The GCCUSIO module is called with the control communication area, search parameters, and US cargo segment structure to retrieve matching records
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when gccusio database search has been executed.
Trigger Criteria:
Context: The GCCUSIO database search has been executed
Applied to: Database Status OK?
Action: The system evaluates the result of the search operation
Logic Flow:
IF The GCCUSIO database search has been executed
AND The system evaluates the result of the search operation
THEN:
• If the status code is spaces (blank), the search is successful; otherwise, an error occurred
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when database search returned a non-blank status code indicating an error or end of data. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The database search returned a non-blank status code indicating an error or end of data
Applied to: Set End of Database Flag
Action: The system processes the search failure
Logic Flow:
IF The database search returned a non-blank status code indicating an error or end of data
AND The system processes the search failure
THEN:
• The end-of-database flag (WS-EOF) is set to TRUE to stop further search attempts
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when us cargo record was successfully retrieved from the database.
Trigger Criteria:
Context: A US cargo record was successfully retrieved from the database
Applied to: Car ID and Waybill Match?
Action: The system validates the retrieved record
Logic Flow:
IF A US cargo record was successfully retrieved from the database
AND The system validates the retrieved record
THEN:
• The system checks if the first 12 characters of the car ID number index equals the current cargo's equipment car ID AND the waybill number index equals the saved waybill index; if both match, the record is valid; otherwise, it indicates end of matching records
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record was retrieved but the car id or waybill number does not match the search criteria. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A US cargo record was retrieved but the car ID or waybill number does not match the search criteria
Applied to: Car ID and Waybill Match? - No Match
Action: The system detects the mismatch
Logic Flow:
IF A US cargo record was retrieved but the car ID or waybill number does not match the search criteria
AND The system detects the mismatch
THEN:
• The end-of-database flag (WS-EOF) is set to TRUE to terminate the search process
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record matches the equipment car id and waybill number.
Trigger Criteria:
Context: A US cargo record matches the equipment car ID and waybill number
Applied to: Cargo Deleted or TR Created?
Action: The system evaluates the record's processing eligibility
Logic Flow:
IF A US cargo record matches the equipment car ID and waybill number
AND The system evaluates the record's processing eligibility
THEN:
• If the cargo deletion status indicator shows deleted OR the train-created-for-it flag equals 'Y', the record should be skipped; otherwise, it is eligible for processing
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when matching us cargo record is found with deletion status set or train-created flag equals 'y'.
Trigger Criteria:
Context: A matching US cargo record is found with deletion status set OR train-created flag equals 'Y'
Applied to: Cargo Deleted or TR Created? - Yes - Skip
Action: The system processes the validation result
Logic Flow:
IF A matching US cargo record is found with deletion status set OR train-created flag equals 'Y'
AND The system processes the validation result
THEN:
• The system continues without setting the US manifest found flag, allowing the search to proceed to the next record
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when us cargo record matches the equipment car id and waybill number and is not deleted and does not have train-created flag set to 'y'. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A US cargo record matches the equipment car ID and waybill number AND is not deleted AND does not have train-created flag set to 'Y'
Applied to: Set US Manifest Found Flag
Action: The system confirms the record is valid for processing
Logic Flow:
IF A US cargo record matches the equipment car ID and waybill number AND is not deleted AND does not have train-created flag set to 'Y'
AND The system confirms the record is valid for processing
THEN:
• The US manifest found flag (WS-US-MFST-FOUND) is set to TRUE to indicate a valid matching record has been located
R-GCX126-cbl-00793 (+10)File: GCX126R.cblBusiness Rule: Get Next Follower Manifest Using Master CCN
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when master manifest needs to have its follower manifests identified.
Trigger Criteria:
Context: A master manifest needs to have its follower manifests identified
Applied to: Initialize Loop Counter I = 1, Set Not End of DB Flag
Action: The follower manifest collection process begins
Logic Flow:
IF A master manifest needs to have its follower manifests identified
AND The follower manifest collection process begins
THEN:
• The loop counter I is set to 1 AND the end-of-database flag is set to indicate more records may exist
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when system is ready to retrieve the next follower manifest record.
Trigger Criteria:
Context: The system is ready to retrieve the next follower manifest record
Applied to: Set Accept Status to 'GEGB'
Action: Database access is initiated
Logic Flow:
IF The system is ready to retrieve the next follower manifest record
AND Database access is initiated
THEN:
• The accept status is set to 'GEGB' to enable Get Next with Browse capability
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when master manifest ccn key is available in gcb0rt-ccn-key and the database access mode is set to 'gegb'. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The master manifest CCN key is available in GCB0RT-CCN-KEY AND the database access mode is set to 'GEGB'
Applied to: Call IMS GN Function Using Master CCN Key
Action: The IMS Get Next function is called with PCB7 using the CCRT-B0RT-SSAQ qualified search
Logic Flow:
IF The master manifest CCN key is available in GCB0RT-CCN-KEY AND the database access mode is set to 'GEGB'
AND The IMS Get Next function is called with PCB7 using the CCRT-B0RT-SSAQ qualified search
THEN:
• The next cargo report segment is retrieved into GCCC-CARGO-REPORT-SEGMENT
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when get next operation has been executed to retrieve a cargo record.
Trigger Criteria:
Context: A Get Next operation has been executed to retrieve a cargo record
Applied to: IMS Status Code = Blank?
Action: The IMS status code is evaluated
Logic Flow:
IF A Get Next operation has been executed to retrieve a cargo record
AND The IMS status code is evaluated
THEN:
• If status code is blank (spaces), the retrieval was successful AND processing continues to validate the record OR If status code is not blank, an error occurred AND the end-of-database flag is set AND loop processing terminates
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been successfully retrieved from the database and the saved master ccn is available in ws-save-ccn. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record has been successfully retrieved from the database AND the saved master CCN is available in WS-SAVE-CCN
Applied to: Master CCN Matches?
Action: The master manifest CCN of the retrieved cargo (GCCC-MASTER-MFST-CCN) is compared to the saved master CCN
Logic Flow:
IF A cargo record has been successfully retrieved from the database AND the saved master CCN is available in WS-SAVE-CCN
AND The master manifest CCN of the retrieved cargo (GCCC-MASTER-MFST-CCN) is compared to the saved master CCN
THEN:
• If the master manifest CCN matches the saved CCN, the cargo belongs to this master AND processing continues to check if it is a follower OR If the master manifest CCN does not match, the cargo belongs to a different master AND the end-of-database flag is set AND loop processing terminates
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been retrieved that belongs to the correct master manifest.
Trigger Criteria:
Context: A cargo record has been retrieved that belongs to the correct master manifest
Applied to: Is Follower Manifest?
Action: The cargo manifest type indicator (GCCC-FOLLOWER-MFST) is evaluated
Logic Flow:
IF A cargo record has been retrieved that belongs to the correct master manifest
AND The cargo manifest type indicator (GCCC-FOLLOWER-MFST) is evaluated
THEN:
• If the cargo is identified as a follower manifest, its CCN is stored in the follower array AND the loop counter is incremented OR If the cargo is the master manifest itself, it is skipped AND the loop continues to the next record
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been confirmed as a follower manifest of the current master. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record has been confirmed as a follower manifest of the current master
Applied to: Store Follower CCN in Array Position I
Action: The follower manifest is being recorded
Logic Flow:
IF A cargo record has been confirmed as a follower manifest of the current master
AND The follower manifest is being recorded
THEN:
• The follower manifest CCN (GCCC-CCN-KEY) is stored in the follower manifest array at position I (WS-FOLLOWER-MANI(I))
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when follower manifest ccn has been stored in the array at position i.
Trigger Criteria:
Context: A follower manifest CCN has been stored in the array at position I
Applied to: Increment Counter I
Action: The counter is incremented
Logic Flow:
IF A follower manifest CCN has been stored in the array at position I
AND The counter is incremented
THEN:
• The loop counter I is increased by 1 to point to the next available array position
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower manifests are being collected in an array with maximum capacity of 100.
Trigger Criteria:
Context: Follower manifests are being collected in an array with maximum capacity of 100
Applied to: Counter I > 100?
Action: The loop counter I is evaluated after incrementing
Logic Flow:
IF Follower manifests are being collected in an array with maximum capacity of 100
AND The loop counter I is evaluated after incrementing
THEN:
• If counter I exceeds 100, the end-of-database flag is set AND loop processing terminates to prevent array overflow OR If counter I is 100 or less, the loop continues to retrieve the next record
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when one of the following conditions has occurred: database retrieval error or retrieved cargo belongs to different master or maximum capacity of 100 followers reached. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: One of the following conditions has occurred: database retrieval error OR retrieved cargo belongs to different master OR maximum capacity of 100 followers reached
Applied to: Set End of DB Flag
Action: The end-of-database flag is set
Logic Flow:
IF One of the following conditions has occurred: database retrieval error OR retrieved cargo belongs to different master OR maximum capacity of 100 followers reached
AND The end-of-database flag is set
THEN:
• The flag WS-FOLLOWER-END-OF-DB is set to TRUE AND the loop will terminate on next iteration
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when follower manifest collection loop has completed due to end-of-database flag or maximum iterations reached. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The follower manifest collection loop has completed due to end-of-database flag OR maximum iterations reached
Applied to: End Loop
Action: Loop processing ends
Logic Flow:
IF The follower manifest collection loop has completed due to end-of-database flag OR maximum iterations reached
AND Loop processing ends
THEN:
• The loop counter I is decremented by 1 to reflect the actual count of follower manifests collected AND if the count is zero or negative, processing exits immediately OR if follower manifests were collected, they are available in the WS-FOLLOWER-MANI array for further processing
R-GCX126-cbl-00804 (+10)File: GCX126R.cblBusiness Rule: Set Release Information: Clear Destination Station, Set Release Date/Time, Set Release By User, Set Status to RELEASED, Clear Error Fields
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists in the system with destination station information.
Trigger Criteria:
Context: A cargo record exists in the system with destination station information
Applied to: Clear Destination Station Number
Action: The system initiates the release information setup process
Logic Flow:
IF A cargo record exists in the system with destination station information
AND The system initiates the release information setup process
THEN:
• The destination station number field is cleared to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record exists in the system with destination station index information.
Trigger Criteria:
Context: A cargo record exists in the system with destination station index information
Applied to: Clear Destination Station Index
Action: The system initiates the release information setup process
Logic Flow:
IF A cargo record exists in the system with destination station index information
AND The system initiates the release information setup process
THEN:
• The destination station index field is cleared to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record is being processed for release.
Trigger Criteria:
Context: A cargo record is being processed for release
Applied to: Set Release Date to Current Machine Date & Set Release Time to Current Machine Time & Set Release By to Current User ID & Initialize Release Reason to Spaces & Clear Error/Release Status Index & Clear Error Status
Action: The system sets release information
Logic Flow:
IF A cargo record is being processed for release
AND The system sets release information
THEN:
• The release date is set to the current machine date from the system
• The release time is set to the current machine time from the system
• The release by field is set to the current user ID from the system
• The release reason field is initialized to spaces
• The error or release status index field is cleared to spaces
• The error status field is cleared to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for customs release.
Trigger Criteria:
Context: A cargo record is being processed for customs release
Applied to: Set Current Status to 'RELEASED' & Set Release Status to 'R'
Action: The system sets release information
Logic Flow:
IF A cargo record is being processed for customs release
AND The system sets release information
THEN:
• The current status field is set to 'RELEASED'
• The release status indicator is set to 'R'
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for customs release via edi 350 message.
Trigger Criteria:
Context: A cargo record is being processed for customs release via EDI 350 message
Applied to: Set Release Type to 'A'
Action: The system sets release information
Logic Flow:
IF A cargo record is being processed for customs release via EDI 350 message
AND The system sets release information
THEN:
• The release type is set to 'A' indicating automatic release
R-GCX126-cbl-00815 (+14)File: GCX126R.cblBusiness Rule: Process Associated US Manifest: Find US Cargo by Car ID and Waybill, Log Release to US CCN
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when canadian cargo record has been processed for release or deconsolidation.
Trigger Criteria:
Context: A Canadian cargo record has been processed for release or deconsolidation
Applied to: Initialize US Manifest Search Flags
Action: The system initiates the US manifest search process
Logic Flow:
IF A Canadian cargo record has been processed for release or deconsolidation
AND The system initiates the US manifest search process
THEN:
• The US manifest not found flag is set to true AND the not end-of-file flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when canadian cargo record with equipment car id and waybill index exists.
Trigger Criteria:
Context: A Canadian cargo record with equipment car ID and waybill index exists
Applied to: Car ID and Waybill Index
Action: The system prepares to search for US cargo
Logic Flow:
IF A Canadian cargo record with equipment car ID and waybill index exists
AND The system prepares to search for US cargo
THEN:
• The US cargo search key is set to the current equipment car ID AND the US cargo waybill search key is set to the saved waybill index
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when us cargo search keys are set with car id and waybill index.
Trigger Criteria:
Context: US cargo search keys are set with car ID and waybill index
Applied to: Retrieve US Cargo Record by Car ID and Waybill
Action: The system executes the initial US cargo retrieval using GU function with CAR-WB index and >= operator
Logic Flow:
IF US cargo search keys are set with car ID and waybill index
AND The system executes the initial US cargo retrieval using GU function with CAR-WB index and >= operator
THEN:
• The system retrieves the first US cargo record matching or exceeding the search criteria
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when us cargo retrieval operation has been executed.
Trigger Criteria:
Context: A US cargo retrieval operation has been executed
Applied to: US Cargo Status?
Action: The system checks the database status code
Logic Flow:
IF A US cargo retrieval operation has been executed
AND The system checks the database status code
THEN:
• If status code is not spaces, set end-of-file flag to true and exit the search process
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record has been successfully retrieved.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved
Applied to: Car ID and Waybill Match?
Action: The system compares the US cargo car ID (first 12 characters) with current car ID key AND compares the US cargo waybill index with saved waybill index
Logic Flow:
IF A US cargo record has been successfully retrieved
AND The system compares the US cargo car ID (first 12 characters) with current car ID key AND compares the US cargo waybill index with saved waybill index
THEN:
• If car ID first 12 characters match current car ID key AND waybill index matches saved waybill index, proceed to check deletion status ELSE set end-of-file flag to true
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when matching us cargo record by car id and waybill has been found.
Trigger Criteria:
Context: A matching US cargo record by car ID and waybill has been found
Applied to: Cargo Deleted or TR Created?
Action: The system checks the cargo deletion status indicator AND train created indicator
Logic Flow:
IF A matching US cargo record by car ID and waybill has been found
AND The system checks the cargo deletion status indicator AND train created indicator
THEN:
• If cargo is marked as deleted OR train created indicator equals 'Y', continue to get next record ELSE set US manifest found flag to true
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record exists that matches car id and waybill and is not deleted and does not have a train created.
Trigger Criteria:
Context: A US cargo record exists that matches car ID and waybill AND is not deleted AND does not have a train created
Applied to: Set US Manifest Found Flag
Action: The system completes validation checks
Logic Flow:
IF A US cargo record exists that matches car ID and waybill AND is not deleted AND does not have a train created
AND The system completes validation checks
THEN:
• The US manifest found flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when current us cargo record does not meet criteria (deleted or train created).
Trigger Criteria:
Context: The current US cargo record does not meet criteria (deleted or train created)
Applied to: Get Next US Cargo Record
Action: The system executes GN function with CAR-WB index and > operator
Logic Flow:
IF The current US cargo record does not meet criteria (deleted or train created)
AND The system executes GN function with CAR-WB index and > operator
THEN:
• The system retrieves the next US cargo record in sequence
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when get-next us cargo retrieval operation has been executed.
Trigger Criteria:
Context: A get-next US cargo retrieval operation has been executed
Applied to: US Cargo Status?
Action: The system checks the database status code
Logic Flow:
IF A get-next US cargo retrieval operation has been executed
AND The system checks the database status code
THEN:
• If status code is not spaces, set end-of-file flag to true and proceed to check found flag
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when next us cargo record has been successfully retrieved.
Trigger Criteria:
Context: A next US cargo record has been successfully retrieved
Applied to: Car ID and Waybill Match?
Action: The system compares the US cargo car ID (first 12 characters) with current car ID key AND compares the US cargo waybill index with saved waybill index
Logic Flow:
IF A next US cargo record has been successfully retrieved
AND The system compares the US cargo car ID (first 12 characters) with current car ID key AND compares the US cargo waybill index with saved waybill index
THEN:
• If car ID first 12 characters match current car ID key AND waybill index matches saved waybill index, proceed to check deletion status ELSE set end-of-file flag to true
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when next matching us cargo record by car id and waybill has been found.
Trigger Criteria:
Context: A next matching US cargo record by car ID and waybill has been found
Applied to: Cargo Deleted or TR Created?
Action: The system checks the cargo deletion status indicator AND train created indicator
Logic Flow:
IF A next matching US cargo record by car ID and waybill has been found
AND The system checks the cargo deletion status indicator AND train created indicator
THEN:
• If cargo is marked as deleted OR train created indicator equals 'Y', continue to get next record ELSE set US manifest found flag to true
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when next us cargo record exists that matches car id and waybill and is not deleted and does not have a train created.
Trigger Criteria:
Context: A next US cargo record exists that matches car ID and waybill AND is not deleted AND does not have a train created
Applied to: Set US Manifest Found Flag
Action: The system completes validation checks
Logic Flow:
IF A next US cargo record exists that matches car ID and waybill AND is not deleted AND does not have a train created
AND The system completes validation checks
THEN:
• The US manifest found flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us manifest search process has completed all retrieval and validation steps.
Trigger Criteria:
Context: The US manifest search process has completed all retrieval and validation steps
Applied to: US Manifest Found?
Action: The system checks the US manifest found flag
Logic Flow:
IF The US manifest search process has completed all retrieval and validation steps
AND The system checks the US manifest found flag
THEN:
• If US manifest found flag is false (not found), exit the process ELSE proceed to prepare log entry
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when valid us manifest record has been found.
Trigger Criteria:
Context: A valid US manifest record has been found
Applied to: Current Date/Time, US CCN, Action Code: LOG-USE-INPUT-MESSAGE, Message: CDN CCN RLSED BY EDI 350
Action: The system prepares the log entry
Logic Flow:
IF A valid US manifest record has been found
AND The system prepares the log entry
THEN:
• The log date is set to current machine century concatenated with current machine date AND the log time is set to current machine time AND the action code is set to LOG-USE-INPUT-MESSAGE AND the US CCN key is set as the train or US CCN identifier AND the cargo type indicator is set to US cargo AND the message is set to 'CDN CCN RLSED BY EDI 350: ' concatenated with the Canadian CCN key
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when log entry has been prepared with date, time, us ccn, action code, and release message.
Trigger Criteria:
Context: The log entry has been prepared with date, time, US CCN, action code, and release message
Applied to: Spawn GCT1051E Transaction to Log Release Message
Action: The system invokes the GCT1051E logging process
Logic Flow:
IF The log entry has been prepared with date, time, US CCN, action code, and release message
AND The system invokes the GCT1051E logging process
THEN:
• A log transaction is created recording the Canadian cargo release notification for the associated US cargo
R-GCX126-cbl-00837 (+9)File: GCX126R.cblBusiness Rule: Set Release Information for Follower
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being processed for release or deconsolidation.
Trigger Criteria:
Context: A cargo record is being processed for release or deconsolidation
Applied to: Clear Destination Station & Set Release Date to Current Date & Set Release Time to Current Time & Set Release By User to Current User ID & Set Current Status to 'RELEASED' & Set Release Status to 'R' & Initialize Release Reason & Clear Error Status Index & Clear Error Status Field
Action: The release information is being set
Logic Flow:
IF A cargo record is being processed for release or deconsolidation
AND The release information is being set
THEN:
• The destination station number index field is set to spaces AND the destination station number for index field is set to spaces
• The cargo release date field is set to the current machine date from the system
• The cargo release time field is set to the current machine time from the system
• The cargo release by field is set to the current ACF2 user ID from the system
• The cargo current status field is set to the literal value 'RELEASED'
• The cargo release status field is set to the code 'R' indicating released status
• The cargo release reason field is set to spaces
• The cargo error or release status index field is set to spaces
• The cargo error status field is set to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being processed for release or deconsolidation via edi 350 message.
Trigger Criteria:
Context: A cargo record is being processed for release or deconsolidation via EDI 350 message
Applied to: Set Release Type to 'A'
Action: The release information is being set
Logic Flow:
IF A cargo record is being processed for release or deconsolidation via EDI 350 message
AND The release information is being set
THEN:
• The cargo release type field is set to the code 'A' indicating automatic release
R-GCX126-cbl-00847 (+9)File: GCX126R.cblBusiness Rule: Process Associated US Manifest for Follower
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when follower manifest cargo record is being processed for release.
Trigger Criteria:
Context: A follower manifest cargo record is being processed for release
Applied to: Set Car ID and Waybill from Follower Manifest
Action: The system prepares to search for associated US cargo records
Logic Flow:
IF A follower manifest cargo record is being processed for release
AND The system prepares to search for associated US cargo records
THEN:
• The equipment car identifier is extracted from the current cargo record's equipment car field and the waybill number is extracted from the saved waybill index field for use in the US cargo search
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment car identifier and waybill number have been extracted from the canadian cargo record.
Trigger Criteria:
Context: An equipment car identifier and waybill number have been extracted from the Canadian cargo record
Applied to: Retrieve US Cargo by Car ID and Waybill
Action: The system searches for the associated US cargo manifest
Logic Flow:
IF An equipment car identifier and waybill number have been extracted from the Canadian cargo record
AND The system searches for the associated US cargo manifest
THEN:
• The system retrieves the US cargo record where the car identifier index matches the equipment car identifier and the waybill number index matches the waybill number, using a greater-than-or-equal-to search operator, and sets an end-of-database indicator if no record is found orif the retrieved record does not match the search criteria
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when us cargo retrieval operation has been performed using equipment car identifier and waybill number.
Trigger Criteria:
Context: A US cargo retrieval operation has been performed using equipment car identifier and waybill number
Applied to: US Cargo Found?
Action: The system evaluates the search results
Logic Flow:
IF A US cargo retrieval operation has been performed using equipment car identifier and waybill number
AND The system evaluates the search results
THEN:
• If the end-of-database indicator is set, the system concludes no US cargo was found and terminates processing; otherwise, the system proceeds to validate the retrieved cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record has been successfully retrieved matching the equipment car identifier and waybill number.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved matching the equipment car identifier and waybill number
Applied to: Cargo Deleted or TR Created?
Action: The system validates the cargo record status
Logic Flow:
IF A US cargo record has been successfully retrieved matching the equipment car identifier and waybill number
AND The system validates the cargo record status
THEN:
• If the cargo record has a deleted status indicator orif the train-created-for-it field equals 'Y', the system skips processing this cargo and terminates; otherwise, the system proceeds to log the release information
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when valid us cargo record has been identified for release logging.
Trigger Criteria:
Context: A valid US cargo record has been identified for release logging
Applied to: Prepare Log Message
Action: The system prepares to create a log entry
Logic Flow:
IF A valid US cargo record has been identified for release logging
AND The system prepares to create a log entry
THEN:
• The log input structure is cleared to spaces, the security byte is set to high-value, the sending transaction is set to 'GCT1261E', and the user identifier is set to the current session's user identifier
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when log information structure has been initialized and the canadian cargo control number is available from the current cargo record.
Trigger Criteria:
Context: The log information structure has been initialized and the Canadian cargo control number is available from the current cargo record
Applied to: 'CDN CCN RLSED BY EDI 350: ' + Canadian CCN
Action: The system builds the log message content
Logic Flow:
IF The log information structure has been initialized and the Canadian cargo control number is available from the current cargo record
AND The system builds the log message content
THEN:
• The log message is constructed by concatenating the text 'CDN CCN RLSED BY EDI 350: ' with the Canadian cargo control number key from the current cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when log message has been constructed and the us cargo record contains the us cargo control number.
Trigger Criteria:
Context: The log message has been constructed and the US cargo record contains the US cargo control number
Applied to: Date/Time from System, Action Code: LOG-USE-INPUT-MESSAGE, US CCN as Reference, Type: US Cargo
Action: The system completes the log entry details
Logic Flow:
IF The log message has been constructed and the US cargo record contains the US cargo control number
AND The system completes the log entry details
THEN:
• The log date is set to the current machine century concatenated with the current machine date, the log time is set to the current machine time, the action code is set to LOG-USE-INPUT-MESSAGE, the train or US cargo control number field is set to the US cargo control number key from the retrieved record, and the cargo type indicator is set to US cargo
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when all log entry fields have been populated with the us cargo release information.
Trigger Criteria:
Context: All log entry fields have been populated with the US cargo release information
Applied to: Spawn GCT1051E Transaction to Log Message
Action: The system executes the log entry creation process
Logic Flow:
IF All log entry fields have been populated with the US cargo release information
AND The system executes the log entry creation process
THEN:
• If the log message is not spaces or low-values, the system replaces all spaces in the date with zeroes, replaces all spaces in the time with '1', moves the log input to the GCT1051E message structure, changes the alternate program communication block, calls the write message log function with the message code, message content, message length and module name, and purges the alternate program communication block
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record has been retrieved that either has a deleted status or has the train-created-for-it indicator set to 'y'.
Trigger Criteria:
Context: A US cargo record has been retrieved that either has a deleted status or has the train-created-for-it indicator set to 'Y'
Applied to: No Action - Skip This US Cargo
Action: The system evaluates whether to process the cargo
Logic Flow:
IF A US cargo record has been retrieved that either has a deleted status or has the train-created-for-it indicator set to 'Y'
AND The system evaluates whether to process the cargo
THEN:
• The system performs no logging or update operations and proceeds to the end of the US manifest processing routine
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when either no us cargo was found, the us cargo was invalid and skipped, or the us cargo release has been successfully logged.
Trigger Criteria:
Context: Either no US cargo was found, the US cargo was invalid and skipped, or the US cargo release has been successfully logged
Applied to: US Manifest Processing Complete
Action: The system reaches the end of the US manifest processing routine
Logic Flow:
IF Either no US cargo was found, the US cargo was invalid and skipped, or the US cargo release has been successfully logged
AND The system reaches the end of the US manifest processing routine
THEN:
• The system exits the US manifest processing section and returns control to the follower manifest processing loop
R-GCX126-cbl-00857 (+11)File: GCX126R.cblBusiness Rule: Call Database to Get First US Cargo Record
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed with a current equipment car identifier key.
Trigger Criteria:
Context: A cargo record is being processed with a current equipment car identifier key
Applied to: Set Car ID from Current Cargo
Action: The system prepares to search for associated US cargo records
Logic Flow:
IF A cargo record is being processed with a current equipment car identifier key
AND The system prepares to search for associated US cargo records
THEN:
• The US cargo search car identifier index is populated with the current cargo's equipment car identifier key
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when waybill index has been saved from the current cargo processing.
Trigger Criteria:
Context: A waybill index has been saved from the current cargo processing
Applied to: Set Waybill Index from Saved Waybill
Action: The system prepares to search for associated US cargo records
Logic Flow:
IF A waybill index has been saved from the current cargo processing
AND The system prepares to search for associated US cargo records
THEN:
• The US cargo search waybill number index is populated with the saved waybill index value
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when system is preparing to search for us cargo records by car identifier and waybill.
Trigger Criteria:
Context: The system is preparing to search for US cargo records by car identifier and waybill
Applied to: Set US CCN Key to Low Values
Action: The search parameters are being initialized
Logic Flow:
IF The system is preparing to search for US cargo records by car identifier and waybill
AND The search parameters are being initialized
THEN:
• The US CCN key index is set to low values to start the search from the lowest possible CCN
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when system needs to retrieve us cargo records from the database.
Trigger Criteria:
Context: The system needs to retrieve US cargo records from the database
Applied to: Set Database Status to 'GEGB'
Action: Database access parameters are being configured
Logic Flow:
IF The system needs to retrieve US cargo records from the database
AND Database access parameters are being configured
THEN:
• The database accept status is set to 'GEGB' to enable get and browse operations
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when system is initiating a search for us cargo records.
Trigger Criteria:
Context: The system is initiating a search for US cargo records
Applied to: Set Function to GU - Get Unique
Action: The database function type is being configured
Logic Flow:
IF The system is initiating a search for US cargo records
AND The database function type is being configured
THEN:
• The function code is set to GU (Get Unique) to retrieve the first matching record
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when system needs to search us cargo records by equipment and waybill.
Trigger Criteria:
Context: The system needs to search US cargo records by equipment and waybill
Applied to: Set Index Type to Car-Waybill
Action: The database index type is being specified
Logic Flow:
IF The system needs to search US cargo records by equipment and waybill
AND The database index type is being specified
THEN:
• The index type is set to Car-Waybill to use the composite index for the search
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when system is configuring a database search with specific car and waybill criteria.
Trigger Criteria:
Context: The system is configuring a database search with specific car and waybill criteria
Applied to: Set Operator to '>='
Action: The search operator is being defined
Logic Flow:
IF The system is configuring a database search with specific car and waybill criteria
AND The search operator is being defined
THEN:
• The operator is set to '>=' to include the starting point and all subsequent records in the index
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when all search parameters are configured with car identifier, waybill index, function code gu, index type car-waybill, and operator '>='. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All search parameters are configured with car identifier, waybill index, function code GU, index type Car-Waybill, and operator '>='
Applied to: Call GCCUSIO to Retrieve US Cargo
Action: The system executes the database retrieval operation
Logic Flow:
IF All search parameters are configured with car identifier, waybill index, function code GU, index type Car-Waybill, and operator '>='
AND The system executes the database retrieval operation
THEN:
• The GCCUSIO module is called with the configured parameters to retrieve the US cargo record into the GCSUSRT segment
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when database call has been executed to retrieve a us cargo record. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database call has been executed to retrieve a US cargo record
Applied to: Database Status OK?
Action: The database status code is not spaces (indicating an error or no records found)
Logic Flow:
IF A database call has been executed to retrieve a US cargo record
AND The database status code is not spaces (indicating an error or no records found)
THEN:
• The end-of-database flag is set to true and processing continues to completion
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved from the database
Applied to: Car ID and Waybill Match?
Action: The system validates the retrieved record's car identifier (first 12 characters) against the current cargo's car identifier key AND the waybill number index against the saved waybill index
Logic Flow:
IF A US cargo record has been successfully retrieved from the database
AND The system validates the retrieved record's car identifier (first 12 characters) against the current cargo's car identifier key AND the waybill number index against the saved waybill index
THEN:
• If both the car identifier and waybill match, continue validation; otherwise set the end-of-database flag to true
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record has been retrieved and validated for car identifier and waybill match.
Trigger Criteria:
Context: A US cargo record has been retrieved and validated for car identifier and waybill match
Applied to: Cargo Deleted or TR Created?
Action: The system checks if the cargo is marked as deleted OR if a train has already been created for it (TR-CREATED-FOR-IT = 'Y')
Logic Flow:
IF A US cargo record has been retrieved and validated for car identifier and waybill match
AND The system checks if the cargo is marked as deleted OR if a train has already been created for it (TR-CREATED-FOR-IT = 'Y')
THEN:
• If either condition is true, skip setting the US manifest found flag and proceed to completion; otherwise continue to set the found flag
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record has been retrieved that matches the car identifier and waybill, is not deleted, and does not have a train already created.
Trigger Criteria:
Context: A US cargo record has been retrieved that matches the car identifier and waybill, is not deleted, and does not have a train already created
Applied to: Set US Manifest Found Flag
Action: All validation checks pass successfully
Logic Flow:
IF A US cargo record has been retrieved that matches the car identifier and waybill, is not deleted, and does not have a train already created
AND All validation checks pass successfully
THEN:
• The US manifest found flag is set to true to indicate a valid record is available for processing
R-GCX126-cbl-00869 (+6)File: GCX126R.cblBusiness Rule: Call Database to Get Next US Cargo Record by Car/Waybill Index
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when request to retrieve the next us cargo record by car and waybill index. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A request to retrieve the next US cargo record by car and waybill index
Applied to: Set Accept Status to 'GEGB'
Action: The system prepares to call the database access routine
Logic Flow:
IF A request to retrieve the next US cargo record by car and waybill index
AND The system prepares to call the database access routine
THEN:
• The accept status is set to 'GEGB', segment type is set to GCSUSRT, function code is set to Get Next (GN), index type is set to Car/Waybill, and operator is set to '>' for sequential retrieval
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when database call parameters are configured with accept status 'gegb', segment gcsusrt, function gn, car/waybill index, and operator '>'. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Database call parameters are configured with accept status 'GEGB', segment GCSUSRT, function GN, car/waybill index, and operator '>'
Applied to: Call GCCUSIO to Read Next Record
Action: The GCCUSIO routine is called with the parameter block and US cargo segment
Logic Flow:
IF Database call parameters are configured with accept status 'GEGB', segment GCSUSRT, function GN, car/waybill index, and operator '>'
AND The GCCUSIO routine is called with the parameter block and US cargo segment
THEN:
• The system retrieves the next US cargo record from the GCSUSRT table based on the car/waybill index position
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when database call to retrieve next us cargo record has completed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The database call to retrieve next US cargo record has completed
Applied to: Database Status OK?
Action: The database status code is not blank (indicating an error or end of data)
Logic Flow:
IF The database call to retrieve next US cargo record has completed
AND The database status code is not blank (indicating an error or end of data)
THEN:
• The end-of-database flag is set to true and processing terminates
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when us cargo record has been successfully retrieved from the database with car id index and waybill number index.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved from the database with car ID index and waybill number index
Applied to: Car ID and Waybill Match?
Action: The system compares the first 12 characters of the retrieved car ID index with the current equipment car ID key AND compares the retrieved waybill number index with the saved waybill index
Logic Flow:
IF A US cargo record has been successfully retrieved from the database with car ID index and waybill number index
AND The system compares the first 12 characters of the retrieved car ID index with the current equipment car ID key AND compares the retrieved waybill number index with the saved waybill index
THEN:
• If both car ID (first 12 characters) and waybill number match, continue validation; otherwise set end-of-database flag to true
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record matches the car id and waybill number criteria.
Trigger Criteria:
Context: A US cargo record matches the car ID and waybill number criteria
Applied to: Cargo Deleted or TR Created?
Action: The system checks if the cargo delete status indicator is set to deleted OR the train-created-for-it indicator is 'Y'
Logic Flow:
IF A US cargo record matches the car ID and waybill number criteria
AND The system checks if the cargo delete status indicator is set to deleted OR the train-created-for-it indicator is 'Y'
THEN:
• If either condition is true, skip this record and continue to next; otherwise set US manifest found flag to true
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when us cargo record matches car id and waybill number and is not deleted and does not have a train created for it.
Trigger Criteria:
Context: A US cargo record matches car ID and waybill number AND is not deleted AND does not have a train created for it
Applied to: Set US Manifest Found Flag
Action: All validation checks pass successfully
Logic Flow:
IF A US cargo record matches car ID and waybill number AND is not deleted AND does not have a train created for it
AND All validation checks pass successfully
THEN:
• The US manifest found flag is set to true indicating a valid matching record has been located
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record has been retrieved from the database.
Trigger Criteria:
Context: A US cargo record has been retrieved from the database
Applied to: Set End-of-Database Flag
Action: The car ID (first 12 characters) does not match the current equipment car ID key OR the waybill number index does not match the saved waybill index
Logic Flow:
IF A US cargo record has been retrieved from the database
AND The car ID (first 12 characters) does not match the current equipment car ID key OR the waybill number index does not match the saved waybill index
THEN:
• The end-of-database flag is set to true to terminate the search loop
R-GCX126-cbl-00876 (+11)File: GCX126R.cblBusiness Rule: Get Next Cargo Record Using Master CCN
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when system needs to retrieve the next cargo record from the database. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system needs to retrieve the next cargo record from the database
Applied to: Set Status Code to 'GEGB'
Action: Preparing to call the database with Get Next function
Logic Flow:
IF The system needs to retrieve the next cargo record from the database
AND Preparing to call the database with Get Next function
THEN:
• The status code is set to 'GEGB' to indicate Get Next operation with proper positioning
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when database status code is set to 'gegb' and the master ccn key is positioned in the qualified ssa. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The database status code is set to 'GEGB' and the master CCN key is positioned in the qualified SSA
Applied to: Call IMS Database with GN Function
Action: The system executes the database call with GN function for PCB7 and cargo report segment using qualified SSA for B0RT
Logic Flow:
IF The database status code is set to 'GEGB' and the master CCN key is positioned in the qualified SSA
AND The system executes the database call with GN function for PCB7 and cargo report segment using qualified SSA for B0RT
THEN:
• The next cargo record is retrieved into the cargo report segment and the database status code is updated to reflect the result
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when database get next call has been executed to retrieve a cargo record. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database Get Next call has been executed to retrieve a cargo record
Applied to: Status Code = Blank?
Action: The system checks the database status code
Logic Flow:
IF A database Get Next call has been executed to retrieve a cargo record
AND The system checks the database status code
THEN:
• If the status code equals blank (spaces), the record was successfully retrieved and processing continues; otherwise, the end of database flag is set
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A cargo record has been successfully retrieved from the database
Applied to: Check Master Manifest CCN Match
Action: The system compares the master manifest CCN from the cargo record against the saved input CCN
Logic Flow:
IF A cargo record has been successfully retrieved from the database
AND The system compares the master manifest CCN from the cargo record against the saved input CCN
THEN:
• The system determines if the retrieved record belongs to the same master manifest hierarchy for further processing
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when master manifest ccn from the cargo record and the saved input ccn are available for comparison.
Trigger Criteria:
Context: The master manifest CCN from the cargo record and the saved input CCN are available for comparison
Applied to: Master CCN Matches Input CCN?
Action: The system evaluates if the master manifest CCN equals the saved input CCN
Logic Flow:
IF The master manifest CCN from the cargo record and the saved input CCN are available for comparison
AND The system evaluates if the master manifest CCN equals the saved input CCN
THEN:
• If they match, continue checking the manifest type; if they do not match, set the end of database flag to stop processing
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been retrieved that belongs to the same master manifest ccn.
Trigger Criteria:
Context: A cargo record has been retrieved that belongs to the same master manifest CCN
Applied to: Is Master Manifest?
Action: The system checks if the cargo record is identified as a master manifest
Logic Flow:
IF A cargo record has been retrieved that belongs to the same master manifest CCN
AND The system checks if the cargo record is identified as a master manifest
THEN:
• If it is a master manifest, skip this record and continue to the next; if not, check if it is a follower manifest
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been retrieved that is not a master manifest but belongs to the same master manifest ccn.
Trigger Criteria:
Context: A cargo record has been retrieved that is not a master manifest but belongs to the same master manifest CCN
Applied to: Is Follower Manifest?
Action: The system checks if the cargo record is identified as a follower manifest
Logic Flow:
IF A cargo record has been retrieved that is not a master manifest but belongs to the same master manifest CCN
AND The system checks if the cargo record is identified as a follower manifest
THEN:
• If it is a follower manifest, store its CCN in the follower array and increment the index; if not, skip this record and continue to the next
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been identified as a follower manifest belonging to the current master manifest.
Trigger Criteria:
Context: A cargo record has been identified as a follower manifest belonging to the current master manifest
Applied to: Store Follower CCN in Array
Action: The system stores the CCN key from the cargo record
Logic Flow:
IF A cargo record has been identified as a follower manifest belonging to the current master manifest
AND The system stores the CCN key from the cargo record
THEN:
• The follower manifest CCN is placed in the follower manifest array at the current index position
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when follower manifest ccn has been stored in the follower manifest array.
Trigger Criteria:
Context: A follower manifest CCN has been stored in the follower manifest array
Applied to: Increment Array Index
Action: The system increments the array index counter
Logic Flow:
IF A follower manifest CCN has been stored in the follower manifest array
AND The system increments the array index counter
THEN:
• The array index is increased by 1 to point to the next available position in the follower manifest array
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when either the database status code indicates no more records, or the master manifest ccn does not match the input ccn.
Trigger Criteria:
Context: Either the database status code indicates no more records, or the master manifest CCN does not match the input CCN
Applied to: Set End of Database Flag
Action: The system determines that database traversal should stop
Logic Flow:
IF Either the database status code indicates no more records, or the master manifest CCN does not match the input CCN
AND The system determines that database traversal should stop
THEN:
• The end of database flag is set to TRUE to terminate the retrieval loop
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when current cargo record is either a master manifest or not a follower manifest.
Trigger Criteria:
Context: The current cargo record is either a master manifest or not a follower manifest
Applied to: Continue to Next Record
Action: The system determines the current record should be skipped
Logic Flow:
IF The current cargo record is either a master manifest or not a follower manifest
AND The system determines the current record should be skipped
THEN:
• Control returns to the caller to continue the loop and retrieve the next cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when either the end of database flag has been set or a record has been processed.
Trigger Criteria:
Context: Either the end of database flag has been set or a record has been processed
Applied to: Return to Caller
Action: The procedure completes its execution
Logic Flow:
IF Either the end of database flag has been set or a record has been processed
AND The procedure completes its execution
THEN:
• Control returns to the calling procedure with the follower manifest array populated with all valid follower CCNs found, or with the end of database flag set if no more records exist
R-GCX126-cbl-00888 (+13)File: GCX126R.cblBusiness Rule: 16: Lookup Cargo by Follower CCN
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when follower manifest ccn is available for cargo lookup.
Trigger Criteria:
Context: A follower manifest CCN is available for cargo lookup
Applied to: Lookup Cargo by Follower CCN
Action: The system attempts to retrieve the cargo record using the follower CCN as the search key
Logic Flow:
IF A follower manifest CCN is available for cargo lookup
AND The system attempts to retrieve the cargo record using the follower CCN as the search key
THEN:
• The system retrieves the cargo report segment and secondary segment if the cargo exists, or indicates cargo not found if the CCN does not match any existing cargo record
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when follower manifest ccn exists in the follower manifest array.
Trigger Criteria:
Context: A follower manifest CCN exists in the follower manifest array
Applied to: Move Follower CCN to Search Key
Action: The system prepares to search for the cargo record
Logic Flow:
IF A follower manifest CCN exists in the follower manifest array
AND The system prepares to search for the cargo record
THEN:
• The follower CCN is moved to both the primary cargo search key (CCRT-SSAQ) and secondary cargo search key (A2RT-SSAQ)
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo search key contains a valid follower ccn. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The cargo search key contains a valid follower CCN
Applied to: Call CIMS with GHU Function
Action: The system invokes the database access function with GHU operation
Logic Flow:
IF The cargo search key contains a valid follower CCN
AND The system invokes the database access function with GHU operation
THEN:
• The system attempts to retrieve the cargo report segment (GCCC-CARGO-REPORT-SEGMENT) from the cargo database (GCCC-PCB) using the qualified search argument
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when database retrieval operation for cargo has completed.
Trigger Criteria:
Context: The database retrieval operation for cargo has completed
Applied to: Status Code = Spaces?
Action: The system checks the database operation status code
Logic Flow:
IF The database retrieval operation for cargo has completed
AND The system checks the database operation status code
THEN:
• If the status code is spaces (blank), the cargo record exists; otherwise, the cargo record does not exist in the database
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when database status code indicates successful cargo retrieval (status code is spaces). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The database status code indicates successful cargo retrieval (status code is spaces)
Applied to: Set Cargo Found Flag
Action: The system processes the successful database response
Logic Flow:
IF The database status code indicates successful cargo retrieval (status code is spaces)
AND The system processes the successful database response
THEN:
• The cargo found indicator (WS-CARGO-FOUND) is set to true to indicate the cargo record exists
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when primary cargo report segment has been successfully retrieved. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The primary cargo report segment has been successfully retrieved
Applied to: Read Cargo Secondary Segment
Action: The system attempts to read the cargo secondary segment using GHU function
Logic Flow:
IF The primary cargo report segment has been successfully retrieved
AND The system attempts to read the cargo secondary segment using GHU function
THEN:
• The system retrieves the cargo secondary segment (GCSCCS52) from the secondary cargo database (GCA2-PCB) using the secondary search key
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when secondary segment retrieval operation has completed.
Trigger Criteria:
Context: The secondary segment retrieval operation has completed
Applied to: Secondary Status = GE?
Action: The system evaluates the secondary segment database status code
Logic Flow:
IF The secondary segment retrieval operation has completed
AND The system evaluates the secondary segment database status code
THEN:
• If the status code equals 'GE' (segment not found), the secondary segment does not exist; otherwise, the secondary segment is available
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when secondary segment retrieval returned status code 'ge' indicating no secondary segment exists.
Trigger Criteria:
Context: The secondary segment retrieval returned status code 'GE' indicating no secondary segment exists
Applied to: Clear Secondary Segment
Action: The system processes the missing secondary segment condition
Logic Flow:
IF The secondary segment retrieval returned status code 'GE' indicating no secondary segment exists
AND The system processes the missing secondary segment condition
THEN:
• The secondary segment data structure (GCSCCS52) is cleared to spaces to prevent processing of invalid data
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when database status code indicates unsuccessful cargo retrieval (status code is not spaces). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The database status code indicates unsuccessful cargo retrieval (status code is not spaces)
Applied to: Set Cargo Not Found Flag
Action: The system processes the failed database response
Logic Flow:
IF The database status code indicates unsuccessful cargo retrieval (status code is not spaces)
AND The system processes the failed database response
THEN:
• The cargo not found indicator (WS-CARGO-NOT-FOUND) is set to true to indicate the cargo record does not exist
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been successfully retrieved from the database. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record has been successfully retrieved from the database
Applied to: Lookup Cargo by Follower CCN
Action: The system evaluates the cargo deletion status field
Logic Flow:
IF A cargo record has been successfully retrieved from the database
AND The system evaluates the cargo deletion status field
THEN:
• If the deletion status equals 'D', the cargo deleted indicator (WS-CARGO-DELETED) is set to true; otherwise, the cargo is considered active
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been retrieved and a waybill index filter is provided (not blank). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record has been retrieved and a waybill index filter is provided (not blank)
Applied to: Lookup Cargo by Follower CCN
Action: The system compares the cargo's waybill key with the saved waybill index
Logic Flow:
IF A cargo record has been retrieved and a waybill index filter is provided (not blank)
AND The system compares the cargo's waybill key with the saved waybill index
THEN:
• If the waybill keys do not match, the cargo not waybill indicator (WS-CARGO-NOT-WB) is set to true; otherwise, the waybill matches and processing continues
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has been successfully retrieved and is not deleted. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record has been successfully retrieved and is not deleted
Applied to: Lookup Cargo by Follower CCN
Action: The system evaluates the cargo return status indicator
Logic Flow:
IF A cargo record has been successfully retrieved and is not deleted
AND The system evaluates the cargo return status indicator
THEN:
• If the cargo status indicates return (GCCC-STATUS-RETURN is true), the cargo returned indicator (WS-CARGO-RETURNED) is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has been successfully retrieved and is not deleted. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record has been successfully retrieved and is not deleted
Applied to: Lookup Cargo by Follower CCN
Action: The system checks the cargo release status field
Logic Flow:
IF A cargo record has been successfully retrieved and is not deleted
AND The system checks the cargo release status field
THEN:
• If the release status equals 'R', the cargo released indicator (WS-CARGO-RELEASED) is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has been successfully retrieved and is not deleted. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo record has been successfully retrieved and is not deleted
Applied to: Lookup Cargo by Follower CCN
Action: The system examines the cargo train identification field
Logic Flow:
IF A cargo record has been successfully retrieved and is not deleted
AND The system examines the cargo train identification field
THEN:
• If the CP train ID is not spaces (blank), the cargo on train indicator (WS-CARGO-ON-A-TRAIN) is set to true
R-GCX126-cbl-00902 (+14)File: GCX126R.cblBusiness Rule: 31: Process Associated US Manifest
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when canadian cargo record has been processed with release or deconsolidation status.
Trigger Criteria:
Context: A Canadian cargo record has been processed with release or deconsolidation status
Applied to: Initialize US Manifest Search Flags
Action: The system begins searching for associated US manifest records
Logic Flow:
IF A Canadian cargo record has been processed with release or deconsolidation status
AND The system begins searching for associated US manifest records
THEN:
• The US manifest found flag is set to NOT FOUND and the end-of-database flag is set to NOT END OF DB to enable iterative search
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when current equipment car id key and saved waybill index are available from the canadian cargo record.
Trigger Criteria:
Context: The current equipment car ID key and saved waybill index are available from the Canadian cargo record
Applied to: Retrieve US Cargo by Car ID and Waybill
Action: The system initiates US cargo search
Logic Flow:
IF The current equipment car ID key and saved waybill index are available from the Canadian cargo record
AND The system initiates US cargo search
THEN:
• The system retrieves the first US cargo record from GCSUSRT table where car ID number index matches the current equipment car ID key and waybill number index matches the saved waybill index using GU (Get Unique) function with '>=' operator on the car-waybill index
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when database retrieval operation has been performed for us cargo.
Trigger Criteria:
Context: A database retrieval operation has been performed for US cargo
Applied to: Cargo Status Check
Action: The database status code is not SPACES (indicating record not found or error)
Logic Flow:
IF A database retrieval operation has been performed for US cargo
AND The database status code is not SPACES (indicating record not found or error)
THEN:
• The end-of-database flag is set to TRUE and processing exits the US manifest search without creating any log entries
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved from the database
Applied to: Car ID and Waybill Match?
Action: The system validates the retrieved record
Logic Flow:
IF A US cargo record has been successfully retrieved from the database
AND The system validates the retrieved record
THEN:
• If the US cargo car ID number index (first 12 characters) equals the current equipment car ID key AND the US cargo waybill number index equals the saved waybill index, continue processing; otherwise set end-of-database flag to TRUE and exit
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when us cargo record has been retrieved and validated for car id and waybill match.
Trigger Criteria:
Context: A US cargo record has been retrieved and validated for car ID and waybill match
Applied to: Cargo Deleted or TR Created?
Action: The system checks the cargo record status
Logic Flow:
IF A US cargo record has been retrieved and validated for car ID and waybill match
AND The system checks the cargo record status
THEN:
• If the cargo delete status indicator shows DELETED OR the train-created-for-it field equals 'Y', skip this record and retrieve the next US cargo record; otherwise mark the US manifest as found
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when current us cargo record is deleted or has train created.
Trigger Criteria:
Context: The current US cargo record is deleted or has train created
Applied to: Get Next US Cargo Record
Action: The system needs to find the next valid US cargo record
Logic Flow:
IF The current US cargo record is deleted or has train created
AND The system needs to find the next valid US cargo record
THEN:
• The system retrieves the next US cargo record from GCSUSRT table using GN (Get Next) function with '>' operator on the car-waybill index and re-validates car ID and waybill match
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when us cargo record has been retrieved that matches car id and waybill and is not deleted and does not have train created.
Trigger Criteria:
Context: A US cargo record has been retrieved that matches car ID and waybill AND is not deleted AND does not have train created
Applied to: Set US Manifest Found Flag
Action: The system validates all conditions are met
Logic Flow:
IF A US cargo record has been retrieved that matches car ID and waybill AND is not deleted AND does not have train created
AND The system validates all conditions are met
THEN:
• The US manifest found flag is set to TRUE to proceed with logging
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when valid us manifest has been found.
Trigger Criteria:
Context: A valid US manifest has been found
Applied to: Prepare Log Information
Action: The system prepares to create a log entry
Logic Flow:
IF A valid US manifest has been found
AND The system prepares to create a log entry
THEN:
• The log input structure is cleared to SPACES, the security byte is set to HIGH-VALUE, the sending transaction is set to 'GCT1261E', and the ACF2 user ID is set from the common control area
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when log header information has been prepared.
Trigger Criteria:
Context: The log header information has been prepared
Applied to: Build Log Date from Machine Date
Action: The system builds the log date field
Logic Flow:
IF The log header information has been prepared
AND The system builds the log date field
THEN:
• The log date is constructed by concatenating the machine century (CC) and machine date (YYMMDD) from the common control area into the GCX105 date field
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when log date has been built.
Trigger Criteria:
Context: The log date has been built
Applied to: Set Log Time from Machine Time
Action: The system sets the log time field
Logic Flow:
IF The log date has been built
AND The system sets the log time field
THEN:
• The log time is set to the machine time (HHMMSS) from the common control area
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when log date and time have been set.
Trigger Criteria:
Context: The log date and time have been set
Applied to: Set Action Code to Input Message
Action: The system assigns the action code
Logic Flow:
IF The log date and time have been set
AND The system assigns the action code
THEN:
• The action code is set to the value of LOG-USE-INPUT-MESSAGE constant
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when action code has been set.
Trigger Criteria:
Context: The action code has been set
Applied to: Set US CCN as Target
Action: The system identifies the target cargo
Logic Flow:
IF The action code has been set
AND The system identifies the target cargo
THEN:
• The train-or-US-CCN field in the log entry is set to the US cargo CCN key from the retrieved GCSUSRT record
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when us ccn has been set as the target identifier.
Trigger Criteria:
Context: The US CCN has been set as the target identifier
Applied to: Set Cargo Type to US Cargo
Action: The system designates the cargo type
Logic Flow:
IF The US CCN has been set as the target identifier
AND The system designates the cargo type
THEN:
• The cargo type indicator is set to US-CARGO (as opposed to Canadian cargo or train)
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo type has been designated as us cargo.
Trigger Criteria:
Context: The cargo type has been designated as US cargo
Applied to: 'CDN CCN RLSED BY EDI 350' + Canadian CCN
Action: The system builds the log message text
Logic Flow:
IF The cargo type has been designated as US cargo
AND The system builds the log message text
THEN:
• The message field is populated by concatenating the literal text 'CDN CCN RLSED BY EDI 350: ' with the Canadian cargo CCN key from the saved cargo report segment
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when complete log entry has been built with date, time, action code, us ccn, cargo type, and message text.
Trigger Criteria:
Context: The complete log entry has been built with date, time, action code, US CCN, cargo type, and message text
Applied to: Spawn GCT1051E Transaction to Log Message
Action: The system submits the log entry
Logic Flow:
IF The complete log entry has been built with date, time, action code, US CCN, cargo type, and message text
AND The system submits the log entry
THEN:
• The GCT1051E transaction is spawned by calling the Z300-SPAWN-GCT1051E routine which validates the message is not blank, replaces spaces with appropriate values in date and time fields, moves the input to the message structure, changes the alternate PCB, calls WRITMSGL to write the message, and purges the alternate PCB
R-GCX126-cbl-00917 (+7)File: GCX126R.cblBusiness Rule: Call EMCSEND2 to Send Email
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when email parameters are prepared with from usercode, destination filename, to usercode, copy usercode, subject, keywords, and message report content. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Email parameters are prepared with FROM usercode, destination filename, TO usercode, COPY usercode, subject, keywords, and message report content
Applied to: Call EMCSEND2 to Send Email
Action: EMCSEND2 program is called with these parameters
Logic Flow:
IF Email parameters are prepared with FROM usercode, destination filename, TO usercode, COPY usercode, subject, keywords, and message report content
AND EMCSEND2 program is called with these parameters
THEN:
• The email is sent through the EMCSEND2 interface and return status flag is populated
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when emcsend2 return status indicates no errors (emi-no-errors).
Trigger Criteria:
Context: EMCSEND2 return status indicates no errors (EMI-NO-ERRORS)
IF EMCSEND2 return status indicates no errors (EMI-NO-ERRORS)
AND Email send operation completes successfully
THEN:
• IMS message queue is purged using PURG function against alternate PCB
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when emcsend2 return status is emi-from-not-found.
Trigger Criteria:
Context: EMCSEND2 return status is EMI-FROM-NOT-FOUND
Applied to: From User Not Found?
Action: Email send operation fails due to invalid sender usercode
Logic Flow:
IF EMCSEND2 return status is EMI-FROM-NOT-FOUND
AND Email send operation fails due to invalid sender usercode
THEN:
• System abends with error message 'EMI - INVALID MERLIN FROM'
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when emcsend2 return status is emi-to-or-copy-not-found. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: EMCSEND2 return status is EMI-TO-OR-COPY-NOT-FOUND
Applied to: To/Copy User Not Found?
Action: Email send operation fails due to invalid recipient usercode
Logic Flow:
IF EMCSEND2 return status is EMI-TO-OR-COPY-NOT-FOUND
AND Email send operation fails due to invalid recipient usercode
THEN:
• Save the bad Merlin ID, reset TO usercode to spaces, set TO usercodes(01) to 'OM01247', and set destination filename to 'IN'
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when email parameters have been reset with to usercode as 'om01247' and destination as 'in'.
Trigger Criteria:
Context: Email parameters have been reset with TO usercode as 'OM01247' and destination as 'IN'
Applied to: Resend Failed Email
Action: Resend operation is performed
Logic Flow:
IF Email parameters have been reset with TO usercode as 'OM01247' and destination as 'IN'
AND Resend operation is performed
THEN:
• EMCSEND2 is called again with updated parameters and return status is evaluated
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when resend operation completed with emi-no-errors status.
Trigger Criteria:
Context: Resend operation completed with EMI-NO-ERRORS status
Applied to: Resend Successful?
Action: Email was successfully rerouted to default recipient
Logic Flow:
IF Resend operation completed with EMI-NO-ERRORS status
AND Email was successfully rerouted to default recipient
THEN:
• Clear subject, build new subject with bad Merlin ID and message 'INVALID MERLIN TO - REPORT REROUTE', and resend notification
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when emcsend2 return status is emi-filename-invalid.
Trigger Criteria:
Context: EMCSEND2 return status is EMI-FILENAME-INVALID
Applied to: Filename Invalid?
Action: Email send operation fails due to invalid destination filename
Logic Flow:
IF EMCSEND2 return status is EMI-FILENAME-INVALID
AND Email send operation fails due to invalid destination filename
THEN:
• System abends with error message 'EMI - INVALID MERLIN FILENAME'
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email send operation has completed (successfully or with handled errors). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Email send operation has completed (successfully or with handled errors)
Applied to: Increment Machine Sequence Number
Action: Processing reaches the end of email send routine
Logic Flow:
IF Email send operation has completed (successfully or with handled errors)
AND Processing reaches the end of email send routine
THEN:
• Add 1 to WS-FMT-MACHINE-SEQ counter
R-GCX126-cbl-00925 (+5)File: GCX126R.cblBusiness Rule: 40:Resend Failed Email to OM01247
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when email notification has failed to send because the intended recipient usercode was not found in the system.
Trigger Criteria:
Context: An email notification has failed to send because the intended recipient usercode was not found in the system
Applied to: Resend Failed Email to OM01247
Action: The system attempts to resend the notification
Logic Flow:
IF An email notification has failed to send because the intended recipient usercode was not found in the system
AND The system attempts to resend the notification
THEN:
• The system clears the TO usercode field, sets the TO usercode to 'OM01247', sets the destination filename to 'IN', calls the email sending service (EMCSEND2) with the original subject, keywords, and message content, and increments the machine sequence number by 1
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email resend operation to om01247 has been attempted.
Trigger Criteria:
Context: The email resend operation to OM01247 has been attempted
Applied to: Send Successful?
Action: The email send service returns a status indicating no errors occurred
Logic Flow:
IF The email resend operation to OM01247 has been attempted
AND The email send service returns a status indicating no errors occurred
THEN:
• The system purges the IMS alternate message queue
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email resend operation to om01247 has been attempted.
Trigger Criteria:
Context: The email resend operation to OM01247 has been attempted
Applied to: Abend - Invalid FROM Usercode
Action: The email send service returns a status indicating the FROM usercode was not found
Logic Flow:
IF The email resend operation to OM01247 has been attempted
AND The email send service returns a status indicating the FROM usercode was not found
THEN:
• The system sets the error message to 'EMI - INVALID MERLIN FROM' and terminates processing abnormally
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email resend operation to om01247 has been attempted. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The email resend operation to OM01247 has been attempted
Applied to: Abend - Invalid TO/COPY Usercode
Action: The email send service returns a status indicating the TO or COPY usercode was not found
Logic Flow:
IF The email resend operation to OM01247 has been attempted
AND The email send service returns a status indicating the TO or COPY usercode was not found
THEN:
• The system sets the error message to 'EMI - INVALID MERLIN TO OR COPY' and terminates processing abnormally
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email resend operation to om01247 has been attempted.
Trigger Criteria:
Context: The email resend operation to OM01247 has been attempted
Applied to: Abend - Invalid Filename
Action: The email send service returns a status indicating the filename is invalid
Logic Flow:
IF The email resend operation to OM01247 has been attempted
AND The email send service returns a status indicating the filename is invalid
THEN:
• The system sets the error message to 'EMI - INVALID MERLIN FILENAME' and terminates processing abnormally
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when email notification has been successfully resent to om01247 and the message queue has been purged.
Trigger Criteria:
Context: The email notification has been successfully resent to OM01247 and the message queue has been purged
Applied to: Increment Machine Sequence Number
Action: The resend operation completes
Logic Flow:
IF The email notification has been successfully resent to OM01247 and the message queue has been purged
AND The resend operation completes
THEN:
• The system adds 1 to the formatted machine sequence number
R-GCX126-cbl-00931 (+6)File: GCX126R.cblBusiness Rule: Call Get Next US Cargo by Car and Waybill Index
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when request to retrieve the next us cargo record by car and waybill index. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A request to retrieve the next US cargo record by car and waybill index
Applied to: Set Database Status Code to 'GEGB', Set Segment Type to GCSUSRT, Set Function to Get Next - GN, Set Index Type to Car-Waybill, Set Operator to Greater Than
Action: The system prepares the database call parameters
Logic Flow:
IF A request to retrieve the next US cargo record by car and waybill index
AND The system prepares the database call parameters
THEN:
• The database status code is set to 'GEGB', the segment type is set to GCSUSRT, the function is set to Get Next (GN), the index type is set to Car-Waybill, and the operator is set to greater than ('>') for sequential retrieval
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when database call parameters are configured with status code 'gegb', segment type gcsusrt, function get next, index type car-waybill, and operator greater than. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Database call parameters are configured with status code 'GEGB', segment type GCSUSRT, function Get Next, index type Car-Waybill, and operator greater than
Applied to: Call GCCUSIO to Retrieve Next US Cargo Record
Action: The GCCUSIO program is called with the configured parameters and US cargo segment
Logic Flow:
IF Database call parameters are configured with status code 'GEGB', segment type GCSUSRT, function Get Next, index type Car-Waybill, and operator greater than
AND The GCCUSIO program is called with the configured parameters and US cargo segment
THEN:
• The system retrieves the next US cargo record from the database and returns the database status code
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when database call has been executed to retrieve the next us cargo record. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database call has been executed to retrieve the next US cargo record
Applied to: Database Status OK? - No - Error Status
Action: The database status code is not equal to spaces (indicating an error or end-of-data condition)
Logic Flow:
IF A database call has been executed to retrieve the next US cargo record
AND The database status code is not equal to spaces (indicating an error or end-of-data condition)
THEN:
• The end-of-database flag is set to true and processing terminates for this retrieval attempt
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record has been successfully retrieved from the database with a valid status.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved from the database with a valid status
Applied to: Car ID and Waybill Match Current Values? - Yes - Match Found
Action: The system compares the retrieved cargo's car ID (first 12 characters) with the current equipment car ID key and the waybill number index with the saved waybill index
Logic Flow:
IF A US cargo record has been successfully retrieved from the database with a valid status
AND The system compares the retrieved cargo's car ID (first 12 characters) with the current equipment car ID key and the waybill number index with the saved waybill index
THEN:
• If both the car ID and waybill number match the current values, the system proceeds to validate the cargo deletion and train creation status; otherwise, the end-of-database flag is set to true
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record has been successfully retrieved from the database with a valid status.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved from the database with a valid status
Applied to: Car ID and Waybill Match Current Values? - No - Different Car/Waybill
Action: Either the retrieved cargo's car ID (first 12 characters) does not match the current equipment car ID key or the waybill number index does not match the saved waybill index
Logic Flow:
IF A US cargo record has been successfully retrieved from the database with a valid status
AND Either the retrieved cargo's car ID (first 12 characters) does not match the current equipment car ID key or the waybill number index does not match the saved waybill index
THEN:
• The end-of-database flag is set to true, terminating the search for matching US cargo records
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record has been retrieved that matches the current car id and waybill number.
Trigger Criteria:
Context: A US cargo record has been retrieved that matches the current car ID and waybill number
Applied to: Cargo Deleted or TR Created? - Yes - Skip Record
Action: The cargo record has a deletion status indicator set or the train-created-for-it flag is set to 'Y'
Logic Flow:
IF A US cargo record has been retrieved that matches the current car ID and waybill number
AND The cargo record has a deletion status indicator set or the train-created-for-it flag is set to 'Y'
THEN:
• The system continues to the next record without setting the US manifest found flag
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record has been retrieved that matches the current car id and waybill number.
Trigger Criteria:
Context: A US cargo record has been retrieved that matches the current car ID and waybill number
Applied to: Cargo Deleted or TR Created? - No - Valid Cargo
Action: The cargo record does not have a deletion status indicator set and the train-created-for-it flag is not set to 'Y'
Logic Flow:
IF A US cargo record has been retrieved that matches the current car ID and waybill number
AND The cargo record does not have a deletion status indicator set and the train-created-for-it flag is not set to 'Y'
THEN:
• The US manifest found flag is set to true, indicating a valid US cargo record has been located
R-GCX126-cbl-00938 (+8)File: GCX126R.cblBusiness Rule: Set Search Parameters
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when current cargo record with equipment car id and waybill index.
Trigger Criteria:
Context: A current cargo record with equipment car ID and waybill index
Applied to: Set Search Parameters
Action: Preparing to search for associated US cargo records
Logic Flow:
IF A current cargo record with equipment car ID and waybill index
AND Preparing to search for associated US cargo records
THEN:
• Set search parameters with car ID from current cargo key, waybill index from saved waybill, US CCN key to LOW-VALUES, database accept status to 'GEGB', segment type to GCSUSRT, function to Get Unique (GU), index type to CAR-WB (Car-Waybill), and operator to greater than or equal ('>=')
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when current cargo equipment car id key is available in ws-current-carid-key. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Current cargo equipment car ID key is available in WS-CURRENT-CARID-KEY
Applied to: Set Car ID from Current Cargo
Action: Initializing search parameters for US cargo lookup
Logic Flow:
IF Current cargo equipment car ID key is available in WS-CURRENT-CARID-KEY
AND Initializing search parameters for US cargo lookup
THEN:
• Move WS-CURRENT-CARID-KEY to GCUSRT-RT073-CAR-ID-NUM-INDEX to use as the car ID search criterion
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when saved waybill index is available in save-waybill-index.
Trigger Criteria:
Context: Saved waybill index is available in SAVE-WAYBILL-INDEX
Applied to: Set Waybill Index from Current Cargo
Action: Initializing search parameters for US cargo lookup
Logic Flow:
IF Saved waybill index is available in SAVE-WAYBILL-INDEX
AND Initializing search parameters for US cargo lookup
THEN:
• Move SAVE-WAYBILL-INDEX to GCUSRT-RT073-WB-NUM-INDEX to use as the waybill search criterion
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when us cargo search is being initialized.
Trigger Criteria:
Context: US cargo search is being initialized
Applied to: Set US CCN to LOW-VALUES
Action: Setting up the US CCN key parameter
Logic Flow:
IF US cargo search is being initialized
AND Setting up the US CCN key parameter
THEN:
• Move LOW-VALUES to GCUSRT-RT073-US-CCN-KEY-INDEX to start search from the beginning of matching records
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when database operation is being prepared for us cargo search.
Trigger Criteria:
Context: Database operation is being prepared for US cargo search
Applied to: Set Accept Status to 'GEGB'
Action: Setting database control parameters
Logic Flow:
IF Database operation is being prepared for US cargo search
AND Setting database control parameters
THEN:
• Move 'GEGB' to CC-ACCEPT-STATUS to indicate Get with status code GE and GB
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when database search parameters are being configured.
Trigger Criteria:
Context: Database search parameters are being configured
Applied to: Set Segment Type to GCSUSRT
Action: Specifying which segment type to retrieve
Logic Flow:
IF Database search parameters are being configured
AND Specifying which segment type to retrieve
THEN:
• Set GCWUSIO-SEG-GCSUSRT to TRUE to indicate US cargo report segment (GCSUSRT) should be accessed
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when database operation type needs to be specified.
Trigger Criteria:
Context: Database operation type needs to be specified
Applied to: Set Function to GU - Get Unique
Action: Configuring the database function for US cargo search
Logic Flow:
IF Database operation type needs to be specified
AND Configuring the database function for US cargo search
THEN:
• Set GCWUSIO-FUNC-GU to TRUE to indicate Get Unique (GU) operation should be performed
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when database index selection is required for search optimization.
Trigger Criteria:
Context: Database index selection is required for search optimization
Applied to: Set Index Type to CAR-WB
Action: Specifying which index to use for US cargo lookup
Logic Flow:
IF Database index selection is required for search optimization
AND Specifying which index to use for US cargo lookup
THEN:
• Set GCWUSIO-INDEX-CAR-WB to TRUE to indicate Car-Waybill index should be used for the search
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when search comparison logic needs to be defined.
Trigger Criteria:
Context: Search comparison logic needs to be defined
Applied to: Set Operator to '>='
Action: Setting the operator for database record matching
Logic Flow:
IF Search comparison logic needs to be defined
AND Setting the operator for database record matching
THEN:
• Move '>=' to GCWUSIO-OPERATOR to retrieve records with keys greater than or equal to the search criteria
Business Justification: Establishes the required business protocol to be followed when ['a canadian cargo has been released via edi 350 message', 'a corresponding us cargo manifest exists with matching equipment car id and waybill number', 'the us cargo is not deleted and no train has been created for it', 'the system has current machine date and time available'].
Trigger Criteria:
Context: ['A Canadian cargo has been released via EDI 350 message', 'A corresponding US cargo manifest exists with matching equipment car ID and waybill number', 'The US cargo is not deleted and no train has been created for it', 'The system has current machine date and time available']
Applied to: - Current Date/Time - US CCN - Action Code: LOG-USE-INPUT-MESSAGE - Message: CDN CCN RLSED BY EDI 350
Action: ['The system processes the US manifest associated with the released Canadian cargo']
Logic Flow:
IF ['A Canadian cargo has been released via EDI 350 message', 'A corresponding US cargo manifest exists with matching equipment car ID and waybill number', 'The US cargo is not deleted and no train has been created for it', 'The system has current machine date and time available']
AND ['The system processes the US manifest associated with the released Canadian cargo']
THEN:
• ['Extract current machine century and date in CCYYMMDD format', 'Extract current machine time in HHMMSS format', 'Set the action code to LOG-USE-INPUT-MESSAGE', 'Set the target identifier to the US cargo control number', 'Set the cargo type indicator to US-CARGO', "Build the log message by concatenating 'CDN CCN RLSED BY EDI 350: ' with the Canadian cargo control number", 'Populate the GCX105 log structure with date, time, action code, US CCN, cargo type, and message', 'Invoke the GCT1051E transaction to create the log entry']
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when ['the system has access to current machine century (cc-machine-century)', 'the system has access to current machine date (cc-machine-date-x)'].
Trigger Criteria:
Context: ['The system has access to current machine century (CC-MACHINE-CENTURY)', 'The system has access to current machine date (CC-MACHINE-DATE-X)']
Applied to: CCYYMMDD
Action: ['Preparing to log US cargo release information']
Logic Flow:
IF ['The system has access to current machine century (CC-MACHINE-CENTURY)', 'The system has access to current machine date (CC-MACHINE-DATE-X)']
AND ['Preparing to log US cargo release information']
THEN:
• ['Concatenate CC-MACHINE-CENTURYandCC-MACHINE-DATE-X', 'Store the result in GCX105-DATE field in CCYYMMDD format']
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when ['the system has access to current machine time (cc-machine-time-x)'].
Trigger Criteria:
Context: ['The system has access to current machine time (CC-MACHINE-TIME-X)']
Applied to: HHMMSS
Action: ['Preparing to log US cargo release information']
Logic Flow:
IF ['The system has access to current machine time (CC-MACHINE-TIME-X)']
AND ['Preparing to log US cargo release information']
THEN:
• ['Move CC-MACHINE-TIME-X to GCX105-TIME field in HHMMSS format']
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when ['a us cargo log entry is being prepared'].
Trigger Criteria:
Context: ['A US cargo log entry is being prepared']
Applied to: Set Action Code to LOG-USE-INPUT-MESSAGE
Action: ['Setting the action code for the log entry']
Logic Flow:
IF ['A US cargo log entry is being prepared']
AND ['Setting the action code for the log entry']
THEN:
• ['Set GCX105-ACTION-CODE to LOG-USE-INPUT-MESSAGE']
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when ['a us cargo manifest has been retrieved (gcusrt-us-ccn-key)', 'the us cargo control number is available'].
Trigger Criteria:
Context: ['A US cargo manifest has been retrieved (GCUSRT-US-CCN-KEY)', 'The US cargo control number is available']
Applied to: Set US CCN as Target
Action: ['Preparing the log entry for US cargo release']
Logic Flow:
IF ['A US cargo manifest has been retrieved (GCUSRT-US-CCN-KEY)', 'The US cargo control number is available']
AND ['Preparing the log entry for US cargo release']
THEN:
• ['Move GCUSRT-US-CCN-KEY to GCX105-TRAIN-OR-US-CCN field']
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when ['a log entry is being created for us cargo'].
Trigger Criteria:
Context: ['A log entry is being created for US cargo']
Applied to: Set Cargo Type Flag to US-CARGO
Action: ['Setting the cargo type indicator']
Logic Flow:
IF ['A log entry is being created for US cargo']
AND ['Setting the cargo type indicator']
THEN:
• ['Set GCX105-US-CARGO flag to TRUE']
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when ['the canadian cargo control number (gccc-ccn-key) is available', 'a us cargo release is being logged'].
Trigger Criteria:
Context: ['The Canadian cargo control number (GCCC-CCN-KEY) is available', 'A US cargo release is being logged']
Applied to: 'CDN CCN RLSED BY EDI 350: ' + Canadian CCN
Action: ['Building the log message text']
Logic Flow:
IF ['The Canadian cargo control number (GCCC-CCN-KEY) is available', 'A US cargo release is being logged']
AND ['Building the log message text']
THEN:
• ["Concatenate the literal text 'CDN CCN RLSED BY EDI 350: ' with GCCC-CCN-KEY", 'Store the concatenated message in GCX105-MESSAGE field']
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when ['gcx105 log structure is fully populated with date, time, action code, us ccn, cargo type, and message', 'all required log information has been prepared']. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: ['GCX105 log structure is fully populated with date, time, action code, US CCN, cargo type, and message', 'All required log information has been prepared']
Applied to: Call GCT1051E Transaction to Log Entry
Action: ['Ready to create the log entry']
Logic Flow:
IF ['GCX105 log structure is fully populated with date, time, action code, US CCN, cargo type, and message', 'All required log information has been prepared']
AND ['Ready to create the log entry']
THEN:
• ['Call Z300-SPAWN-GCT1051E procedure to create the log entry']
Business Justification: Dictates the expected operational logic and validation steps when log message needs to be prepared for the gct1051e transaction.
Trigger Criteria:
Context: A log message needs to be prepared for the GCT1051E transaction
Applied to: Initialize GCX105 Input Structure
Action: The log message preparation process begins
Logic Flow:
IF A log message needs to be prepared for the GCT1051E transaction
AND The log message preparation process begins
THEN:
• The GCX105 input structure is cleared to spaces to ensure no residual data remains
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when log message structure has been initialized.
Trigger Criteria:
Context: The log message structure has been initialized
Applied to: Set Security Byte to HIGH-VALUE
Action: Security attributes need to be set for the log entry
Logic Flow:
IF The log message structure has been initialized
AND Security attributes need to be set for the log entry
THEN:
• The security byte in GCX105 structure is set to HIGH-VALUE to indicate system-level security
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when log message is being prepared by the gct1261e program.
Trigger Criteria:
Context: The log message is being prepared by the GCT1261E program
Applied to: Set Sending Transaction = 'GCT1261E'
Action: The sending transaction identifier needs to be recorded
Logic Flow:
IF The log message is being prepared by the GCT1261E program
AND The sending transaction identifier needs to be recorded
THEN:
• The sending transaction field in GCX105 structure is set to 'GCT1261E'
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when current user id is available in the cccom control block.
Trigger Criteria:
Context: The current user ID is available in the CCCOM control block
Applied to: Set ACF2 User ID from CCCOM
Action: User identification needs to be captured for the log entry
Logic Flow:
IF The current user ID is available in the CCCOM control block
AND User identification needs to be captured for the log entry
THEN:
• The ACF2 user ID from CCCOM is copied to the GCX105 ACF2-ID field
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when date field in gcx105 structure may contain spaces.
Trigger Criteria:
Context: The date field in GCX105 structure may contain spaces
Applied to: Replace Spaces with Zeroes in Date
Action: The date field is being prepared for logging
Logic Flow:
IF The date field in GCX105 structure may contain spaces
AND The date field is being prepared for logging
THEN:
• All space characters in the GCX105 date field are replaced with zeroes to ensure numeric consistency
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when time field in gcx105 structure may contain spaces.
Trigger Criteria:
Context: The time field in GCX105 structure may contain spaces
Applied to: Replace Spaces with '1' in Time
Action: The time field is being prepared for logging
Logic Flow:
IF The time field in GCX105 structure may contain spaces
AND The time field is being prepared for logging
THEN:
• All space characters in the GCX105 time field are replaced with '1' to ensure data consistency
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when gcx105 input structure has been fully populated with log information.
Trigger Criteria:
Context: The GCX105 input structure has been fully populated with log information
Applied to: Format Message for GCT1051E
Action: The message needs to be formatted for the GCT1051E transaction
Logic Flow:
IF The GCX105 input structure has been fully populated with log information
AND The message needs to be formatted for the GCT1051E transaction
THEN:
• The GCX105 input data is moved to the GCT1051E message structure for subsequent logging operations
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when log message is being prepared for the gct1051e transaction.
Trigger Criteria:
Context: A log message is being prepared for the GCT1051E transaction
Applied to: Format Message for GCT1051E
Action: The message content in GCX105-MESSAGE is spaces or low-values
Logic Flow:
IF A log message is being prepared for the GCT1051E transaction
AND The message content in GCX105-MESSAGE is spaces or low-values
THEN:
• The log message preparation process is terminated without further processing
R-GCX126-cbl-00963File: GCX126R.cblBusiness Rule: Set Accept Status to 'GEGB'
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when system needs to perform a database get next operation on cargo records. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system needs to perform a database Get Next operation on cargo records
Applied to: Set Accept Status to 'GEGB'
Action: The accept status is being configured for the database call
Logic Flow:
IF The system needs to perform a database Get Next operation on cargo records
AND The accept status is being configured for the database call
THEN:
• The accept status field is set to 'GEGB' to indicate Get Next with Good status and Browse mode
R-GCX126-cbl-00964 (+4)File: GCX126R.cblBusiness Rule: Prepare Log Information
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo event or status change needs to be logged to the audit trail.
Trigger Criteria:
Context: A cargo event or status change needs to be logged to the audit trail
Applied to: Clear GCX105 Input Area
Action: The log information preparation process is initiated
Logic Flow:
IF A cargo event or status change needs to be logged to the audit trail
AND The log information preparation process is initiated
THEN:
• The system shall clear the GCX105 input area to remove any previous data, set the security byte to HIGH-VALUE to indicate secure logging, set the sending transaction identifier to 'GCT1261E' to identify the source program, and populate the ACF2 user ID from the current session context (CCCOM) to track who initiated the action
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when new log entry needs to be created for a cargo event.
Trigger Criteria:
Context: A new log entry needs to be created for a cargo event
Applied to: Clear GCX105 Input Area
Action: The log preparation process begins
Logic Flow:
IF A new log entry needs to be created for a cargo event
AND The log preparation process begins
THEN:
• The system shall initialize the GCX105-INPUT area to spaces, removing all previous content
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when log entry structure is being prepared.
Trigger Criteria:
Context: A log entry structure is being prepared
Applied to: Set Security Byte to HIGH-VALUE
Action: Security parameters are being set
Logic Flow:
IF A log entry structure is being prepared
AND Security parameters are being set
THEN:
• The system shall set the GCX105-SECURITY-BYTE to HIGH-VALUE to indicate this is a secure, system-generated log entry
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when log entry is being created from the edi 350 processing program.
Trigger Criteria:
Context: A log entry is being created from the EDI 350 processing program
Applied to: Set Sending Transaction to 'GCT1261E'
Action: The source transaction identifier needs to be recorded
Logic Flow:
IF A log entry is being created from the EDI 350 processing program
AND The source transaction identifier needs to be recorded
THEN:
• The system shall set the GCX105-SENDING-TRANSACTION field to 'GCT1261E' to identify this program as the source of the log entry
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when log entry is being prepared and the current user session is active.
Trigger Criteria:
Context: A log entry is being prepared and the current user session is active
Applied to: Set ACF2 User ID from CCCOM
Action: User identification needs to be recorded
Logic Flow:
IF A log entry is being prepared and the current user session is active
AND User identification needs to be recorded
THEN:
• The system shall populate the GCX105-ACF2-ID field with the CC-ACF2-USERID value from the CCCOM control block to record who initiated the logged action
R-GCX126-cbl-00969 (+9)File: GCX126R.cblBusiness Rule: Call EMCSEND2 with Email Parameters
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when system needs to send an email notification via emcsend2. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system needs to send an email notification via EMCSEND2
Applied to: Call CCISCOM to Setup ISCOM
Action: The email sending process is initiated
Logic Flow:
IF The system needs to send an email notification via EMCSEND2
AND The email sending process is initiated
THEN:
• The system calls CCISCOM program with CCCOM and ISCOM parameters to setup the communication context
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when communication context is established and email parameters are prepared including from user code (emi-from-usercode), destination filename (emi-destination-filename), to user code (emi-to-usercode), copy user code (emi-copy-usercode), subject (emi-subject), keywords (emi-keywords), report content (mrln-350-report), return status flag (emi-return-status-flag), segment numbers (emi-seg-no1, emi-seg-no2), and item type (emi-item-type). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The communication context is established and email parameters are prepared including From User Code (EMI-FROM-USERCODE), Destination Filename (EMI-DESTINATION-FILENAME), To User Code (EMI-TO-USERCODE), Copy User Code (EMI-COPY-USERCODE), Subject (EMI-SUBJECT), Keywords (EMI-KEYWORDS), Report Content (MRLN-350-REPORT), Return Status Flag (EMI-RETURN-STATUS-FLAG), Segment Numbers (EMI-SEG-NO1, EMI-SEG-NO2), and Item Type (EMI-ITEM-TYPE)
Applied to: From User Code, Destination Filename, To User Code, Copy User Code, Subject, Keywords, Report Content, Return Status Flag, Segment Numbers, Item Type
Action: The system invokes EMCSEND2 program
Logic Flow:
IF The communication context is established and email parameters are prepared including From User Code (EMI-FROM-USERCODE), Destination Filename (EMI-DESTINATION-FILENAME), To User Code (EMI-TO-USERCODE), Copy User Code (EMI-COPY-USERCODE), Subject (EMI-SUBJECT), Keywords (EMI-KEYWORDS), Report Content (MRLN-350-REPORT), Return Status Flag (EMI-RETURN-STATUS-FLAG), Segment Numbers (EMI-SEG-NO1, EMI-SEG-NO2), and Item Type (EMI-ITEM-TYPE)
AND The system invokes EMCSEND2 program
THEN:
• The email is sent with all specified parameters and the return status flag is populated with the result
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when emcsend2 program has completed sending the email. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The EMCSEND2 program has completed sending the email
Applied to: Call ISCCCOM to Restore CCCOM
Action: The email sending operation finishes
Logic Flow:
IF The EMCSEND2 program has completed sending the email
AND The email sending operation finishes
THEN:
• The system calls ISCCCOM program with ISCOM and CCCOM parameters to restore the original communication context
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when emcsend2 return status flag indicates no errors (emi-no-errors).
Trigger Criteria:
Context: The EMCSEND2 return status flag indicates no errors (EMI-NO-ERRORS)
Applied to: Purge IMS Message Queue
Action: The email sending completes successfully
Logic Flow:
IF The EMCSEND2 return status flag indicates no errors (EMI-NO-ERRORS)
AND The email sending completes successfully
THEN:
• The system calls CIMS program with PURG function code andALT-PCB to purge the message from the queue
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when emcsend2 return status flag indicates sender not found (emi-from-not-found).
Trigger Criteria:
Context: The EMCSEND2 return status flag indicates sender not found (EMI-FROM-NOT-FOUND)
Applied to: Set Error Message 'EMI - INVALID MERLIN FROM'
Action: The email sending fails due to invalid sender user code
Logic Flow:
IF The EMCSEND2 return status flag indicates sender not found (EMI-FROM-NOT-FOUND)
AND The email sending fails due to invalid sender user code
THEN:
• The system sets error message to 'EMI - INVALID MERLIN FROM' in CCCOM error message field and calls CERR program to abort
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when emcsend2 return status flag indicates recipient not found (emi-to-or-copy-not-found) and the message type is unrelease (88-z110-mrln-type-is-unrlse). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The EMCSEND2 return status flag indicates recipient not found (EMI-TO-OR-COPY-NOT-FOUND) and the message type is unrelease (88-Z110-MRLN-TYPE-IS-UNRLSE)
Applied to: Identify Bad Merlin ID
Action: The email sending fails due to invalid recipient
Logic Flow:
IF The EMCSEND2 return status flag indicates recipient not found (EMI-TO-OR-COPY-NOT-FOUND) and the message type is unrelease (88-Z110-MRLN-TYPE-IS-UNRLSE)
AND The email sending fails due to invalid recipient
THEN:
• The system moves EMI-TO-USERCODES(02) to WS-BAD-MERLIN-ID, clears EMI-TO-USERCODE, sets EMI-TO-USERCODES(01) to 'OM01247', sets EMI-DESTINATION-FILENAME to 'IN', and performs Z116-RESEND-MERLIN
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when emcsend2 return status flag indicates recipient not found (emi-to-or-copy-not-found) and the message type is not unrelease. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The EMCSEND2 return status flag indicates recipient not found (EMI-TO-OR-COPY-NOT-FOUND) and the message type is not unrelease
Applied to: Identify Bad Merlin ID
Action: The email sending fails due to invalid recipient
Logic Flow:
IF The EMCSEND2 return status flag indicates recipient not found (EMI-TO-OR-COPY-NOT-FOUND) and the message type is not unrelease
AND The email sending fails due to invalid recipient
THEN:
• The system moves EMI-TO-USERCODES(01) to WS-BAD-MERLIN-ID, clears EMI-TO-USERCODE, sets EMI-TO-USERCODES(01) to 'OM01247', sets EMI-DESTINATION-FILENAME to 'IN', and performs Z116-RESEND-MERLIN
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when resend operation completed successfully (emi-no-errors after z116-resend-merlin). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The resend operation completed successfully (EMI-NO-ERRORS after Z116-RESEND-MERLIN)
Applied to: Resend Failed Email to OM01247 with Reroute Notification
Action: The email has been rerouted to default user
Logic Flow:
IF The resend operation completed successfully (EMI-NO-ERRORS after Z116-RESEND-MERLIN)
AND The email has been rerouted to default user
THEN:
• The system clears EMI-SUBJECT, builds a new subject message containing WS-BAD-MERLIN-IDand text 'INVALID MERLIN TO - REPORT REROUTE', and performs Z116-RESEND-MERLIN again to send the notification
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when emcsend2 return status flag indicates invalid filename (emi-filename-invalid).
Trigger Criteria:
Context: The EMCSEND2 return status flag indicates invalid filename (EMI-FILENAME-INVALID)
Applied to: Set Error Message 'EMI - INVALID MERLIN FILENAME'
Action: The email sending fails due to invalid destination filename
Logic Flow:
IF The EMCSEND2 return status flag indicates invalid filename (EMI-FILENAME-INVALID)
AND The email sending fails due to invalid destination filename
THEN:
• The system sets error message to 'EMI - INVALID MERLIN FILENAME' in CCCOM error message field and calls CERR program to abort
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when email sending process has completed (either successfully purged or successfully rerouted). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The email sending process has completed (either successfully purged or successfully rerouted)
Applied to: Increment Machine Sequence Number
Action: The email operation finishes
Logic Flow:
IF The email sending process has completed (either successfully purged or successfully rerouted)
AND The email operation finishes
THEN:
• The system adds 1 to WS-FMT-MACHINE-SEQ
R-GCX126-cbl-00979 (+9)File: GCX126R.cblBusiness Rule: Call EMCSEND2 to Resend Email
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email notification has failed to send to the primary recipient. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email notification has failed to send to the primary recipient
Applied to: Call EMCSEND2 to Resend Email
Action: The resend process is initiated
Logic Flow:
IF An email notification has failed to send to the primary recipient
AND The resend process is initiated
THEN:
• The system clears the TO usercode field, sets TO usercode to 'OM01247', sets destination filename to 'IN', and calls EMCSEND2 with the updated parameters
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email has been successfully resent via emcsend2 with no errors.
Trigger Criteria:
Context: An email has been successfully resent via EMCSEND2 with no errors
Applied to: Purge IMS Message Queue
Action: The email send operation completes with EMI-NO-ERRORS status
Logic Flow:
IF An email has been successfully resent via EMCSEND2 with no errors
AND The email send operation completes with EMI-NO-ERRORS status
THEN:
• The system calls CIMS with PURG function to purge the alternate PCB message queue
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when email resend operation has completed (successfully or with error). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email resend operation has completed (successfully or with error)
Applied to: Increment Machine Sequence Number
Action: The resend process finishes
Logic Flow:
IF An email resend operation has completed (successfully or with error)
AND The resend process finishes
THEN:
• The system adds 1 to WS-FMT-MACHINE-SEQ to increment the sequence number
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when email resend is attempted via emcsend2.
Trigger Criteria:
Context: An email resend is attempted via EMCSEND2
Applied to: Invalid FROM Usercode
Action: EMCSEND2 returns EMI-FROM-NOT-FOUND status
Logic Flow:
IF An email resend is attempted via EMCSEND2
AND EMCSEND2 returns EMI-FROM-NOT-FOUND status
THEN:
• The system sets error message to 'EMI - INVALID MERLIN FROM' and performs Z900-ABEND to terminate processing
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when email resend is attempted via emcsend2. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email resend is attempted via EMCSEND2
Applied to: Invalid TO/COPY Usercode
Action: EMCSEND2 returns EMI-TO-OR-COPY-NOT-FOUND status
Logic Flow:
IF An email resend is attempted via EMCSEND2
AND EMCSEND2 returns EMI-TO-OR-COPY-NOT-FOUND status
THEN:
• The system sets error message to 'EMI - INVALID MERLIN TO OR COPY' and performs Z900-ABEND to terminate processing
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when email resend is attempted via emcsend2.
Trigger Criteria:
Context: An email resend is attempted via EMCSEND2
Applied to: Invalid Filename
Action: EMCSEND2 returns EMI-FILENAME-INVALID status
Logic Flow:
IF An email resend is attempted via EMCSEND2
AND EMCSEND2 returns EMI-FILENAME-INVALID status
THEN:
• The system sets error message to 'EMI - INVALID MERLIN FILENAME' and performs Z900-ABEND to terminate processing
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email notification needs to be resent.
Trigger Criteria:
Context: An email notification needs to be resent
Applied to: Clear TO Usercode Field
Action: The resend process begins
Logic Flow:
IF An email notification needs to be resent
AND The resend process begins
THEN:
• The system moves SPACES to EMI-TO-USERCODE to clear the field
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when to usercode field has been cleared.
Trigger Criteria:
Context: The TO usercode field has been cleared
Applied to: Set TO Usercode to OM01247
Action: Setting up the resend parameters
Logic Flow:
IF The TO usercode field has been cleared
AND Setting up the resend parameters
THEN:
• The system moves 'OM01247' to EMI-TO-USERCODES(01) as the default recipient
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when recipient has been set to the default usercode.
Trigger Criteria:
Context: The recipient has been set to the default usercode
Applied to: Set Destination Filename to IN
Action: Configuring the destination for resend
Logic Flow:
IF The recipient has been set to the default usercode
AND Configuring the destination for resend
THEN:
• The system moves 'IN' to EMI-DESTINATION-FILENAME
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when all resend parameters have been configured (to usercode = om01247, destination = in). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All resend parameters have been configured (TO usercode = OM01247, destination = IN)
Applied to: Call EMCSEND2 with Updated Parameters
Action: Ready to resend the email
Logic Flow:
IF All resend parameters have been configured (TO usercode = OM01247, destination = IN)
AND Ready to resend the email
THEN:
• The system calls EMCSEND2 passing ISCOM, EMI-FROM-USERCODE, EMI-DESTINATION-FILENAME, EMI-TO-USERCODE, EMI-COPY-USERCODE, EMI-SUBJECT, EMI-KEYWORDS, MRLN-350-REPORT, EMI-RETURN-STATUS-FLAG, EMI-SEG-NO1, EMI-SEG-NO2, andEMI-ITEM-TYPE parameters
R-GCX126-cbl-00989 (+9)File: GCX126R.cblBusiness Rule: Call GCCUSIO to Execute Database Search
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when canadian cargo record is being processed with a current equipment car id key and a saved waybill index.
Trigger Criteria:
Context: A Canadian cargo record is being processed with a current equipment car ID key and a saved waybill index
Applied to: Set Car ID from Current Key, Set Waybill Index from Saved Value, Set US CCN Key to Low Values
Action: The system prepares to search for associated US cargo records
Logic Flow:
IF A Canadian cargo record is being processed with a current equipment car ID key and a saved waybill index
AND The system prepares to search for associated US cargo records
THEN:
• The search parameters are initialized with the equipment car ID from the current key, the waybill number from the saved index, and the US CCN key is set to its lowest possible value to enable range searching
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when system needs to find the first us cargo record matching equipment car id and waybill number.
Trigger Criteria:
Context: The system needs to find the first US cargo record matching equipment car ID and waybill number
Applied to: Set Function to GU - Get Unique, Set Index Type to CAR-WB, Set Operator to '>=' - Greater/Equal
Action: Performing the initial database search operation
Logic Flow:
IF The system needs to find the first US cargo record matching equipment car ID and waybill number
AND Performing the initial database search operation
THEN:
• The database function is set to Get Unique (GU), the index type is set to equipment-waybill (CAR-WB), and the search operator is set to greater-than-or-equal-to (>=) to find the first matching or next available record
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when system has already retrieved an initial us cargo record and needs to find subsequent records.
Trigger Criteria:
Context: The system has already retrieved an initial US cargo record and needs to find subsequent records
Applied to: Set Function to GN - Get Next, Set Index Type to CAR-WB, Set Operator to '>' - Greater Than
Action: Performing a follow-up database search operation
Logic Flow:
IF The system has already retrieved an initial US cargo record and needs to find subsequent records
AND Performing a follow-up database search operation
THEN:
• The database function is set to Get Next (GN), the index type is set to equipment-waybill (CAR-WB), and the search operator is set to greater-than (>) to find the next sequential record
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when all search parameters are configured including segment type gcsusrt, function type (gu or gn), index type car-wb, and search operator. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All search parameters are configured including segment type GCSUSRT, function type (GU or GN), index type CAR-WB, and search operator
Applied to: Call GCCUSIO with Parameters
Action: The system executes the database search
Logic Flow:
IF All search parameters are configured including segment type GCSUSRT, function type (GU or GN), index type CAR-WB, and search operator
AND The system executes the database search
THEN:
• The GCCUSIO program is called with the control communication area, search parameters, and US cargo segment structure to retrieve matching records
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when database search operation has been executed for us cargo records.
Trigger Criteria:
Context: A database search operation has been executed for US cargo records
Applied to: Database Status OK?, Set End of Database Flag
Action: The database operation returns a non-successful status code indicating no records found or an error condition
Logic Flow:
IF A database search operation has been executed for US cargo records
AND The database operation returns a non-successful status code indicating no records found or an error condition
THEN:
• The end-of-database flag is set to TRUE to indicate no more records are available and processing should terminate the search loop
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when us cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A US cargo record has been successfully retrieved from the database
Applied to: Verify Car ID Matches Current Key, Verify Waybill Matches Saved Index, Keys Match?
Action: The system validates the retrieved record against search criteria
Logic Flow:
IF A US cargo record has been successfully retrieved from the database
AND The system validates the retrieved record against search criteria
THEN:
• The equipment car ID from the retrieved record (first 12 characters) is compared to the current equipment car ID key AND the waybill number from the retrieved record is compared to the saved waybill index, and both must match exactly for the record to be considered valid
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record has been retrieved but either the equipment car id or waybill number does not match the search criteria.
Trigger Criteria:
Context: A US cargo record has been retrieved but either the equipment car ID or waybill number does not match the search criteria
Applied to: Keys Match?, Set End of Database Flag
Action: The key validation check fails
Logic Flow:
IF A US cargo record has been retrieved but either the equipment car ID or waybill number does not match the search criteria
AND The key validation check fails
THEN:
• The end-of-database flag is set to TRUE to terminate the search loop, as records are indexed and sorted, indicating no further matching records will be found
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo record has been retrieved that matches equipment and waybill criteria.
Trigger Criteria:
Context: A US cargo record has been retrieved that matches equipment and waybill criteria
Applied to: Cargo Deleted?, Continue to Next Record
Action: The cargo record has a deletion status indicator set to deleted
Logic Flow:
IF A US cargo record has been retrieved that matches equipment and waybill criteria
AND The cargo record has a deletion status indicator set to deleted
THEN:
• The record is skipped without setting the US manifest found flag, and processing continues to allow searching for the next record
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when us cargo record has been retrieved that matches equipment and waybill criteria and is not deleted.
Trigger Criteria:
Context: A US cargo record has been retrieved that matches equipment and waybill criteria and is not deleted
Applied to: TR Created?, Continue to Next Record
Action: The cargo record has the train-created indicator set to 'Y' (Yes)
Logic Flow:
IF A US cargo record has been retrieved that matches equipment and waybill criteria and is not deleted
AND The cargo record has the train-created indicator set to 'Y' (Yes)
THEN:
• The record is skipped without setting the US manifest found flag, and processing continues to allow searching for the next record
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when us cargo record has been retrieved that matches equipment car id and waybill number, is not marked as deleted, and does not have a train record already created.
Trigger Criteria:
Context: A US cargo record has been retrieved that matches equipment car ID and waybill number, is not marked as deleted, and does not have a train record already created
Applied to: Set US Manifest Found Flag
Action: All validation checks pass successfully
Logic Flow:
IF A US cargo record has been retrieved that matches equipment car ID and waybill number, is not marked as deleted, and does not have a train record already created
AND All validation checks pass successfully
THEN:
• The US manifest found flag is set to TRUE to indicate a valid associated US cargo record has been located and is ready for processing
Business Justification: Ensures correct system behavior and process compliance when cargo information message needs to be logged. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo information message needs to be logged
Applied to: Call Z200-MOVE-LOG-INFORMATION to Initialize Log Structure
Action: The log structure initialization is invoked
Logic Flow:
IF A cargo information message needs to be logged
AND The log structure initialization is invoked
THEN:
• The log input area is cleared to spaces AND the security byte is set to high-value AND the sending transaction is set to 'GCT1261E' AND the user ID from the common control area is copied to the log structure
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when log structure is being initialized.
Trigger Criteria:
Context: The log structure is being initialized
Applied to: Clear GCX105-INPUT to Spaces
Action: The initialization process begins
Logic Flow:
IF The log structure is being initialized
AND The initialization process begins
THEN:
• The GCX105-INPUT field is set to spaces
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when log structure is being initialized.
Trigger Criteria:
Context: The log structure is being initialized
Applied to: Set GCX105-SECURITY-BYTE to HIGH-VALUE
Action: Security settings are being configured
Logic Flow:
IF The log structure is being initialized
AND Security settings are being configured
THEN:
• The GCX105-SECURITY-BYTE is set to HIGH-VALUE
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when log structure is being initialized.
Trigger Criteria:
Context: The log structure is being initialized
Applied to: Set GCX105-SENDING-TRANSACTION to 'GCT1261E'
Action: The transaction identifier is being set
Logic Flow:
IF The log structure is being initialized
AND The transaction identifier is being set
THEN:
• The GCX105-SENDING-TRANSACTION is set to 'GCT1261E'
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when log structure is being initialized and the common control area contains the current user id.
Trigger Criteria:
Context: The log structure is being initialized AND the common control area contains the current user ID
Applied to: Set GCX105-ACF2-ID from CCCOM User ID
Action: User identification is being captured
Logic Flow:
IF The log structure is being initialized AND the common control area contains the current user ID
AND User identification is being captured
THEN:
• The GCX105-ACF2-ID is set to the value from CC-ACF2-USERID in the common control area
Business Justification: Governs the functional prerequisites and system routing when log entry creation request is initiated for gct1051e.
Trigger Criteria:
Context: A log entry creation request is initiated for GCT1051E
Applied to: Log Message Empty?
Action: The GCX105-MESSAGE field is empty (spaces) OR contains only low-values
Logic Flow:
IF A log entry creation request is initiated for GCT1051E
AND The GCX105-MESSAGE field is empty (spaces) OR contains only low-values
THEN:
• The system skips the log entry creation process and exits the Z300-SPAWN-GCT1051E section without writing any log record
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when valid log message exists in gcx105-message.
Trigger Criteria:
Context: A valid log message exists in GCX105-MESSAGE
Applied to: Normalize Date - Replace Spaces with Zeros
Action: The GCX105-DATE field contains space characters
Logic Flow:
IF A valid log message exists in GCX105-MESSAGE
AND The GCX105-DATE field contains space characters
THEN:
• The system replaces all spaces in GCX105-DATE with zeroes to ensure proper date formatting
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when valid log message exists in gcx105-message and the gcx105-date field has been normalized.
Trigger Criteria:
Context: A valid log message exists in GCX105-MESSAGE AND the GCX105-DATE field has been normalized
Applied to: Normalize Time - Replace Spaces with '1'
Action: The GCX105-TIME field contains space characters
Logic Flow:
IF A valid log message exists in GCX105-MESSAGE AND the GCX105-DATE field has been normalized
AND The GCX105-TIME field contains space characters
THEN:
• The system replaces all spaces in GCX105-TIME with the character '1' to ensure proper time formatting
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when gcx105-date and gcx105-time fields have been normalized and a valid log message exists.
Trigger Criteria:
Context: The GCX105-DATE and GCX105-TIME fields have been normalized AND a valid log message exists
Applied to: Move Log Input to GCT1051E Message
Action: The log entry preparation is in progress
Logic Flow:
IF The GCX105-DATE and GCX105-TIME fields have been normalized AND a valid log message exists
AND The log entry preparation is in progress
THEN:
• The system moves the complete GCX105-INPUT structure to the GCT1051E-MSG field
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when gct1051e message structure has been populated with log data. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The GCT1051E message structure has been populated with log data
Applied to: Call CIMS with CHNG Function
Action: The system is ready to write the log entry
Logic Flow:
IF The GCT1051E message structure has been populated with log data
AND The system is ready to write the log entry
THEN:
• The system calls CIMS with CHNG function using the alternate PCB and GCT1051E message to change the message destination
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when message destination has been changed to the alternate pcb and the gct1051e message is populated. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The message destination has been changed to the alternate PCB AND the GCT1051E message is populated
Applied to: Call WRITMSGL to Write Message Log
Action: The system is ready to persist the log entry
Logic Flow:
IF The message destination has been changed to the alternate PCB AND the GCT1051E message is populated
AND The system is ready to persist the log entry
THEN:
• The system calls WRITMSGL with the alternate PCB, GCT1051E message code, message content, message length, and module name to write the log entry
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when log entry has been written to the message queue via writmsgl. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The log entry has been written to the message queue via WRITMSGL
Applied to: Call CIMS with PURG Function to Commit
Action: The log entry write operation is complete
Logic Flow:
IF The log entry has been written to the message queue via WRITMSGL
AND The log entry write operation is complete
THEN:
• The system calls CIMS with PURG function using the alternate PCB to commit the transaction and make the log entry permanent
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when log message (gcx105-message) is being prepared for writing to the audit trail.
Trigger Criteria:
Context: A log message (GCX105-MESSAGE) is being prepared for writing to the audit trail
Applied to: Log Message Empty?
Action: The log message field contains only spaces OR low values
Logic Flow:
IF A log message (GCX105-MESSAGE) is being prepared for writing to the audit trail
AND The log message field contains only spaces OR low values
THEN:
• The system skips all logging operations and exits the Z300-SPAWN-GCT1051E section without writing any log entry
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when log message with a date field (gcx105-date) is ready to be written.
Trigger Criteria:
Context: A log message with a date field (GCX105-DATE) is ready to be written
Applied to: Replace Spaces with Zeroes in Date
Action: The date field contains any space characters
Logic Flow:
IF A log message with a date field (GCX105-DATE) is ready to be written
AND The date field contains any space characters
THEN:
• The system replaces all spaces in the date field with zeroes to ensure numeric consistency
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when log message with a time field (gcx105-time) is ready to be written.
Trigger Criteria:
Context: A log message with a time field (GCX105-TIME) is ready to be written
Applied to: Replace Spaces with '1' in Time
Action: The time field contains any space characters
Logic Flow:
IF A log message with a time field (GCX105-TIME) is ready to be written
AND The time field contains any space characters
THEN:
• The system replaces all spaces in the time field with the character '1' to ensure data consistency
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when validated log input structure (gcx105-input) with normalized date and time fields.
Trigger Criteria:
Context: A validated log input structure (GCX105-INPUT) with normalized date and time fields
Applied to: Move Log Input to GCT1051E Message
Action: The log message is ready to be written to the audit trail
Logic Flow:
IF A validated log input structure (GCX105-INPUT) with normalized date and time fields
AND The log message is ready to be written to the audit trail
THEN:
• The system moves the entire log input structure to the GCT1051E message format (GCT1051E-MSG)
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when formatted log message (gct1051e) ready to be written. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A formatted log message (GCT1051E) ready to be written
Applied to: Call CIMS with CHNG Function
Action: The system needs to write the log entry to the audit trail
Logic Flow:
IF A formatted log message (GCT1051E) ready to be written
AND The system needs to write the log entry to the audit trail
THEN:
• The system calls CIMS with CHNG function using the alternate PCB (ALT-PCB OF CCCOM) and the GCT1051E message structure to change the message destination
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when log message with changed destination in the alternate pcb. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A log message with changed destination in the alternate PCB
Applied to: Call WRITMSGL to Write Message
Action: The system is ready to persist the log entry
Logic Flow:
IF A log message with changed destination in the alternate PCB
AND The system is ready to persist the log entry
THEN:
• The system calls WRITMSGL utility with parameters: CCCOM control block, alternate PCB, message code (GCT1051E-MSG-CODE), message text (GCT1051E-MESSAGE), message length (GCT1051E-MSG-LGTH), and module name (GCT1051E-MOD-NAME) to write the log entry to the audit trail
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when log entry has been successfully written to the audit trail via the alternate pcb. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A log entry has been successfully written to the audit trail via the alternate PCB
Applied to: Call CIMS with PURG Function
Action: The log writing operation is complete
Logic Flow:
IF A log entry has been successfully written to the audit trail via the alternate PCB
AND The log writing operation is complete
THEN:
• The system calls CIMS with PURG function using the alternate PCB (ALT-PCB OF CCCOM) to purge the message from the queue
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo information message is ready to be logged.
Trigger Criteria:
Context: A cargo information message is ready to be logged
Applied to: Message Empty?
Action: The message content (GCX105-MESSAGE) is either spaces or low-values
Logic Flow:
IF A cargo information message is ready to be logged
AND The message content (GCX105-MESSAGE) is either spaces or low-values
THEN:
• The system skips the logging process and exits without creating any log entry
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo information message with a date field (gcx105-date) is being prepared for logging.
Trigger Criteria:
Context: A cargo information message with a date field (GCX105-DATE) is being prepared for logging
Applied to: Replace Spaces with Zeroes in Date
Action: The date field contains any space characters
Logic Flow:
IF A cargo information message with a date field (GCX105-DATE) is being prepared for logging
AND The date field contains any space characters
THEN:
• The system replaces all spaces in the date field with zeroes to ensure numeric consistency
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo information message with a time field (gcx105-time) is being prepared for logging.
Trigger Criteria:
Context: A cargo information message with a time field (GCX105-TIME) is being prepared for logging
Applied to: Replace Spaces with '1' in Time
Action: The time field contains any space characters
Logic Flow:
IF A cargo information message with a time field (GCX105-TIME) is being prepared for logging
AND The time field contains any space characters
THEN:
• The system replaces all spaces in the time field with the character '1' to ensure valid time format
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when validated cargo information message (gcx105-input) is ready for logging.
Trigger Criteria:
Context: A validated cargo information message (GCX105-INPUT) is ready for logging
Applied to: Move Input to GCT1051E Message
Action: The message needs to be written to the IMS message queue
Logic Flow:
IF A validated cargo information message (GCX105-INPUT) is ready for logging
AND The message needs to be written to the IMS message queue
THEN:
• The system moves the input message to the GCT1051E message structure (GCT1051E-MSG)
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when cargo information message is ready to be written to ims. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo information message is ready to be written to IMS
Applied to: Set Accept Status to Blank
Action: The system prepares to call IMS message services
Logic Flow:
IF A cargo information message is ready to be written to IMS
AND The system prepares to call IMS message services
THEN:
• The system sets the accept status (CC-ACCEPT-STATUS) to blank (two spaces) to enable standard message processing
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo information message is prepared in gct1051e format. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo information message is prepared in GCT1051E format
Applied to: Call CIMS with CHNG Function
Action: The message destination needs to be set in the IMS message queue
Logic Flow:
IF A cargo information message is prepared in GCT1051E format
AND The message destination needs to be set in the IMS message queue
THEN:
• The system calls CIMS with CHNG function using the alternate PCB and GCT1051E message structure to establish the message destination
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo information message is formatted in gct1051e structure with destination set. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo information message is formatted in GCT1051E structure with destination set
Applied to: Call WRITMSGL to Write Message Log
Action: The message needs to be permanently logged
Logic Flow:
IF A cargo information message is formatted in GCT1051E structure with destination set
AND The message needs to be permanently logged
THEN:
• The system calls WRITMSGL with the alternate PCB, message code (GCT1051E-MSG-CODE), message content (GCT1051E-MESSAGE), message length (GCT1051E-MSG-LGTH), and module name (GCT1051E-MOD-NAME) to write the log entry
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo information message has been successfully written to the message log. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A cargo information message has been successfully written to the message log
Applied to: Call CIMS with PURG Function
Action: The logging transaction needs to be completed
Logic Flow:
IF A cargo information message has been successfully written to the message log
AND The logging transaction needs to be completed
THEN:
• The system calls CIMS with PURG function using the alternate PCB to remove the message from the queue and finalize the transaction
R-GCX126-cbl-01026 (+7)File: GCX126R.cblBusiness Rule: Evaluate Return Status and Handle Email Send Results
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email notification has been processed through emcsend2.
Trigger Criteria:
Context: An email notification has been processed through EMCSEND2
Applied to: No Errors - Email Sent Successfully
Action: The return status indicates no errors (EMI-NO-ERRORS)
Logic Flow:
IF An email notification has been processed through EMCSEND2
AND The return status indicates no errors (EMI-NO-ERRORS)
THEN:
• The system purges the alternate message queue to complete the email transaction
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email notification is being sent through emcsend2.
Trigger Criteria:
Context: An email notification is being sent through EMCSEND2
Applied to: From User Not Found Error
Action: The return status indicates the FROM user was not found (EMI-FROM-NOT-FOUND)
Logic Flow:
IF An email notification is being sent through EMCSEND2
AND The return status indicates the FROM user was not found (EMI-FROM-NOT-FOUND)
THEN:
• The system sets error message 'EMI - INVALID MERLIN FROM' and aborts the program
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email notification is being sent through emcsend2.
Trigger Criteria:
Context: An email notification is being sent through EMCSEND2
Applied to: Filename Invalid Error
Action: The return status indicates the destination filename is invalid (EMI-FILENAME-INVALID)
Logic Flow:
IF An email notification is being sent through EMCSEND2
AND The return status indicates the destination filename is invalid (EMI-FILENAME-INVALID)
THEN:
• The system sets error message 'EMI - INVALID MERLIN FILENAME' and aborts the program
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when email notification has failed due to invalid to or copy recipient (emi-to-or-copy-not-found) and the notification type is unreleased cargo (88-z110-mrln-type-is-unrlse). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email notification has failed due to invalid TO or COPY recipient (EMI-TO-OR-COPY-NOT-FOUND) and the notification type is unreleased cargo (88-Z110-MRLN-TYPE-IS-UNRLSE)
Applied to: Get Bad Merlin ID from TO-USERCODES 2
Action: The system needs to identify the invalid recipient
Logic Flow:
IF An email notification has failed due to invalid TO or COPY recipient (EMI-TO-OR-COPY-NOT-FOUND) and the notification type is unreleased cargo (88-Z110-MRLN-TYPE-IS-UNRLSE)
AND The system needs to identify the invalid recipient
THEN:
• The system captures the invalid Merlin ID from EMI-TO-USERCODES position 2 into WS-BAD-MERLIN-ID
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when email notification has failed due to invalid to or copy recipient (emi-to-or-copy-not-found) and the notification type is not unreleased cargo. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email notification has failed due to invalid TO or COPY recipient (EMI-TO-OR-COPY-NOT-FOUND) and the notification type is not unreleased cargo
Applied to: Get Bad Merlin ID from TO-USERCODES 1
Action: The system needs to identify the invalid recipient
Logic Flow:
IF An email notification has failed due to invalid TO or COPY recipient (EMI-TO-OR-COPY-NOT-FOUND) and the notification type is not unreleased cargo
AND The system needs to identify the invalid recipient
THEN:
• The system captures the invalid Merlin ID from EMI-TO-USERCODES position 1 into WS-BAD-MERLIN-ID
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when email notification has failed due to invalid to or copy recipient (emi-to-or-copy-not-found). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email notification has failed due to invalid TO or COPY recipient (EMI-TO-OR-COPY-NOT-FOUND)
Applied to: Set TO-USERCODES 1 to OM01247
Action: The system prepares to reroute the notification
Logic Flow:
IF An email notification has failed due to invalid TO or COPY recipient (EMI-TO-OR-COPY-NOT-FOUND)
AND The system prepares to reroute the notification
THEN:
• The system clears EMI-TO-USERCODE, sets EMI-TO-USERCODES position 1 to 'OM01247', and sets destination filename to 'IN'
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when email notification has failed due to invalid recipient and has been rerouted to default user om01247 with destination filename 'in'.
Trigger Criteria:
Context: An email notification has failed due to invalid recipient and has been rerouted to default user OM01247 with destination filename 'IN'
Applied to: Resend Failed Email
Action: The system executes the resend operation
Logic Flow:
IF An email notification has failed due to invalid recipient and has been rerouted to default user OM01247 with destination filename 'IN'
AND The system executes the resend operation
THEN:
• The system calls Z116-RESEND-MERLIN to attempt delivery to the default recipient
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email notification was successfully rerouted to default recipient (emi-no-errors after resend). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email notification was successfully rerouted to default recipient (EMI-NO-ERRORS after resend)
Applied to: Prepare Reroute Notification Subject
Action: The system prepares the reroute notification
Logic Flow:
IF An email notification was successfully rerouted to default recipient (EMI-NO-ERRORS after resend)
AND The system prepares the reroute notification
THEN:
• The system clears EMI-SUBJECTand creates a message containing the invalid Merlin ID (WS-BAD-MERLIN-ID) with text 'INVALID MERLIN TO - REPORT REROUTE', then calls Z116-RESEND-MERLIN again to send this notification
R-GCX126-cbl-01034 (+7)File: GCX126R.cblBusiness Rule: Call EMCSEND2 with Resend Parameters
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when system needs to send an email notification and cccom contains current session information. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system needs to send an email notification and CCCOM contains current session information
Applied to: Call CCISCOM to Initialize ISCOM
Action: The resend email process is initiated
Logic Flow:
IF The system needs to send an email notification and CCCOM contains current session information
AND The resend email process is initiated
THEN:
• The system calls CCISCOM with CCCOM and ISCOM parameters to initialize the communication control block for email operations
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when communication control block is initialized and all email parameters are prepared including from user code, destination filename, to user code, copy user code, subject, keywords, and report content. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The communication control block is initialized and all email parameters are prepared including from user code, destination filename, to user code, copy user code, subject, keywords, and report content
Applied to: Call EMCSEND2 with Parameters
Action: The system executes the email send operation
Logic Flow:
IF The communication control block is initialized and all email parameters are prepared including from user code, destination filename, to user code, copy user code, subject, keywords, and report content
AND The system executes the email send operation
THEN:
• The system calls EMCSEND2 with ISCOM, from user code, destination filename, to user code, copy user code, subject, keywords, report content (MRLN-350-REPORT), return status flag, segment numbers, and item type to send the email notification
Rule Belongs to : GCX126R.cbl
Business Justification: Ensures correct system behavior and process compliance when emcsend2 call has completed and iscom contains updated communication information. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The EMCSEND2 call has completed and ISCOM contains updated communication information
Applied to: Call ISCCCOM to Restore CCCOM
Action: The email send operation finishes
Logic Flow:
IF The EMCSEND2 call has completed and ISCOM contains updated communication information
AND The email send operation finishes
THEN:
• The system calls ISCCCOM with ISCOM and CCCOM parameters to restore the communication control block state
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when email notification was sent through emcsend2 and the return status flag indicates no errors (emi-no-errors).
Trigger Criteria:
Context: The email notification was sent through EMCSEND2 and the return status flag indicates no errors (EMI-NO-ERRORS)
Applied to: Purge IMS Message Queue
Action: The system evaluates the email send result
Logic Flow:
IF The email notification was sent through EMCSEND2 and the return status flag indicates no errors (EMI-NO-ERRORS)
AND The system evaluates the email send result
THEN:
• The system calls CIMS with CCCOM, PURG function, andALT-PCB to purge the message from the IMS queue
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when emcsend2 call completed and the return status flag indicates the sender user code was not found (emi-from-not-found). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The EMCSEND2 call completed and the return status flag indicates the sender user code was not found (EMI-FROM-NOT-FOUND)
Applied to: Invalid Merlin FROM
Action: The system evaluates the email send result
Logic Flow:
IF The EMCSEND2 call completed and the return status flag indicates the sender user code was not found (EMI-FROM-NOT-FOUND)
AND The system evaluates the email send result
THEN:
• The system moves 'EMI - INVALID MERLIN FROM' to the error message field in CCCOM and performs the abend routine (Z900-ABEND)
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when emcsend2 call completed and the return status flag indicates the recipient or copy user code was not found (emi-to-or-copy-not-found). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The EMCSEND2 call completed and the return status flag indicates the recipient or copy user code was not found (EMI-TO-OR-COPY-NOT-FOUND)
Applied to: Invalid Merlin TO or COPY
Action: The system evaluates the email send result
Logic Flow:
IF The EMCSEND2 call completed and the return status flag indicates the recipient or copy user code was not found (EMI-TO-OR-COPY-NOT-FOUND)
AND The system evaluates the email send result
THEN:
• The system moves 'EMI - INVALID MERLIN TO OR COPY' to the error message field in CCCOM and performs the abend routine (Z900-ABEND)
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when emcsend2 call completed and the return status flag indicates the destination filename is invalid (emi-filename-invalid). ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The EMCSEND2 call completed and the return status flag indicates the destination filename is invalid (EMI-FILENAME-INVALID)
Applied to: Invalid Merlin Filename
Action: The system evaluates the email send result
Logic Flow:
IF The EMCSEND2 call completed and the return status flag indicates the destination filename is invalid (EMI-FILENAME-INVALID)
AND The system evaluates the email send result
THEN:
• The system moves 'EMI - INVALID MERLIN FILENAME' to the error message field in CCCOM and performs the abend routine (Z900-ABEND)
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when email send operation has completed with any result status. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The email send operation has completed with any result status
Applied to: Increment Machine Sequence Number
Action: The system finishes processing the email notification
Logic Flow:
IF The email send operation has completed with any result status
AND The system finishes processing the email notification
THEN:
• The system adds 1 to WS-FMT-MACHINE-SEQ to increment the machine sequence number
R-GCX126-cbl-01042 (+9)File: GCX126R.cblBusiness Rule: Evaluate Return Status and Handle Resend Results
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when email notification has been sent via emcsend2.
Trigger Criteria:
Context: An email notification has been sent via EMCSEND2
Applied to: No Errors - Purge Message Queue
Action: The return status flag indicates EMI-NO-ERRORS
Logic Flow:
IF An email notification has been sent via EMCSEND2
AND The return status flag indicates EMI-NO-ERRORS
THEN:
• The system purges the message from the alternate PCB message queue and increments the machine sequence number
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when email notification has been attempted via emcsend2.
Trigger Criteria:
Context: An email notification has been attempted via EMCSEND2
Applied to: EMI - INVALID MERLIN FROM
Action: The return status flag indicates EMI-FROM-NOT-FOUND
Logic Flow:
IF An email notification has been attempted via EMCSEND2
AND The return status flag indicates EMI-FROM-NOT-FOUND
THEN:
• The system sets the error message to 'EMI - INVALID MERLIN FROM' and aborts processing
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when email notification has been attempted via emcsend2.
Trigger Criteria:
Context: An email notification has been attempted via EMCSEND2
Applied to: EMI - INVALID MERLIN FILENAME
Action: The return status flag indicates EMI-FILENAME-INVALID
Logic Flow:
IF An email notification has been attempted via EMCSEND2
AND The return status flag indicates EMI-FILENAME-INVALID
THEN:
• The system sets the error message to 'EMI - INVALID MERLIN FILENAME' and aborts processing
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when unrelease type email notification has been attempted via emcsend2 and the message type is unrlse. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An unrelease type email notification has been attempted via EMCSEND2 and the message type is UNRLSE
Applied to: Save Bad Merlin ID from TO-USERCODES 02
Action: The return status flag indicates EMI-TO-OR-COPY-NOT-FOUND
Logic Flow:
IF An unrelease type email notification has been attempted via EMCSEND2 and the message type is UNRLSE
AND The return status flag indicates EMI-TO-OR-COPY-NOT-FOUND
THEN:
• The system saves the invalid Merlin ID from TO-USERCODES position 02 to WS-BAD-MERLIN-ID for error reporting
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when non-unrelease type email notification has been attempted via emcsend2 and the message type is not unrlse. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A non-unrelease type email notification has been attempted via EMCSEND2 and the message type is not UNRLSE
Applied to: Save Bad Merlin ID from TO-USERCODES 01
Action: The return status flag indicates EMI-TO-OR-COPY-NOT-FOUND
Logic Flow:
IF A non-unrelease type email notification has been attempted via EMCSEND2 and the message type is not UNRLSE
AND The return status flag indicates EMI-TO-OR-COPY-NOT-FOUND
THEN:
• The system saves the invalid Merlin ID from TO-USERCODES position 01 to WS-BAD-MERLIN-ID for error reporting
Rule Belongs to : GCX126R.cbl
Business Justification: Defines the strict business conditions required to proceed when email notification has failed with emi-to-or-copy-not-found and the invalid merlin id has been captured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email notification has failed with EMI-TO-OR-COPY-NOT-FOUND and the invalid Merlin ID has been captured
Applied to: Set TO-USERCODES 01 to OM01247
Action: The system prepares to reroute the notification
Logic Flow:
IF An email notification has failed with EMI-TO-OR-COPY-NOT-FOUND and the invalid Merlin ID has been captured
AND The system prepares to reroute the notification
THEN:
• The system clears EMI-TO-USERCODE to spaces, sets TO-USERCODES position 01 to 'OM01247', and sets the destination filename to 'IN'
Rule Belongs to : GCX126R.cbl
Business Justification: Establishes the required business protocol to be followed when notification recipient has been corrected to the default user om01247 and destination filename set to in.
Trigger Criteria:
Context: The notification recipient has been corrected to the default user OM01247 and destination filename set to IN
Applied to: Resend Email via EMCSEND2
Action: The system initiates the resend process
Logic Flow:
IF The notification recipient has been corrected to the default user OM01247 and destination filename set to IN
AND The system initiates the resend process
THEN:
• The system calls EMCSEND2 with the corrected recipient information to resend the notification
Rule Belongs to : GCX126R.cbl
Business Justification: Dictates the expected operational logic and validation steps when notification has been successfully resent to the default user om01247 with emi-no-errors status.
Trigger Criteria:
Context: The notification has been successfully resent to the default user OM01247 with EMI-NO-ERRORS status
Applied to: Bad Merlin ID + INVALID MERLIN TO - REPORT REROUTE
Action: The resend operation completes successfully
Logic Flow:
IF The notification has been successfully resent to the default user OM01247 with EMI-NO-ERRORS status
AND The resend operation completes successfully
THEN:
• The system clears the EMI-SUBJECT, builds a new subject message containing the bad Merlin ID concatenated with ' INVALID MERLIN TO - REPORT REROUTE', and sends this notification via EMCSEND2
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when notification resend has been attempted with the corrected default user om01247. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A notification resend has been attempted with the corrected default user OM01247
Applied to: EMI - INVALID MERLIN TO OR COPY
Action: The resend operation fails with a status other than EMI-NO-ERRORS
Logic Flow:
IF A notification resend has been attempted with the corrected default user OM01247
AND The resend operation fails with a status other than EMI-NO-ERRORS
THEN:
• The system sets the error message to 'EMI - INVALID MERLIN TO OR COPY' and aborts processing
Rule Belongs to : GCX126R.cbl
Business Justification: Governs the functional prerequisites and system routing when email notification has been successfully processed through emcsend2. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email notification has been successfully processed through EMCSEND2
Applied to: Increment Machine Sequence Number
Action: The notification processing completes without errors
Logic Flow:
IF An email notification has been successfully processed through EMCSEND2
AND The notification processing completes without errors
THEN:
• The system adds 1 to WS-FMT-MACHINE-SEQ to increment the machine sequence number
Business Justification: Ensures correct system behavior and process compliance when message writing system needs to be initialized.
Trigger Criteria:
Context: The message writing system needs to be initialized
Applied to: Message Writing Initialization - Calls the WRITMSG program to initialize message writing functionality
Action: The program execution begins
Logic Flow:
IF The message writing system needs to be initialized
AND The program execution begins
THEN:
• The WRITMSG program is called to initialize message writing functionality
Rule Belongs to : WRITMSGL.cbl
Business Justification: Dictates the expected operational logic and validation steps when message writing system is initialized and six parameters p1, p2, p3, p4, p5, p6 are available.
Trigger Criteria:
Context: 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
Action: Extended message writing is required
Logic Flow:
IF The message writing system is initialized and six parameters P1, P2, P3, P4, P5, P6 are available
AND Extended message writing is required
THEN:
• The WRITMSGX program is called with parameters P1, P2, P3, P4, P5, P6
Rule Belongs to : WRITMSGL.cbl
Business Justification: Governs the functional prerequisites and system routing when both basic and extended message writing operations are required.
Trigger Criteria:
Context: Both basic and extended message writing operations are required
Applied to: Message Writing Initialization - Calls the WRITMSG program to initialize message writing functionality
Action: Message processing is initiated
Logic Flow:
IF Both basic and extended message writing operations are required
AND Message processing is initiated
THEN:
• WRITMSG is called first, followed by WRITMSGX with parameters
Business Justification: Establishes the required business protocol to be followed when six input parameters p1, p2, p3, p4, p5, p6 are available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Six input parameters P1, P2, P3, P4, P5, P6 are available
Applied to: Call WRITMSGX Program with Parameters
Action: The system needs to write a formatted message
Logic Flow:
IF Six input parameters P1, P2, P3, P4, P5, P6 are available
AND The system needs to write a formatted message
THEN:
• The WRITMSGX program is called with all six parameters to produce the formatted message output