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 train export request is received with a specific request type.
Trigger Criteria:
Context: A train export request is received with a specific request type
Applied to: AEI Request Type Classification
Action: The request type equals the AEI request type constant
Logic Flow:
IF A train export request is received with a specific request type
AND The request type equals the AEI request type constant
THEN:
• Set AEI train send flag to YES, otherwise set AEI train send flag to NO
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when user attempts to process a train request with their acf2 user id.
Trigger Criteria:
Context: A user attempts to process a train request with their ACF2 user ID
Applied to: User Security Validation
Action: The user's SCAC access is invalid AND the request is not an AEI train send request
Logic Flow:
IF A user attempts to process a train request with their ACF2 user ID
AND The user's SCAC access is invalid AND the request is not an AEI train send request
THEN:
• Generate error message 14 (access denied) and set user access flag to NO
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when user requests to send a train manifest.
Trigger Criteria:
Context: A user requests to send a train manifest
Applied to: User Security Validation
Action: The user's UTF authorization is not 'U' or 'S' AND the request is not an AEI train send request
Logic Flow:
IF A user requests to send a train manifest
AND The user's UTF authorization is not 'U' or 'S' AND the request is not an AEI train send request
THEN:
• Generate error message 13 (insufficient authorization) and set user access flag to NO
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when user requests to send a train manifest that requires special manifest processing.
Trigger Criteria:
Context: A user requests to send a train manifest that requires special manifest processing
Applied to: User Security Validation
Action: The user's special manifest authorization is not 'S' AND the request is not an AEI train send request
Logic Flow:
IF A user requests to send a train manifest that requires special manifest processing
AND The user's special manifest authorization is not 'S' AND the request is not an AEI train send request
THEN:
• Set user not authorized for special manifest flag to TRUE
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train request is being processed.
Business Justification: Ensures correct system behavior and process compliance when train origin is provided.
Trigger Criteria:
Context: A train origin is provided
Applied to: Train Origin Validation
Action: The origin is not found in station code table OR the US station code is blank
Logic Flow:
IF A train origin is provided
AND The origin is not found in station code table OR the US station code is blank
THEN:
• Generate error message 2 (invalid train origin)
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train request includes an eta date.
Trigger Criteria:
Context: A train request includes an ETA date
Applied to: Estimated Time of Arrival Validation
Action: The ETA date equals '000000'
Logic Flow:
IF A train request includes an ETA date
AND The ETA date equals '000000'
THEN:
• Generate error message 3 (invalid ETA date) and exit validation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when eta date and time are provided.
Trigger Criteria:
Context: An ETA date and time are provided
Applied to: Estimated Time of Arrival Validation
Action: The date conversion fails OR ETA time is not numeric OR hour is not 00-23 OR minute is not 00-59
Logic Flow:
IF An ETA date and time are provided
AND The date conversion fails OR ETA time is not numeric OR hour is not 00-23 OR minute is not 00-59
THEN:
• Generate error message 3 (invalid ETA format)
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when valid eta date is provided and user authorization level is determined.
Trigger Criteria:
Context: A valid ETA date is provided and user authorization level is determined
Applied to: Estimated Time of Arrival Validation
Action: For 'S' authorization: ETA is not within 30 days before to 5 days after current date, OR For other users: ETA is not within 2 days before to 2 days after current date
Logic Flow:
IF A valid ETA date is provided and user authorization level is determined
AND For 'S' authorization: ETA is not within 30 days before to 5 days after current date, OR For other users: ETA is not within 2 days before to 2 days after current date
THEN:
• Generate error message 4 (for 'S' users) or message 21 (for other users)
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train details including scac, train id, origin, consist number, and creation date.
Trigger Criteria:
Context: Train details including SCAC, train ID, origin, consist number, and creation date
Applied to: US Customs Train ID Generation
Action: A train record with the same US customs train ID already exists AND is not marked as deleted
Logic Flow:
IF Train details including SCAC, train ID, origin, consist number, and creation date
AND A train record with the same US customs train ID already exists AND is not marked as deleted
THEN:
• Generate error message 6 (duplicate train ID)
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train record with the same us customs train id exists.
Trigger Criteria:
Context: A train record with the same US customs train ID exists
Applied to: US Customs Train ID Generation
Action: The existing train record is marked as deleted
Logic Flow:
IF A train record with the same US customs train ID exists
AND The existing train record is marked as deleted
THEN:
• Delete the existing train record to allow creation of new record
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train origin station is validated.
Trigger Criteria:
Context: Train origin station is validated
Applied to: MERLIN Customs ID Validation
Action: The station's public MERLIN ID is blank OR the MERLIN ID is not found in MERLIN database
Logic Flow:
IF Train origin station is validated
AND The station's public MERLIN ID is blank OR the MERLIN ID is not found in MERLIN database
THEN:
• Generate error message 7 (missing MERLIN ID) or message 8 (MERLIN ID not found)
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train request contains an equipment list.
Trigger Criteria:
Context: A train request contains an equipment list
Applied to: Equipment Limit Validation
Action: The first equipment item is marked as 'no more equipment' OR the 500th equipment item is not marked as 'no more equipment'
Logic Flow:
IF A train request contains an equipment list
AND The first equipment item is marked as 'no more equipment' OR the 500th equipment item is not marked as 'no more equipment'
THEN:
• Generate error message 5 (invalid equipment list size)
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment is identified as a container.
Trigger Criteria:
Context: Equipment is identified as a container
Applied to: Container Waybill Retrieval
Action: Container is found in container inquiry system
Logic Flow:
IF Equipment is identified as a container
AND Container is found in container inquiry system
THEN:
• Retrieve waybill information using container inquiry data, otherwise use container database lookup
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment is identified as a car with init and number.
Trigger Criteria:
Context: Equipment is identified as a car with init and number
Applied to: Car Waybill Retrieval
Action: Car waybill lookup is performed
Logic Flow:
IF Equipment is identified as a car with init and number
AND Car waybill lookup is performed
THEN:
• Retrieve latest waybill excluding temporary, corrector, and incomplete EDI waybills, andif car is loaded empty, treat as waybill not found
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill is found for equipment.
Trigger Criteria:
Context: A waybill is found for equipment
Applied to: Cargo Record Retrieval
Action: Cargo lookup is performed using waybill number and equipment ID
Logic Flow:
IF A waybill is found for equipment
AND Cargo lookup is performed using waybill number and equipment ID
THEN:
• Retrieve first cargo record and set cargo found flag, otherwise set no cargo found flag
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo is found for equipment and request action is send with no errors.
Trigger Criteria:
Context: Cargo is found for equipment and request action is SEND with no errors
Applied to: Cargo Attachment to Train
Action: Cargo is immediate transport OR already created for IT OR US-Canada-US with release status OR default with release status OR empty equipment OR special manifest at Woburn PQ station OR export at non-Laredo stations
Logic Flow:
IF Cargo is found for equipment and request action is SEND with no errors
AND Cargo is immediate transport OR already created for IT OR US-Canada-US with release status OR default with release status OR empty equipment OR special manifest at Woburn PQ station OR export at non-Laredo stations
THEN:
• Skip cargo attachment to train
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment information is available.
Trigger Criteria:
Context: Equipment information is available
Applied to: Equipment Detail Line Building
Action: Building equipment detail line
Logic Flow:
IF Equipment information is available
AND Building equipment detail line
THEN:
• Include equipment ID, load/empty indicator, equipment type, and format according to container or car type
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment id is provided.
Trigger Criteria:
Context: Equipment ID is provided
Applied to: Equipment Type Validation
Action: Equipment type lookup fails
Logic Flow:
IF Equipment ID is provided
AND Equipment type lookup fails
THEN:
• Generate error message 35 (for containers) or message 36 (for cars) and set equipment error flag
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment type is 'sk' and waybill is found.
Trigger Criteria:
Context: Equipment type is 'SK' and waybill is found
Applied to: Equipment Type Validation
Action: Double stack traffic type is determined
Logic Flow:
IF Equipment type is 'SK' and waybill is found
AND Double stack traffic type is determined
THEN:
• Add double stack count to appropriate traffic counter (CPRS, CSXT, NS, or HAUL)
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo is found for equipment.
Trigger Criteria:
Context: Cargo is found for equipment
Applied to: Cargo Information Processing
Action: Processing cargo information
Logic Flow:
IF Cargo is found for equipment
AND Processing cargo information
THEN:
• Extract US CCN key, load/empty code, bond numbers, and set appropriate bond found flags based on cargo type
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo with bond type information is processed.
Trigger Criteria:
Context: Cargo with bond type information is processed
Applied to: Bond Type Classification
Action: Bond type is US-Canada-US and not created for IT and not special TR
Logic Flow:
IF Cargo with bond type information is processed
AND Bond type is US-Canada-US and not created for IT and not special TR
THEN:
• Set TR bond found flag, and when bond type is transport export and not created for IT, set TE bond found flag
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is being processed.
Trigger Criteria:
Context: Cargo is being processed
Applied to: Special Manifest Processing
Action: Cargo has special manifest origin flag
Logic Flow:
IF Cargo is being processed
AND Cargo has special manifest origin flag
THEN:
• Set special manifest IT found flag, and when cargo is transport export with special manifest flag, set special manifest TE found flag
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is export type with us-mexico country codes.
Trigger Criteria:
Context: Cargo is export type with US-Mexico country codes
Applied to: Special Manifest Processing
Action: Cargo has special 88 flag
Logic Flow:
IF Cargo is export type with US-Mexico country codes
AND Cargo has special 88 flag
THEN:
• Set US-Mexico 88 found flag, and when cargo is US-Canada-US with special TR flag, set special TR found flag
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is found and being validated.
Trigger Criteria:
Context: Cargo is found and being validated
Applied to: Cargo Status Validation
Action: Cargo status is pending, deleted, or error
Logic Flow:
IF Cargo is found and being validated
AND Cargo status is pending, deleted, or error
THEN:
• Generate error message 16 (cargo status invalid)
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo with specific bill type is processed.
Trigger Criteria:
Context: Cargo with specific bill type is processed
Applied to: Bill Type Validation
Action: Bill type is '15'
Logic Flow:
IF Cargo with specific bill type is processed
AND Bill type is '15'
THEN:
• Format as 'PPR 7512 15 US-CA-US', when bond type is IT or IE, format as 'AMS [bond_type] [bond_number]', when bond type is TE, TR, or MT, format as 'AMS 7512 [bond_type] [bond_number]'
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment with cargo is being processed.
Trigger Criteria:
Context: Equipment with cargo is being processed
Applied to: Equipment Load Status Validation
Action: Cargo is empty equipment or empty residue type
Logic Flow:
IF Equipment with cargo is being processed
AND Cargo is empty equipment or empty residue type
THEN:
• Set equipment as empty, update counters from loaded to empty, and format info as 'EMPTY'
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is processed at laredo tx station.
Trigger Criteria:
Context: Cargo is processed at Laredo TX station
Applied to: Mexico Customs Documentation Check
Action: FEN reference number is not found
Logic Flow:
IF Cargo is processed at Laredo TX station
AND FEN reference number is not found
THEN:
• Generate error message 46, when KCM reference number is not found, generate error message 47, when cargo has hold border status, generate message 48, when cargo has DSP hold flag, generate message 49, when both hold border and DSP hold exist, generate message 52
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo and waybill conditions are evaluated.
Trigger Criteria:
Context: Cargo and waybill conditions are evaluated
Applied to: Detour Processing Coordination
Action: Specific detour conditions are met for TE bond, TR bond, border clearance, US-US movement, or US-Mexico export
Logic Flow:
IF Cargo and waybill conditions are evaluated
AND Specific detour conditions are met for TE bond, TR bond, border clearance, US-US movement, or US-Mexico export
Business Justification: Governs the functional prerequisites and system routing when transport export cargo not created for it with location mismatch.
Trigger Criteria:
Context: Transport export cargo not created for IT with location mismatch
Applied to: TE Bond Port Change Processing
Action: Request action is REPORT
Logic Flow:
IF Transport export cargo not created for IT with location mismatch
AND Request action is REPORT
THEN:
• Generate message 19 with station code, when request action is SEND and user is authorized for special manifest, generate message 20 and spawn port change manifest, when user is not authorized, generate message 43
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when transit cargo not created for it with release status.
Trigger Criteria:
Context: Transit cargo not created for IT with release status
Applied to: TR Bond Diversion Processing
Action: Request action is REPORT
Logic Flow:
IF Transit cargo not created for IT with release status
AND Request action is REPORT
THEN:
• Generate message 18, when request action is SEND and user is authorized for special manifest, generate message 23 and spawn detour manifest, when user is not authorized, generate message 43
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when default cargo type not created for it.
Trigger Criteria:
Context: Default cargo type not created for IT
Applied to: Border Clearance Detour Processing
Action: Cargo has release status and request action is REPORT
Logic Flow:
IF Default cargo type not created for IT
AND Cargo has release status and request action is REPORT
THEN:
• Generate message 18, when request action is SEND and user is authorized for special manifest, generate message 23 and spawn detour manifest, when user is not authorized, generate message 43, when cargo does not have release status, generate message 31
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill found with no cargo for us domestic movement.
Trigger Criteria:
Context: Waybill found with no cargo for US domestic movement
Applied to:US-US Movement Detour Processing
Action: Request action is REPORT
Logic Flow:
IF Waybill found with no cargo for US domestic movement
AND Request action is REPORT
THEN:
• Generate message 18, when request action is SEND and user is authorized for special manifest, generate message 23 and spawn US-US detour manifest, when user is not authorized, generate message 43
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when export cargo with us-mexico country codes without special manifest.
Trigger Criteria:
Context: Export cargo with US-Mexico country codes without special manifest
Applied to: US-Mexico Export Detour Processing
Action: Request action is REPORT
Logic Flow:
IF Export cargo with US-Mexico country codes without special manifest
AND Request action is REPORT
THEN:
• Generate message 50, when request action is SEND and user is authorized for special manifest, generate message 23 and spawn 88-TR detour manifest, when user is not authorized, generate message 43, when cargo is not export type, generate message 31
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill contains routing information.
Trigger Criteria:
Context: Waybill contains routing information
Applied to: Geographic Route Validation
Action: Route contains hazmat code 'HM'
Logic Flow:
IF Waybill contains routing information
AND Route contains hazmat code 'HM'
THEN:
• Set routing indicator to 2, when route has CSXT or NS to CPRS via DET, set indicator to 3 (CSXT) or 4 (NS), otherwise set indicator to 1
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment is identified as container or waybill indicates conveying car with loaded status.
Trigger Criteria:
Context: Equipment is identified as container or waybill indicates conveying car with loaded status
Applied to: Container on Flat Car Processing
Action: Container is not found in primary database
Logic Flow:
IF Equipment is identified as container or waybill indicates conveying car with loaded status
AND Container is not found in primary database
THEN:
• Search container database, if still not found, search inquiry system for container cross-reference, generate error message 11 if no container found
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train processing is complete.
Trigger Criteria:
Context: Train processing is complete
Applied to: Report Header and Summary Building
Action: Building final report
Logic Flow:
IF Train processing is complete
AND Building final report
THEN:
• Include train ID, origin station, user ID, processing date/time, action type (SEND/REPORT), result status, error/warning counts, equipment totals, and ETA information
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train processing completed successfully with send action.
Trigger Criteria:
Context: Train processing completed successfully with SEND action
Applied to: Train Database Record Creation
Action: Creating train database record
Logic Flow:
IF Train processing completed successfully with SEND action
AND Creating train database record
THEN:
• Store train header with ID, origin, destination, ETA, AEI flag, and up to maximum equipment items with their cargo details, generate error if equipment limit exceeded
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train record is successfully created in database. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Train record is successfully created in database
Applied to: EDI Train List Transmission
Action: Transmitting to customs system
Logic Flow:
IF Train record is successfully created in database
AND Transmitting to customs system
THEN:
• Call EDI transmission module with train list data, generate error if transmission fails
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when aei train processing is completed.
Trigger Criteria:
Context: AEI train processing is completed
Applied to: AEI Activity Logging
Action: Logging AEI activity
Logic Flow:
IF AEI train processing is completed
AND Logging AEI activity
THEN:
• Create log entry with train ID, user ID, date/time, action code 'ZZZ', and AEI send message
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train processing is completed successfully.
Trigger Criteria:
Context: Train processing is completed successfully
Applied to: Report Transmission to Customs
Action: Sending report to customs
Logic Flow:
IF Train processing is completed successfully
AND Sending report to customs
THEN:
• Send email to OM01247 with train details, equipment list, and status information, handle large reports with continuation logic
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report exceeds 699 lines.
Trigger Criteria:
Context: Report exceeds 699 lines
Applied to: Large Report Email Pagination
Action: Sending large report
Logic Flow:
IF Report exceeds 699 lines
AND Sending large report
THEN:
• Send first portion, create continuation message with headers, and send remaining portions with continuation indicators
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train processing is completed.
Trigger Criteria:
Context: Train processing is completed
Applied to: Report Distribution to Originator
Action: Distributing results to originator
Logic Flow:
IF Train processing is completed
AND Distributing results to originator
THEN:
• Send appropriate report type (error, sent, or report) to originator terminal or alternate terminal if specified
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when request is aei train send type.
Trigger Criteria:
Context: Request is AEI train send type
Applied to: AEI Report Processing
Action: Processing AEI report
Logic Flow:
IF Request is AEI train send type
AND Processing AEI report
THEN:
• Retrieve email addresses from AEI work table for train origin, send report to configured addresses, use default addresses if none configured, handle email failures by sending to support
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train processing completed successfully for non-laredo stations.
Trigger Criteria:
Context: Train processing completed successfully for non-Laredo stations
Applied to: Canadian Export Report Generation
Action: Generating export report
Logic Flow:
IF Train processing completed successfully for non-Laredo stations
AND Generating export report
THEN:
• Spawn GCX141 message for export report generation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train processing completed successfully at laredo tx station.
Trigger Criteria:
Context: Train processing completed successfully at Laredo TX station
Applied to: Enhanced Report Generation
Action: Generating enhanced report
Logic Flow:
IF Train processing completed successfully at Laredo TX station
AND Generating enhanced report
THEN:
• Create detailed report with car/container counts, locomotive counts, port information, ETA details, and equipment details with BOL information
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when report data is prepared. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Report data is prepared
Applied to: PDF Report Generation
Action: Generating PDF reports
Logic Flow:
IF Report data is prepared
AND Generating PDF reports
THEN:
• Call GCX904 module to create PDF reports for both pre-exit report (80 character width) and export train report (132 character width)
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when error or warning message is generated.
Trigger Criteria:
Context: Error or warning message is generated
Applied to: Error Message Processing
Action: Processing message
Logic Flow:
IF Error or warning message is generated
AND Processing message
THEN:
• Increment appropriate counter (error, warning, info), track special message types (DSP holds), and handle spawn message indicators
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when report contains equipment entries.
Trigger Criteria:
Context: Report contains equipment entries
Applied to: Duplicate Equipment Removal
Action: Scanning for duplicates
Logic Flow:
IF Report contains equipment entries
AND Scanning for duplicates
THEN:
• Remove duplicate car IDs while preserving first occurrence, skip error/warning/info message lines
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo is successfully added to train.
Trigger Criteria:
Context: Cargo is successfully added to train
Applied to: Activity Audit Logging
Action: Logging cargo activity
Logic Flow:
IF Cargo is successfully added to train
AND Logging cargo activity
THEN:
• Create audit log entry with cargo CCN, user ID, date/time, action code 'ZZZ', and cargo added message
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when processing errors occur that require rollback.
Trigger Criteria:
Context: Processing errors occur that require rollback
Applied to: Database Rollback Processing
Action: Performing rollback
Logic Flow:
IF Processing errors occur that require rollback
AND Performing rollback
THEN:
• Execute database rollback operation to undo all changes made during current transaction
Business Justification: Ensures correct system behavior and process compliance when system is ready to process train export requests. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is ready to process train export requests
Applied to: Read First Input Message
Action: The system starts processing
Logic Flow:
IF The system is ready to process train export requests
AND The system starts processing
THEN:
• The first input message is read and message availability status is set
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when system has attempted to read an input message. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system has attempted to read an input message
Applied to: More Input Messages Available?
Action: The system checks the message availability status
Logic Flow:
IF The system has attempted to read an input message
AND The system checks the message availability status
THEN:
• Processing continues if messages are available, otherwise the processing loop terminates
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train export request message has been received.
Trigger Criteria:
Context: A train export request message has been received
Applied to: Classify Request Type - AEI or Regular
Action: The system examines the request type field
Logic Flow:
IF A train export request message has been received
AND The system examines the request type field
THEN:
• The request is classified as either AEI type or regular type based on the request type value
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when request type has been classified as aei or regular.
Trigger Criteria:
Context: The request type has been classified as AEI or regular
Applied to: Set AEI Processing Flag
Action: The system sets processing flags
Logic Flow:
IF The request type has been classified as AEI or regular
AND The system sets processing flags
THEN:
• AEI train send flag is set to YES if request type equals AEI request type, otherwise set to NO
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train export request has been received and classified.
Trigger Criteria:
Context: A train export request has been received and classified
Applied to: Prepare Request for Processing
Action: The system prepares the request for processing
Logic Flow:
IF A train export request has been received and classified
AND The system prepares the request for processing
THEN:
• All request validations are performed including train security, origin validation, ETA validation, US customer train ID validation, equipment list validation, and customs ID retrieval
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when request preparation including security validation has been completed.
Trigger Criteria:
Context: Request preparation including security validation has been completed
Applied to: User Has Access to Process Request?
Action: The system checks the user access status
Logic Flow:
IF Request preparation including security validation has been completed
AND The system checks the user access status
THEN:
• Processing continues to equipment processing if user has access, otherwise skips to request termination
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when user has access to process the request and equipment list exists.
Trigger Criteria:
Context: User has access to process the request and equipment list exists
Applied to: Process Equipment List for Train
Action: The system processes the equipment list
Logic Flow:
IF User has access to process the request and equipment list exists
AND The system processes the equipment list
THEN:
• Each equipment item is processed through equipment validation, waybill retrieval, cargo processing, and report building until all equipment is processed or maximum limit of 499 items is reached
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment processing has been completed or user access was denied.
Trigger Criteria:
Context: Equipment processing has been completed or user access was denied
Applied to: Terminate Current Request Processing
Action: The system terminates the current request
Logic Flow:
IF Equipment processing has been completed or user access was denied
AND The system terminates the current request
THEN:
• Final report is generated, appropriate actions are taken based on request type (SEND, REPORT, or ERROR), and all necessary notifications are sent to originators and customs systems
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when current request processing has been terminated. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Current request processing has been terminated
Applied to: Read Next Input Message
Action: The system attempts to read the next message
Logic Flow:
IF Current request processing has been terminated
AND The system attempts to read the next message
THEN:
• The next input message is read and message availability status is updated for the next loop iteration
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when no more input messages are available for processing.
Trigger Criteria:
Context: No more input messages are available for processing
Applied to: End Request Processing Loop
Action: The system exits the processing loop
Logic Flow:
IF No more input messages are available for processing
AND The system exits the processing loop
THEN:
• The main processing routine is completed and control returns to the calling program
R-GCX003-cbl-00062 (+3)File: GCX003.cblBusiness Rule: User Security Validation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when user with acf2 id attempts to access train processing functionality.
Trigger Criteria:
Context: A user with ACF2 ID attempts to access train processing functionality
Applied to: Check SCAC Access Permission
Action: The system checks SCAC access permission and the request is an AEI train request
Logic Flow:
IF A user with ACF2 ID attempts to access train processing functionality
AND The system checks SCAC access permission and the request is an AEI train request
THEN:
• Access is granted even if SCAC access is invalid, but for non-AEI requests with invalid SCAC access, user access is denied and error message 14 is generated
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when valid acf2 user id is available.
Trigger Criteria:
Context: A valid ACF2 user ID is available
Applied to: Retrieve User Profile from Security Table
Action: The system queries the user security table
Logic Flow:
IF A valid ACF2 user ID is available
AND The system queries the user security table
THEN:
• If user profile is found, the profile data is loaded for further validation, otherwise processing continues with default permissions
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when user profile exists and the request action is send.
Trigger Criteria:
Context: A user profile exists and the request action is SEND
Applied to: Validate User Train Send Authority
Action: The system checks the user's train send authority flag
Logic Flow:
IF A user profile exists and the request action is SEND
AND The system checks the user's train send authority flag
THEN:
• If user has 'U' or 'S' authorization or the request is an AEI train send, access is granted, otherwise error message 13 is generated and access is denied
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when user has valid send authority and the request is not an aei train send.
Trigger Criteria:
Context: A user has valid send authority and the request is not an AEI train send
Applied to: Check Special Manifest Authorization
Action: The system checks the user's special manifest authorization flag
Logic Flow:
IF A user has valid send authority and the request is not an AEI train send
AND The system checks the user's special manifest authorization flag
THEN:
• If user does not have 'S' authorization for special manifests, the special manifest flag is set to indicate restricted access
Business Justification: Establishes the required business protocol to be followed when train manifest request is being processed.
Trigger Criteria:
Context: A train manifest request is being processed
Applied to: Is Train Origin Empty?
Action: The train origin field is empty or contains only spaces
Logic Flow:
IF A train manifest request is being processed
AND The train origin field is empty or contains only spaces
THEN:
• The system should set error message 2 indicating origin is required and mark validation as failed
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train origin value has been provided.
Trigger Criteria:
Context: A train origin value has been provided
Applied to: Look Up Station in Reference Table
Action: The system needs to validate the origin station
Logic Flow:
IF A train origin value has been provided
AND The system needs to validate the origin station
THEN:
• The system should query the GCSTBRT station code reference table using the train origin as the search key
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train origin has been looked up in the station code reference table.
Trigger Criteria:
Context: A train origin has been looked up in the station code reference table
Applied to: Station Found in Table?
Action: The station lookup operation completes
Logic Flow:
IF A train origin has been looked up in the station code reference table
AND The station lookup operation completes
THEN:
• If the station is not found in the reference table, the system should set error message 2 for invalid origin station
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when valid station record has been found in the reference table.
Trigger Criteria:
Context: A valid station record has been found in the reference table
Applied to: Extract US Station Code
Action: The system processes the station data
Logic Flow:
IF A valid station record has been found in the reference table
AND The system processes the station data
THEN:
• The system should extract the US station code from the station record and store it for crossing port determination
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when us station code has been extracted from the station reference data.
Trigger Criteria:
Context: A US station code has been extracted from the station reference data
Applied to: US Station Code Valid?
Action: The system validates the US station code
Logic Flow:
IF A US station code has been extracted from the station reference data
AND The system validates the US station code
THEN:
• If the US station code is empty or contains only spaces, the system should set error message 2 for invalid origin station
R-GCX003-cbl-00071 (+5)File: GCX003.cblBusiness Rule: Estimated Time of Arrival Validation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train export request is being processed.
Trigger Criteria:
Context: A train export request is being processed
Applied to: ETA Date = '000000'?
Action: The ETA date field equals '000000'
Logic Flow:
IF A train export request is being processed
AND The ETA date field equals '000000'
THEN:
• Set error message indicating ETA date is required and exit validation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when eta date with 2-digit year is being processed.
Trigger Criteria:
Context: An ETA date with 2-digit year is being processed
Applied to: Year > 80?
Action: The year portion is greater than 80
Logic Flow:
IF An ETA date with 2-digit year is being processed
AND The year portion is greater than 80
THEN:
• Set the century to '19' for years 81-99, otherwise set century to '20' for years 00-80
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when valid eta date and time in local border crossing time zone.
Trigger Criteria:
Context: A valid ETA date and time in local border crossing time zone
Applied to: Convert Local Time to Eastern Time
Action: Time zone conversion is requested
Logic Flow:
IF A valid ETA date and time in local border crossing time zone
AND Time zone conversion is requested
THEN:
• Convert the local date and time to Eastern Standard Time using the border crossing station's time zone
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when eta date and time are provided.
Trigger Criteria:
Context: An ETA date and time are provided
Applied to: Date/Time Format Valid?
Action: Date conversion service validates the format OR time is not numeric OR hour is not between 00-23 OR minute is not between 00-59
Logic Flow:
IF An ETA date and time are provided
AND Date conversion service validates the format OR time is not numeric OR hour is not between 00-23 OR minute is not between 00-59
THEN:
• Set error message indicating invalid ETA format
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when user is processing an eta validation.
Trigger Criteria:
Context: A user is processing an ETA validation
Applied to: User Type = Supervisor?
Action: The user has supervisor authorization level ('S')
Logic Flow:
IF A user is processing an ETA validation
AND The user has supervisor authorization level ('S')
THEN:
• Set acceptable date range to 30 days before current date to 5 days after current date, otherwise set range to 2 days before current date to 2 days after current date
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when eta date and calculated acceptable date range.
Trigger Criteria:
Context: An ETA date and calculated acceptable date range
Applied to: ETA Within Acceptable Range?
Action: The ETA date is less than the low date OR greater than the high date of the acceptable range
Logic Flow:
IF An ETA date and calculated acceptable date range
AND The ETA date is less than the low date OR greater than the high date of the acceptable range
THEN:
• Set appropriate error message based on user type - message 4 for supervisor users or message 21 for regular users
R-GCX003-cbl-00077 (+16)File: GCX003.cblBusiness Rule: US Customs Train ID Generation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train manifest processing request is being prepared.
Trigger Criteria:
Context: A train manifest processing request is being prepared
Applied to: Extract SCAC Code from Constants
Action: The system needs to generate a unique US Customs train identifier
Logic Flow:
IF A train manifest processing request is being prepared
AND The system needs to generate a unique US Customs train identifier
THEN:
• The system extracts the Canadian Pacific SCAC code from constants and assigns it to the train SCAC field
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train manifest request contains train identification information.
Trigger Criteria:
Context: A train manifest request contains train identification information
Applied to: Get Train ID from Request
Action: The system processes the request for US Customs train ID generation
Logic Flow:
IF A train manifest request contains train identification information
AND The system processes the request for US Customs train ID generation
THEN:
• The system extracts the train ID from the request and assigns it to the train identifier field
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train manifest request specifies an origin location.
Trigger Criteria:
Context: A train manifest request specifies an origin location
Applied to: Get Train Origin from Request
Action: The system builds the US Customs train identifier
Logic Flow:
IF A train manifest request specifies an origin location
AND The system builds the US Customs train identifier
THEN:
• The system extracts the train origin from the request and assigns it to the train origin field
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train manifest request includes a consist number.
Trigger Criteria:
Context: A train manifest request includes a consist number
Applied to: Get Consist Number from Request
Action: The system generates the US Customs train identifier
Logic Flow:
IF A train manifest request includes a consist number
AND The system generates the US Customs train identifier
THEN:
• The system extracts the consist number from the request and assigns it to the train consist number field
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when system is processing a train manifest request.
Trigger Criteria:
Context: The system is processing a train manifest request
Applied to: Get Current Machine Date
Action: A unique train identifier needs to be generated
Logic Flow:
IF The system is processing a train manifest request
AND A unique train identifier needs to be generated
THEN:
• The system captures the current machine date and century from the system
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when system has captured the current machine date and century.
Trigger Criteria:
Context: The system has captured the current machine date and century
Applied to: Convert Date to Julian Format
Action: The date needs to be formatted for train identifier generation
Logic Flow:
IF The system has captured the current machine date and century
AND The date needs to be formatted for train identifier generation
THEN:
• The system converts the date to Julian format using date conversion services and stores it as a 5-digit Julian date
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train manifest is being processed for export purposes.
Trigger Criteria:
Context: A train manifest is being processed for export purposes
Applied to: Build Train Export Indicator 'T'
Action: The system builds the US Customs train identifier
Logic Flow:
IF A train manifest is being processed for export purposes
AND The system builds the US Customs train identifier
THEN:
• The system sets the export indicator to 'T' to designate this as an export train
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when all train identifier components have been extracted and formatted (scac code, train id, origin, consist number, julian date, export indicator).
Trigger Criteria:
Context: All train identifier components have been extracted and formatted (SCAC code, train ID, origin, consist number, Julian date, export indicator)
Applied to: Concatenate All Components into US Customs Train ID
Action: The system needs to create the final US Customs train identifier
Logic Flow:
IF All train identifier components have been extracted and formatted (SCAC code, train ID, origin, consist number, Julian date, export indicator)
AND The system needs to create the final US Customs train identifier
THEN:
• The system concatenates all components into a single unique identifier and stores it as the US Customer Train ID
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when complete us customs train identifier has been generated.
Trigger Criteria:
Context: A complete US Customs train identifier has been generated
Applied to: Store Generated ID in Train Header
Action: The system needs to preserve the identifier for processing
Logic Flow:
IF A complete US Customs train identifier has been generated
AND The system needs to preserve the identifier for processing
THEN:
• The system stores the generated train ID in the train header record
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when us customs train identifier has been generated.
Trigger Criteria:
Context: A US Customs train identifier has been generated
Applied to: Check if Train ID Already Exists in Database
Action: The system needs to ensure uniqueness of the train record
Logic Flow:
IF A US Customs train identifier has been generated
AND The system needs to ensure uniqueness of the train record
THEN:
• The system queries the train database to check if a record with the same train identifier already exists
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train record with the same identifier exists in the database. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A train record with the same identifier exists in the database
Applied to: Read Existing Train Record
Action: The system needs to determine the status of the existing record
Logic Flow:
IF A train record with the same identifier exists in the database
AND The system needs to determine the status of the existing record
THEN:
• The system reads the existing train record to examine its current status and deletion flag
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when existing train record has been found with the same identifier.
Trigger Criteria:
Context: An existing train record has been found with the same identifier
Applied to: Is Existing Record Marked for Deletion?
Action: The system needs to determine if the new record can proceed
Logic Flow:
IF An existing train record has been found with the same identifier
AND The system needs to determine if the new record can proceed
THEN:
• The system checks if the existing record has a deletion confirmation flag set to determine next action
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when existing train record is found and is marked for deletion.
Trigger Criteria:
Context: An existing train record is found and is marked for deletion
Applied to: Delete Existing Train Record
Action: The system needs to create a new record with the same identifier
Logic Flow:
IF An existing train record is found and is marked for deletion
AND The system needs to create a new record with the same identifier
THEN:
• The system deletes the existing train record from the database
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when existing active train record is found with the same identifier.
Trigger Criteria:
Context: An existing active train record is found with the same identifier
Applied to: Generate Error - Duplicate Train ID
Action: The system attempts to create a new train record
Logic Flow:
IF An existing active train record is found with the same identifier
AND The system attempts to create a new train record
THEN:
• The system generates error message 6 indicating a duplicate train identifier and prevents record creation
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when no active train record exists with the same identifier or existing record has been deleted.
Trigger Criteria:
Context: No active train record exists with the same identifier or existing record has been deleted
Applied to: Initialize New Train Header Record
Action: The system needs to create a new train record
Logic Flow:
IF No active train record exists with the same identifier or existing record has been deleted
AND The system needs to create a new train record
THEN:
• The system initializes a new train header record structure with default values
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when new train header record has been initialized and a us customs train id has been generated.
Trigger Criteria:
Context: A new train header record has been initialized and a US Customs train ID has been generated
Applied to: Set Generated Train ID in Multiple Fields
Action: The system needs to populate the train record with identifier information
Logic Flow:
IF A new train header record has been initialized and a US Customs train ID has been generated
AND The system needs to populate the train record with identifier information
THEN:
• The system assigns the generated train ID to both the train header US Customer Train ID field and the added train field
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when new train record has been created with the generated us customs train identifier.
Trigger Criteria:
Context: A new train record has been created with the generated US Customs train identifier
Applied to: Mark Train ID as Added to System
Action: The system completes the train ID generation process
Logic Flow:
IF A new train record has been created with the generated US Customs train identifier
AND The system completes the train ID generation process
THEN:
• The system marks the train identifier as added to the system in the tracking records
R-GCX003-cbl-00094 (+5)File: GCX003.cblBusiness Rule: MERLIN Customs ID Validation
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when request requires merlin customs id validation.
Trigger Criteria:
Context: A request requires MERLIN customs ID validation
Applied to: Retrieve Administration Table for MERLIN Configuration
Action: The system attempts to retrieve administration table with AD key configuration
Logic Flow:
IF A request requires MERLIN customs ID validation
AND The system attempts to retrieve administration table with AD key configuration
THEN:
• The administration table segment is retrieved for MERLIN ID extraction
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when administration table retrieval has been attempted.
Trigger Criteria:
Context: Administration table retrieval has been attempted
Applied to: Administration Table Found?
Action: The system checks if the administration table was successfully retrieved
Logic Flow:
IF Administration table retrieval has been attempted
AND The system checks if the administration table was successfully retrieved
THEN:
• If table not found, generate error message 7 indicating MERLIN configuration unavailable, otherwise proceed to extract MERLIN ID
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when administration table has been successfully retrieved.
Trigger Criteria:
Context: Administration table has been successfully retrieved
Applied to: Extract Public MERLIN ID from Configuration
Action: The system extracts the public MERLIN ID from the administration segment
Logic Flow:
IF Administration table has been successfully retrieved
AND The system extracts the public MERLIN ID from the administration segment
THEN:
• The public MERLIN ID value is obtained from the configuration for validation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when public merlin id has been extracted from administration table.
Trigger Criteria:
Context: Public MERLIN ID has been extracted from administration table
Applied to: MERLIN ID Present?
Action: The system checks if the MERLIN ID field contains spaces or is empty
Logic Flow:
IF Public MERLIN ID has been extracted from administration table
AND The system checks if the MERLIN ID field contains spaces or is empty
THEN:
• If MERLIN ID is spaces, generate error message 7 indicating missing MERLIN configuration, otherwise proceed to database validation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when valid merlin id has been extracted from administration configuration.
Trigger Criteria:
Context: A valid MERLIN ID has been extracted from administration configuration
Applied to: Validate MERLIN ID in MERLIN Database
Action: The system queries the MERLIN database using the extracted MERLIN ID
Logic Flow:
IF A valid MERLIN ID has been extracted from administration configuration
AND The system queries the MERLIN database using the extracted MERLIN ID
THEN:
• The MERLIN database is accessed to verify ID validity and availability
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when merlin database validation has been performed.
Trigger Criteria:
Context: MERLIN database validation has been performed
Applied to: MERLIN ID Valid in Database?
Action: The system evaluates the database query results for MERLIN ID existence
Logic Flow:
IF MERLIN database validation has been performed
AND The system evaluates the database query results for MERLIN ID existence
THEN:
• If MERLIN ID not found in database, generate error message 8 indicating invalid MERLIN ID, otherwise validation is successful
Business Justification: Defines the strict business conditions required to proceed when container processing request is being handled.
Trigger Criteria:
Context: A container processing request is being handled
Applied to: Container Found in Inquiry System?
Action: The system checks for container existence in inquiry system
Logic Flow:
IF A container processing request is being handled
AND The system checks for container existence in inquiry system
THEN:
• If container is found in inquiry system, proceed to retrieve from inquiry database, otherwise check primary system
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when container is confirmed to exist in inquiry system.
Trigger Criteria:
Context: Container is confirmed to exist in inquiry system
Applied to: Retrieve Container from Inquiry Database
Action: System attempts to retrieve container from inquiry database
Logic Flow:
IF Container is confirmed to exist in inquiry system
AND System attempts to retrieve container from inquiry database
THEN:
• Container information is fetched from FWIQROOT and FWIQBOTL databases using container cross-reference
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container was not found in inquiry system.
Trigger Criteria:
Context: Container was not found in inquiry system
Applied to: Container Found in Primary System?
Action: System checks primary waybill system for container
Logic Flow:
IF Container was not found in inquiry system
AND System checks primary waybill system for container
THEN:
• If container exists in primary system, proceed to retrieve container information, otherwise mark as not found
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container exists in either inquiry or primary system.
Trigger Criteria:
Context: Container exists in either inquiry or primary system
Applied to: Retrieve Container Information Using Container ID
Action: System retrieves container information using container ID
Logic Flow:
IF Container exists in either inquiry or primary system
AND System retrieves container information using container ID
THEN:
• Container details are fetched from SHIPROOT database and waybill information is populated
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when container information retrieval has been attempted.
Trigger Criteria:
Context: Container information retrieval has been attempted
Applied to: Waybill Data Retrieved Successfully?
Action: System validates the retrieval operation result
Logic Flow:
IF Container information retrieval has been attempted
AND System validates the retrieval operation result
THEN:
• If waybill data is successfully retrieved, proceed to extract container details, otherwise mark waybill as not found
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill data has been successfully retrieved.
Trigger Criteria:
Context: Waybill data has been successfully retrieved
Applied to: Extract Container Details from Waybill
Action: System extracts container details from waybill
Logic Flow:
IF Waybill data has been successfully retrieved
AND System extracts container details from waybill
THEN:
• Container ID, load/empty status, and other relevant details are extracted and populated
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when container details have been extracted from waybill.
Trigger Criteria:
Context: Container details have been extracted from waybill
Applied to: Validate Container Load/Empty Status
Action: System validates container load/empty status
Logic Flow:
IF Container details have been extracted from waybill
AND System validates container load/empty status
THEN:
• Container status is verified against waybill information for consistency
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container load/empty status has been validated.
Trigger Criteria:
Context: Container load/empty status has been validated
Applied to: Container is Loaded but Waybill Shows Empty?
Action: Container is expected to be loaded but waybill indicates empty status
Logic Flow:
IF Container load/empty status has been validated
AND Container is expected to be loaded but waybill indicates empty status
THEN:
• If mismatch exists, mark waybill as not found, otherwise proceed with successful retrieval
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when container load status mismatch has been detected.
Trigger Criteria:
Context: Container load status mismatch has been detected
Applied to: Mark Waybill as Not Found
Action: System processes the status mismatch
Logic Flow:
IF Container load status mismatch has been detected
AND System processes the status mismatch
THEN:
• Waybill is marked as not found and container processing continues with not found status
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when container information has been processed without status mismatch.
Trigger Criteria:
Context: Container information has been processed without status mismatch
Applied to: Container Waybill Retrieved Successfully
Action: System completes container waybill retrieval
Logic Flow:
IF Container information has been processed without status mismatch
AND System completes container waybill retrieval
THEN:
• Container waybill is marked as successfully retrieved and available for further processing
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when container waybill retrieval has failed from all available systems.
Trigger Criteria:
Context: Container waybill retrieval has failed from all available systems
Applied to: Container Waybill Not Found
Action: System processes the not found condition
Logic Flow:
IF Container waybill retrieval has failed from all available systems
AND System processes the not found condition
THEN:
• Container is marked as having no waybill found and appropriate error handling is initiated
R-GCX003-cbl-00120 (+10)File: GCX003.cblBusiness Rule: Car Waybill Retrieval
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when car waybill retrieval request is initiated. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A car waybill retrieval request is initiated
Applied to: First Call or Different Equipment ID?
Action: The system checks if this is the first FWCARGET call OR the current equipment ID is different from the previously held equipment ID
Logic Flow:
IF A car waybill retrieval request is initiated
AND The system checks if this is the first FWCARGET call OR the current equipment ID is different from the previously held equipment ID
THEN:
• If either condition is true, proceed with full waybill retrieval process, otherwise skip to exit
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill retrieval parameters need to be initialized.
Trigger Criteria:
Context: Waybill retrieval parameters need to be initialized
Applied to: Set Search Criteria - All Types Except 98-99
Action: Setting up the car search criteria
Logic Flow:
IF Waybill retrieval parameters need to be initialized
AND Setting up the car search criteria
THEN:
• Configure to search all car types except types 98 and 99, include all status types, exclude EDI incomplete records, include temporary waybills, exclude corrector waybills, return lead waybill, and use latest waybill date
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill has been successfully retrieved.
Trigger Criteria:
Context: A waybill has been successfully retrieved
Applied to: Has Haulage Right Carrier?
Action: The system checks if the haulage right carrier field contains data
Logic Flow:
IF A waybill has been successfully retrieved
AND The system checks if the haulage right carrier field contains data
THEN:
• If haulage right carrier is spaces, mark as done and proceed to result processing, otherwise continue with EDI completion check
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill has been successfully retrieved.
Trigger Criteria:
Context: A waybill has been successfully retrieved
Applied to: Empty Status but Loaded Request?
Action: The waybill shows empty status ('E') AND the equipment request indicates loaded status
Logic Flow:
IF A waybill has been successfully retrieved
AND The waybill shows empty status ('E') AND the equipment request indicates loaded status
THEN:
• Set waybill status to not found to trigger fallback processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill with haulage right carrier has been retrieved.
Trigger Criteria:
Context: A waybill with haulage right carrier has been retrieved
Applied to: EDI Complete Release?
Action: The system checks the EDI completion 418 release flag
Logic Flow:
IF A waybill with haulage right carrier has been retrieved
AND The system checks the EDI completion 418 release flag
THEN:
• If EDI completion 418 release equals 'Y', mark as done and proceed to result processing, otherwise check for duplicate waybill key
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill without edi completion release has been found.
Trigger Criteria:
Context: A waybill without EDI completion release has been found
Applied to: Same Waybill Key as Previous?
Action: The system compares the current FWBX key feedback with the stored previous FWBX key feedback
Logic Flow:
IF A waybill without EDI completion release has been found
AND The system compares the current FWBX key feedback with the stored previous FWBX key feedback
THEN:
• If the keys match, set waybill not found status and mark as done, otherwise update the stored key and set previous status waybill date for next iteration
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when primary waybill retrieval has failed or returned not found status.
Trigger Criteria:
Context: Primary waybill retrieval has failed or returned not found status
Applied to: Try Inquiry System Fallback
Action: The system initiates fallback processing using the inquiry system
Logic Flow:
IF Primary waybill retrieval has failed or returned not found status
AND The system initiates fallback processing using the inquiry system
THEN:
• Retrieve car information from container inquiry root, set inquiry parameters using road number, station number, and waybill number, and attempt to get waybill data from inquiry system
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill data has been successfully retrieved from inquiry system.
Trigger Criteria:
Context: Waybill data has been successfully retrieved from inquiry system
Applied to: Set Load/Empty Status
Action: The system processes the belonging code from the inquiry root
Logic Flow:
IF Waybill data has been successfully retrieved from inquiry system
AND The system processes the belonging code from the inquiry root
THEN:
• If belonging code equals 'ZE', set equipment status to 'E' (empty), otherwise set status to 'L' (loaded)
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when inquiry system has returned successful waybill data.
Trigger Criteria:
Context: Inquiry system has returned successful waybill data
Applied to: Get Additional Routing Info
Action: The system processes routing information from FWIQINFO segment
Logic Flow:
IF Inquiry system has returned successful waybill data
AND The system processes routing information from FWIQINFO segment
THEN:
• Parse routing fields to extract up to 4 SCAC codes and their corresponding junction R260 codes, handling space-separated field format and storing in routing group structure
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when car search parameters have been properly configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Car search parameters have been properly configured
Applied to: Call FWCARGET to Retrieve Waybill
Action: The system needs to retrieve waybill data for a specific equipment ID
Logic Flow:
IF Car search parameters have been properly configured
AND The system needs to retrieve waybill data for a specific equipment ID
THEN:
• Call FWCARGET external program with configured parameters and equipment ID to retrieve waybill information
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when primary waybill retrieval has failed and inquiry parameters are set. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Primary waybill retrieval has failed and inquiry parameters are set
Applied to: Call FWIQIO to Get Waybill from Inquiry
Action: The system attempts fallback waybill retrieval from inquiry system
Logic Flow:
IF Primary waybill retrieval has failed and inquiry parameters are set
AND The system attempts fallback waybill retrieval from inquiry system
THEN:
• Call FWIQIO external program with inquiry parameters to retrieve waybill data from inquiry database
R-GCX003-cbl-00131 (+16)File: GCX003.cblBusiness Rule: Cargo Record Retrieval
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment processing is starting for a specific equipment piece.
Trigger Criteria:
Context: Equipment processing is starting for a specific equipment piece
Applied to: Initialize Cargo Search Parameters
Action: The system initializes cargo search parameters
Logic Flow:
IF Equipment processing is starting for a specific equipment piece
AND The system initializes cargo search parameters
THEN:
• All cargo record structures are cleared and ready for new cargo data retrieval
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment has been processed and waybill information is available.
Trigger Criteria:
Context: Equipment has been processed and waybill information is available
Applied to: Set Waybill Root Key from Equipment
Action: The system sets up cargo search parameters
Logic Flow:
IF Equipment has been processed and waybill information is available
AND The system sets up cargo search parameters
THEN:
• Waybill root key and waybill date are extracted from equipment record for cargo search
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment id is available from current equipment processing.
Trigger Criteria:
Context: Equipment ID is available from current equipment processing
Applied to: Set Equipment ID for Search
Action: The system prepares cargo search criteria
Logic Flow:
IF Equipment ID is available from current equipment processing
AND The system prepares cargo search criteria
THEN:
• Equipment ID is assigned to the cargo search index for precise cargo matching
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill root key, waybill date, and equipment id are available.
Trigger Criteria:
Context: Waybill root key, waybill date, and equipment ID are available
Applied to: Build Cargo Database Index Key
Action: The system builds the cargo database index key
Logic Flow:
IF Waybill root key, waybill date, and equipment ID are available
AND The system builds the cargo database index key
THEN:
• Complete index key is constructed combining waybill root-date and equipment ID for cargo record retrieval
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo database index key is properly constructed.
Trigger Criteria:
Context: Cargo database index key is properly constructed
Applied to: Execute First Cargo Record Query
Action: The system executes the first cargo record query
Logic Flow:
IF Cargo database index key is properly constructed
AND The system executes the first cargo record query
THEN:
• Database query is performed using the cargo index key and cargo record status is returned
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record query has been executed.
Trigger Criteria:
Context: Cargo record query has been executed
Applied to: Cargo Record Found?
Action: The system evaluates the query results
Logic Flow:
IF Cargo record query has been executed
AND The system evaluates the query results
THEN:
• Cargo found status is determined based on database query return status
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has been retrieved from the database.
Trigger Criteria:
Context: A cargo record has been retrieved from the database
Applied to: Validate Cargo Belongs to Equipment
Action: The system validates cargo ownership
Logic Flow:
IF A cargo record has been retrieved from the database
AND The system validates cargo ownership
THEN:
• Equipment ID and waybill root-date from cargo record are compared against current equipment values
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record contains equipment id and waybill information.
Trigger Criteria:
Context: Cargo record contains equipment ID and waybill information
Applied to: Equipment ID and Waybill Match?
Action: The system compares cargo record data with current equipment data
Logic Flow:
IF Cargo record contains equipment ID and waybill information
AND The system compares cargo record data with current equipment data
THEN:
• Match is confirmed when equipment ID equals cargo equipment ID AND waybill root-date equals cargo waybill root-date
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record has been retrieved and validated as belonging to current equipment.
Trigger Criteria:
Context: Cargo record has been retrieved and validated as belonging to current equipment
Applied to: Set Cargo Found Status
Action: The system sets cargo processing status
Logic Flow:
IF Cargo record has been retrieved and validated as belonging to current equipment
AND The system sets cargo processing status
THEN:
• Cargo found indicator is set to true and cargo data is available for processing
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record query returned no results or retrieved cargo does not match current equipment.
Trigger Criteria:
Context: Cargo record query returned no results OR retrieved cargo does not match current equipment
Applied to: Set No Cargo Found Status
Action: The system sets cargo processing status
Logic Flow:
IF Cargo record query returned no results OR retrieved cargo does not match current equipment
AND The system sets cargo processing status
THEN:
• No cargo found indicator is set to true indicating no valid cargo exists for this equipment
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when initial cargo record has been processed and more cargo records may exist.
Trigger Criteria:
Context: Initial cargo record has been processed and more cargo records may exist
Applied to: Get Next Cargo Record
Action: The system attempts to retrieve next cargo record
Logic Flow:
IF Initial cargo record has been processed and more cargo records may exist
AND The system attempts to retrieve next cargo record
THEN:
• Database query is executed to get the next cargo record using the same search criteria
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when next cargo record query has been executed.
Trigger Criteria:
Context: Next cargo record query has been executed
Applied to: More Cargo Records?
Action: The system evaluates query results for additional records
Logic Flow:
IF Next cargo record query has been executed
AND The system evaluates query results for additional records
THEN:
• More cargo records status is determined based on successful retrieval of next cargo record
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when additional cargo record has been retrieved from database.
Trigger Criteria:
Context: Additional cargo record has been retrieved from database
Applied to: Validate Next Cargo Record
Action: The system validates the next cargo record
Logic Flow:
IF Additional cargo record has been retrieved from database
AND The system validates the next cargo record
THEN:
• Equipment ID and waybill information from next cargo record are validated against current equipment
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when next cargo record contains equipment and waybill identification.
Trigger Criteria:
Context: Next cargo record contains equipment and waybill identification
Applied to: Next Record Matches Equipment?
Action: The system compares next record with current equipment
Logic Flow:
IF Next cargo record contains equipment and waybill identification
AND The system compares next record with current equipment
THEN:
• Match is confirmed when next record equipment ID equals current equipment ID AND next record waybill root-date equals current waybill root-date
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when next cargo record matches current equipment and waybill.
Trigger Criteria:
Context: Next cargo record matches current equipment and waybill
Applied to: Continue to Next Record
Action: The system processes the matching cargo record
Logic Flow:
IF Next cargo record matches current equipment and waybill
AND The system processes the matching cargo record
THEN:
• Cargo record is processed and system continues to search for additional cargo records
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when no more cargo records are available or next cargo record does not match current equipment.
Trigger Criteria:
Context: No more cargo records are available OR next cargo record does not match current equipment
Applied to: Set No More Cargo Status
Action: The system completes cargo record processing
Logic Flow:
IF No more cargo records are available OR next cargo record does not match current equipment
AND The system completes cargo record processing
THEN:
• No more cargo indicator is set to true indicating all cargo records for this equipment have been processed
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record retrieval and validation process is complete.
Trigger Criteria:
Context: Cargo record retrieval and validation process is complete
Applied to: Return Cargo Record Data
Action: The system returns cargo data to equipment processing
Logic Flow:
IF Cargo record retrieval and validation process is complete
AND The system returns cargo data to equipment processing
THEN:
• Cargo record data and cargo found status are made available for subsequent equipment processing steps
R-GCX003-cbl-00148 (+12)File: GCX003.cblBusiness Rule: Cargo Attachment to Train
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo attachment process is initiated.
Trigger Criteria:
Context: A cargo attachment process is initiated
Applied to: Is Request Action SEND?
Action: The request action is not SEND
Logic Flow:
IF A cargo attachment process is initiated
AND The request action is not SEND
THEN:
• Skip the cargo attachment process and exit
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when send request is being processed for cargo attachment.
Trigger Criteria:
Context: A SEND request is being processed for cargo attachment
Applied to: Are There Processing Errors?
Action: There are processing errors present
Logic Flow:
IF A SEND request is being processed for cargo attachment
AND There are processing errors present
THEN:
• Skip the cargo attachment process and exit
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when send request with no processing errors is being processed.
Trigger Criteria:
Context: A SEND request with no processing errors is being processed
Applied to: Is Spawn Required?
Action: Spawn processing is required
Logic Flow:
IF A SEND request with no processing errors is being processed
AND Spawn processing is required
THEN:
• Skip the cargo attachment process and exit
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when send request with no errors or spawn requirements is being processed.
Trigger Criteria:
Context: A SEND request with no errors or spawn requirements is being processed
Applied to: Is Cargo Empty Residue?
Action: The cargo is classified as empty residue
Logic Flow:
IF A SEND request with no errors or spawn requirements is being processed
AND The cargo is classified as empty residue
THEN:
• Skip the cargo attachment process and exit
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being evaluated for attachment to train manifest.
Trigger Criteria:
Context: A cargo record is being evaluated for attachment to train manifest
Applied to: IT Bond - Immediate Transport?
Action: The cargo has immediate transport bond type (IT bond)
Logic Flow:
IF A cargo record is being evaluated for attachment to train manifest
AND The cargo has immediate transport bond type (IT bond)
THEN:
• Skip cargo attachment and add to special processing queue
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record without immediate transport bond is being evaluated.
Trigger Criteria:
Context: A cargo record without immediate transport bond is being evaluated
Applied to: TR Created for IT Bond?
Action: The cargo has TR bond already created for IT processing
Logic Flow:
IF A cargo record without immediate transport bond is being evaluated
AND The cargo has TR bond already created for IT processing
THEN:
• Skip cargo attachment and add to special processing queue
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record without it bond or existing tr bond is being evaluated.
Trigger Criteria:
Context: A cargo record without IT bond or existing TR bond is being evaluated
Applied to: US-Canada-US Movement with Release Status?
Action: The cargo is US-Canada-US movement type AND TR bond is not created for IT AND cargo has release status
Logic Flow:
IF A cargo record without IT bond or existing TR bond is being evaluated
AND The cargo is US-Canada-US movement type AND TR bond is not created for IT AND cargo has release status
THEN:
• Skip cargo attachment and add to special processing queue
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record that doesn't meet previous exclusion criteria is being evaluated.
Trigger Criteria:
Context: A cargo record that doesn't meet previous exclusion criteria is being evaluated
Applied to: Default Bond with Release Status?
Action: The cargo has default bond type AND TR bond is not created for IT AND cargo has release status
Logic Flow:
IF A cargo record that doesn't meet previous exclusion criteria is being evaluated
AND The cargo has default bond type AND TR bond is not created for IT AND cargo has release status
THEN:
• Skip cargo attachment and add to special processing queue
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record that doesn't meet previous exclusion criteria is being evaluated.
Trigger Criteria:
Context: A cargo record that doesn't meet previous exclusion criteria is being evaluated
Applied to: Empty Equipment Bond?
Action: The cargo is classified as empty equipment bond
Logic Flow:
IF A cargo record that doesn't meet previous exclusion criteria is being evaluated
AND The cargo is classified as empty equipment bond
THEN:
• Skip cargo attachment and add to special processing queue
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record that doesn't meet previous exclusion criteria is being evaluated.
Trigger Criteria:
Context: A cargo record that doesn't meet previous exclusion criteria is being evaluated
Applied to: Special Manifest Original at Woburn-PQ?
Action: The cargo has special manifest original designation AND the crossing port is Woburn-PQ station
Logic Flow:
IF A cargo record that doesn't meet previous exclusion criteria is being evaluated
AND The cargo has special manifest original designation AND the crossing port is Woburn-PQ station
THEN:
• Skip cargo attachment and add to special processing queue
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record that doesn't meet previous exclusion criteria is being evaluated.
Trigger Criteria:
Context: A cargo record that doesn't meet previous exclusion criteria is being evaluated
Applied to: Special Manifest Special 'Not Woburn-PQ'?
Action: The cargo has special manifest special designation AND the crossing port is NOT Woburn-PQ station
Logic Flow:
IF A cargo record that doesn't meet previous exclusion criteria is being evaluated
AND The cargo has special manifest special designation AND the crossing port is NOT Woburn-PQ station
THEN:
• Skip cargo attachment and add to special processing queue
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record that doesn't meet previous exclusion criteria is being evaluated.
Trigger Criteria:
Context: A cargo record that doesn't meet previous exclusion criteria is being evaluated
Applied to: Export Bond US-Mexico 'Not Laredo'?
Action: The cargo has export bond type AND origin-destination country codes are US-Mexico AND the crossing port is NOT Laredo-TX station
Logic Flow:
IF A cargo record that doesn't meet previous exclusion criteria is being evaluated
AND The cargo has export bond type AND origin-destination country codes are US-Mexico AND the crossing port is NOT Laredo-TX station
THEN:
• Skip cargo attachment and add to special processing queue
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has been evaluated against all exclusion criteria.
Trigger Criteria:
Context: A cargo record has been evaluated against all exclusion criteria
Applied to: Attach Cargo to Train for Customs Report
Action: The cargo does not meet any of the exclusion criteria
Logic Flow:
IF A cargo record has been evaluated against all exclusion criteria
AND The cargo does not meet any of the exclusion criteria
THEN:
• Attach the cargo to the train manifest for customs reporting
R-GCX003-cbl-00161 (+24)File: GCX003.cblBusiness Rule: Equipment Detail Line Building
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when new equipment item needs to be processed for reporting.
Trigger Criteria:
Context: A new equipment item needs to be processed for reporting
Applied to: Initialize Report Line
Action: The system begins building the equipment detail line
Logic Flow:
IF A new equipment item needs to be processed for reporting
AND The system begins building the equipment detail line
THEN:
• The report line is cleared and initialized with default values
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment item is being processed.
Trigger Criteria:
Context: An equipment item is being processed
Applied to: Equipment Type?
Action: The system checks if a container was found in the waybill
Logic Flow:
IF An equipment item is being processed
AND The system checks if a container was found in the waybill
THEN:
• Equipment is classified as container if container found, otherwise as car
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment is classified as a container.
Trigger Criteria:
Context: Equipment is classified as a container
Applied to: Process Container Information
Action: The system processes container information
Logic Flow:
IF Equipment is classified as a container
AND The system processes container information
THEN:
• Container ID is set from equipment ID, load/empty indicator is set from shipment root, and container flag is set for validation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment is classified as a car.
Trigger Criteria:
Context: Equipment is classified as a car
Applied to: Process Car Information
Action: The system processes car information
Logic Flow:
IF Equipment is classified as a car
AND The system processes car information
THEN:
• Car ID is set from request equipment ID, load/empty indicator is set from request, car flag is set for validation, and equipment ID is formatted for new report
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment information has been formatted with car or container details. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Equipment information has been formatted with car or container details
Applied to: Call Equipment Type Validation
Action: The system calls equipment type validation service
Logic Flow:
IF Equipment information has been formatted with car or container details
AND The system calls equipment type validation service
THEN:
• Equipment type code is validated and equipment details are retrieved from the equipment type master
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment type validation has been performed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Equipment type validation has been performed
Applied to: Equipment Type Valid?
Action: The equipment type validation call is not successful
Logic Flow:
IF Equipment type validation has been performed
AND The equipment type validation call is not successful
THEN:
• Equipment error flag is set and appropriate error message is added to the report
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment type validation has failed.
Trigger Criteria:
Context: Equipment type validation has failed
Applied to: Set Equipment Error Flag
Action: The system processes the validation failure
Logic Flow:
IF Equipment type validation has failed
AND The system processes the validation failure
THEN:
• Equipment error flag is set to indicate processing should not continue
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment has failed validation and error flag is set.
Trigger Criteria:
Context: Equipment has failed validation and error flag is set
Applied to: Add Error Message
Action: The system adds error messages to the report
Logic Flow:
IF Equipment has failed validation and error flag is set
AND The system adds error messages to the report
THEN:
• Message 35 is added for container validation failure or message 36 for car validation failure
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment has valid waybill and equipment type code is 'sk'.
Trigger Criteria:
Context: Equipment has valid waybill and equipment type code is 'SK'
Applied to: Process Double Stack Container Count
Action: The system processes double stack container information
Logic Flow:
IF Equipment has valid waybill and equipment type code is 'SK'
AND The system processes double stack container information
THEN:
• Double stack counts are updated based on traffic type (CPRS, CSXT, NS, or HAUL)
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment has valid waybill information.
Trigger Criteria:
Context: Equipment has valid waybill information
Applied to: Process Equipment Routing Information
Action: The system processes routing information from the waybill
Logic Flow:
IF Equipment has valid waybill information
AND The system processes routing information from the waybill
THEN:
• Routing is checked against predefined patterns and empty indicator is set to 1 if no valid route found, otherwise route-specific indicators are set
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment type code has been validated successfully.
Trigger Criteria:
Context: Equipment type code has been validated successfully
Applied to: Retrieve Equipment Type Description
Action: The system retrieves equipment type description from the vehicle information table
Logic Flow:
IF Equipment type code has been validated successfully
AND The system retrieves equipment type description from the vehicle information table
THEN:
• Equipment type description is retrieved and stored for report display
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment information has been processed.
Trigger Criteria:
Context: Equipment information has been processed
Applied to: Cargo Found?
Action: The system checks for associated cargo records
Logic Flow:
IF Equipment information has been processed
AND The system checks for associated cargo records
THEN:
• Processing branches to cargo handling if cargo found, otherwise proceeds to information field formatting
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo information exists for the equipment.
Trigger Criteria:
Context: Cargo information exists for the equipment
Applied to: Fill Cargo Part Information
Action: The system processes cargo details
Logic Flow:
IF Cargo information exists for the equipment
AND The system processes cargo details
THEN:
• Bond type indicators are set, US CCN key is captured, load/empty indicator is updated, and cargo condition response code is stored
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment information has been formatted.
Trigger Criteria:
Context: Equipment information has been formatted
Applied to: Equipment Category?
Action: The system categorizes equipment for counting purposes
Logic Flow:
IF Equipment information has been formatted
AND The system categorizes equipment for counting purposes
THEN:
• Equipment is classified as locomotive, container, or car based on equipment type code
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment type code is 'lo' or 'et'.
Trigger Criteria:
Context: Equipment type code is 'LO' or 'ET'
Applied to: Count Locomotives
Action: The system processes locomotive equipment
Logic Flow:
IF Equipment type code is 'LO' or 'ET'
AND The system processes locomotive equipment
THEN:
• Total locomotive count is incremented by 1
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment type code is 'cn' (container).
Trigger Criteria:
Context: Equipment type code is 'CN' (container)
Applied to: Count Containers by Load/Empty
Action: The system processes container load status
Logic Flow:
IF Equipment type code is 'CN' (container)
AND The system processes container load status
THEN:
• Total loaded container count is incremented if load indicator is 'L', otherwise total empty container count is incremented
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment type code is not locomotive or container.
Trigger Criteria:
Context: Equipment type code is not locomotive or container
Applied to: Count Cars by Load/Empty
Action: The system processes car load status
Logic Flow:
IF Equipment type code is not locomotive or container
AND The system processes car load status
THEN:
• Total loaded car count is incremented if load indicator is 'L', otherwise total empty car count is incremented
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment has been categorized and counted.
Trigger Criteria:
Context: Equipment has been categorized and counted
Applied to: Special Equipment?
Action: The system checks for special equipment characteristics
Logic Flow:
IF Equipment has been categorized and counted
AND The system checks for special equipment characteristics
THEN:
• Equipment is identified as SBU van, conveying car, or regular equipment for appropriate information formatting
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment is identified as sbu van unit.
Trigger Criteria:
Context: Equipment is identified as SBU van unit
Applied to: Process International Service Unit
Action: The load/empty indicator is 'E' (empty)
Logic Flow:
IF Equipment is identified as SBU van unit
AND The load/empty indicator is 'E' (empty)
THEN:
• Information field is set to 'INTERNATIONAL SERVICE' and processing exits
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment is identified as conveying car and no cargo found.
Trigger Criteria:
Context: Equipment is identified as conveying car and no cargo found
Applied to: Process Conveying Flat Car
Action: The system processes conveying car information
Logic Flow:
IF Equipment is identified as conveying car and no cargo found
AND The system processes conveying car information
THEN:
• Information field is set to 'CONVEYING FLAT CAR' and processing exits
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment and cargo information has been processed.
Trigger Criteria:
Context: Equipment and cargo information has been processed
Applied to: Cargo Status?
Action: The system determines cargo processing requirements
Logic Flow:
IF Equipment and cargo information has been processed
AND The system determines cargo processing requirements
THEN:
• Cargo is classified as empty equipment, loaded with bond information, or regular cargo for information field formatting
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo is classified as empty equipment or empty residue.
Trigger Criteria:
Context: Cargo is classified as empty equipment or empty residue
Applied to: Process Empty Equipment
Action: The system processes empty equipment status
Logic Flow:
IF Cargo is classified as empty equipment or empty residue
AND The system processes empty equipment status
THEN:
• Container or car counts are adjusted from loaded to empty, information field is set to 'EMPTY', and load/empty indicator is set to 'E'
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo has bond information that needs display formatting.
Trigger Criteria:
Context: Cargo has bond information that needs display formatting
Applied to: Format AMS Bond Display
Action: The system formats bond information for display
Logic Flow:
IF Cargo has bond information that needs display formatting
AND The system formats bond information for display
THEN:
• Bond information is formatted as 'PPR 7512 15 US-CA-US' for type 15, 'AMS [type] [number]' for IT/IE types, or 'AMS 7512 [type] [number]' for TE/TR/MT types
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo information exists and segment 07 data is available.
Trigger Criteria:
Context: Cargo information exists and segment 07 data is available
Applied to: Process Segment 07 Data
Action: The system processes segment 07 cargo descriptions
Logic Flow:
IF Cargo information exists and segment 07 data is available
AND The system processes segment 07 cargo descriptions
THEN:
• Cargo descriptions are extracted from segment 07 data, formatted for display, and multiple descriptions create separate report lines
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment information has been completely formatted.
Trigger Criteria:
Context: Equipment information has been completely formatted
Applied to: Add Equipment Line to Report
Action: The equipment line is not blank and not marked for special processing
Logic Flow:
IF Equipment information has been completely formatted
AND The equipment line is not blank and not marked for special processing
THEN:
• Equipment count is incremented, report line is added to email text, and report index is advanced
R-GCX003-cbl-00186 (+11)File: GCX003.cblBusiness Rule: Equipment Type Validation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment processing is initiated and waybill data is available.
Trigger Criteria:
Context: Equipment processing is initiated and waybill data is available
Applied to: Set Container Parameters
Action: The system detects container equipment from waybill data
Logic Flow:
IF Equipment processing is initiated and waybill data is available
AND The system detects container equipment from waybill data
THEN:
• Equipment type is set to container and container-specific processing parameters are established
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment is classified as container type and waybill routing data is available.
Trigger Criteria:
Context: Equipment is classified as container type and waybill routing data is available
Applied to: Set Trailer Parameters
Action: The waybill indicates trailer equipment type
Logic Flow:
IF Equipment is classified as container type and waybill routing data is available
AND The waybill indicates trailer equipment type
THEN:
• Trailer-specific processing parameters are applied to the equipment
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment processing is initiated.
Trigger Criteria:
Context: Equipment processing is initiated
Applied to: Set Car Parameters
Action: The equipment is not identified as container equipment
Logic Flow:
IF Equipment processing is initiated
AND The equipment is not identified as container equipment
THEN:
• Equipment type is set to car and car-specific processing parameters are established
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment type parameters are set and equipment id is available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Equipment type parameters are set and equipment ID is available
Applied to: Call Equipment Type Validation Service GCCCARTP
Action: Equipment type validation is required
Logic Flow:
IF Equipment type parameters are set and equipment ID is available
AND Equipment type validation is required
THEN:
• External equipment validation service GCCCARTP is called with equipment parameters
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment validation service has been called.
Trigger Criteria:
Context: Equipment validation service has been called
Applied to: Validation Successful?
Action: The validation service returns a response
Logic Flow:
IF Equipment validation service has been called
AND The validation service returns a response
THEN:
• System checks if validation was successful and routes processing accordingly
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment validation was successful and equipment code is available.
Trigger Criteria:
Context: Equipment validation was successful and equipment code is available
Applied to: Retrieve Equipment Type Description
Action: Equipment type description is needed for reporting
Logic Flow:
IF Equipment validation was successful and equipment code is available
AND Equipment type description is needed for reporting
THEN:
• System retrieves equipment type description from vehicle information reference table
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment is validated and waybill is found and equipment type is 'sk' (stack car).
Trigger Criteria:
Context: Equipment is validated and waybill is found and equipment type is 'SK' (stack car)
Applied to: Set Double Stack Container Count
Action: Double stack container processing is required
Logic Flow:
IF Equipment is validated and waybill is found and equipment type is 'SK' (stack car)
AND Double stack container processing is required
THEN:
• System calls double stack service and updates appropriate traffic type counters (CPRS, CSXT, NS, or HAUL)
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill is found and routing information is available.
Trigger Criteria:
Context: Waybill is found and routing information is available
Applied to: Validate Equipment Routing Information
Action: Equipment routing validation is performed
Logic Flow:
IF Waybill is found and routing information is available
AND Equipment routing validation is performed
THEN:
• System checks routing information against predefined routing patterns and sets appropriate routing indicators
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment routing validation has been performed.
Trigger Criteria:
Context: Equipment routing validation has been performed
Applied to: Set Empty Equipment Indicator
Action: Routing validation fails or waybill is not found
Logic Flow:
IF Equipment routing validation has been performed
AND Routing validation fails or waybill is not found
THEN:
• Empty equipment indicator is set to 1 for the equipment
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment is classified as container type. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Equipment is classified as container type
Applied to: Generate Container Type Error Message MSG-35
Action: Equipment type validation service call fails
Logic Flow:
IF Equipment is classified as container type
AND Equipment type validation service call fails
THEN:
• Error message MSG-35 is generated indicating container type validation failure
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment is classified as car type. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Equipment is classified as car type
Applied to: Generate Car Type Error Message MSG-36
Action: Equipment type validation service call fails
Logic Flow:
IF Equipment is classified as car type
AND Equipment type validation service call fails
THEN:
• Error message MSG-36 is generated indicating car type validation failure
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment type validation has failed.
Trigger Criteria:
Context: Equipment type validation has failed
Applied to: Set Equipment Error Flag
Action: Error messages have been generated
Logic Flow:
IF Equipment type validation has failed
AND Error messages have been generated
THEN:
• Equipment error flag is set to prevent continued processing of invalid equipment
R-GCX003-cbl-00198 (+15)File: GCX003.cblBusiness Rule: Cargo Information Processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with bond type classification criteria.
Trigger Criteria:
Context: A cargo record with bond type classification criteria
Applied to: Bond Type = TR?
Action: The cargo has US-Canada-US bond type code AND the cargo was not created for IT processing AND the cargo is not designated as special USMX TR cargo
Logic Flow:
IF A cargo record with bond type classification criteria
AND The cargo has US-Canada-US bond type code AND the cargo was not created for IT processing AND the cargo is not designated as special USMX TR cargo
THEN:
• Set the TR bond found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with bond type classification criteria.
Trigger Criteria:
Context: A cargo record with bond type classification criteria
Applied to: Bond Type = TE?
Action: The cargo has transportation export bond type code AND the cargo was not created for IT processing
Logic Flow:
IF A cargo record with bond type classification criteria
AND The cargo has transportation export bond type code AND the cargo was not created for IT processing
THEN:
• Set the TE bond found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with special manifest indicators.
Trigger Criteria:
Context: A cargo record with special manifest indicators
Applied to: Special Manifest Original?
Action: The cargo is designated as special manifest original
Logic Flow:
IF A cargo record with special manifest indicators
AND The cargo is designated as special manifest original
THEN:
• Set the special IT found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with te bond type and special manifest indicators.
Trigger Criteria:
Context: A cargo record with TE bond type and special manifest indicators
Applied to: Bond Type = TE AND Special Manifest?
Action: The cargo has transportation export bond type code AND the cargo is designated as special manifest
Logic Flow:
IF A cargo record with TE bond type and special manifest indicators
AND The cargo has transportation export bond type code AND the cargo is designated as special manifest
THEN:
• Set the special TE found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with export bond type and special indicators.
Trigger Criteria:
Context: A cargo record with export bond type and special indicators
Applied to: Bond Type = Export AND Special 88?
Action: The cargo has export bond type code AND the cargo has USMX special 88 designation
Logic Flow:
IF A cargo record with export bond type and special indicators
AND The cargo has export bond type code AND the cargo has USMX special 88 designation
THEN:
• Set the US-MX 88 found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with us-canada-us bond type and special tr indicators.
Trigger Criteria:
Context: A cargo record with US-Canada-US bond type and special TR indicators
Applied to: Bond Type = US-CAN-US AND Special TR?
Action: The cargo has US-Canada-US bond type code AND the cargo has USMX special TR designation
Logic Flow:
IF A cargo record with US-Canada-US bond type and special TR indicators
AND The cargo has US-Canada-US bond type code AND the cargo has USMX special TR designation
THEN:
• Set the special TR found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with potential bond number sources.
Trigger Criteria:
Context: A cargo record with potential bond number sources
Applied to: Entry Number Available?
Action: The cargo entry number field is not blank or spaces
Logic Flow:
IF A cargo record with potential bond number sources
AND The cargo entry number field is not blank or spaces
THEN:
• Use the entry number as the bond number for processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record where entry number is not available.
Trigger Criteria:
Context: A cargo record where entry number is not available
Applied to: In-Bond Control Number Available?
Action: The in-bond control number field is not blank or spaces
Logic Flow:
IF A cargo record where entry number is not available
AND The in-bond control number field is not blank or spaces
THEN:
• Use the in-bond control number as the bond number for processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with empty equipment designation.
Trigger Criteria:
Context: A cargo record with empty equipment designation
Applied to: Process Empty Equipment
Action: The cargo is classified as empty equipment or empty residue
Logic Flow:
IF A cargo record with empty equipment designation
AND The cargo is classified as empty equipment or empty residue
THEN:
• Set cargo information to 'EMPTY', update load/empty indicator to 'E', and adjust equipment counters from loaded to empty
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with specific bond type code.
Trigger Criteria:
Context: A cargo record with specific bond type code
Applied to: Process Paper 7512 Movement
Action: The cargo bond type code equals '15'
Logic Flow:
IF A cargo record with specific bond type code
AND The cargo bond type code equals '15'
THEN:
• Set cargo information to 'PPR 7512 15 US-CA-US'
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with it or ie bond type and extracted bond number.
Trigger Criteria:
Context: A cargo record with IT or IE bond type and extracted bond number
Applied to: Process AMS IT/IE Bond
Action: The cargo in-bond type code equals 'IT' or 'IE'
Logic Flow:
IF A cargo record with IT or IE bond type and extracted bond number
AND The cargo in-bond type code equals 'IT' or 'IE'
THEN:
• Format cargo information as 'AMS' followed by bond type code and bond number
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with te, tr, or mt bond type and extracted bond number.
Trigger Criteria:
Context: A cargo record with TE, TR, or MT bond type and extracted bond number
Applied to: Process AMS 7512 TE/TR/MT Bond
Action: The cargo in-bond type code equals 'TE' or 'TR' or 'MT'
Logic Flow:
IF A cargo record with TE, TR, or MT bond type and extracted bond number
AND The cargo in-bond type code equals 'TE' or 'TR' or 'MT'
THEN:
• Format cargo information as 'AMS 7512' followed by bond type code and bond number
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with potential segment 07 data.
Trigger Criteria:
Context: A cargo record with potential segment 07 data
Applied to: Segment 07 Data Available?
Action: Segment 07 data exists and is not blank or low-values
Logic Flow:
IF A cargo record with potential segment 07 data
AND Segment 07 data exists and is not blank or low-values
THEN:
• Process the segment 07 data for cargo description extraction
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with valid segment 07 data.
Trigger Criteria:
Context: A cargo record with valid segment 07 data
Applied to: Extract Equipment Description
Action: Segment 07 contains cargo description information
Logic Flow:
IF A cargo record with valid segment 07 data
AND Segment 07 contains cargo description information
THEN:
• Extract the cargo description and use it as the cargo information field
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when empty equipment record with residue weight information.
Trigger Criteria:
Context: An empty equipment record with residue weight information
Applied to: Residue Weight > Threshold?
Action: The residue weight is greater than zero AND special handling code contains ER threshold code
Logic Flow:
IF An empty equipment record with residue weight information
AND The residue weight is greater than zero AND special handling code contains ER threshold code
THEN:
• Apply empty residue processing rules
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment with determined load/empty status and equipment type.
Trigger Criteria:
Context: Equipment with determined load/empty status and equipment type
Applied to: Update Load/Empty Status Counters
Action: Processing equipment counters for containers or cars
Logic Flow:
IF Equipment with determined load/empty status and equipment type
AND Processing equipment counters for containers or cars
THEN:
• Increment appropriate counter (container loaded/empty or car loaded/empty) based on equipment type and load status
R-GCX003-cbl-00214 (+22)File: GCX003.cblBusiness Rule: Bond Type Classification
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists for the equipment.
Trigger Criteria:
Context: A cargo record exists for the equipment
Applied to: Extract Bond Type from Cargo Record
Action: The system processes the cargo information
Logic Flow:
IF A cargo record exists for the equipment
AND The system processes the cargo information
THEN:
• The in-bond type code is extracted from the cargo record field M1201-IN-BOND-TYP-CDE
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo has it bond type.
Trigger Criteria:
Context: Cargo has IT bond type
Applied to: Set Special Manifest Flags
Action: The system processes the bond type classification
Logic Flow:
IF Cargo has IT bond type
AND The system processes the bond type classification
THEN:
• The special manifest origin flag is set to indicate special processing is required
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has te bond type and special manifest processing is required.
Trigger Criteria:
Context: Cargo has TE bond type and special manifest processing is required
Applied to: Set Special Manifest Flags
Action: The system processes the bond type classification
Logic Flow:
IF Cargo has TE bond type and special manifest processing is required
AND The system processes the bond type classification
THEN:
• The special manifest special flag is set to indicate TE special processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo has us-canada-us bond type and tr is not already created and does not have special tr processing.
Trigger Criteria:
Context: Cargo has US-Canada-US bond type and TR is not already created and does not have special TR processing
Applied to: Set TR Bond Found Flag
Action: The system processes TR bond type
Logic Flow:
IF Cargo has US-Canada-US bond type and TR is not already created and does not have special TR processing
AND The system processes TR bond type
THEN:
• The TR bond found flag is set to true
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has transport export bond type and te is not already created.
Trigger Criteria:
Context: Cargo has transport export bond type and TE is not already created
Applied to: Set TE Bond Found Flag
Action: The system processes TE bond type
Logic Flow:
IF Cargo has transport export bond type and TE is not already created
AND The system processes TE bond type
THEN:
• The TE bond found flag is set to true
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has export bond type and has usmx special 88 processing.
Trigger Criteria:
Context: Cargo has export bond type and has USMX special 88 processing
Applied to: Set Special Manifest Flags
Action: The system processes export bond classification
Logic Flow:
IF Cargo has export bond type and has USMX special 88 processing
AND The system processes export bond classification
THEN:
• The USMX 88 found flag is set to indicate special export processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo has us-canada-us bond type and has usmx special tr processing.
Trigger Criteria:
Context: Cargo has US-Canada-US bond type and has USMX special TR processing
Applied to: Set Special Manifest Flags
Action: The system processes bond type classification
Logic Flow:
IF Cargo has US-Canada-US bond type and has USMX special TR processing
AND The system processes bond type classification
THEN:
• The SPLC TR found flag is set to indicate special TR processing
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo bond type is not spaces and not export type and not empty equipment type.
Trigger Criteria:
Context: Cargo bond type is not spaces and not export type and not empty equipment type
Applied to: Format Bond Information Display
Action: The system formats cargo information for display
Logic Flow:
IF Cargo bond type is not spaces and not export type and not empty equipment type
AND The system formats cargo information for display
THEN:
• The US CCN key from cargo is assigned to the report US CCN field
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo entry number field is not spaces.
Trigger Criteria:
Context: Cargo entry number field is not spaces
Applied to: Extract from Entry Number
Action: The system extracts bond number information
Logic Flow:
IF Cargo entry number field is not spaces
AND The system extracts bond number information
THEN:
• The entry number is saved as the bond number for display formatting
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo entry number is spaces and in-bond control number is not spaces.
Trigger Criteria:
Context: Cargo entry number is spaces and in-bond control number is not spaces
Applied to: Extract from In-Bond Control Number
Action: The system extracts bond number information
Logic Flow:
IF Cargo entry number is spaces and in-bond control number is not spaces
AND The system extracts bond number information
THEN:
• The in-bond control number is saved as the bond number for display formatting
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo is empty equipment type or empty residue type.
Trigger Criteria:
Context: Cargo is empty equipment type or empty residue type
Applied to: Format Bond Information Display
Action: The system formats bond information for display
Logic Flow:
IF Cargo is empty equipment type or empty residue type
AND The system formats bond information for display
THEN:
• The report info shows 'EMPTY', load/empty indicator is set to 'E', and equipment counters are updated from loaded to empty
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo bond type code is '15'.
Trigger Criteria:
Context: Cargo bond type code is '15'
Applied to: Format Bond Information Display
Action: The system formats bond information for display
Logic Flow:
IF Cargo bond type code is '15'
AND The system formats bond information for display
THEN:
• The report info displays 'PPR 7512 15 US-CA-US'
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo in-bond type code is 'it' or 'ie'.
Trigger Criteria:
Context: Cargo in-bond type code is 'IT' or 'IE'
Applied to: Format Bond Information Display
Action: The system formats bond information for display
Logic Flow:
IF Cargo in-bond type code is 'IT' or 'IE'
AND The system formats bond information for display
THEN:
• The report info displays 'AMS ' concatenated with bond type and bond number
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo in-bond type code is 'te' or 'tr' or 'mt'.
Trigger Criteria:
Context: Cargo in-bond type code is 'TE' or 'TR' or 'MT'
Applied to: Format Bond Information Display
Action: The system formats bond information for display
Logic Flow:
IF Cargo in-bond type code is 'TE' or 'TR' or 'MT'
AND The system formats bond information for display
THEN:
• The report info displays 'AMS 7512 ' concatenated with bond type and bond number
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when it cargo requires special manifest processing and action is send.
Trigger Criteria:
Context: IT cargo requires special manifest processing and action is send
Applied to: Check if Special Manifest Required
Action: The system checks user authorization for special manifests
Logic Flow:
IF IT cargo requires special manifest processing and action is send
AND The system checks user authorization for special manifests
THEN:
• If user is not authorized for special manifests, generate authorization error message 43, otherwise proceed with IT export manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when te cargo requires port change processing and action is send.
Trigger Criteria:
Context: TE cargo requires port change processing and action is send
Applied to: Check Port Change Requirements
Action: The system checks user authorization for port change manifests
Logic Flow:
IF TE cargo requires port change processing and action is send
AND The system checks user authorization for port change manifests
THEN:
• If user is not authorized for special manifests, generate authorization error message 43, otherwise proceed with port change manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when tr cargo requires diversion processing and action is send.
Trigger Criteria:
Context: TR cargo requires diversion processing and action is send
Applied to: Check Diversion Requirements
Action: The system checks user authorization for diversion manifests
Logic Flow:
IF TR cargo requires diversion processing and action is send
AND The system checks user authorization for diversion manifests
THEN:
• If user is not authorized for special manifests, generate authorization error message 43, otherwise proceed with diversion manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when it cargo is not already created and user is authorized for special manifests and action is send.
Trigger Criteria:
Context: IT cargo is not already created and user is authorized for special manifests and action is send
Applied to: Create IT Export Special Manifest
Action: The system processes IT export requirements
Logic Flow:
IF IT cargo is not already created and user is authorized for special manifests and action is send
AND The system processes IT export requirements
THEN:
• Generate message 23, set IT export spawn flag, and invoke special manifest creation process
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when te cargo location does not match crossing port and user is authorized and action is send.
Trigger Criteria:
Context: TE cargo location does not match crossing port and user is authorized and action is send
Applied to: Create TE Port Change Manifest
Action: The system processes TE port change requirements
Logic Flow:
IF TE cargo location does not match crossing port and user is authorized and action is send
AND The system processes TE port change requirements
THEN:
• Generate message 20, set port change spawn flag, and invoke special manifest creation process
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when tr cargo requires diversion processing and user is authorized and action is send.
Trigger Criteria:
Context: TR cargo requires diversion processing and user is authorized and action is send
Applied to: Create TR Diversion Manifest
Action: The system processes TR diversion requirements
Logic Flow:
IF TR cargo requires diversion processing and user is authorized and action is send
AND The system processes TR diversion requirements
THEN:
• Generate message 23, set detour spawn flag, and invoke special manifest creation process
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo has mt bond type and vessel name is not 'train' and not spaces and crossing port matches cargo location.
Trigger Criteria:
Context: Cargo has MT bond type and vessel name is not 'TRAIN' and not spaces and crossing port matches cargo location
Applied to: Validate Vessel Name
Action: The system validates MT bond requirements
Logic Flow:
IF Cargo has MT bond type and vessel name is not 'TRAIN' and not spaces and crossing port matches cargo location
AND The system validates MT bond requirements
THEN:
• Generate error message 25 for invalid MT bond vessel configuration
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo has te bond type and vessel name character 23 is 't'.
Trigger Criteria:
Context: Cargo has TE bond type and vessel name character 23 is 'T'
Applied to: Validate Vessel Name
Action: The system validates TE bond requirements
Logic Flow:
IF Cargo has TE bond type and vessel name character 23 is 'T'
AND The system validates TE bond requirements
THEN:
• Generate error message 17 for invalid TE bond vessel name
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo bond type is not 'te' and not 'mt' and vessel name is not 'train'.
Trigger Criteria:
Context: Cargo bond type is not 'TE' and not 'MT' and vessel name is not 'TRAIN'
Applied to: Validate Vessel Name
Action: The system validates bond vessel requirements
Logic Flow:
IF Cargo bond type is not 'TE' and not 'MT' and vessel name is not 'TRAIN'
AND The system validates bond vessel requirements
THEN:
• Generate error message 17 for invalid vessel name configuration
R-GCX003-cbl-00237 (+16)File: GCX003.cblBusiness Rule: Special Manifest Processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when user is processing it bond cargo that requires special manifest creation.
Trigger Criteria:
Context: A user is processing IT bond cargo that requires special manifest creation
Applied to: User Authorized for Special Manifests?
Action: The system checks if the user is authorized for special manifests AND the request is not an AEI train send
Logic Flow:
IF A user is processing IT bond cargo that requires special manifest creation
AND The system checks if the user is authorized for special manifests AND the request is not an AEI train send
THEN:
• If user is not authorized for special manifests, generate authorization error message 43
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when it bond cargo exists with tr-created-for-it not equal to 'y' and special manifest original flag is not set and user is authorized for special manifests.
Trigger Criteria:
Context: IT bond cargo exists with TR-CREATED-FOR-IT not equal to 'Y' AND special manifest original flag is not set AND user is authorized for special manifests
Applied to: Create IT Export Special Manifest
Action: The request action is SEND
Logic Flow:
IF IT bond cargo exists with TR-CREATED-FOR-IT not equal to 'Y' AND special manifest original flag is not set AND user is authorized for special manifests
AND The request action is SEND
THEN:
• Set IT export spawn flag to TRUE, generate message 23, and perform special manifest creation process
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when it bond cargo exists with tr-created-for-it not equal to 'y' and special manifest original flag is not set.
Trigger Criteria:
Context: IT bond cargo exists with TR-CREATED-FOR-IT not equal to 'Y' AND special manifest original flag is not set
Applied to: Generate IT Export Report Message
Action: The request action is REPORT
Logic Flow:
IF IT bond cargo exists with TR-CREATED-FOR-IT not equal to 'Y' AND special manifest original flag is not set
AND The request action is REPORT
THEN:
• Generate message 24 for IT export reporting
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is found with tr bond type and cargo location id does not match train crossing port.
Trigger Criteria:
Context: Cargo is found with TR bond type AND cargo location ID does not match train crossing port
Applied to: Create TR Diversion Special Manifest
Action: The request action is SEND AND user is authorized for special manifests
Logic Flow:
IF Cargo is found with TR bond type AND cargo location ID does not match train crossing port
AND The request action is SEND AND user is authorized for special manifests
THEN:
• Set diversion spawn flag to TRUE, generate message 20, and perform special manifest creation process
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is found with tr bond type and cargo location id does not match train crossing port.
Trigger Criteria:
Context: Cargo is found with TR bond type AND cargo location ID does not match train crossing port
Applied to: Generate TR Diversion Report Message
Action: The request action is REPORT
Logic Flow:
IF Cargo is found with TR bond type AND cargo location ID does not match train crossing port
AND The request action is REPORT
THEN:
• Generate message 19 with station code information for TR bond diversion reporting
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is found with te bond type and tr-created-for-it is spaces and cargo status is not export and cargo is billed as cprs and cargo location id1 does not match train crossing port.
Trigger Criteria:
Context: Cargo is found with TE bond type AND TR-CREATED-FOR-IT is SPACES AND cargo status is not export AND cargo is billed as CPRS AND cargo location ID1 does not match train crossing port
Applied to: Create TE Port Change Special Manifest
Action: The request action is SEND AND user is authorized for special manifests
Logic Flow:
IF Cargo is found with TE bond type AND TR-CREATED-FOR-IT is SPACES AND cargo status is not export AND cargo is billed as CPRS AND cargo location ID1 does not match train crossing port
AND The request action is SEND AND user is authorized for special manifests
THEN:
• Set port change spawn flag to TRUE, generate message 20, and perform special manifest creation process
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is found with te bond type and tr-created-for-it is spaces and cargo status is not export and cargo is billed as cprs and cargo location id1 does not match train crossing port.
Trigger Criteria:
Context: Cargo is found with TE bond type AND TR-CREATED-FOR-IT is SPACES AND cargo status is not export AND cargo is billed as CPRS AND cargo location ID1 does not match train crossing port
Applied to: Generate TE Port Change Report Message
Action: The request action is REPORT
Logic Flow:
IF Cargo is found with TE bond type AND TR-CREATED-FOR-IT is SPACES AND cargo status is not export AND cargo is billed as CPRS AND cargo location ID1 does not match train crossing port
AND The request action is REPORT
THEN:
• Generate message 19 with station code information for TE bond port change reporting
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill is found with no cargo and origin and destination are both us states and equipment is loaded or has residue weight with er found.
Trigger Criteria:
Context: Waybill is found with no cargo AND origin and destination are both US states AND equipment is loaded or has residue weight with ER found
Applied to: Create US-US Detour Special Manifest
Action: The request action is SEND AND user is authorized for special manifests
Logic Flow:
IF Waybill is found with no cargo AND origin and destination are both US states AND equipment is loaded or has residue weight with ER found
AND The request action is SEND AND user is authorized for special manifests
THEN:
• Set US-US detour spawn flag to TRUE, generate message 23, and perform special manifest creation process
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill is found with no cargo and origin and destination are both us states and equipment is loaded or has residue weight with er found.
Trigger Criteria:
Context: Waybill is found with no cargo AND origin and destination are both US states AND equipment is loaded or has residue weight with ER found
Applied to: Generate US-US Detour Report Message
Action: The request action is REPORT
Logic Flow:
IF Waybill is found with no cargo AND origin and destination are both US states AND equipment is loaded or has residue weight with ER found
AND The request action is REPORT
THEN:
• Generate message 18 for US-US movement detour reporting
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is found with export type and origin-destination country codes are 'usmx' and special manifest flag is spaces and not at laredo tx station.
Trigger Criteria:
Context: Cargo is found with export type AND origin-destination country codes are 'USMX' AND special manifest flag is SPACES AND not at Laredo TX station
Applied to: Create US-Mexico Export Special Manifest
Action: The request action is SEND AND user is authorized for special manifests
Logic Flow:
IF Cargo is found with export type AND origin-destination country codes are 'USMX' AND special manifest flag is SPACES AND not at Laredo TX station
AND The request action is SEND AND user is authorized for special manifests
THEN:
• Set 88-TR detour spawn flag to TRUE, generate message 23, and perform special manifest creation process
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is found with export type and origin-destination country codes are 'usmx' and special manifest flag is spaces and not at laredo tx station.
Trigger Criteria:
Context: Cargo is found with export type AND origin-destination country codes are 'USMX' AND special manifest flag is SPACES AND not at Laredo TX station
Applied to: Generate US-Mexico Export Report Message
Action: The request action is REPORT
Logic Flow:
IF Cargo is found with export type AND origin-destination country codes are 'USMX' AND special manifest flag is SPACES AND not at Laredo TX station
AND The request action is REPORT
THEN:
• Generate message 50 for US-Mexico export reporting
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo is found with default type and tr-created-for-it is spaces and special manifest original flag is not set.
Trigger Criteria:
Context: Cargo is found with default type AND TR-CREATED-FOR-IT is SPACES AND special manifest original flag is not set
Applied to: Create Border Clearance Special Manifest
Action: Cargo status equals release status AND request action is SEND AND user is authorized for special manifests
Logic Flow:
IF Cargo is found with default type AND TR-CREATED-FOR-IT is SPACES AND special manifest original flag is not set
AND Cargo status equals release status AND request action is SEND AND user is authorized for special manifests
THEN:
• Set detour spawn flag to TRUE, generate message 23, and perform special manifest creation process
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo is found with default type and tr-created-for-it is spaces and special manifest original flag is not set.
Trigger Criteria:
Context: Cargo is found with default type AND TR-CREATED-FOR-IT is SPACES AND special manifest original flag is not set
Applied to: Generate Invalid Status Message
Action: Cargo status does not equal release status
Logic Flow:
IF Cargo is found with default type AND TR-CREATED-FOR-IT is SPACES AND special manifest original flag is not set
AND Cargo status does not equal release status
THEN:
• Generate message 31 for invalid cargo status
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when special manifest needs to be created for any cargo type.
Trigger Criteria:
Context: A special manifest needs to be created for any cargo type
Applied to: Set Special Manifest Parameters
Action: Special manifest creation is triggered
Logic Flow:
IF A special manifest needs to be created for any cargo type
AND Special manifest creation is triggered
THEN:
• Set high-values security byte, set 'US' record type code, set border code from station crossing port, set border name from station name, and set CCN from cargo CCN key
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when special manifest parameters are configured.
Trigger Criteria:
Context: Special manifest parameters are configured
Applied to: Determine Manifest Type
Action: Evaluating spawn type flags
Logic Flow:
IF Special manifest parameters are configured
AND Evaluating spawn type flags
THEN:
• Set diversion flag for diversion spawn, set IT export flag for IT export spawn, set change port flag for port change spawn, set IT export flag for detour spawn, set US-US detour flag for US-US detour spawn, or set export TR flag for 88-TR detour spawn
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when special manifest type is determined.
Trigger Criteria:
Context: Special manifest type is determined
Applied to: Set Equipment and Waybill Information
Action: Setting equipment and waybill information
Logic Flow:
IF Special manifest type is determined
AND Setting equipment and waybill information
THEN:
• Set equipment ID from current equipment ID, set waybill number from cargo waybill index, and set waybill date from cargo waybill date index
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when special manifest is fully configured with all required parameters.
Trigger Criteria:
Context: Special manifest is fully configured with all required parameters
Applied to: Queue Special Manifest for Processing
Action: Queuing manifest for processing
Logic Flow:
IF Special manifest is fully configured with all required parameters
AND Queuing manifest for processing
THEN:
• Increment report spawn count by 1 and store special manifest input parameters in working storage spawn table
R-GCX003-cbl-00254 (+12)File: GCX003.cblBusiness Rule: Cargo Status Validation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists and has been retrieved for processing.
Trigger Criteria:
Context: A cargo record exists and has been retrieved for processing
Applied to: Is Cargo Empty Residue?
Action: The cargo is classified as empty residue type
Logic Flow:
IF A cargo record exists and has been retrieved for processing
AND The cargo is classified as empty residue type
THEN:
• Skip all cargo status validations and proceed to completion
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists and is not empty residue type.
Trigger Criteria:
Context: A cargo record exists and is not empty residue type
Applied to: Is Cargo Empty Equipment?
Action: The cargo is classified as empty equipment type
Logic Flow:
IF A cargo record exists and is not empty residue type
AND The cargo is classified as empty equipment type
THEN:
• Skip all cargo status validations and proceed to completion
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists and is not empty residue or empty equipment.
Trigger Criteria:
Context: A cargo record exists and is not empty residue or empty equipment
Applied to: Is Cargo Pending?
Action: The cargo status is pending, deleted, or in error state
Logic Flow:
IF A cargo record exists and is not empty residue or empty equipment
AND The cargo status is pending, deleted, or in error state
THEN:
• Generate cargo status error message and halt processing for this cargo
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo has been found and passed initial status checks.
Trigger Criteria:
Context: Cargo has been found and passed initial status checks
Applied to: Is TR Bond with Export Status?
Action: The cargo has TR bond type and the cargo status description indicates export status
Logic Flow:
IF Cargo has been found and passed initial status checks
AND The cargo has TR bond type and the cargo status description indicates export status
THEN:
• Generate TR bond export error message
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo has mt bond type and vessel name is not 'train' or spaces.
Trigger Criteria:
Context: Cargo has MT bond type and vessel name is not 'TRAIN' or spaces
Applied to: Is MT Bond at Wrong Location?
Action: The train crossing port does not match the cargo location ID
Logic Flow:
IF Cargo has MT bond type and vessel name is not 'TRAIN' or spaces
AND The train crossing port does not match the cargo location ID
THEN:
• Generate MT bond location error message
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has te bond type.
Trigger Criteria:
Context: Cargo has TE bond type
Applied to: Is TE Bond with Wrong Vessel?
Action: The vessel name does not have 'T' in position 23
Logic Flow:
IF Cargo has TE bond type
AND The vessel name does not have 'T' in position 23
THEN:
• Generate TE bond vessel error message
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo does not have te or mt bond type.
Trigger Criteria:
Context: Cargo does not have TE or MT bond type
Applied to: Is Non-TE/MT Bond with Wrong Vessel?
Action: The vessel name is not 'TRAIN'
Logic Flow:
IF Cargo does not have TE or MT bond type
AND The vessel name is not 'TRAIN'
THEN:
• Generate vessel type error message
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo has been found and passed bond validation checks.
Trigger Criteria:
Context: Cargo has been found and passed bond validation checks
Applied to: Is Cargo at Laredo Station?
Action: The train crossing port is Laredo TX station
Logic Flow:
IF Cargo has been found and passed bond validation checks
AND The train crossing port is Laredo TX station
THEN:
• Perform DSP hold status checks and documentation validations
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is being processed at laredo station and cargo description indicates border hold status.
Trigger Criteria:
Context: Cargo is being processed at Laredo station and cargo description indicates border hold status
Applied to: Is Border Hold Status?
Action: DSP hold is also applied to the cargo
Logic Flow:
IF Cargo is being processed at Laredo station and cargo description indicates border hold status
AND DSP hold is also applied to the cargo
THEN:
• Generate DSP hold error message for border hold cargo
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo is being processed at laredo station and does not have border hold status.
Trigger Criteria:
Context: Cargo is being processed at Laredo station and does not have border hold status
Applied to: Is DSP Hold Applied?
Action: DSP hold is applied to the cargo
Logic Flow:
IF Cargo is being processed at Laredo station and does not have border hold status
AND DSP hold is applied to the cargo
THEN:
• Generate DSP hold warning message
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is being processed at laredo station and dsp hold is not applied.
Trigger Criteria:
Context: Cargo is being processed at Laredo station and DSP hold is not applied
Applied to: Is Border Hold Status?
Action: The cargo description indicates border hold status
Logic Flow:
IF Cargo is being processed at Laredo station and DSP hold is not applied
AND The cargo description indicates border hold status
THEN:
• Generate border hold error message
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is being processed at laredo station and segment 02 data is available.
Trigger Criteria:
Context: Cargo is being processed at Laredo station and segment 02 data is available
Applied to: Is FEN Documentation Missing?
Action: FEN reference number qualifier is not found in the segment data
Logic Flow:
IF Cargo is being processed at Laredo station and segment 02 data is available
AND FEN reference number qualifier is not found in the segment data
THEN:
• Generate FEN missing warning message
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is being processed at laredo station and segment 02 data is available.
Trigger Criteria:
Context: Cargo is being processed at Laredo station and segment 02 data is available
Applied to: Is KCM Documentation Missing?
Action: KCM reference number qualifier is not found in the segment data
Logic Flow:
IF Cargo is being processed at Laredo station and segment 02 data is available
AND KCM reference number qualifier is not found in the segment data
THEN:
• Generate KCM missing warning message
R-GCX003-cbl-00267 (+4)File: GCX003.cblBusiness Rule: Bill Type Validation
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo is found and has valid bill type information.
Trigger Criteria:
Context: Cargo is found and has valid bill type information
Applied to: Set Paper 7512 US-CA-US Message
Action: The cargo bill type code equals '15'
Logic Flow:
IF Cargo is found and has valid bill type information
AND The cargo bill type code equals '15'
THEN:
• Set the cargo information message to 'PPR 7512 15 US-CA-US'
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo is found with in-bond type code and bond number information available.
Trigger Criteria:
Context: Cargo is found with in-bond type code and bond number information available
Applied to: Format AMS Bond Message with Bond Number
Action: The in-bond type code is 'IT' or 'IE'
Logic Flow:
IF Cargo is found with in-bond type code and bond number information available
AND The in-bond type code is 'IT' or 'IE'
THEN:
• Format cargo information as 'AMS' followed by the in-bond type code and bond number
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo is found with in-bond type code and bond number information available.
Trigger Criteria:
Context: Cargo is found with in-bond type code and bond number information available
Applied to: Format AMS 7512 Bond Message with Bond Number
Action: The in-bond type code is 'TE', 'TR', or 'MT'
Logic Flow:
IF Cargo is found with in-bond type code and bond number information available
AND The in-bond type code is 'TE', 'TR', or 'MT'
THEN:
• Format cargo information as 'AMS 7512' followed by the in-bond type code and bond number
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is found with bill type information.
Trigger Criteria:
Context: Cargo is found with bill type information
Applied to: Apply Default Bill Type Processing
Action: The cargo is classified as empty equipment or empty residue
Logic Flow:
IF Cargo is found with bill type information
AND The cargo is classified as empty equipment or empty residue
THEN:
• Set cargo information to 'EMPTY', set load/empty indicator to 'E', and adjust equipment counters from loaded to empty
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is found and segment 07 data is available and cargo information is currently blank.
Trigger Criteria:
Context: Cargo is found and segment 07 data is available and cargo information is currently blank
Applied to: Accept Bill Type
Action: No specific bill type formatting rules apply and segment data contains valid information
Logic Flow:
IF Cargo is found and segment 07 data is available and cargo information is currently blank
AND No specific bill type formatting rules apply and segment data contains valid information
THEN:
• Extract and format cargo description from segment data into the cargo information field
R-GCX003-cbl-00272 (+4)File: GCX003.cblBusiness Rule: Equipment Load Status Validation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment item is being processed for a train manifest.
Trigger Criteria:
Context: An equipment item is being processed for a train manifest
Applied to: Generate Error Message - Missing Waybill for Loaded Equipment
Action: The equipment is marked as loaded AND no waybill is found AND the equipment is not an SBU Van unit
Logic Flow:
IF An equipment item is being processed for a train manifest
AND The equipment is marked as loaded AND no waybill is found AND the equipment is not an SBU Van unit
Business Justification: Ensures correct system behavior and process compliance when equipment item has an associated waybill.
Trigger Criteria:
Context: An equipment item has an associated waybill
Applied to: Generate Error Message - Missing Cargo for Loaded Equipment
Action: No cargo records are found for the equipment AND the equipment is marked as loaded AND the equipment is not a conveying car AND the equipment is not an idler car
Logic Flow:
IF An equipment item has an associated waybill
AND No cargo records are found for the equipment AND the equipment is marked as loaded AND the equipment is not a conveying car AND the equipment is not an idler car
THEN:
• Generate error message MSG-FIFTEEN indicating missing cargo records for loaded equipment with waybill and date information
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment item is being processed for cargo validation.
Trigger Criteria:
Context: An equipment item is being processed for cargo validation
Applied to: Equipment Validation Passed
Action: The equipment load/empty indicator shows the equipment is empty
Logic Flow:
IF An equipment item is being processed for cargo validation
AND The equipment load/empty indicator shows the equipment is empty
THEN:
• Skip cargo validation checks and mark equipment validation as passed
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment item is marked as loaded but has no waybill.
Trigger Criteria:
Context: An equipment item is marked as loaded but has no waybill
Applied to: Equipment Validation Passed
Action: The equipment is classified as an SBU Van unit
Logic Flow:
IF An equipment item is marked as loaded but has no waybill
AND The equipment is classified as an SBU Van unit
THEN:
• Exempt the equipment from waybill requirement validation and mark validation as passed
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment item has a waybill but no cargo records are found.
Trigger Criteria:
Context: An equipment item has a waybill but no cargo records are found
Applied to: Equipment Validation Passed
Action: The equipment is classified as a conveying car
Logic Flow:
IF An equipment item has a waybill but no cargo records are found
AND The equipment is classified as a conveying car
THEN:
• Exempt the equipment from cargo record requirement validation and mark validation as passed
Business Justification: Defines the strict business conditions required to proceed when cargo processing request is being evaluated.
Trigger Criteria:
Context: A cargo processing request is being evaluated
Applied to: Is Cargo Found?
Action: The system checks for cargo existence
Logic Flow:
IF A cargo processing request is being evaluated
AND The system checks for cargo existence
THEN:
• If no cargo is found, skip Mexico customs documentation validation and continue with next processing step
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is found and being processed.
Trigger Criteria:
Context: Cargo is found and being processed
Applied to: Is Train Origin Laredo TX Station?
Action: The system evaluates the train crossing station
Logic Flow:
IF Cargo is found and being processed
AND The system evaluates the train crossing station
THEN:
• If the crossing station is not Laredo TX, skip Mexico customs documentation validation
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is found and train origin is laredo tx station.
Trigger Criteria:
Context: Cargo is found and train origin is Laredo TX station
Applied to: Is Segment 02 Data Found?
Action: The system checks for segment 02 reference data availability
Logic Flow:
IF Cargo is found and train origin is Laredo TX station
AND The system checks for segment 02 reference data availability
THEN:
• If segment 02 data is not found or empty, skip Mexico customs documentation validation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when segment 02 data is available for processing.
Trigger Criteria:
Context: Segment 02 data is available for processing
Applied to: Initialize FEN and KCM Flags as Not Found
Action: The system begins Mexico customs documentation validation
Logic Flow:
IF Segment 02 data is available for processing
AND The system begins Mexico customs documentation validation
THEN:
• Set FEN documentation flag to not found and KCM documentation flag to not found
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when system is processing segment 02 reference numbers.
Trigger Criteria:
Context: System is processing segment 02 reference numbers
Applied to: Reference Number Qualifier = 'FEN'?
Action: A reference number qualifier equals 'FEN'
Logic Flow:
IF System is processing segment 02 reference numbers
AND A reference number qualifier equals 'FEN'
THEN:
• Check if the corresponding reference number value is not empty
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when system is processing segment 02 reference numbers.
Trigger Criteria:
Context: System is processing segment 02 reference numbers
Applied to: Reference Number Qualifier = 'KCM'?
Action: A reference number qualifier equals 'KCM'
Logic Flow:
IF System is processing segment 02 reference numbers
AND A reference number qualifier equals 'KCM'
THEN:
• Check if the corresponding reference number value is not empty
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when system is processing segment 02 reference numbers.
Trigger Criteria:
Context: System is processing segment 02 reference numbers
Applied to: More Reference Numbers?
Action: Current reference number processing is complete
Logic Flow:
IF System is processing segment 02 reference numbers
AND Current reference number processing is complete
THEN:
• If more reference numbers exist, continue processing next reference number, otherwise proceed to documentation validation
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when reference number qualifier is identified as 'fen'.
Trigger Criteria:
Context: A reference number qualifier is identified as 'FEN'
Applied to: Reference Number Not Empty?
Action: The system validates the reference number value
Logic Flow:
IF A reference number qualifier is identified as 'FEN'
AND The system validates the reference number value
THEN:
• If the reference number is not empty or low-values, set FEN found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when fen reference qualifier is found with valid reference number value.
Trigger Criteria:
Context: FEN reference qualifier is found with valid reference number value
Applied to: Set FEN Found Flag
Action: The system processes the FEN documentation
Logic Flow:
IF FEN reference qualifier is found with valid reference number value
AND The system processes the FEN documentation
THEN:
• Set the FEN found flag to indicate required documentation is present
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when reference number qualifier is identified as 'kcm'.
Trigger Criteria:
Context: A reference number qualifier is identified as 'KCM'
Applied to: Reference Number Not Empty?
Action: The system validates the reference number value
Logic Flow:
IF A reference number qualifier is identified as 'KCM'
AND The system validates the reference number value
THEN:
• If the reference number is not empty or low-values, set KCM found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when kcm reference qualifier is found with valid reference number value.
Trigger Criteria:
Context: KCM reference qualifier is found with valid reference number value
Applied to: Set KCM Found Flag
Action: The system processes the KCM documentation
Logic Flow:
IF KCM reference qualifier is found with valid reference number value
AND The system processes the KCM documentation
THEN:
• Set the KCM found flag to indicate required documentation is present
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when all reference numbers have been processed.
Trigger Criteria:
Context: All reference numbers have been processed
Applied to: Is Cargo Hold at Border Status?
Action: The system evaluates cargo status conditions
Logic Flow:
IF All reference numbers have been processed
AND The system evaluates cargo status conditions
THEN:
• If cargo short description equals hold at border status, check for DSP hold application
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has hold at border status.
Trigger Criteria:
Context: Cargo has hold at border status
Applied to: Is DSP Hold Applied?
Action: The system checks DSP hold application
Logic Flow:
IF Cargo has hold at border status
AND The system checks DSP hold application
THEN:
• If DSP hold is applied, generate message 52 for hold at border with DSP hold
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo has hold at border status and dsp hold is applied.
Trigger Criteria:
Context: Cargo has hold at border status and DSP hold is applied
Applied to: Hold at Border with DSP Hold
Action: The system processes the combined hold conditions
Logic Flow:
IF Cargo has hold at border status and DSP hold is applied
AND The system processes the combined hold conditions
THEN:
• Generate message 52 indicating hold at border status with DSP hold applied
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo does not have hold at border status.
Trigger Criteria:
Context: Cargo does not have hold at border status
Applied to: Is DSP Hold Applied Only?
Action: The system checks for DSP hold application
Logic Flow:
IF Cargo does not have hold at border status
AND The system checks for DSP hold application
THEN:
• If DSP hold is applied, generate message 49 for DSP hold applied
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo has dsp hold applied but no hold at border status.
Trigger Criteria:
Context: Cargo has DSP hold applied but no hold at border status
Applied to: DSP Hold Applied
Action: The system processes the DSP hold condition
Logic Flow:
IF Cargo has DSP hold applied but no hold at border status
AND The system processes the DSP hold condition
THEN:
• Generate message 49 indicating DSP hold is applied
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo has hold at border status but dsp hold is not applied.
Trigger Criteria:
Context: Cargo has hold at border status but DSP hold is not applied
Applied to: Is Hold at Border Status Only?
Action: The system evaluates the hold at border condition
Logic Flow:
IF Cargo has hold at border status but DSP hold is not applied
AND The system evaluates the hold at border condition
THEN:
• Generate message 48 for hold at border status
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo has hold at border status but no dsp hold applied.
Trigger Criteria:
Context: Cargo has hold at border status but no DSP hold applied
Applied to: Hold at Border Status
Action: The system processes the hold at border condition
Logic Flow:
IF Cargo has hold at border status but no DSP hold applied
AND The system processes the hold at border condition
THEN:
• Generate message 48 indicating hold at border status
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when all hold status conditions have been processed.
Trigger Criteria:
Context: All hold status conditions have been processed
Applied to: Is FEN Documentation Missing?
Action: The system validates FEN documentation presence
Logic Flow:
IF All hold status conditions have been processed
AND The system validates FEN documentation presence
THEN:
• If FEN documentation is not found, generate message 46 for missing FEN documentation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when fen documentation is not found in cargo data.
Trigger Criteria:
Context: FEN documentation is not found in cargo data
Applied to: FEN Documentation Required
Action: The system validates Mexico customs documentation requirements
Logic Flow:
IF FEN documentation is not found in cargo data
AND The system validates Mexico customs documentation requirements
THEN:
• Generate message 46 indicating FEN documentation is required
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when fen documentation validation is complete.
Trigger Criteria:
Context: FEN documentation validation is complete
Applied to: Is KCM Documentation Missing?
Action: The system validates KCM documentation presence
Logic Flow:
IF FEN documentation validation is complete
AND The system validates KCM documentation presence
THEN:
• If KCM documentation is not found, generate message 47 for missing KCM documentation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when kcm documentation is not found in cargo data.
Trigger Criteria:
Context: KCM documentation is not found in cargo data
Applied to: KCM Documentation Required
Action: The system validates Mexico customs documentation requirements
Logic Flow:
IF KCM documentation is not found in cargo data
AND The system validates Mexico customs documentation requirements
THEN:
• Generate message 47 indicating KCM documentation is required
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when all mexico customs documentation validation is complete.
Trigger Criteria:
Context: All Mexico customs documentation validation is complete
Applied to: Continue Processing
Action: The system has processed all required documentation checks
Logic Flow:
IF All Mexico customs documentation validation is complete
AND The system has processed all required documentation checks
Business Justification: Ensures correct system behavior and process compliance when detour processing request is initiated.
Trigger Criteria:
Context: A detour processing request is initiated
Applied to: Cargo Found?
Action: The system checks for cargo existence
Logic Flow:
IF A detour processing request is initiated
AND The system checks for cargo existence
THEN:
• If cargo is found, proceed to bond type evaluation, otherwise process as original US-US movement
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is found and bond type is transport export (te).
Trigger Criteria:
Context: Cargo is found and bond type is Transport Export (TE)
Applied to: TE Bond Detour Processing
Action: The system processes TE bond detour requirements
Logic Flow:
IF Cargo is found and bond type is Transport Export (TE)
AND The system processes TE bond detour requirements
THEN:
• Execute TE bond specific detour processing logic including port change validation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo is found and bond type is transit (tr).
Trigger Criteria:
Context: Cargo is found and bond type is Transit (TR)
Applied to: TR Bond Detour Processing
Action: The system processes TR bond detour requirements
Logic Flow:
IF Cargo is found and bond type is Transit (TR)
AND The system processes TR bond detour requirements
THEN:
• Execute TR bond specific detour processing logic including release status validation
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo is found and requires border clearance processing.
Trigger Criteria:
Context: Cargo is found and requires border clearance processing
Applied to: Border Clearance Detour Processing
Action: The system processes border clearance detour requirements
Logic Flow:
IF Cargo is found and requires border clearance processing
AND The system processes border clearance detour requirements
THEN:
• Execute border clearance specific detour processing logic including release status validation
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is found and is us to mexico export type.
Trigger Criteria:
Context: Cargo is found and is US to Mexico export type
Applied to: US-Mexico Export Detour Processing
Action: The system processes US-Mexico export detour requirements
Logic Flow:
IF Cargo is found and is US to Mexico export type
AND The system processes US-Mexico export detour requirements
THEN:
• Execute US-Mexico export specific detour processing logic including special manifest validation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when no cargo is found or cargo requires us domestic movement processing.
Trigger Criteria:
Context: No cargo is found or cargo requires US domestic movement processing
Applied to: Original US-US Movement Detour Processing
Action: The system processes US-US movement detour requirements
Logic Flow:
IF No cargo is found or cargo requires US domestic movement processing
AND The system processes US-US movement detour requirements
THEN:
• Execute US domestic movement specific detour processing logic
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when transport export cargo is being processed and cargo is not created for it and cargo status is not export and cargo is billed as cprs.
Trigger Criteria:
Context: Transport Export cargo is being processed and cargo is not created for IT and cargo status is not export and cargo is billed as CPRS
Applied to: Port Change Required?
Action: The system checks if cargo location does not match the train crossing port
Logic Flow:
IF Transport Export cargo is being processed and cargo is not created for IT and cargo status is not export and cargo is billed as CPRS
AND The system checks if cargo location does not match the train crossing port
THEN:
• If locations do not match, require port change processing, otherwise skip port change
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when special manifest creation is required for detour processing.
Trigger Criteria:
Context: A special manifest creation is required for detour processing
Applied to: User Authorized for Special Manifest?
Action: The system validates user authorization for special manifests
Logic Flow:
IF A special manifest creation is required for detour processing
AND The system validates user authorization for special manifests
THEN:
• If user is not authorized, generate error message 43 and report message, otherwise proceed with special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when user is authorized and port change is required for te bond cargo and action is send.
Trigger Criteria:
Context: User is authorized and port change is required for TE bond cargo and action is SEND
Applied to: Create Port Change Special Manifest
Action: The system creates a port change special manifest
Logic Flow:
IF User is authorized and port change is required for TE bond cargo and action is SEND
AND The system creates a port change special manifest
THEN:
• Generate message 20, set port change spawn flag, and invoke special manifest creation process
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when transit bond cargo is being processed and cargo is not created for it.
Trigger Criteria:
Context: Transit bond cargo is being processed and cargo is not created for IT
Applied to: Release Status Check
Action: The system checks if cargo status equals release status
Logic Flow:
IF Transit bond cargo is being processed and cargo is not created for IT
AND The system checks if cargo status equals release status
THEN:
• If status matches release, proceed with TR detour processing, otherwise skip
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when user is authorized and tr bond release status is valid and action is send.
Trigger Criteria:
Context: User is authorized and TR bond release status is valid and action is SEND
Applied to: Create TR Detour Special Manifest
Action: The system creates a TR detour special manifest
Logic Flow:
IF User is authorized and TR bond release status is valid and action is SEND
AND The system creates a TR detour special manifest
THEN:
• Generate message 23, set detour spawn flag, and invoke special manifest creation process
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when border clearance cargo is being processed and cargo is not created for it.
Trigger Criteria:
Context: Border clearance cargo is being processed and cargo is not created for IT
Applied to: Release Status Check
Action: The system checks cargo release status
Logic Flow:
IF Border clearance cargo is being processed and cargo is not created for IT
AND The system checks cargo release status
THEN:
• If status equals release, proceed with border clearance detour, if invalid status generate message 31, otherwise skip
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when user is authorized and border clearance release status is valid and action is send.
Trigger Criteria:
Context: User is authorized and border clearance release status is valid and action is SEND
Applied to: Create Border Clearance Special Manifest
Action: The system creates a border clearance special manifest
Logic Flow:
IF User is authorized and border clearance release status is valid and action is SEND
AND The system creates a border clearance special manifest
THEN:
• Generate message 23, set detour spawn flag, and invoke special manifest creation process
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when us-mexico export cargo is being processed.
Trigger Criteria:
Context: US-Mexico export cargo is being processed
Applied to: Special Manifest Check
Action: The system checks if special manifest field is empty
Logic Flow:
IF US-Mexico export cargo is being processed
AND The system checks if special manifest field is empty
THEN:
• If special manifest is empty, proceed with export detour processing, otherwise skip
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when user is authorized and us-mexico export requires special manifest and action is send.
Trigger Criteria:
Context: User is authorized and US-Mexico export requires special manifest and action is SEND
Applied to: Create US-MX Export Special Manifest
Action: The system creates a US-Mexico export special manifest
Logic Flow:
IF User is authorized and US-Mexico export requires special manifest and action is SEND
AND The system creates a US-Mexico export special manifest
THEN:
• Generate message 23, set 88-TR detour spawn flag, and invoke special manifest creation process
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when user is authorized and us-us detour is required and action is send.
Trigger Criteria:
Context: User is authorized and US-US detour is required and action is SEND
Applied to: Create US-US Detour Special Manifest
Action: The system creates a US-US detour special manifest
Logic Flow:
IF User is authorized and US-US detour is required and action is SEND
AND The system creates a US-US detour special manifest
THEN:
• Generate message 23, set US-US detour spawn flag, and invoke special manifest creation process
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with default manifest type.
Trigger Criteria:
Context: A cargo record exists with default manifest type
Applied to: Check if TR Created for IT = SPACES
Action: The system checks the TR created for IT field
Logic Flow:
IF A cargo record exists with default manifest type
AND The system checks the TR created for IT field
THEN:
• Processing continues only if TR created for IT field is empty (SPACES)
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with tr created for it field as spaces.
Trigger Criteria:
Context: A cargo record with TR created for IT field as SPACES
Applied to: Check Cargo Status Description
Action: The system evaluates the cargo short description status
Logic Flow:
IF A cargo record with TR created for IT field as SPACES
AND The system evaluates the cargo short description status
THEN:
• If status equals RELEASE, proceed with detour processing, otherwise generate invalid cargo status message
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with release status for border clearance.
Trigger Criteria:
Context: A cargo record with release status for border clearance
Applied to: Request Action Type?
Action: The system checks the request action type
Logic Flow:
IF A cargo record with release status for border clearance
AND The system checks the request action type
THEN:
• If action is REPORT, generate detour report message; if action is SEND, check user authorization
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when request action type of report for border clearance cargo.
Trigger Criteria:
Context: A request action type of REPORT for border clearance cargo
Applied to: Generate Message 18 - Detour Report
Action: The system processes the detour requirement
Logic Flow:
IF A request action type of REPORT for border clearance cargo
AND The system processes the detour requirement
THEN:
• Generate message 18 indicating detour required and add to report output
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when send request for border clearance cargo requiring special manifest.
Trigger Criteria:
Context: A SEND request for border clearance cargo requiring special manifest
Applied to: User Authorized for Special Manifest?
Action: The system validates user special manifest authorization
Logic Flow:
IF A SEND request for border clearance cargo requiring special manifest
AND The system validates user special manifest authorization
THEN:
• If user is not authorized, generate authorization error message; if authorized, proceed with manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when user without special manifest authorization attempting to send border clearance cargo.
Trigger Criteria:
Context: A user without special manifest authorization attempting to send border clearance cargo
Applied to: Generate Message 43 - Not Authorized
Action: The system validates authorization permissions
Logic Flow:
IF A user without special manifest authorization attempting to send border clearance cargo
AND The system validates authorization permissions
THEN:
• Generate message 43 indicating user not authorized for special manifest and add to report output
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when authorized user sending border clearance cargo requiring special manifest.
Trigger Criteria:
Context: An authorized user sending border clearance cargo requiring special manifest
Applied to: Generate Message 23 - Special Manifest Created
Action: The system creates the special manifest
Logic Flow:
IF An authorized user sending border clearance cargo requiring special manifest
AND The system creates the special manifest
THEN:
• Generate message 23 confirming special manifest creation and add to report output
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when authorized special manifest creation for border clearance.
Trigger Criteria:
Context: An authorized special manifest creation for border clearance
Applied to: Set Detour Spawn Flag
Action: The system prepares for manifest generation
Logic Flow:
IF An authorized special manifest creation for border clearance
AND The system prepares for manifest generation
THEN:
• Set the detour spawn flag to TRUE to trigger special manifest processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when detour spawn flag set to true for border clearance. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A detour spawn flag set to TRUE for border clearance
Applied to: Create Special Manifest
Action: The system processes the special manifest requirement
Logic Flow:
IF A detour spawn flag set to TRUE for border clearance
AND The system processes the special manifest requirement
THEN:
• Call the special manifest creation procedure to generate the required documentation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with tr created for it as spaces but cargo status not equal to release.
Trigger Criteria:
Context: A cargo record with TR created for IT as SPACES but cargo status not equal to RELEASE
Applied to: Generate Message 31 - Invalid Cargo Status
Action: The system validates cargo status for border clearance
Logic Flow:
IF A cargo record with TR created for IT as SPACES but cargo status not equal to RELEASE
AND The system validates cargo status for border clearance
THEN:
• Generate message 31 indicating invalid cargo status and add to report output
R-GCX003-cbl-00347 (+16)File: GCX003.cblBusiness Rule: US
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill processing scenario exists.
Trigger Criteria:
Context: A waybill processing scenario exists
Applied to: Waybill Found AND No Cargo Found?
Action: The system checks if waybill is found and no cargo is found
Logic Flow:
IF A waybill processing scenario exists
AND The system checks if waybill is found and no cargo is found
THEN:
• The system should proceed to US-US movement detour processing if both conditions are true, otherwise skip the processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when us-us movement detour scenario is identified.
Trigger Criteria:
Context: A US-US movement detour scenario is identified
Applied to: Request Action Type?
Action: The system evaluates the request action type
Logic Flow:
IF A US-US movement detour scenario is identified
AND The system evaluates the request action type
THEN:
• The system should route to report generation if action is REPORT, or to authorization check if action is SEND
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when us-us movement detour scenario exists and request action is report.
Trigger Criteria:
Context: A US-US movement detour scenario exists and request action is REPORT
Applied to: Original US-US Movement Detour Required
Action: The system processes the detour for reporting
Logic Flow:
IF A US-US movement detour scenario exists and request action is REPORT
AND The system processes the detour for reporting
THEN:
• The system should generate warning message 18 indicating that an original US-US movement detour is required
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when us-us movement detour scenario exists and request action is send.
Trigger Criteria:
Context: A US-US movement detour scenario exists and request action is SEND
Applied to: User Authorized for Special Manifests?
Action: The system checks user authorization for special manifests
Logic Flow:
IF A US-US movement detour scenario exists and request action is SEND
AND The system checks user authorization for special manifests
THEN:
• The system should proceed with special manifest creation if authorized, otherwise generate an authorization error
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when us-us movement detour scenario exists with send action and user lacks special manifest authorization.
Trigger Criteria:
Context: A US-US movement detour scenario exists with SEND action and user lacks special manifest authorization
Applied to: User Not Authorized for Special Manifests
Action: The system processes the unauthorized special manifest request
Logic Flow:
IF A US-US movement detour scenario exists with SEND action and user lacks special manifest authorization
AND The system processes the unauthorized special manifest request
THEN:
• The system should generate error message 43 indicating the user is not authorized for special manifests
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when us-us movement detour scenario exists with send action and user has special manifest authorization.
Trigger Criteria:
Context: A US-US movement detour scenario exists with SEND action and user has special manifest authorization
Applied to: Special Manifest Will Be Created
Action: The system processes the authorized special manifest request
Logic Flow:
IF A US-US movement detour scenario exists with SEND action and user has special manifest authorization
AND The system processes the authorized special manifest request
THEN:
• The system should generate success message 23 indicating that a special manifest will be created
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when us-us movement detour scenario requires special manifest creation.
Trigger Criteria:
Context: A US-US movement detour scenario requires special manifest creation
Applied to: Set US-US Detour Spawn Flag
Action: The system processes the detour request
Logic Flow:
IF A US-US movement detour scenario requires special manifest creation
AND The system processes the detour request
THEN:
• The system should set the US-US detour spawn flag to trigger subsequent special manifest processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when us-us detour spawn flag is set.
Trigger Criteria:
Context: A US-US detour spawn flag is set
Applied to: Create Special Manifest Request
Action: The system initiates special manifest creation
Logic Flow:
IF A US-US detour spawn flag is set
AND The system initiates special manifest creation
THEN:
• The system should create a special manifest request through the special manifest creation process
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists with bill type code.
Trigger Criteria:
Context: A cargo record exists with bill type code
Applied to: Check Export Bill Type 88?
Action: Processing US-Mexico export detour and bill type code is checked
Logic Flow:
IF A cargo record exists with bill type code
AND Processing US-Mexico export detour and bill type code is checked
THEN:
• Continue processing only if bill type code equals Export type 88, otherwise skip processing
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when origin and destination country codes are available.
Trigger Criteria:
Context: Origin and destination country codes are available
Applied to: Check US-MX Country Codes?
Action: Processing export detour for bill type 88
Logic Flow:
IF Origin and destination country codes are available
AND Processing export detour for bill type 88
THEN:
• Continue processing only if origin-destination country codes equal 'USMX', otherwise skip processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with us-mexico export type 88.
Trigger Criteria:
Context: A cargo record with US-Mexico export type 88
Applied to: Check Special 88 Manifest Flag?
Action: Checking special manifest requirements
Logic Flow:
IF A cargo record with US-Mexico export type 88
AND Checking special manifest requirements
THEN:
• Continue processing if special 88 manifest flag is set, otherwise check if special manifest field is empty
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train crossing port station code.
Trigger Criteria:
Context: A train crossing port station code
Applied to: Check Not Laredo Station?
Action: Processing US-Mexico export detour with special 88 manifest
Logic Flow:
IF A train crossing port station code
AND Processing US-Mexico export detour with special 88 manifest
THEN:
• Continue processing only if station is not Laredo TX, otherwise skip detour processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record for us-mexico export processing.
Trigger Criteria:
Context: A cargo record for US-Mexico export processing
Applied to: Check Special Manifest Empty?
Action: Special manifest field is checked
Logic Flow:
IF A cargo record for US-Mexico export processing
AND Special manifest field is checked
THEN:
• Continue with detour processing if special manifest field is empty (spaces), otherwise skip processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when valid us-mexico export detour scenario with empty special manifest.
Trigger Criteria:
Context: A valid US-Mexico export detour scenario with empty special manifest
Applied to: Generate Report Message 50
Action: Request action type is 'REPORT'
Logic Flow:
IF A valid US-Mexico export detour scenario with empty special manifest
AND Request action type is 'REPORT'
THEN:
• Generate message 50 and add to report without creating special manifest
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when send action request for us-mexico export detour and user authorization status.
Trigger Criteria:
Context: A send action request for US-Mexico export detour and user authorization status
Applied to: Generate Warning Message 43 - User Not Authorized
Action: User is not authorized for special manifests
Logic Flow:
IF A send action request for US-Mexico export detour and user authorization status
AND User is not authorized for special manifests
THEN:
• Generate warning message 43 and skip special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when send action request for us-mexico export detour with authorized user.
Trigger Criteria:
Context: A send action request for US-Mexico export detour with authorized user
Applied to: Generate Special Manifest Message 23
Action: User has special manifest authorization
Logic Flow:
IF A send action request for US-Mexico export detour with authorized user
AND User has special manifest authorization
THEN:
• Generate message 23, set 88-TR detour spawn flag, and create special manifest
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record that doesn't meet export type 88 criteria.
Trigger Criteria:
Context: A cargo record that doesn't meet export type 88 criteria
Applied to: Generate Error Message 31 - Invalid Status
Action: Cargo status is invalid for US-Mexico export processing
Logic Flow:
IF A cargo record that doesn't meet export type 88 criteria
AND Cargo status is invalid for US-Mexico export processing
THEN:
• Generate error message 31 indicating invalid cargo status
Business Justification: Ensures correct system behavior and process compliance when waybill contains an origin state/province code.
Trigger Criteria:
Context: A waybill contains an origin state/province code
Applied to: Search State-Country Reference Table for Origin
Action: The system searches the state-country reference table for the origin state code
Logic Flow:
IF A waybill contains an origin state/province code
AND The system searches the state-country reference table for the origin state code
THEN:
• If the origin state is found in the table, set the origin country code from the table entry, otherwise set the origin country code to spaces
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill contains a destination state/province code.
Trigger Criteria:
Context: A waybill contains a destination state/province code
Applied to: Search State-Country Reference Table for Destination
Action: The system searches the state-country reference table for the destination state code
Logic Flow:
IF A waybill contains a destination state/province code
AND The system searches the state-country reference table for the destination state code
THEN:
• If the destination state is found in the table, set the destination country code from the table entry, otherwise set the destination country code to spaces
R-GCX003-cbl-00366 (+10)File: GCX003.cblBusiness Rule: Container on Flat Car Processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment item is being processed for a train manifest.
Trigger Criteria:
Context: An equipment item is being processed for a train manifest
Applied to: Container Found or Conveying Car with Load?
Action: The system checks if the equipment has containers or is a conveying car with load status
Logic Flow:
IF An equipment item is being processed for a train manifest
AND The system checks if the equipment has containers or is a conveying car with load status
THEN:
• Container processing is initiated if container is found OR if equipment is a conveying car with loaded status, otherwise container processing is skipped
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when container processing is required for an equipment item.
Trigger Criteria:
Context: Container processing is required for an equipment item
Applied to: Check if Container Not Found in Primary System
Action: The system determines that container was not found in the primary waybill system
Logic Flow:
IF Container processing is required for an equipment item
AND The system determines that container was not found in the primary waybill system
THEN:
• The system initiates container lookup in the FWSWRWR container database
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container information is not available from primary waybill system.
Trigger Criteria:
Context: Container information is not available from primary waybill system
Applied to: Retrieve Container from FWSWRWR Database
Action: The system searches the FWSWRWR database using the waybill root key
Logic Flow:
IF Container information is not available from primary waybill system
AND The system searches the FWSWRWR database using the waybill root key
THEN:
• Container segment information is retrieved if found in the database
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container segment is found in fwswrwr database.
Trigger Criteria:
Context: Container segment is found in FWSWRWR database
Applied to: Get Next Container Equipment Record
Action: The system retrieves the next container equipment record using GNP function
Logic Flow:
IF Container segment is found in FWSWRWR database
AND The system retrieves the next container equipment record using GNP function
THEN:
• Container equipment details are loaded for processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when valid container equipment record is retrieved.
Trigger Criteria:
Context: A valid container equipment record is retrieved
Applied to: Move Container ID to Equipment ID
Action: The system processes the container information
Logic Flow:
IF A valid container equipment record is retrieved
AND The system processes the container information
THEN:
• The container ID is assigned to the working equipment ID variable for further processing
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when container has been processed for a rail car.
Trigger Criteria:
Context: A container has been processed for a rail car
Applied to: More Containers on This Car?
Action: The system checks for additional containers using inquiry system data
Logic Flow:
IF A container has been processed for a rail car
AND The system checks for additional containers using inquiry system data
THEN:
• Processing continues with next container if more containers exist, otherwise container processing is marked complete
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when multiple containers exist on the same rail car.
Trigger Criteria:
Context: Multiple containers exist on the same rail car
Applied to: Increment Container Sequence
Action: The system processes containers sequentially
Logic Flow:
IF Multiple containers exist on the same rail car
AND The system processes containers sequentially
THEN:
• The container sequence counter is incremented to process the next container
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when container id is retrieved from the sequence.
Trigger Criteria:
Context: A container ID is retrieved from the sequence
Applied to: Valid Container ID?
Action: The system validates the container ID
Logic Flow:
IF A container ID is retrieved from the sequence
AND The system validates the container ID
THEN:
• Processing continues if container ID is not spaces or low-values, otherwise container processing is marked complete
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when container is not found in primary fwswrwr database.
Trigger Criteria:
Context: Container is not found in primary FWSWRWR database
Applied to: Search FWIQ Container Cross-Reference
Action: The system searches the FWIQ inquiry database using waybill information
Logic Flow:
IF Container is not found in primary FWSWRWR database
AND The system searches the FWIQ inquiry database using waybill information
THEN:
• Container cross-reference records are retrieved if they exist in the inquiry system
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container cross-reference records are found in inquiry system.
Trigger Criteria:
Context: Container cross-reference records are found in inquiry system
Applied to: Extract Container Information from Inquiry
Action: The system processes FWIQBOTL records with 'T/C XREF' identifier
Logic Flow:
IF Container cross-reference records are found in inquiry system
AND The system processes FWIQBOTL records with 'T/C XREF' identifier
THEN:
• Container IDs and associated waybill information are extracted and stored in container table
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when container processing is required but container is not found in any database.
Trigger Criteria:
Context: Container processing is required but container is not found in any database
Applied to: Generate Container Not Found Error
Action: Both FWSWRWR and FWIQ inquiry systems return no container information
Logic Flow:
IF Container processing is required but container is not found in any database
AND Both FWSWRWR and FWIQ inquiry systems return no container information
THEN:
• Error message 11 is generated indicating container not found
R-GCX003-cbl-00377 (+30)File: GCX003.cblBusiness Rule: Report Header and Summary Building
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report is being finalized.
Trigger Criteria:
Context: A report is being finalized
Applied to: Set Report End Marker
Action: The current report line at index RPT-IDX is blank
Logic Flow:
IF A report is being finalized
AND The current report line at index RPT-IDX is blank
THEN:
• Set the report line as end of report marker
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report is being finalized.
Trigger Criteria:
Context: A report is being finalized
Applied to: Store Last Line Index
Action: The report processing reaches the end
Logic Flow:
IF A report is being finalized
AND The report processing reaches the end
THEN:
• Store the current RPT-IDX as RPT-LAST-LINEandNEW-RPT-IDX as NEW-RPT-LAST-LINE
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report header is being created.
Trigger Criteria:
Context: A report header is being created
Applied to: Create Header Line 1 - Train Information
Action: Setting up the first header line
Logic Flow:
IF A report header is being created
AND Setting up the first header line
THEN:
• Set RPT-HEADER-LINE-1 flag to TRUE for line 1
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report header is being created.
Trigger Criteria:
Context: A report header is being created
Applied to: Create Header Line 2 - User Information
Action: Setting up the second header line
Logic Flow:
IF A report header is being created
AND Setting up the second header line
THEN:
• Set RPT-HEADER-LINE-2 flag to TRUE for line 2
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report header is being created.
Trigger Criteria:
Context: A report header is being created
Applied to: Create Header Line 3 - Action Type
Action: Setting up the third header line
Logic Flow:
IF A report header is being created
AND Setting up the third header line
THEN:
• Set RPT-HEADER-LINE-3 flag to TRUE for line 3
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report header is being created.
Trigger Criteria:
Context: A report header is being created
Applied to: Create Header Line 4 - Train Details
Action: Setting up the fourth header line
Logic Flow:
IF A report header is being created
AND Setting up the fourth header line
THEN:
• Set RPT-HEADER-LINE-4 flag to TRUE for line 4
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report header line 1 is being populated.
Trigger Criteria:
Context: A report header line 1 is being populated
Applied to: Set Train ID in Header
Action: Adding train identification information
Logic Flow:
IF A report header line 1 is being populated
AND Adding train identification information
THEN:
• Move REQ-TRAIN-ID to RPT-HDR-TRAIN-ID for line 1
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report header line 1 is being populated.
Trigger Criteria:
Context: A report header line 1 is being populated
Applied to: Set Origin Station Name in Header
Action: Adding origin station information
Logic Flow:
IF A report header line 1 is being populated
AND Adding origin station information
THEN:
• Move GCSTBRT-SC-US-STAT-NAME to RPT-HDR-ORIGIN for line 1
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report header line 2 is being populated.
Trigger Criteria:
Context: A report header line 2 is being populated
Applied to: Set User ID in Header
Action: Adding user identification information
Logic Flow:
IF A report header line 2 is being populated
AND Adding user identification information
THEN:
• Move CC-ACF2-USERID from CCCOM to RPT-HDR-USER-ID for line 2
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report header line 2 is being populated.
Trigger Criteria:
Context: A report header line 2 is being populated
Applied to: Set Terminal ID in Header
Action: Adding terminal identification information
Logic Flow:
IF A report header line 2 is being populated
AND Adding terminal identification information
THEN:
• Move CC-ORIG-LTERM from CCCOM to RPT-HDR-LTERM for line 2
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report header line 2 is being populated.
Trigger Criteria:
Context: A report header line 2 is being populated
Applied to: Set Processing Date in Header
Action: Adding processing date information
Logic Flow:
IF A report header line 2 is being populated
AND Adding processing date information
THEN:
• Move CC-MACHINE-DATE from CCCOM to RPT-HDR-DATE for line 2
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report header line 2 is being populated.
Trigger Criteria:
Context: A report header line 2 is being populated
Applied to: Set Processing Time in Header
Action: Adding processing time information
Logic Flow:
IF A report header line 2 is being populated
AND Adding processing time information
THEN:
• Move CC-MACHINE-HOURandCC-MACHINE-MIN from CCCOM to RPT-HDR-HOURandRPT-HDR-MIN for line 2
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report header line 3 is being populated.
Trigger Criteria:
Context: A report header line 3 is being populated
Applied to: Request Action Type?
Action: The request action type is being evaluated
Logic Flow:
IF A report header line 3 is being populated
AND The request action type is being evaluated
THEN:
• Branch to SEND action processing ifREQ-ACTION-SEND, REPORT action processing ifREQ-ACTION-REPORT, or OTHER action processing for any other action type
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report header line 3 is being populated.
Trigger Criteria:
Context: A report header line 3 is being populated
Applied to: Set SEND Action Header
Action: The request action type is SEND
Logic Flow:
IF A report header line 3 is being populated
AND The request action type is SEND
THEN:
• Perform C150-SEND-REPORT-WRAPUP to set SEND-specific header information
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report header line 3 is being populated.
Trigger Criteria:
Context: A report header line 3 is being populated
Applied to: Set REPORT Action Header
Action: The request action type is REPORT
Logic Flow:
IF A report header line 3 is being populated
AND The request action type is REPORT
THEN:
• Set RPT-HDR-REPORT flag to TRUE for line 3
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report header line 3 is being populated.
Trigger Criteria:
Context: A report header line 3 is being populated
Applied to: Set OTHER Action Header
Action: The request action type is neither SEND nor REPORT
Logic Flow:
IF A report header line 3 is being populated
AND The request action type is neither SEND nor REPORT
THEN:
• Move REQ-TYPE to RPT-HDR-TYPE for line 3 and set RPT-RESULT-ABORT flag to TRUE for line 3
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when send or report action header is being configured.
Trigger Criteria:
Context: A SEND or REPORT action header is being configured
Applied to: Processing Status?
Action: The processing status needs to be determined
Logic Flow:
IF A SEND or REPORT action header is being configured
AND The processing status needs to be determined
THEN:
• Check if there are no errors and no warnings to set result as NO-MSG, otherwise set result as MSG with error and warning counts
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when send action is being processed.
Trigger Criteria:
Context: A SEND action is being processed
Applied to: Set Result as SENT
Action: There are no errors (RPT-NO-ERROR) and no spawn processing (RPT-NO-SPAWN)
Logic Flow:
IF A SEND action is being processed
AND There are no errors (RPT-NO-ERROR) and no spawn processing (RPT-NO-SPAWN)
THEN:
• Set RPT-RESULT-SENT flag to TRUE for line 3 and move RPT-WARNING-CNT to RPT-WRN-CNT1 for line 3
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when send action is being processed.
Trigger Criteria:
Context: A SEND action is being processed
Applied to: Set Result as NOT SENT
Action: There are errors or spawn processing is required
Logic Flow:
IF A SEND action is being processed
AND There are errors or spawn processing is required
THEN:
• Set RPT-RESULT-NO-SENT flag to TRUE for line 3, move RPT-WARNING-CNT to RPT-WRN-CNT2 for line 3, add RPT-SPAWN-CNT to RPT-ERROR-CNT, and move RPT-ERROR-CNT to RPT-ERR-CNT2 for line 3
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when other action type is being processed.
Trigger Criteria:
Context: An OTHER action type is being processed
Applied to: Set Result as ABORTED
Action: The action is neither SEND nor REPORT
Logic Flow:
IF An OTHER action type is being processed
AND The action is neither SEND nor REPORT
THEN:
• Set RPT-RESULT-ABORT flag to TRUE for line 3
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report action header is being configured.
Trigger Criteria:
Context: A REPORT action header is being configured
Applied to: Add Warning Count to Header & Add Error Count to Header & Add DSP Count to Header
Action: There are errors or warnings (not RPT-NO-ERROR or not RPT-NO-WRN)
Logic Flow:
IF A REPORT action header is being configured
AND There are errors or warnings (not RPT-NO-ERROR or not RPT-NO-WRN)
THEN:
• Move RPT-WARNING-CNT to RPT-WRN-CNT4 for line 3
• Move RPT-ERROR-CNT to RPT-ERR-CNT4 for line 3
• Move RPT-DSP-CNT to RPT-DSP-CNT4 for line 3
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report header line 4 is being populated.
Trigger Criteria:
Context: A report header line 4 is being populated
Applied to: Set US Customs Train ID
Action: Adding US Customs train identification
Logic Flow:
IF A report header line 4 is being populated
AND Adding US Customs train identification
THEN:
• Move GCWTL-M1005-US-CUST-TRAIN-ID to RPT-HDR-US-TRAIN-ID for line 4
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report header line 4 is being populated.
Trigger Criteria:
Context: A report header line 4 is being populated
Applied to: Set ETA Year in Header
Action: Adding ETA year information
Logic Flow:
IF A report header line 4 is being populated
AND Adding ETA year information
THEN:
• Move REQ-ETA-YEAR to RPT-HDR-ETA-YEAR for line 4
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report header line 4 is being populated.
Trigger Criteria:
Context: A report header line 4 is being populated
Applied to: Set ETA Month in Header
Action: Adding ETA month information
Logic Flow:
IF A report header line 4 is being populated
AND Adding ETA month information
THEN:
• Move REQ-ETA-MONTH to RPT-HDR-ETA-MONTH for line 4
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report header line 4 is being populated.
Trigger Criteria:
Context: A report header line 4 is being populated
Applied to: Set ETA Day in Header
Action: Adding ETA day information
Logic Flow:
IF A report header line 4 is being populated
AND Adding ETA day information
THEN:
• Move REQ-ETA-DAY to RPT-HDR-ETA-DAY for line 4
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report header line 4 is being populated.
Trigger Criteria:
Context: A report header line 4 is being populated
Applied to: Set ETA Hour in Header
Action: Adding ETA hour information
Logic Flow:
IF A report header line 4 is being populated
AND Adding ETA hour information
THEN:
• Move REQ-ETA-HOUR to RPT-HDR-ETA-HOUR for line 4
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report header line 4 is being populated.
Trigger Criteria:
Context: A report header line 4 is being populated
Applied to: Set ETA Minutes in Header
Action: Adding ETA minutes information
Logic Flow:
IF A report header line 4 is being populated
AND Adding ETA minutes information
THEN:
• Move REQ-ETA-MIN to RPT-HDR-ETA-MIN for line 4
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report header is being finalized.
Trigger Criteria:
Context: A report header is being finalized
Applied to: Create Detail Headers
Action: Setting up detail section headers
Logic Flow:
IF A report header is being finalized
AND Setting up detail section headers
THEN:
• Set RPT-DET-HEADER-1 flag to TRUE for line 6 andRPT-DET-HEADER-2 flag to TRUE for line 7
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when all report headers have been configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All report headers have been configured
Applied to: Copy Headers to Report Lines
Action: Finalizing the report structure
Logic Flow:
IF All report headers have been configured
AND Finalizing the report structure
THEN:
• Move RPT-LINE content for lines 1 through 5 to corresponding EMI-TEXT-LINE positions
R-GCX003-cbl-00408 (+16)File: GCX003.cblBusiness Rule: Train Database Record Creation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train record creation process is initiated.
Trigger Criteria:
Context: A train record creation process is initiated
Applied to: Initialize Train Header Record
Action: The system begins creating a new train database record
Logic Flow:
IF A train record creation process is initiated
AND The system begins creating a new train database record
THEN:
• The train header record structure is initialized to empty values
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train header record is initialized and train request data is available.
Trigger Criteria:
Context: A train header record is initialized and train request data is available
Applied to: Set Train Identification Data
Action: The system sets train identification data
Logic Flow:
IF A train header record is initialized and train request data is available
AND The system sets train identification data
THEN:
• The train number, train day, train origin, and consist number are assigned to the train header record
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train identification data is set and station information is validated.
Trigger Criteria:
Context: Train identification data is set and station information is validated
Applied to: Set Train Origin and Destination
Action: The system assigns station information to the train record
Logic Flow:
IF Train identification data is set and station information is validated
AND The system assigns station information to the train record
THEN:
• The US station code, US station name, and FIRMS code are populated in the train header
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when station information is assigned and eta data is validated.
Trigger Criteria:
Context: Station information is assigned and ETA data is validated
Applied to: Set Estimated Time of Arrival
Action: The system sets the estimated time of arrival
Logic Flow:
IF Station information is assigned and ETA data is validated
AND The system sets the estimated time of arrival
THEN:
• The ETA date and ETA time are assigned to the train header record
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when eta information is set and aei send status is determined.
Trigger Criteria:
Context: ETA information is set and AEI send status is determined
Applied to: Set AEI Send Flag
Action: The system configures the AEI send flag
Logic Flow:
IF ETA information is set and AEI send status is determined
AND The system configures the AEI send flag
THEN:
• The AEI send indicator is set to true if AEI sending is enabled, otherwise set to false
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when aei send flag is configured.
Trigger Criteria:
Context: AEI send flag is configured
Applied to: Initialize Equipment Counter
Action: The system initializes equipment processing
Logic Flow:
IF AEI send flag is configured
AND The system initializes equipment processing
THEN:
• The equipment quantity counter is set to zero
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment processing is in progress with current report index position.
Trigger Criteria:
Context: Equipment processing is in progress with current report index position
Applied to: More Equipment to Process?
Action: The system checks for more equipment to process
Logic Flow:
IF Equipment processing is in progress with current report index position
AND The system checks for more equipment to process
THEN:
• Continue processing if report index is within the last line limit and equipment table is not full, otherwise stop processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when more equipment exists to process and current report line contains equipment data.
Trigger Criteria:
Context: More equipment exists to process and current report line contains equipment data
Applied to: Extract Equipment Details
Action: The system extracts equipment details
Logic Flow:
IF More equipment exists to process and current report line contains equipment data
AND The system extracts equipment details
THEN:
• Equipment ID is extracted from either container ID or car identification fields, and equipment type information is captured
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment details are extracted from the report line.
Trigger Criteria:
Context: Equipment details are extracted from the report line
Applied to: Determine Equipment Type
Action: The system determines equipment type
Logic Flow:
IF Equipment details are extracted from the report line
AND The system determines equipment type
THEN:
• Equipment is classified as container if container ID exists, otherwise classified as railcar using car identification
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment type is determined and cargo information is available.
Trigger Criteria:
Context: Equipment type is determined and cargo information is available
Applied to: Set Load/Empty Status
Action: The system sets load/empty status
Logic Flow:
IF Equipment type is determined and cargo information is available
AND The system sets load/empty status
THEN:
• Status is set to 'E' (empty) if no cargo key exists, otherwise set to the load/empty indicator from the report line
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment type is determined and load/empty status is set.
Trigger Criteria:
Context: Equipment type is determined and load/empty status is set
Applied to: Store Equipment Information
Action: The system stores equipment information
Logic Flow:
IF Equipment type is determined and load/empty status is set
AND The system stores equipment information
THEN:
• Equipment ID, equipment type, load/empty status, cargo key, and condition response code are stored in the equipment table at the current quantity position
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment information is stored in the equipment table.
Trigger Criteria:
Context: Equipment information is stored in the equipment table
Applied to: Increment Equipment Counter
Action: The system increments the equipment counter
Logic Flow:
IF Equipment information is stored in the equipment table
AND The system increments the equipment counter
THEN:
• The equipment quantity counter is increased by one
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment counter is incremented and current report index position is known.
Trigger Criteria:
Context: Equipment counter is incremented and current report index position is known
Applied to: Equipment Table Full?
Action: The system checks equipment table capacity
Logic Flow:
IF Equipment counter is incremented and current report index position is known
AND The system checks equipment table capacity
THEN:
• If equipment quantity equals maximum capacity and more report lines exist, trigger system abend for table overflow, otherwise continue processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when all equipment is processed and train header is complete.
Trigger Criteria:
Context: All equipment is processed and train header is complete
Applied to: Insert Train Record to Database
Action: The system inserts the train record to database
Logic Flow:
IF All equipment is processed and train header is complete
AND The system inserts the train record to database
THEN:
• The train list record is inserted into the GCSUTRT and GCSUTDP database tables
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train record insertion to database is attempted.
Trigger Criteria:
Context: Train record insertion to database is attempted
Applied to: Database Insert Successful?
Action: The system validates database insert success
Logic Flow:
IF Train record insertion to database is attempted
AND The system validates database insert success
THEN:
• If insertion is successful, continue processing, otherwiseif record already exists trigger system abend
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when database insertion is validated as successful.
Trigger Criteria:
Context: Database insertion is validated as successful
Applied to: Train Record Created Successfully
Action: The system completes train record creation
Logic Flow:
IF Database insertion is validated as successful
AND The system completes train record creation
THEN:
• Train record creation process is marked as successfully completed
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when database insertion fails or equipment table overflow occurs.
Trigger Criteria:
Context: Database insertion fails or equipment table overflow occurs
Applied to: Database Insert Failed - Abend
Action: The system handles database insert failure
Logic Flow:
IF Database insertion fails or equipment table overflow occurs
AND The system handles database insert failure
THEN:
• System abend is triggered with appropriate error message
Business Justification: Dictates the expected operational logic and validation steps when waybill exists with routing information in rut-info fields.
Trigger Criteria:
Context: A waybill exists with routing information in RUT-INFO fields
Applied to: Extract Routing Information from Waybill
Action: The system processes the waybill routing data
Logic Flow:
IF A waybill exists with routing information in RUT-INFO fields
AND The system processes the waybill routing data
THEN:
• The routing information is extracted into working storage and exclamation marks are replaced with spaces for proper parsing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment routing classification process is starting.
Trigger Criteria:
Context: Equipment routing classification process is starting
Applied to: Initialize Route Search Variables
Action: The system begins route pattern analysis
Logic Flow:
IF Equipment routing classification process is starting
AND The system begins route pattern analysis
THEN:
• Route search variables are initialized and route not found flag is set to true
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment has routing information with csxt as first carrier, cprs as second carrier, and det as junction.
Trigger Criteria:
Context: Equipment has routing information with CSXT as first carrier, CPRS as second carrier, and DET as junction
Applied to: Set Equipment Routing Flag = 3 for CSXT
Action: The system analyzes the route pattern
Logic Flow:
IF Equipment has routing information with CSXT as first carrier, CPRS as second carrier, and DET as junction
AND The system analyzes the route pattern
THEN:
• Equipment routing indicator is set to 3 and route found flag is set to true
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment has routing information with ns as first carrier, cprs as second carrier, and det as junction.
Trigger Criteria:
Context: Equipment has routing information with NS as first carrier, CPRS as second carrier, and DET as junction
Applied to: Set Equipment Routing Flag = 4 for NS
Action: The system analyzes the route pattern
Logic Flow:
IF Equipment has routing information with NS as first carrier, CPRS as second carrier, and DET as junction
AND The system analyzes the route pattern
THEN:
• Equipment routing indicator is set to 4 and route found flag is set to true
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment does not match csxt-cprs-det or ns-cprs-det patterns and has hazardous materials indicator.
Trigger Criteria:
Context: Equipment does not match CSXT-CPRS-DET or NS-CPRS-DET patterns and has hazardous materials indicator
Applied to: Set Equipment Routing Flag = 2 for Haulage
Action: The system checks for hazmat classification
Logic Flow:
IF Equipment does not match CSXT-CPRS-DET or NS-CPRS-DET patterns and has hazardous materials indicator
AND The system checks for hazmat classification
THEN:
• Equipment routing indicator is set to 2 and route found flag is set to true
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment does not match any specific routing patterns or no routing information is found.
Trigger Criteria:
Context: Equipment does not match any specific routing patterns or no routing information is found
Applied to: Set Equipment Routing Flag = 1 for Empty/No Route
Action: The system completes route pattern analysis without finding a match
Logic Flow:
IF Equipment does not match any specific routing patterns or no routing information is found
AND The system completes route pattern analysis without finding a match
THEN:
• Equipment routing indicator is set to 1 as the default classification
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment routing information is being processed.
Trigger Criteria:
Context: Equipment routing information is being processed
Applied to: Set Route Type 2 - Hazmat Routing
Action: The equipment IMA code equals 'HM' indicating hazmat material
Logic Flow:
IF Equipment routing information is being processed
AND The equipment IMA code equals 'HM' indicating hazmat material
THEN:
• Set route classification to type 2 (hazmat routing) and mark route as found
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment routing information is being processed.
Trigger Criteria:
Context: Equipment routing information is being processed
Applied to: Set Route Type 1 - No Special Routing
Action: Equipment is not hazmat and routing pattern doesn't match CSXT/NS to CPRS via Detroit
Logic Flow:
IF Equipment routing information is being processed
AND Equipment is not hazmat and routing pattern doesn't match CSXT/NS to CPRS via Detroit
THEN:
• Set route classification to type 1 indicating no special routing requirements
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when raw routing information has been extracted from waybill.
Trigger Criteria:
Context: Raw routing information has been extracted from waybill
Applied to: Clean Routing Data - Replace Special Characters
Action: The routing information contains exclamation mark delimiters
Logic Flow:
IF Raw routing information has been extracted from waybill
AND The routing information contains exclamation mark delimiters
THEN:
• Replace all exclamation marks with spaces to normalize the routing data
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment has valid routing information with scac codes and junction points.
Trigger Criteria:
Context: Equipment has valid routing information with SCAC codes and junction points
Applied to: Set Route Type 3 - CSXT to CPRS via DET
Action: First SCAC is CSXT or NS, second SCAC is CPRS, and junction point is DET, and first SCAC is specifically CSXT
Logic Flow:
IF Equipment has valid routing information with SCAC codes and junction points
AND First SCAC is CSXT or NS, second SCAC is CPRS, and junction point is DET, and first SCAC is specifically CSXT
THEN:
• Set route classification to type 3 and mark route as found
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment has valid routing information with scac codes and junction points.
Trigger Criteria:
Context: Equipment has valid routing information with SCAC codes and junction points
Applied to: Set Route Type 4 - NS to CPRS via DET
Action: First SCAC is CSXT or NS, second SCAC is CPRS, and junction point is DET, and first SCAC is NS
Logic Flow:
IF Equipment has valid routing information with SCAC codes and junction points
AND First SCAC is CSXT or NS, second SCAC is CPRS, and junction point is DET, and first SCAC is NS
THEN:
• Set route classification to type 4 and mark route as found
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when routing information has been extracted and cleaned.
Trigger Criteria:
Context: Routing information has been extracted and cleaned
Applied to: Validate Route Fields Present?
Action: Route information fields are checked for valid data
Logic Flow:
IF Routing information has been extracted and cleaned
AND Route information fields are checked for valid data
THEN:
• If routing fields are spaces or low-values, skip pattern matching and use default classification
R-GCX003-cbl-00431 (+12)File: GCX003.cblBusiness Rule: EDI Train List Transmission
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train list is ready for edi transmission to us customs.
Trigger Criteria:
Context: A train list is ready for EDI transmission to US Customs
Applied to: Set Background Processing Mode
Action: The EDI transmission process is initiated
Logic Flow:
IF A train list is ready for EDI transmission to US Customs
AND The EDI transmission process is initiated
THEN:
• The system must be configured for background processing mode
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when validated train list exists with all required equipment and cargo information. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A validated train list exists with all required equipment and cargo information
Applied to: Call GCCU358T Module for EDI Transmission
Action: The EDI transmission is executed through GCCU358T module
Logic Flow:
IF A validated train list exists with all required equipment and cargo information
AND The EDI transmission is executed through GCCU358T module
THEN:
• The train list data must be transmitted to US Customs EDI system
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when gccu358t module has been called for edi transmission.
Trigger Criteria:
Context: The GCCU358T module has been called for EDI transmission
Applied to: Validate Module Parameters
Action: The module execution completes
Logic Flow:
IF The GCCU358T module has been called for EDI transmission
AND The module execution completes
THEN:
• The system must validate that the module parameters were valid and the transmission was successful, otherwise terminate with system error
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when gccu358t module has been called for edi transmission.
Trigger Criteria:
Context: The GCCU358T module has been called for EDI transmission
Applied to: EDI Transmission Successful?
Action: The transmission process completes
Logic Flow:
IF The GCCU358T module has been called for EDI transmission
AND The transmission process completes
THEN:
• The system must verify the transmission was successful AND if unsuccessful, trigger parameter validation error handling
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train list has been successfully transmitted via edi.
Trigger Criteria:
Context: A train list has been successfully transmitted via EDI
Applied to: AEI Train Send Request?
Action: The system checks the train send type
Logic Flow:
IF A train list has been successfully transmitted via EDI
AND The system checks the train send type
THEN:
• If the train send is marked as AEI-enabled, additional AEI logging must be performed
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when aei train send request has been successfully transmitted.
Trigger Criteria:
Context: An AEI train send request has been successfully transmitted
Applied to: Log AEI Send Activity
Action: AEI logging is required
Logic Flow:
IF An AEI train send request has been successfully transmitted
AND AEI logging is required
THEN:
• The system must create an activity log record with train details, user information, timestamp, and AEI send confirmation message
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when validated train list with all equipment and cargo details and the system is configured for background processing. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A validated train list with all equipment and cargo details AND the system is configured for background processing
Applied to: Call GCCU358T Module for EDI Transmission
Action: The EDI transmission is executed
Logic Flow:
IF A validated train list with all equipment and cargo details AND the system is configured for background processing
AND The EDI transmission is executed
THEN:
• The GCCU358T module must be called with the complete train list data for transmission to US Customs
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when edi transmission has failed.
Trigger Criteria:
Context: The EDI transmission has failed
Applied to: Validate Module Parameters
Action: Parameter validation is performed
Logic Flow:
IF The EDI transmission has failed
AND Parameter validation is performed
THEN:
• The system must validate all module parameters AND if invalid, generate an abend condition with error message 'GCCU358T MODULE PARAMETERS INVALID'
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when edi transmission has completed successfully.
Trigger Criteria:
Context: The EDI transmission has completed successfully
Applied to: AEI Train Send Request?
Action: The system checks the request type
Logic Flow:
IF The EDI transmission has completed successfully
AND The system checks the request type
THEN:
• If the request is an AEI train send request, additional AEI logging must be performed AND if not an AEI request, complete the transmission process normally
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when transmission is confirmed as an aei train send request.
Trigger Criteria:
Context: The transmission is confirmed as an AEI train send request
Applied to: Log AEI Send Activity
Action: AEI logging is performed
Logic Flow:
IF The transmission is confirmed as an AEI train send request
AND AEI logging is performed
THEN:
• The system must create an activity log entry with train ID, user information, timestamp, and AEI send confirmation message
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when edi transmission is successful and any required aei logging is complete.
Trigger Criteria:
Context: The EDI transmission is successful AND any required AEI logging is complete
Applied to: Complete EDI Transmission
Action: The transmission process is finalized
Logic Flow:
IF The EDI transmission is successful AND any required AEI logging is complete
AND The transmission process is finalized
THEN:
• The EDI transmission process must be marked as complete and control returned to the calling process
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when edi module parameters have been validated and found to be invalid.
Trigger Criteria:
Context: EDI module parameters have been validated and found to be invalid
Applied to: System Abend - Invalid Parameters
Action: The parameter validation fails
Logic Flow:
IF EDI module parameters have been validated and found to be invalid
AND The parameter validation fails
THEN:
• The system must initiate an abend condition with the specific error message indicating invalid GCCU358T module parameters
R-GCX003-cbl-00436 (+14)File: GCX003.cblBusiness Rule: Report Transmission to Customs
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train manifest processing request has been completed.
Trigger Criteria:
Context: A train manifest processing request has been completed
Applied to: Build Report Header with Train Details
Action: The system prepares the customs report transmission
Logic Flow:
IF A train manifest processing request has been completed
AND The system prepares the customs report transmission
THEN:
• The report header must include train ID in header line 1, origin station name in header line 1, user ID in header line 2, terminal ID in header line 2, processing date in header line 2, processing hour in header line 2, and processing minute in header line 2
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train list has been processed and a us customs train id has been generated.
Trigger Criteria:
Context: A train list has been processed and a US customs train ID has been generated
Applied to: Set US Customs Train ID
Action: The system builds the report header for customs transmission
Logic Flow:
IF A train list has been processed and a US customs train ID has been generated
AND The system builds the report header for customs transmission
THEN:
• The US customs train ID from the train list must be assigned to header line 4
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train request contains eta date and time information.
Trigger Criteria:
Context: A train request contains ETA date and time information
Applied to: Set ETA Date and Time Fields
Action: The system builds the report header for customs transmission
Logic Flow:
IF A train request contains ETA date and time information
AND The system builds the report header for customs transmission
THEN:
• The ETA year must be set in header line 4, ETA month must be set in header line 4, ETA day must be set in header line 4, ETA hour must be set in header line 4, and ETA minute must be set in header line 4
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment processing has been completed for a train manifest.
Trigger Criteria:
Context: Equipment processing has been completed for a train manifest
Applied to: Add Equipment Total Count to Status Line
Action: The system prepares the status line for customs transmission
Logic Flow:
IF Equipment processing has been completed for a train manifest
AND The system prepares the status line for customs transmission
THEN:
• The total equipment count must be moved to the status line and the status line must be assigned to email text line 5
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report lines have been generated for a train manifest.
Trigger Criteria:
Context: Report lines have been generated for a train manifest
Applied to: Format Report Lines for Email
Action: The system prepares the email transmission to customs
Logic Flow:
IF Report lines have been generated for a train manifest
AND The system prepares the email transmission to customs
THEN:
• Report line 1 must be copied to email text line 1, report line 2 must be copied to email text line 2, report line 3 must be copied to email text line 3, report line 4 must be copied to email text line 4, detail header 1 must be copied to email text line 6, and detail header 2 must be copied to email text line 7
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when customs report is ready for transmission. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A customs report is ready for transmission
Applied to: Set Email Parameters
Action: The system prepares the email parameters
Logic Flow:
IF A customs report is ready for transmission
AND The system prepares the email parameters
THEN:
• Keywords must be set to spaces, copy user code must be set to spaces, item number sequence must be set to spaces, item alpha sequence must be set to spaces, and return status flag must be initialized
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when customs report is being prepared for transmission.
Trigger Criteria:
Context: A customs report is being prepared for transmission
Applied to: Set Sender as OM01247
Action: The system sets the email sender and recipient
Logic Flow:
IF A customs report is being prepared for transmission
AND The system sets the email sender and recipient
THEN:
• The from user code must be set to 'OM01247' and the to user code must be set to 'OM01247'
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when customs report has been formatted with header information.
Trigger Criteria:
Context: A customs report has been formatted with header information
Applied to: Set Report Subject Line
Action: The system sets the email subject line
Logic Flow:
IF A customs report has been formatted with header information
AND The system sets the email subject line
THEN:
• The email subject must be set to the content of report line 1
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when customs report is being prepared for email transmission.
Trigger Criteria:
Context: A customs report is being prepared for email transmission
Applied to: Set Email Width to 80 Characters
Action: The system sets the email formatting parameters
Logic Flow:
IF A customs report is being prepared for email transmission
AND The system sets the email formatting parameters
THEN:
• The email item width must be set to '080' characters
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when customs report has been formatted for transmission.
Trigger Criteria:
Context: A customs report has been formatted for transmission
Applied to: Report Size Check
Action: The system processes report lines for email transmission and the line count reaches 700 lines
Logic Flow:
IF A customs report has been formatted for transmission
AND The system processes report lines for email transmission and the line count reaches 700 lines
THEN:
• The system must send the current email batch, reset the email text, initialize line counter to zero, add continuation message as line 1, add detail header 1 as line 2, add detail header 2 as line 3, and increment line counter by 3
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when customs report has been formatted and the total line count is 700 or fewer lines. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A customs report has been formatted and the total line count is 700 or fewer lines
Applied to: Send Single Email with Complete Report
Action: The system completes processing all report lines
Logic Flow:
IF A customs report has been formatted and the total line count is 700 or fewer lines
AND The system completes processing all report lines
THEN:
• The system must call EMCSEND3 to transmit the complete email with all report content
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when customs report exceeds 700 lines during processing.
Trigger Criteria:
Context: A customs report exceeds 700 lines during processing
Applied to: Split Report into Multiple Emails
Action: The system reaches the line limit
Logic Flow:
IF A customs report exceeds 700 lines during processing
AND The system reaches the line limit
THEN:
• The system must send the current email batch, clear the email text, reset line counter, add continuation message, add report headers, and continue processing remaining lines
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when email has been sent to customs using emcsend3.
Trigger Criteria:
Context: An email has been sent to customs using EMCSEND3
Applied to: Verify Email Send Success
Action: The system checks the email transmission result
Logic Flow:
IF An email has been sent to customs using EMCSEND3
AND The system checks the email transmission result
THEN:
• If the email return status is not successful, the system must handle the email send failure
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when email transmission to customs has failed.
Trigger Criteria:
Context: An email transmission to customs has failed
Applied to: Handle Email Send Failure
Action: The system detects the email send failure
Logic Flow:
IF An email transmission to customs has failed
AND The system detects the email send failure
THEN:
• The system must set the error message to 'SEND TO FILE OF OM01247 FAILED' and perform system abend
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when email has been successfully sent to customs. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email has been successfully sent to customs
Applied to: Purge Message Queue
Action: The system completes the email transmission
Logic Flow:
IF An email has been successfully sent to customs
AND The system completes the email transmission
THEN:
• The system must initialize the accept status and call CIMS with PURG to purge the alternate PCB message queue
R-GCX003-cbl-00451 (+19)File: GCX003.cblBusiness Rule: Large Report Email Pagination
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when report needs to be sent via email.
Trigger Criteria:
Context: A report needs to be sent via email
Applied to: Initialize Email Parameters
Action: Email processing begins
Logic Flow:
IF A report needs to be sent via email
AND Email processing begins
THEN:
• Email parameters are initialized with sender as OM01247, destination filename is set, item width is set to 080, and line counter is reset to zero
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when email processing is in progress with a current mail subscription counter.
Trigger Criteria:
Context: Email processing is in progress with a current mail subscription counter
Applied to: More Report Lines to Process?
Action: The system checks for more lines to process
Logic Flow:
IF Email processing is in progress with a current mail subscription counter
AND The system checks for more lines to process
THEN:
• Continue processing if the current line is not empty or low-values AND the mail subscription counter has not exceeded the maximum email line limit
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when report line exists and needs to be added to the email.
Trigger Criteria:
Context: A report line exists and needs to be added to the email
Applied to: Add Report Line to Email Message
Action: The line is processed for inclusion
Logic Flow:
IF A report line exists and needs to be added to the email
AND The line is processed for inclusion
THEN:
• The report line is moved to the email text message line at the current line subscription position AND the line subscription counter is incremented by 1 AND the more email flag is set to true
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when lines are being added to an email message buffer.
Trigger Criteria:
Context: Lines are being added to an email message buffer
Applied to: Line Count > 699?
Action: The line subscription counter is evaluated
Logic Flow:
IF Lines are being added to an email message buffer
AND The line subscription counter is evaluated
THEN:
• If the line counter exceeds 699 lines, trigger email batch sending process
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when lines are being added to an email message buffer.
Trigger Criteria:
Context: Lines are being added to an email message buffer
Applied to: Line Count > 699?
Action: The line count reaches or exceeds 699 lines
Logic Flow:
IF Lines are being added to an email message buffer
AND The line count reaches or exceeds 699 lines
THEN:
• The current email batch must be sent and a new batch must be started
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when email message buffer contains 699 or more lines. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The email message buffer contains 699 or more lines
Applied to: Send Current Email Batch
Action: The batch size limit is reached
Logic Flow:
IF The email message buffer contains 699 or more lines
AND The batch size limit is reached
THEN:
• Call EMCSEND3 to send the current email batch with all configured parameters including sender, recipient, subject, and message content
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when email batch has been successfully sent.
Trigger Criteria:
Context: An email batch has been successfully sent
Applied to: Clear Email Message Buffer
Action: The system prepares for the next batch
Logic Flow:
IF An email batch has been successfully sent
AND The system prepares for the next batch
THEN:
• Clear the email text message buffer by setting it to spaces
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when email message buffer has been cleared after sending a batch.
Trigger Criteria:
Context: The email message buffer has been cleared after sending a batch
Applied to: Reset Line Counter to Zero
Action: Preparing for the next batch of lines
Logic Flow:
IF The email message buffer has been cleared after sending a batch
AND Preparing for the next batch of lines
THEN:
• Set the line subscription counter to zero
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when new email batch is being prepared after sending a previous batch.
Trigger Criteria:
Context: A new email batch is being prepared after sending a previous batch
Applied to: Add Continuation Header
Action: The continuation header needs to be added
Logic Flow:
IF A new email batch is being prepared after sending a previous batch
AND The continuation header needs to be added
THEN:
• Add 'CONTINUATION OF REPORT ....' message to the first line of the new email batch
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when new email batch is being prepared after sending a previous batch.
Trigger Criteria:
Context: A new email batch is being prepared after sending a previous batch
Applied to: Add Continuation Header
Action: The system initializes the continuation email
Logic Flow:
IF A new email batch is being prepared after sending a previous batch
AND The system initializes the continuation email
THEN:
• A continuation message 'CONTINUATION OF REPORT ....' is added as the first line, followed by report detail headers, and the line counter is incremented by 3
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when continuation email batch is being prepared.
Trigger Criteria:
Context: A continuation email batch is being prepared
Applied to: Add Report Detail Headers
Action: Detail headers need to be added after the continuation message
Logic Flow:
IF A continuation email batch is being prepared
AND Detail headers need to be added after the continuation message
THEN:
• Add the standard detail header line 1 to email text message line 2 AND add the standard detail header line 2 to email text message line 3
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when continuation header and detail headers have been added to the email batch.
Trigger Criteria:
Context: Continuation header and detail headers have been added to the email batch
Applied to: Add 3 to Line Counter
Action: The line counter needs to be updated
Logic Flow:
IF Continuation header and detail headers have been added to the email batch
AND The line counter needs to be updated
THEN:
• Add 3 to the line subscription counter to account for the added header lines
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when all report lines have been processed and the more email flag is true. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All report lines have been processed and the more email flag is true
Applied to: Send Final Email Batch
Action: No more lines remain to be processed
Logic Flow:
IF All report lines have been processed and the more email flag is true
AND No more lines remain to be processed
THEN:
• Call EMCSEND3 to send the final email batch with all remaining content
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when email send operation has been attempted.
Trigger Criteria:
Context: An email send operation has been attempted
Applied to: Email Send Successful?
Action: The email return status is evaluated
Logic Flow:
IF An email send operation has been attempted
AND The email return status is evaluated
THEN:
• If the email return status is not successful, trigger error handling process
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when email send operation has failed.
Trigger Criteria:
Context: An email send operation has failed
Applied to: Handle Email Send Error
Action: Error handling is triggered
Logic Flow:
IF An email send operation has failed
AND Error handling is triggered
THEN:
• Clear the current recipient usercode AND set AEI9999 as the first recipient usercode AND set OM01247 as the second recipient usercode
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when email send has failed and alternative recipients have been configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Email send has failed and alternative recipients have been configured
Applied to: Send Error Notification to Support
Action: Error notification needs to be sent
Logic Flow:
IF Email send has failed and alternative recipients have been configured
AND Error notification needs to be sent
THEN:
• Call EMCSEND3 to send error notification to support recipients AND if this also fails, generate system abend with message 'SEND TO FILE OF OM01247 FAILED'
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report line exists to be processed for email transmission.
Trigger Criteria:
Context: A report line exists to be processed for email transmission
Applied to: Add Line to Email Message
Action: The system processes the report line for email inclusion
Logic Flow:
IF A report line exists to be processed for email transmission
AND The system processes the report line for email inclusion
THEN:
• The report line is added to the email message buffer and the line counter is incremented by 1
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when email message buffer contains 699 or more lines of report data.
Trigger Criteria:
Context: An email message buffer contains 699 or more lines of report data
Applied to: Send Current Email Batch
Action: The batch size limit is reached
Logic Flow:
IF An email message buffer contains 699 or more lines of report data
AND The batch size limit is reached
THEN:
• The email is sent using EMCSEND3 service, the message buffer is cleared, and the line counter is reset to zero
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when all report lines have been processed and there is remaining content in the email buffer.
Trigger Criteria:
Context: All report lines have been processed and there is remaining content in the email buffer
Applied to: Send Final Email Batch
Action: No more report lines exist to process
Logic Flow:
IF All report lines have been processed and there is remaining content in the email buffer
AND No more report lines exist to process
THEN:
• The final email batch is sent using EMCSEND3 service with all remaining accumulated content
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when system is iterating through report lines for email processing.
Trigger Criteria:
Context: The system is iterating through report lines for email processing
Applied to: More Report Lines to Process?
Action: The system checks for more lines to process
Logic Flow:
IF The system is iterating through report lines for email processing
AND The system checks for more lines to process
THEN:
• Processing continues if the current line contains data and the maximum line limit has not been exceeded, otherwise processing stops
R-GCX003-cbl-00465 (+19)File: GCX003.cblBusiness Rule: Report Distribution to Originator
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train processing request is being evaluated.
Trigger Criteria:
Context: A train processing request is being evaluated
Applied to: Is AEI Train Send Request?
Action: The system checks if AEI train send processing is enabled
Logic Flow:
IF A train processing request is being evaluated
AND The system checks if AEI train send processing is enabled
THEN:
• AEI send report processing is triggered if AEI train send is set to YES
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when aei train send request requires email notification.
Trigger Criteria:
Context: An AEI train send request requires email notification
Applied to: Retrieve Email Distribution List
Action: The system queries the customer email table using train origin as the key
Logic Flow:
IF An AEI train send request requires email notification
AND The system queries the customer email table using train origin as the key
THEN:
• Email addresses are retrieved for notification distribution or default addresses are used if none found
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when aei email notification needs to be sent.
Trigger Criteria:
Context: An AEI email notification needs to be sent
Applied to: Generate Email Subject Line
Action: The system evaluates if there are errors in the report
Logic Flow:
IF An AEI email notification needs to be sent
AND The system evaluates if there are errors in the report
THEN:
• Email subject is set to 'US TRAIN [train_id] NOT SENT AT [origin]' for errors or 'US TRAIN [train_id] SENT AT [origin]' for successful processing
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when aei email distribution list retrieval returns no entries or encounters an error.
Trigger Criteria:
Context: AEI email distribution list retrieval returns no entries or encounters an error
Applied to: Use Default Recipients
Action: The system cannot find specific email recipients for the train origin
Logic Flow:
IF AEI email distribution list retrieval returns no entries or encounters an error
AND The system cannot find specific email recipients for the train origin
THEN:
• Default Merlin ID is assigned as both sender and recipient for the email notification
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when aei report is being prepared for email transmission.
Trigger Criteria:
Context: An AEI report is being prepared for email transmission
Applied to: Report Size Exceeds Limit?
Action: The report exceeds 699 lines
Logic Flow:
IF An AEI report is being prepared for email transmission
AND The report exceeds 699 lines
THEN:
• The report is split into multiple emails with continuation headers and the current email is sent before starting a new one
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when aei email transmission fails.
Trigger Criteria:
Context: An AEI email transmission fails
Applied to: Handle Email Send Errors
Action: The email send operation returns an unsuccessful status
Logic Flow:
IF An AEI email transmission fails
AND The email send operation returns an unsuccessful status
THEN:
• An error notification is sent to AEI9999 and OM01247 support addresses, andif that also fails, the system abends with an error message
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when report needs to be sent to the originating user.
Trigger Criteria:
Context: A report needs to be sent to the originating user
Applied to: Determine Destination Terminal
Action: The system checks if an alternate terminal is configured for the user
Logic Flow:
IF A report needs to be sent to the originating user
AND The system checks if an alternate terminal is configured for the user
THEN:
• The alternate terminal is used if available, otherwise the original terminal from the request is used
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report is being prepared for distribution.
Trigger Criteria:
Context: A report is being prepared for distribution
Applied to: Set Report Type Based on Action
Action: The system evaluates the request action type and error status
Logic Flow:
IF A report is being prepared for distribution
AND The system evaluates the request action type and error status
THEN:
• Report type is set to TRAIN-ERROR for error conditions, TRAIN-SENT for successful send actions, orTRAIN-REPORT for report-only actions
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report is being prepared for distribution.
Trigger Criteria:
Context: A report is being prepared for distribution
Applied to: Request Action Type?
Action: The system evaluates the request action type and error append status
Logic Flow:
IF A report is being prepared for distribution
AND The system evaluates the request action type and error append status
THEN:
• The system sets train error type if error append is true, train sent type if action is send, or train report type if action is report
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report is ready for transmission to the originator.
Trigger Criteria:
Context: A report is ready for transmission to the originator
Applied to: Report Display Mode?
Action: The system evaluates if the report should show all details or selective content
Logic Flow:
IF A report is ready for transmission to the originator
AND The system evaluates if the report should show all details or selective content
THEN:
• All report lines are sent for comprehensive reports, or selective content is sent based on warning conditions
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report is ready for transmission to the originator.
Trigger Criteria:
Context: A report is ready for transmission to the originator
Applied to: Report Display Mode?
Action: The system checks the report display mode setting
Logic Flow:
IF A report is ready for transmission to the originator
AND The system checks the report display mode setting
THEN:
• The system sends all report lines if set to all report mode, otherwise sends summary based on warning status
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when selective report display mode is active.
Trigger Criteria:
Context: A selective report display mode is active
Applied to: Has Warnings?
Action: The system checks for warning conditions in the report
Logic Flow:
IF A selective report display mode is active
AND The system checks for warning conditions in the report
THEN:
• Only header lines are sent if no warnings exist, otherwise header and warning lines from the equipment section are included
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train report distribution process is initiated.
Trigger Criteria:
Context: A train report distribution process is initiated
Applied to: Is AEI Train Send?
Action: The system checks if AEI train send flag is set to YES
Logic Flow:
IF A train report distribution process is initiated
AND The system checks if AEI train send flag is set to YES
THEN:
• The system processes AEI send report if flag is YES, otherwise continues with standard report distribution
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when report needs to be sent to an originator terminal.
Trigger Criteria:
Context: A report needs to be sent to an originator terminal
Applied to: Alternate Terminal Available?
Action: The system checks if an alternate terminal is configured and not empty
Logic Flow:
IF A report needs to be sent to an originator terminal
AND The system checks if an alternate terminal is configured and not empty
THEN:
• The system uses the alternate terminal if available, otherwise uses the original terminal from the request
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when summary report mode is selected and report content needs to be determined.
Trigger Criteria:
Context: A summary report mode is selected and report content needs to be determined
Applied to: Has Warnings?
Action: The system checks if the report contains warning messages
Logic Flow:
IF A summary report mode is selected and report content needs to be determined
AND The system checks if the report contains warning messages
THEN:
• The system sends only header lines if no warnings exist, otherwise sends header plus all warning message lines
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report type has been determined and destination terminal is set.
Trigger Criteria:
Context: A report type has been determined and destination terminal is set
Applied to: Send Report Header Line
Action: The system initiates report transmission
Logic Flow:
IF A report type has been determined and destination terminal is set
AND The system initiates report transmission
THEN:
• The system sends the report header line containing report identification and formatting information
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report display mode is set to all report and header has been sent.
Trigger Criteria:
Context: Report display mode is set to all report and header has been sent
Applied to: Send All Report Lines
Action: The system processes report line transmission
Logic Flow:
IF Report display mode is set to all report and header has been sent
AND The system processes report line transmission
THEN:
• The system iterates through and sends every report line from first line to last line
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when summary report mode is selected and no warning messages exist.
Trigger Criteria:
Context: Summary report mode is selected and no warning messages exist
Applied to: Send Header Lines Only
Action: The system determines report content to transmit
Logic Flow:
IF Summary report mode is selected and no warning messages exist
AND The system determines report content to transmit
THEN:
• The system sends only the first four header lines containing basic report information
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when summary report mode is selected and warning messages exist.
Trigger Criteria:
Context: Summary report mode is selected and warning messages exist
Applied to: Send Warning Messages Only
Action: The system scans through report lines to identify warnings
Logic Flow:
IF Summary report mode is selected and warning messages exist
AND The system scans through report lines to identify warnings
THEN:
• The system processes each warning message line and its preceding context line for transmission
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when all required report content has been transmitted to the destination terminal.
Trigger Criteria:
Context: All required report content has been transmitted to the destination terminal
Applied to: Send Report Wrap Command
Action: The system completes report line transmission
Logic Flow:
IF All required report content has been transmitted to the destination terminal
AND The system completes report line transmission
THEN:
• The system sends a wrap command with user function code to properly terminate the report session
Business Justification: Defines the strict business conditions required to proceed when train processing request is received.
Trigger Criteria:
Context: A train processing request is received
Applied to: Check if AEI Train Send Request
Action: The request type equals the AEI request type constant
Logic Flow:
IF A train processing request is received
AND The request type equals the AEI request type constant
THEN:
• Set AEI train send flag to YES, otherwise set to NO
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when aei train send request is being processed.
Trigger Criteria:
Context: An AEI train send request is being processed
Applied to: Retrieve AEI Email Distribution List
Action: The system queries the AEI work table using train origin as the key with record type 'CUSEMAIL'
Logic Flow:
IF An AEI train send request is being processed
AND The system queries the AEI work table using train origin as the key with record type 'CUSEMAIL'
THEN:
• Return the configured email distribution list or indicate no entry found
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when aei email distribution retrieval has been attempted.
Trigger Criteria:
Context: AEI email distribution retrieval has been attempted
Applied to: Email Distribution Found?
Action: The return code indicates successful retrieval
Logic Flow:
IF AEI email distribution retrieval has been attempted
AND The return code indicates successful retrieval
THEN:
• Use the retrieved email addresses for up to 10 recipients, otherwise use default MERLIN email address
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when no aei email distribution list was found or database error occurred.
Trigger Criteria:
Context: No AEI email distribution list was found or database error occurred
Applied to: Use Default MERLIN Email
Action: The system needs to assign email recipients
Logic Flow:
IF No AEI email distribution list was found or database error occurred
AND The system needs to assign email recipients
THEN:
• Set both sender and recipient to the default MERLIN ID
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when aei email distribution list was successfully retrieved.
Trigger Criteria:
Context: AEI email distribution list was successfully retrieved
Applied to: Set Multiple Email Recipients
Action: Processing email recipient configuration
Logic Flow:
IF AEI email distribution list was successfully retrieved
AND Processing email recipient configuration
THEN:
• Set sender to default MERLIN ID and assign up to 10 recipient email addresses from the distribution list until a blank entry is encountered
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when email recipients have been configured.
Trigger Criteria:
Context: Email recipients have been configured
Applied to: Build Email Subject Line
Action: Building the email subject line
Logic Flow:
IF Email recipients have been configured
AND Building the email subject line
THEN:
• If errors occurred, create subject 'US TRAIN [train_id] NOT SENT AT [origin]', otherwise create 'US TRAIN [train_id] SENT AT [origin]'
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when email subject line has been created.
Trigger Criteria:
Context: Email subject line has been created
Applied to: Initialize Email Content
Action: Preparing to build email content
Logic Flow:
IF Email subject line has been created
AND Preparing to build email content
THEN:
• Set line counter to 1, initialize email text structure, and set email parameters including destination filename and item width
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when email content is initialized and report lines are available.
Trigger Criteria:
Context: Email content is initialized and report lines are available
Applied to: Add Report Lines to Email
Action: Processing each report line up to the last line
Logic Flow:
IF Email content is initialized and report lines are available
AND Processing each report line up to the last line
THEN:
• Add each report line to email text, increment line counter, and set more email flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report lines are being added to email content.
Trigger Criteria:
Context: Report lines are being added to email content
Applied to: Email Size Limit Reached?
Action: The line counter exceeds 699 lines
Logic Flow:
IF Report lines are being added to email content
AND The line counter exceeds 699 lines
THEN:
• Trigger immediate email send and prepare for continuation email
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when email content has reached the 699 line limit.
Trigger Criteria:
Context: Email content has reached the 699 line limit
Applied to: Send Current Email Batch
Action: Sending the current email batch using EMCSEND3
Logic Flow:
IF Email content has reached the 699 line limit
AND Sending the current email batch using EMCSEND3
THEN:
• If send fails, redirect to error notification addresses AEI9999 and OM01247, otherwise continue processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when previous email batch was sent due to size limits.
Trigger Criteria:
Context: A previous email batch was sent due to size limits
Applied to: Start New Email with Continuation Header
Action: Starting a new continuation email
Logic Flow:
IF A previous email batch was sent due to size limits
AND Starting a new continuation email
THEN:
• Clear email text, reset line counter to 1, add continuation message, and add detail headers starting at line 3
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when all report lines have been processed and more email flag is true.
Trigger Criteria:
Context: All report lines have been processed and more email flag is true
Applied to: Send Final Email Batch
Action: Sending the final email batch using EMCSEND3
Logic Flow:
IF All report lines have been processed and more email flag is true
AND Sending the final email batch using EMCSEND3
THEN:
• If send fails, redirect to error notification addresses AEI9999 and OM01247
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when email transmission has failed.
Trigger Criteria:
Context: Email transmission has failed
Applied to: Send Error Notification to Support
Action: The EMCSEND3 return status indicates failure
Logic Flow:
IF Email transmission has failed
AND The EMCSEND3 return status indicates failure
THEN:
• Clear recipient addresses, set error notification recipients to AEI9999 and OM01247, and attempt to send error notification
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when error notification email transmission has also failed.
Trigger Criteria:
Context: Error notification email transmission has also failed
Applied to: Log Email Failure
Action: The system cannot send any email notifications
Logic Flow:
IF Error notification email transmission has also failed
AND The system cannot send any email notifications
THEN:
• Generate system error message 'SEND TO FILE OF OM01247 FAILED' and perform system abend
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when email processing has completed successfully or error handling is complete. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Email processing has completed successfully or error handling is complete
Applied to: Purge Email Transaction
Action: Performing transaction cleanup
Logic Flow:
IF Email processing has completed successfully or error handling is complete
AND Performing transaction cleanup
THEN:
• Initialize accept status, call CIMS with PURG function, and set destination filename to export file
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when aei report needs to be distributed via email. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An AEI report needs to be distributed via email
Applied to: Initialize Email Parameters
Action: The system initializes email parameters
Logic Flow:
IF An AEI report needs to be distributed via email
AND The system initializes email parameters
THEN:
• Email copy usercode, keywords, item sequence numbers, item alpha sequence, item width, and text content are cleared, and item width is set to 80 characters
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train origin station code is available.
Trigger Criteria:
Context: A train origin station code is available
Applied to: Query AEI Email Distribution List
Action: The system queries the AEI email distribution table using train origin as key with record type 'CUSEMAIL'
Logic Flow:
IF A train origin station code is available
AND The system queries the AEI email distribution table using train origin as key with record type 'CUSEMAIL'
THEN:
• The system retrieves the email distribution configuration for that origin station
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when aei email distribution query returns success status.
Trigger Criteria:
Context: The AEI email distribution query returns success status
Applied to: Email Distribution Found?
Action: The system processes the query results
Logic Flow:
IF The AEI email distribution query returns success status
AND The system processes the query results
THEN:
• The system sets default MERLIN ID as sender and populates up to 10 recipient email addresses from the distribution list, stopping when a blank recipient is encountered
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when aei email distribution query fails or returns no entry status.
Trigger Criteria:
Context: The AEI email distribution query fails or returns no entry status
Applied to: Use Default MERLIN Email
Action: The system cannot retrieve specific email distribution configuration
Logic Flow:
IF The AEI email distribution query fails or returns no entry status
AND The system cannot retrieve specific email distribution configuration
THEN:
• The system uses default MERLIN ID for both sender and recipient email addresses
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train processing result status and train identification information are available.
Trigger Criteria:
Context: A train processing result status and train identification information are available
Applied to: Build Email Subject Line
Action: The system builds the email subject line
Logic Flow:
IF A train processing result status and train identification information are available
AND The system builds the email subject line
THEN:
• The subject contains 'US TRAIN [train_id] NOT SENT AT [origin]' if errors occurred, or 'US TRAIN [train_id] SENT AT [origin]' if processing was successful
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when report lines are available from train processing results.
Trigger Criteria:
Context: Report lines are available from train processing results
Applied to: Load Report Lines into Email
Action: The system loads report content into email message
Logic Flow:
IF Report lines are available from train processing results
AND The system loads report content into email message
THEN:
• Each report line is copied to email text lines sequentially, with line counter incremented, and email-more flag set to true
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when report lines are being loaded into email message.
Trigger Criteria:
Context: Report lines are being loaded into email message
Applied to: Email Size Limit Reached?
Action: The email line count exceeds 699 lines
Logic Flow:
IF Report lines are being loaded into email message
AND The email line count exceeds 699 lines
THEN:
• The system sets no-more-email flag, sends current email batch, clears email text, resets line counter to 1, and adds continuation header lines
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when email content is prepared with recipients, subject, and message text.
Trigger Criteria:
Context: Email content is prepared with recipients, subject, and message text
Applied to: Send Current Email Batch
Action: The system sends the email batch
Logic Flow:
IF Email content is prepared with recipients, subject, and message text
AND The system sends the email batch
THEN:
• The email is transmitted to inbox destination using sender ID, recipient list, subject line, and message content through the email service
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when aei email send operation fails.
Trigger Criteria:
Context: An AEI email send operation fails
Applied to: Send Error Notification to Support
Action: The system detects email transmission failure
Logic Flow:
IF An AEI email send operation fails
AND The system detects email transmission failure
THEN:
• The system clears recipient list, sets AEI9999 and OM01247 as error recipients, and attempts to send error notification using the same email service
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when email processing is complete regardless of success or failure.
Trigger Criteria:
Context: Email processing is complete regardless of success or failure
Applied to: Purge Email Transaction
Action: The system finalizes email operations
Logic Flow:
IF Email processing is complete regardless of success or failure
AND The system finalizes email operations
THEN:
• The system clears accept status and purges the email transaction using the alternate PCB
Business Justification: Governs the functional prerequisites and system routing when aei activity logging is triggered.
Trigger Criteria:
Context: AEI activity logging is triggered
Applied to: Initialize Log Entry Structure
Action: The system begins creating a log entry
Logic Flow:
IF AEI activity logging is triggered
AND The system begins creating a log entry
THEN:
• The log entry structure is initialized to prepare for data population
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when aei log entry is being created.
Trigger Criteria:
Context: An AEI log entry is being created
Applied to: Set Security Level to High
Action: Security level needs to be assigned
Logic Flow:
IF An AEI log entry is being created
AND Security level needs to be assigned
THEN:
• The security byte is set to HIGH-VALUES to indicate maximum security classification
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when aei log entry is being created.
Trigger Criteria:
Context: An AEI log entry is being created
Applied to: Set Sending Transaction ID
Action: The originating transaction needs to be identified
Logic Flow:
IF An AEI log entry is being created
AND The originating transaction needs to be identified
THEN:
• The sending transaction is set to 'GCT0031E' to identify the source transaction
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when aei activity log entry is being prepared.
Trigger Criteria:
Context: An AEI activity log entry is being prepared
Applied to: Set Record Type as US Train
Action: Record type classification is required
Logic Flow:
IF An AEI activity log entry is being prepared
AND Record type classification is required
THEN:
• The record type is set to US-TRAIN to identify this as a US train activity log
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when aei log entry requires an action code.
Trigger Criteria:
Context: An AEI log entry requires an action code
Applied to: Set Action Code to ZZZ
Action: The action code field needs to be populated
Logic Flow:
IF An AEI log entry requires an action code
AND The action code field needs to be populated
THEN:
• The action code is set to 'ZZZ' as the standard identifier for AEI send activities
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when aei activity is being logged.
Trigger Criteria:
Context: An AEI activity is being logged
Applied to: Capture User ACF2 ID
Action: User identification is required for the log entry
Logic Flow:
IF An AEI activity is being logged
AND User identification is required for the log entry
THEN:
• The ACF2 user ID from the current session is captured and stored in the log entry
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when aei log entry requires a date timestamp.
Trigger Criteria:
Context: An AEI log entry requires a date timestamp
Applied to: Format Current Date
Action: The current date needs to be recorded
Logic Flow:
IF An AEI log entry requires a date timestamp
AND The current date needs to be recorded
THEN:
• The system date is formatted by concatenating machine century and machine date into the log entry date field
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when aei activity log entry is being created.
Trigger Criteria:
Context: An AEI activity log entry is being created
Applied to: Capture Current Time
Action: A time timestamp is required
Logic Flow:
IF An AEI activity log entry is being created
AND A time timestamp is required
THEN:
• The current machine time is captured and stored in the log entry time field
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when aei send activity is being logged.
Trigger Criteria:
Context: An AEI send activity is being logged
Applied to: Record Train ID from Customs
Action: The train identifier needs to be recorded
Logic Flow:
IF An AEI send activity is being logged
AND The train identifier needs to be recorded
THEN:
• The US Customs train ID from the train list is stored in the log entry
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when aei activity log entry requires a descriptive message.
Trigger Criteria:
Context: An AEI activity log entry requires a descriptive message
Applied to: Set Standard AEI Send Message
Action: The message field needs to be populated
Logic Flow:
IF An AEI activity log entry requires a descriptive message
AND The message field needs to be populated
THEN:
• The standard AEI send log message is assigned to describe the activity
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when aei log entry has been populated with all required data.
Trigger Criteria:
Context: An AEI log entry has been populated with all required data
Applied to: Prepare Log Message for Queue
Action: The log entry needs to be queued for processing
Logic Flow:
IF An AEI log entry has been populated with all required data
AND The log entry needs to be queued for processing
THEN:
• The log input structure is moved to the message format for queue transmission
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when aei log entry is prepared for transmission.
Trigger Criteria:
Context: An AEI log entry is prepared for transmission
Applied to: Send Log to Message Queue
Action: The log needs to be sent to the queue system
Logic Flow:
IF An AEI log entry is prepared for transmission
AND The log needs to be sent to the queue system
THEN:
• The system calls the message queue service to transmit the log entry
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when aei log entry has been queued.
Trigger Criteria:
Context: An AEI log entry has been queued
Applied to: Write Log Message to System
Action: The log message needs to be written to system storage
Logic Flow:
IF An AEI log entry has been queued
AND The log message needs to be written to system storage
THEN:
• The system writes the log message using the message logging service
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when aei log message has been successfully written to the system.
Trigger Criteria:
Context: An AEI log message has been successfully written to the system
Applied to: Purge Message Queue
Action: Queue cleanup is required
Logic Flow:
IF An AEI log message has been successfully written to the system
AND Queue cleanup is required
THEN:
• The message queue is purged to remove the processed log entry
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when aei train send operation has been completed successfully.
Trigger Criteria:
Context: An AEI train send operation has been completed successfully
Applied to: Initialize Activity Log Record
Action: The system begins the activity logging process
Logic Flow:
IF An AEI train send operation has been completed successfully
AND The system begins the activity logging process
THEN:
• A new activity log record is initialized with all fields cleared and ready for population
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when aei activity log record is being created.
Trigger Criteria:
Context: An AEI activity log record is being created
Applied to: Set Security Byte to High-Values
Action: The security classification needs to be assigned
Logic Flow:
IF An AEI activity log record is being created
AND The security classification needs to be assigned
THEN:
• The security byte is set to high-values to indicate maximum security level
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when aei activity log record is being created.
Trigger Criteria:
Context: An AEI activity log record is being created
Applied to: Set Action Code to 'ZZZ'
Action: The action code needs to be assigned
Logic Flow:
IF An AEI activity log record is being created
AND The action code needs to be assigned
THEN:
• The action code is set to 'ZZZ' as the standard identifier for AEI logging activities
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when aei activity log record is being created.
Trigger Criteria:
Context: An AEI activity log record is being created
Applied to: Capture Current System Date
Action: The date timestamp needs to be recorded
Logic Flow:
IF An AEI activity log record is being created
AND The date timestamp needs to be recorded
THEN:
• The current system date from the machine century and date fields is captured and formatted for the log record
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when aei activity log record is being created.
Trigger Criteria:
Context: An AEI activity log record is being created
Applied to: Capture Current System Time
Action: The time timestamp needs to be recorded
Logic Flow:
IF An AEI activity log record is being created
AND The time timestamp needs to be recorded
THEN:
• The current system time from the machine time field is captured and recorded in the log
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when aei activity log record is being created for a train send operation.
Trigger Criteria:
Context: An AEI activity log record is being created for a train send operation
Applied to: Set Record Type as US-TRAIN
Action: The record type classification is being assigned
Logic Flow:
IF An AEI activity log record is being created for a train send operation
AND The record type classification is being assigned
THEN:
• The record type is set to 'US-TRAIN' to identify this as a US train activity
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when aei activity log record is being created for a train send operation.
Trigger Criteria:
Context: An AEI activity log record is being created for a train send operation
Applied to: Set Log Message as 'AEI SEND LOG MESSAGE'
Action: The log message content needs to be assigned
Logic Flow:
IF An AEI activity log record is being created for a train send operation
AND The log message content needs to be assigned
THEN:
• The message field is set to the predefined 'AEI SEND LOG MESSAGE' constant
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when aei activity log record is being created from a train send operation.
Trigger Criteria:
Context: An AEI activity log record is being created from a train send operation
Applied to: Set Sending Transaction to 'GCT0031E'
Action: The sending transaction identifier needs to be recorded
Logic Flow:
IF An AEI activity log record is being created from a train send operation
AND The sending transaction identifier needs to be recorded
THEN:
• The sending transaction is set to 'GCT0031E' to identify the source transaction
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when aei train send operation was initiated by a user.
Trigger Criteria:
Context: An AEI train send operation was initiated by a user
Applied to: Capture User ACF2 ID
Action: The activity log record is being populated
Logic Flow:
IF An AEI train send operation was initiated by a user
AND The activity log record is being populated
THEN:
• The user's ACF2 ID from the common communication area is captured and recorded in the log
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when aei train send operation has been completed for a specific train.
Trigger Criteria:
Context: An AEI train send operation has been completed for a specific train
Applied to: Record US Customs Train ID
Action: The activity log record is being populated with train information
Logic Flow:
IF An AEI train send operation has been completed for a specific train
AND The activity log record is being populated with train information
THEN:
• The US Customs Train ID from the train list is recorded in the log as the train identifier
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when aei activity log record has been populated with all required information.
Trigger Criteria:
Context: An AEI activity log record has been populated with all required information
Applied to: Format Log Record for GCT1051E
Action: The record needs to be prepared for transmission
Logic Flow:
IF An AEI activity log record has been populated with all required information
AND The record needs to be prepared for transmission
THEN:
• The log input structure is formatted and moved to the GCT1051E message format
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when aei activity log record has been formatted for transmission.
Trigger Criteria:
Context: An AEI activity log record has been formatted for transmission
Applied to: Send Log Record to Message Queue
Action: The record needs to be sent to the logging system
Logic Flow:
IF An AEI activity log record has been formatted for transmission
AND The record needs to be sent to the logging system
THEN:
• The system calls the message processing service to change the alternate PCB and queue the log record
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when aei activity log record has been queued for processing.
Trigger Criteria:
Context: An AEI activity log record has been queued for processing
Applied to: Write Log Message to System
Action: The record needs to be permanently logged
Logic Flow:
IF An AEI activity log record has been queued for processing
AND The record needs to be permanently logged
THEN:
• The system calls the message writing service with the log message code, content, length, and module name
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when aei activity log record has been successfully written to the system log.
Trigger Criteria:
Context: An AEI activity log record has been successfully written to the system log
Applied to: Purge Message Queue
Action: The logging transaction needs to be completed
Logic Flow:
IF An AEI activity log record has been successfully written to the system log
AND The logging transaction needs to be completed
THEN:
• The system calls the message processing service to purge the alternate PCB and complete the transaction
R-GCX003-cbl-00504 (+14)File: GCX003.cblBusiness Rule: Canadian Export Report Generation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train processing request has been completed.
Trigger Criteria:
Context: A train processing request has been completed
Applied to: Check if Train Successfully Sent
Action: The system evaluates the train processing outcome
Logic Flow:
IF A train processing request has been completed
AND The system evaluates the train processing outcome
THEN:
• Canadian export report generation is triggered only if the train was successfully sent without errors and without spawn conditions
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when canadian export report generation has been triggered.
Trigger Criteria:
Context: Canadian export report generation has been triggered
Applied to: Initialize GCX141 Message Parameters
Action: The system prepares the export report message
Logic Flow:
IF Canadian export report generation has been triggered
AND The system prepares the export report message
THEN:
• All GCX141 input parameters are cleared and reset to initial state
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when gcx141 message parameters have been initialized.
Trigger Criteria:
Context: GCX141 message parameters have been initialized
Applied to: Set Message Function Name Flag
Action: The system configures the message function type
Logic Flow:
IF GCX141 message parameters have been initialized
AND The system configures the message function type
THEN:
• The message function name flag is set to indicate export report generation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when export report message function has been configured.
Trigger Criteria:
Context: Export report message function has been configured
Applied to: Set Security Byte to High Values
Action: The system sets security parameters for the message
Logic Flow:
IF Export report message function has been configured
AND The system sets security parameters for the message
THEN:
• The security byte is set to high values to ensure proper authorization level
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when export report security has been configured.
Trigger Criteria:
Context: Export report security has been configured
Applied to: Move US Customs Train ID to Message
Action: The system populates the train identifier in the message
Logic Flow:
IF Export report security has been configured
AND The system populates the train identifier in the message
THEN:
• The US customs train ID from the train list is assigned to the GCX141 train ID field
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train identifier has been assigned to the export report message.
Trigger Criteria:
Context: Train identifier has been assigned to the export report message
Applied to: Set Message Function Length Flag
Action: The system finalizes message configuration
Logic Flow:
IF Train identifier has been assigned to the export report message
AND The system finalizes message configuration
THEN:
• The message function length flag is set to indicate proper message sizing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when all gcx141 message parameters have been configured.
Trigger Criteria:
Context: All GCX141 message parameters have been configured
Applied to: Move Input Parameters to Message Output
Action: The system prepares the message for transmission
Logic Flow:
IF All GCX141 message parameters have been configured
AND The system prepares the message for transmission
THEN:
• The complete GCX141 input structure is moved to the message output text field
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when export report message has been prepared with all required parameters.
Trigger Criteria:
Context: Export report message has been prepared with all required parameters
Applied to: Insert GCX141 Message to Queue
Action: The system sends the message to the GCX141 processing queue
Logic Flow:
IF Export report message has been prepared with all required parameters
AND The system sends the message to the GCX141 processing queue
THEN:
• The message is inserted into the queue for Canadian export report generation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when canadian export report needs to be generated.
Trigger Criteria:
Context: A Canadian export report needs to be generated
Applied to: Initialize GCX141 Message Parameters
Action: The system begins the report generation process
Logic Flow:
IF A Canadian export report needs to be generated
AND The system begins the report generation process
THEN:
• All GCX141 input parameters are initialized to blank values
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when gcx141 message parameters are initialized.
Trigger Criteria:
Context: GCX141 message parameters are initialized
Applied to: Set Message Function Name Flag
Action: The system configures the message type
Logic Flow:
IF GCX141 message parameters are initialized
AND The system configures the message type
THEN:
• The message function name flag is set to TRUE
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when canadian export message is being prepared.
Trigger Criteria:
Context: A Canadian export message is being prepared
Applied to: Set Security Byte to High Values
Action: Security parameters need to be established
Logic Flow:
IF A Canadian export message is being prepared
AND Security parameters need to be established
THEN:
• The security byte is set to high values for maximum security clearance
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train list contains a valid us customs train id.
Trigger Criteria:
Context: A train list contains a valid US customs train ID
Applied to: Move US Customs Train ID to GCX141 Train ID
Action: A Canadian export message is being prepared for that train
Logic Flow:
IF A train list contains a valid US customs train ID
AND A Canadian export message is being prepared for that train
THEN:
• The US customs train ID is copied to the GCX141 train ID field
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train id has been set in the gcx141 message.
Trigger Criteria:
Context: Train ID has been set in the GCX141 message
Applied to: Set Message Function Length Flag
Action: Message length parameters need to be configured
Logic Flow:
IF Train ID has been set in the GCX141 message
AND Message length parameters need to be configured
THEN:
• The message function length flag is set to TRUE
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when gcx141 input parameters are fully configured with train id and flags.
Trigger Criteria:
Context: GCX141 input parameters are fully configured with train ID and flags
Applied to: Move GCX141 Input to Message Output Text
Action: The message needs to be prepared for output
Logic Flow:
IF GCX141 input parameters are fully configured with train ID and flags
AND The message needs to be prepared for output
THEN:
• The complete GCX141 input is moved to the message output text field
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when complete canadian export message is prepared in the output text field.
Trigger Criteria:
Context: A complete Canadian export message is prepared in the output text field
Applied to: Insert GCX141 Message to Queue
Action: The message needs to be queued for processing
Logic Flow:
IF A complete Canadian export message is prepared in the output text field
AND The message needs to be queued for processing
THEN:
• The GCX141 message is inserted into the processing queue via Z750-ISRT-GCX141-MSG procedure
Business Justification: Establishes the required business protocol to be followed when train processing request is being finalized.
Trigger Criteria:
Context: A train processing request is being finalized
Applied to: Check if Laredo TX Station
Action: The system checks the crossing port station code
Logic Flow:
IF A train processing request is being finalized
AND The system checks the crossing port station code
THEN:
• Enhanced report generation is triggered only for Laredo TX station (CST-LAREDO-TX-STATION)
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when enhanced report generation is active for laredo tx station.
Trigger Criteria:
Context: Enhanced report generation is active for Laredo TX station
Applied to: Build Header Line 1 - Train ID and Car Counts
Action: The system builds the first header line
Logic Flow:
IF Enhanced report generation is active for Laredo TX station
AND The system builds the first header line
THEN:
• The header includes US customer train ID, total loaded cars count, and total empty cars count
• The header includes the US customer train ID, total loaded cars count, and total empty cars count
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when enhanced report generation is active and first header is complete.
Trigger Criteria:
Context: Enhanced report generation is active and first header is complete
Applied to: Build Header Line 2 - ETA Date/Time and Container Counts
Action: The system builds the second header line
Logic Flow:
IF Enhanced report generation is active and first header is complete
AND The system builds the second header line
THEN:
• The header includes ETA century (19 for years >94, 20 otherwise), ETA year/month/day/hour/minute, total loaded containers count, and total empty containers count
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when enhanced report generation is active and previous headers are complete.
Trigger Criteria:
Context: Enhanced report generation is active and previous headers are complete
Applied to: Build Header Line 3 - Port Code/Name and Locomotive Count
Action: The system builds the third header line
Logic Flow:
IF Enhanced report generation is active and previous headers are complete
AND The system builds the third header line
THEN:
• The header includes US station code, US station name, total locomotives count, and calculated total equipment count (cars + containers + locomotives)
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when individual equipment counts are available (loaded cars, empty cars, loaded containers, empty containers, locomotives).
Trigger Criteria:
Context: Individual equipment counts are available (loaded cars, empty cars, loaded containers, empty containers, locomotives)
Applied to: Calculate Total Equipment Count
Action: The system calculates total equipment
Logic Flow:
IF Individual equipment counts are available (loaded cars, empty cars, loaded containers, empty containers, locomotives)
AND The system calculates total equipment
THEN:
• Total equals the sum of loaded cars + empty cars + loaded containers + empty containers + locomotives
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when enhanced report content is ready for distribution.
Trigger Criteria:
Context: Enhanced report content is ready for distribution
Applied to: Initialize Email Parameters
Action: The system initializes email parameters
Logic Flow:
IF Enhanced report content is ready for distribution
AND The system initializes email parameters
THEN:
• Email sender and recipient are set to OM01247, line width is set to 80 characters, and subject includes train ID
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when enhanced report lines are being added to email message.
Trigger Criteria:
Context: Enhanced report lines are being added to email message
Applied to: Email Message Size Limit Reached?
Action: The system checks if message size limit is reached
Logic Flow:
IF Enhanced report lines are being added to email message
AND The system checks if message size limit is reached
THEN:
• If line count exceeds 699 lines, send current batch and initialize continuation email with headers
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when email message size limit of 699 lines has been reached.
Trigger Criteria:
Context: Email message size limit of 699 lines has been reached
Applied to: Initialize Continuation Email
Action: The system initializes a continuation email
Logic Flow:
IF Email message size limit of 699 lines has been reached
AND The system initializes a continuation email
THEN:
• Email message is cleared, line counter is reset, continuation message is added, and detail headers are re-added
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train export request is being processed.
Trigger Criteria:
Context: A train export request is being processed
Applied to: Check Location
Action: The system checks the train crossing location
Logic Flow:
IF A train export request is being processed
AND The system checks the train crossing location
THEN:
• Enhanced report generation is enabled only for Laredo TX station, otherwise the process is skipped
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when enhanced report generation is active.
Trigger Criteria:
Context: Enhanced report generation is active
Applied to: Build Header Line 2 - ETA Date/Time and Container Counts
Action: The system builds the second header line
Logic Flow:
IF Enhanced report generation is active
AND The system builds the second header line
THEN:
• The header includes ETA date with century calculation (19xx for years >94, 20xx otherwise), ETA time, loaded container count, and empty container count
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when enhanced report generation is active.
Trigger Criteria:
Context: Enhanced report generation is active
Applied to: Build Header Line 3 - Port Information and Totals
Action: The system builds the third header line
Logic Flow:
IF Enhanced report generation is active
AND The system builds the third header line
THEN:
• The header includes port code, port name, locomotive count, and total equipment count (sum of cars, containers, and locomotives)
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when enhanced report lines are being processed for email transmission.
Trigger Criteria:
Context: Enhanced report lines are being processed for email transmission
Applied to: Line Count > 699?
Action: The line count reaches 699 lines
Logic Flow:
IF Enhanced report lines are being processed for email transmission
AND The line count reaches 699 lines
THEN:
• The current email batch is sent, email buffer is reset, continuation header is added, and processing continues with remaining lines
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when enhanced report content is ready for transmission.
Trigger Criteria:
Context: Enhanced report content is ready for transmission
Applied to: Send Email Batch
Action: The system sends the email batch
Logic Flow:
IF Enhanced report content is ready for transmission
AND The system sends the email batch
THEN:
• Email is sent to OM01247 usercode with 80-character line width and appropriate subject line containing train ID
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when enhanced report email transmission fails.
Trigger Criteria:
Context: Enhanced report email transmission fails
Applied to: Handle Email Error
Action: The email send operation is unsuccessful
Logic Flow:
IF Enhanced report email transmission fails
AND The email send operation is unsuccessful
THEN:
• The system terminates processing with error message 'SEND TO FILE OF OM01247 FAILED'
R-GCX003-cbl-00520 (+10)File: GCX003.cblBusiness Rule: PDF Report Generation
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when pdf report generation is initiated.
Trigger Criteria:
Context: PDF report generation is initiated
Applied to: Start PDF Report Generation
Action: the system starts the PDF generation process
Logic Flow:
IF PDF report generation is initiated
AND the system starts the PDF generation process
THEN:
• the report message data should be cleared to prepare for new content
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when pre-exit report needs to be generated.
Trigger Criteria:
Context: a pre-exit report needs to be generated
Applied to: Prepare Pre-Exit Report Data
Action: preparing the report data
Logic Flow:
IF a pre-exit report needs to be generated
AND preparing the report data
THEN:
• the report message should be populated with the existing email text content and email subject should be set from the first report line
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when pre-exit report is being configured.
Trigger Criteria:
Context: a pre-exit report is being configured
Applied to: 'Pre-Exit Report'
Action: setting up the report parameters
Logic Flow:
IF a pre-exit report is being configured
AND setting up the report parameters
THEN:
• the report title should be set to 'Pre-Exit Report', report type to 'EXPORT', PDF length to 80 characters, train ID from the train list, and number of lines from the current report
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when pre-exit report data is prepared and configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: pre-exit report data is prepared and configured
Applied to: Call GCX904R for Pre-Exit PDF
Action: generating the PDF document
Logic Flow:
IF pre-exit report data is prepared and configured
AND generating the PDF document
THEN:
• the GCX904R service should be called to create the PDF with the prepared report data
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when export train report needs to be generated.
Trigger Criteria:
Context: an export train report needs to be generated
Applied to: Prepare Export Train Report Data
Action: preparing the report data
Logic Flow:
IF an export train report needs to be generated
AND preparing the report data
THEN:
• the report message should be populated with the new report table content and email subject should be set from the new report subject
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when export train report is being configured.
Trigger Criteria:
Context: an export train report is being configured
Applied to: 'Export Train Report'
Action: setting up the report parameters
Logic Flow:
IF an export train report is being configured
AND setting up the report parameters
THEN:
• the report title should be set to 'Export Train Report', report type to 'EXPORT', PDF length to 132 characters, train ID from the train list, and number of lines from the new report
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when export train report data is prepared and configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: export train report data is prepared and configured
Applied to: Call GCX904R for Export Train PDF
Action: generating the PDF document
Logic Flow:
IF export train report data is prepared and configured
AND generating the PDF document
THEN:
• the GCX904R service should be called to create the PDF with the prepared report data
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train export report has been processed and report data is available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A train export report has been processed and report data is available
Applied to: Call GCX904R for Pre-Exit PDF
Action: The system initiates PDF report generation for pre-exit documentation
Logic Flow:
IF A train export report has been processed and report data is available
AND The system initiates PDF report generation for pre-exit documentation
THEN:
• The system should prepare report data, set report title to 'Pre-Exit Report', set report type to 'EXPORT', configure PDF line length to 80 characters, calculate total number of report lines, and call GCX904R module to generate the PDF report
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when pre-exit pdf report has been generated.
Trigger Criteria:
Context: A pre-exit PDF report has been generated
Applied to: Laredo TX Station?
Action: The system checks if the current station is Laredo TX station
Logic Flow:
IF A pre-exit PDF report has been generated
AND The system checks if the current station is Laredo TX station
THEN:
• If the station is Laredo TX, the system should proceed to generate an enhanced report format, otherwise PDF generation should be marked as complete
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when processing station is laredo tx and pre-exit pdf has been generated. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The processing station is Laredo TX and pre-exit PDF has been generated
Applied to: Call GCX904R for Enhanced PDF
Action: The system initiates enhanced PDF report generation
Logic Flow:
IF The processing station is Laredo TX and pre-exit PDF has been generated
AND The system initiates enhanced PDF report generation
THEN:
• The system should prepare enhanced report data, set report title to 'Export Train Report', maintain report type as 'EXPORT', configure PDF line length to 132 characters, calculate enhanced report line count, and call GCX904R module to generate the enhanced PDF report
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train processing has completed and report generation is requested.
Trigger Criteria:
Context: Train processing has completed and report generation is requested
Applied to: Prepare Pre-Exit Report Data
Action: The system prepares data for PDF report creation
Logic Flow:
IF Train processing has completed and report generation is requested
AND The system prepares data for PDF report creation
THEN:
• The system should extract train ID for report identification, use email subject line as PDF subject, format report content for PDF output, and include report statistics with line count calculations
Business Justification: Ensures correct system behavior and process compliance when cargo is found with it bond type and special manifest origin is not set.
Trigger Criteria:
Context: Cargo is found with IT bond type and special manifest origin is not set
Applied to: Check Bond Type
Action: The cargo requires IT bond processing
Logic Flow:
IF Cargo is found with IT bond type and special manifest origin is not set
AND The cargo requires IT bond processing
THEN:
• Execute Crowley process for IT bond handling
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill and cargo are found with special manifest origin flag set.
Trigger Criteria:
Context: Waybill and cargo are found with special manifest origin flag set
Applied to: Check Special Conditions
Action: The crossing port is Woburn PQ station
Logic Flow:
IF Waybill and cargo are found with special manifest origin flag set
AND The crossing port is Woburn PQ station
THEN:
• Continue processing without generating error messages
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill and cargo are found with special manifest special flag set.
Trigger Criteria:
Context: Waybill and cargo are found with special manifest special flag set
Applied to: Check Special Conditions
Action: The crossing port is not Woburn PQ station
Logic Flow:
IF Waybill and cargo are found with special manifest special flag set
AND The crossing port is not Woburn PQ station
THEN:
• Continue processing without generating error messages
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill and cargo are found with export type and us-mexico country codes and special 88 flag.
Trigger Criteria:
Context: Waybill and cargo are found with export type and US-Mexico country codes and special 88 flag
Applied to: Check Special Conditions
Action: The crossing port is not Laredo TX station
Logic Flow:
IF Waybill and cargo are found with export type and US-Mexico country codes and special 88 flag
AND The crossing port is not Laredo TX station
THEN:
• Set US-Mexico 88 found flag and continue processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill and cargo are found with us-canada-us type and special tr flag.
Trigger Criteria:
Context: Waybill and cargo are found with US-Canada-US type and special TR flag
Applied to: Check Special Conditions
Action: The crossing port is Laredo TX station
Logic Flow:
IF Waybill and cargo are found with US-Canada-US type and special TR flag
AND The crossing port is Laredo TX station
THEN:
• Set special TR found flag and continue processing
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill is not found and container is found.
Trigger Criteria:
Context: Waybill is not found and container is found
Applied to: Generate Equipment Type Error
Action: Processing equipment validation
Logic Flow:
IF Waybill is not found and container is found
AND Processing equipment validation
THEN:
• Continue processing without generating specific error for this condition
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill is not found and container is not found and equipment is loaded.
Trigger Criteria:
Context: Waybill is not found and container is not found and equipment is loaded
Applied to: Generate Equipment Type Error
Action: Equipment is not a unit SBU van
Logic Flow:
IF Waybill is not found and container is not found and equipment is loaded
AND Equipment is not a unit SBU van
THEN:
• Generate message ten indicating waybill not found
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill status is neither found nor not found.
Trigger Criteria:
Context: Waybill status is neither found nor not found
Business Justification: Establishes the required business protocol to be followed when waybill is found and no cargo is found and idler indicator is not spaces.
Trigger Criteria:
Context: Waybill is found and no cargo is found and idler indicator is not spaces
Applied to: Generate Cargo Status Error
Action: Processing cargo validation
Logic Flow:
IF Waybill is found and no cargo is found and idler indicator is not spaces
AND Processing cargo validation
THEN:
• Generate message fifteen with waybill root key and date
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill is found and no cargo is found and residue weight threshold is greater than 7 and equipment is empty.
Trigger Criteria:
Context: Waybill is found and no cargo is found and residue weight threshold is greater than 7 and equipment is empty
Applied to: Generate Load Status Warning
Action: Idler indicator is not 'I'
Logic Flow:
IF Waybill is found and no cargo is found and residue weight threshold is greater than 7 and equipment is empty
AND Idler indicator is not 'I'
THEN:
• Generate message forty-four with waybill root key and date
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill is found and no cargo is found and origin state is us and destination state is us and equipment is loaded.
Trigger Criteria:
Context: Waybill is found and no cargo is found and origin state is US and destination state is US and equipment is loaded
Applied to: Check Load Status Consistent
Action: Equipment is not a conveying car
Logic Flow:
IF Waybill is found and no cargo is found and origin state is US and destination state is US and equipment is loaded
AND Equipment is not a conveying car
THEN:
• Execute detour process
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill is found and no cargo is found and origin state is us and destination state is us and equipment is empty and residue weight is greater than 0 and er is found.
Trigger Criteria:
Context: Waybill is found and no cargo is found and origin state is US and destination state is US and equipment is empty and residue weight is greater than 0 and ER is found
Applied to: Check Load Status Consistent
Action: Equipment is not a conveying car
Logic Flow:
IF Waybill is found and no cargo is found and origin state is US and destination state is US and equipment is empty and residue weight is greater than 0 and ER is found
AND Equipment is not a conveying car
THEN:
• Execute detour process
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill is found and no cargo is found and container is not found and equipment is loaded.
Trigger Criteria:
Context: Waybill is found and no cargo is found and container is not found and equipment is loaded
Applied to: Generate Documentation Warning
Action: Equipment is not conveying car and idler indicator is not 'I'
Logic Flow:
IF Waybill is found and no cargo is found and container is not found and equipment is loaded
AND Equipment is not conveying car and idler indicator is not 'I'
THEN:
• Generate message fifteen with waybill root key and date
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo is found with cp cargo status.
Trigger Criteria:
Context: Cargo is found with CP cargo status
Applied to: Generate Cargo Status Error
Action: Status is pending, deleted, or error
Logic Flow:
IF Cargo is found with CP cargo status
AND Status is pending, deleted, or error
THEN:
• Generate message sixteen indicating invalid cargo status
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is found with tr bond type.
Trigger Criteria:
Context: Cargo is found with TR bond type
Applied to: Generate Bond Type Error
Action: Cargo status description equals export status
Logic Flow:
IF Cargo is found with TR bond type
AND Cargo status description equals export status
THEN:
• Generate message twelve indicating TR bond export issue
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo is found with mt bond type and vessel name is not 'train' and not spaces.
Trigger Criteria:
Context: Cargo is found with MT bond type and vessel name is not 'TRAIN' and not spaces
Applied to: Generate Bond Type Error
Action: Station code matches cargo location ID
Logic Flow:
IF Cargo is found with MT bond type and vessel name is not 'TRAIN' and not spaces
AND Station code matches cargo location ID
THEN:
• Generate message twenty-five indicating MT bond location issue
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is found with te bond type.
Trigger Criteria:
Context: Cargo is found with TE bond type
Applied to: Generate Bond Type Error
Action: Vessel name character at position 23 is 'T'
Logic Flow:
IF Cargo is found with TE bond type
AND Vessel name character at position 23 is 'T'
THEN:
• Generate message seventeen indicating invalid vessel name
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is found with bond type not te and not mt.
Trigger Criteria:
Context: Cargo is found with bond type not TE and not MT
Applied to: Generate Bond Type Error
Action: Vessel name is not 'TRAIN'
Logic Flow:
IF Cargo is found with bond type not TE and not MT
AND Vessel name is not 'TRAIN'
THEN:
• Generate message seventeen indicating invalid vessel name
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo is found at laredo tx station with cargo status description equal to hold border.
Trigger Criteria:
Context: Cargo is found at Laredo TX station with cargo status description equal to hold border
Applied to: Generate Port Requirement Error
Action: DSP hold status is yes
Logic Flow:
IF Cargo is found at Laredo TX station with cargo status description equal to hold border
AND DSP hold status is yes
THEN:
• Generate message fifty-two indicating hold border with DSP hold
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo is found at laredo tx station.
Trigger Criteria:
Context: Cargo is found at Laredo TX station
Applied to: Generate Port Requirement Error
Action: DSP hold status is yes
Logic Flow:
IF Cargo is found at Laredo TX station
AND DSP hold status is yes
THEN:
• Generate message forty-nine indicating DSP hold
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo is found at laredo tx station.
Trigger Criteria:
Context: Cargo is found at Laredo TX station
Applied to: Generate Port Requirement Error
Action: Cargo status description equals hold border
Logic Flow:
IF Cargo is found at Laredo TX station
AND Cargo status description equals hold border
THEN:
• Generate message forty-eight indicating hold border without DSP
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is found at laredo tx station and segment 02 is found.
Trigger Criteria:
Context: Cargo is found at Laredo TX station and segment 02 is found
Applied to: Generate Documentation Warning
Action: FEN reference number is not found in segment data
Logic Flow:
IF Cargo is found at Laredo TX station and segment 02 is found
AND FEN reference number is not found in segment data
Business Justification: Governs the functional prerequisites and system routing when cargo is found with transport export type and not created for it and not export status and bills as cprs.
Trigger Criteria:
Context: Cargo is found with transport export type and not created for IT and not export status and bills as CPRS
Applied to: Check Special Conditions
Action: Cargo location ID does not match station code
Logic Flow:
IF Cargo is found with transport export type and not created for IT and not export status and bills as CPRS
AND Cargo location ID does not match station code
THEN:
• Execute detour process for TE bond
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when message has been generated during processing.
Trigger Criteria:
Context: A message has been generated during processing
Applied to: Categorize Message Type
Action: The message type is determined
Logic Flow:
IF A message has been generated during processing
AND The message type is determined
THEN:
• Set appropriate error, warning, or info flag and increment corresponding counter
Business Justification: Defines the strict business conditions required to proceed when report contains multiple lines with equipment information and message lines.
Trigger Criteria:
Context: A report contains multiple lines with equipment information and message lines
Applied to: Remove duplicate car entries from reports while preserving messages
Action: The system scans through report lines up to position 700 and encounters equipment entries with car IDs
Logic Flow:
IF A report contains multiple lines with equipment information and message lines
AND The system scans through report lines up to position 700 and encounters equipment entries with car IDs
THEN:
• The system should remove duplicate car ID entries while preserving all message lines (error, warning, information) and maintain the first occurrence of each unique car ID
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when system is processing report lines for duplicate removal.
Trigger Criteria:
Context: The system is processing report lines for duplicate removal
Applied to: Get Current Report Line
Action: A report line contains an empty car ID or represents a message line with prefixes 'ERR>', 'WRN>', or 'INF>'
Logic Flow:
IF The system is processing report lines for duplicate removal
AND A report line contains an empty car ID or represents a message line with prefixes 'ERR>', 'WRN>', or 'INF>'
THEN:
• The system should skip processing this line and continue to the next report line without any duplicate checking
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when system encounters a valid car id that is different from the previously stored car id.
Trigger Criteria:
Context: The system encounters a valid car ID that is different from the previously stored car ID
Applied to: Store Car ID as Previous
Action: The car ID is not empty and not a message line
Logic Flow:
IF The system encounters a valid car ID that is different from the previously stored car ID
AND The car ID is not empty and not a message line
THEN:
• The system should store this car ID as the new reference for subsequent duplicate comparisons
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when system finds a car id that matches the previously stored car id reference.
Trigger Criteria:
Context: The system finds a car ID that matches the previously stored car ID reference
Applied to: Clear Duplicate Car ID from Report
Action: The current car ID is identical to the held car ID from previous processing
Logic Flow:
IF The system finds a car ID that matches the previously stored car ID reference
AND The current car ID is identical to the held car ID from previous processing
THEN:
• The system should clear the car ID from the current report line by setting it to spaces, effectively removing the duplicate entry
Business Justification: Ensures correct system behavior and process compliance when train manifest processing operation is in progress with database changes pending.
Trigger Criteria:
Context: A train manifest processing operation is in progress with database changes pending
Applied to: Error Detected During Processing
Action: An error is detected during processing that requires transaction rollback
Logic Flow:
IF A train manifest processing operation is in progress with database changes pending
AND An error is detected during processing that requires transaction rollback
THEN:
• The system should execute database rollback to undo all uncommitted changes and restore the database to its previous consistent state
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when database rollback operation needs to be performed.
Trigger Criteria:
Context: A database rollback operation needs to be performed
Applied to: Initialize Rollback Status
Action: The rollback process is initiated
Logic Flow:
IF A database rollback operation needs to be performed
AND The rollback process is initiated
THEN:
• The system should initialize the accept status to prepare for rollback command execution
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when rollback status has been initialized. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The rollback status has been initialized
Applied to: Execute Database Rollback Command
Action: The database rollback command is executed
Logic Flow:
IF The rollback status has been initialized
AND The database rollback command is executed
THEN:
• The system should call the database rollback function to undo all pending changes
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train manifest processing is executing with potential for errors.
Trigger Criteria:
Context: Train manifest processing is executing with potential for errors
Applied to: Processing Error Occurred?
Action: The system evaluates whether processing errors have occurred
Logic Flow:
IF Train manifest processing is executing with potential for errors
AND The system evaluates whether processing errors have occurred
THEN:
• If no errors occurred, continue normal processing; if errors occurred, trigger rollback processing
R-GCX003-cbl-00578 (+12)File: GCX003.cblBusiness Rule: Port Automation Classification
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with scac code and train origin station.
Trigger Criteria:
Context: A cargo record with SCAC code and train origin station
Applied to: CPRS SCAC and Origin ≠ 9089?
Action: The cargo SCAC is 'CPRS' and the train origin is not '9089'
Logic Flow:
IF A cargo record with SCAC code and train origin station
AND The cargo SCAC is 'CPRS' and the train origin is not '9089'
THEN:
• The port is classified as automated for processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with scac code and train origin station.
Trigger Criteria:
Context: A cargo record with SCAC code and train origin station
Applied to: UPRR SCAC and Origin = 9089?
Action: The cargo SCAC is 'UPRR' and the train origin is '9089'
Logic Flow:
IF A cargo record with SCAC code and train origin station
AND The cargo SCAC is 'UPRR' and the train origin is '9089'
THEN:
• The port is classified as automated for processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo that does not meet cprs or uprr automated port criteria.
Trigger Criteria:
Context: A cargo that does not meet CPRS or UPRR automated port criteria
Applied to: Lookup Port in Reference Table
Action: The system needs to determine port automation status
Logic Flow:
IF A cargo that does not meet CPRS or UPRR automated port criteria
AND The system needs to determine port automation status
THEN:
• Look up the port configuration in GCSTBRT SS segment using cargo SCAC and station code
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when port configuration record retrieved from reference table.
Trigger Criteria:
Context: A port configuration record retrieved from reference table
Applied to: Automated Carrier Flag = 'Y'?
Action: The automated carrier flag is evaluated
Logic Flow:
IF A port configuration record retrieved from reference table
AND The automated carrier flag is evaluated
THEN:
• If flag equals 'Y' then classify port as automated, otherwise classify as paper-based
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with automated haulage flag and a paper-based port classification.
Trigger Criteria:
Context: A cargo record with automated haulage flag and a paper-based port classification
Applied to: Update Haulage Flag to Manual 'N'
Action: The request action is SEND and the cargo has haulage processing
Logic Flow:
IF A cargo record with automated haulage flag and a paper-based port classification
AND The request action is SEND and the cargo has haulage processing
THEN:
• Update the cargo haulage automated flag to 'N' for manual processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with manual haulage flag and an automated port classification.
Trigger Criteria:
Context: A cargo record with manual haulage flag and an automated port classification
Applied to: Update Haulage Flag to Automated 'Y'
Action: The request action is SEND and the cargo has haulage processing
Logic Flow:
IF A cargo record with manual haulage flag and an automated port classification
AND The request action is SEND and the cargo has haulage processing
THEN:
• Update the cargo haulage automated flag to 'Y' for automated processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with scac code and a train request with origin station.
Trigger Criteria:
Context: A cargo record with SCAC code and a train request with origin station
Applied to: CPRS Carrier AND Origin ≠ 9089?
Action: The cargo SCAC is 'CPRS' AND the train origin is not '9089'
Logic Flow:
IF A cargo record with SCAC code and a train request with origin station
AND The cargo SCAC is 'CPRS' AND the train origin is not '9089'
THEN:
• The port is classified as AUTOMATED
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with scac code and a train request with origin station.
Trigger Criteria:
Context: A cargo record with SCAC code and a train request with origin station
Applied to: UPRR Carrier AND Origin = 9089?
Action: The cargo SCAC is 'UPRR' AND the train origin is '9089'
Logic Flow:
IF A cargo record with SCAC code and a train request with origin station
AND The cargo SCAC is 'UPRR' AND the train origin is '9089'
THEN:
• The port is classified as AUTOMATED
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo scac code and a crossing port station code.
Trigger Criteria:
Context: A cargo SCAC code and a crossing port station code
Applied to: Look Up Port in Reference Table
Action: The port automation status needs to be determined from reference data
Logic Flow:
IF A cargo SCAC code and a crossing port station code
AND The port automation status needs to be determined from reference data
THEN:
• Look up the port in GCSTBRT table using SCAC and station code combination
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when port record retrieved from reference table with automation flag.
Trigger Criteria:
Context: A port record retrieved from reference table with automation flag
Applied to: Automation Flag = 'Y'?
Action: The automation flag is evaluated
Logic Flow:
IF A port record retrieved from reference table with automation flag
AND The automation flag is evaluated
THEN:
• If flag equals 'Y' then classify as AUTOMATED, otherwise classify as PAPER
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when port that is either not found in reference table or has automation flag not equal to 'y'.
Trigger Criteria:
Context: A port that is either not found in reference table or has automation flag not equal to 'Y'
Applied to: Set Port as PAPER
Action: Port classification is being determined
Logic Flow:
IF A port that is either not found in reference table or has automation flag not equal to 'Y'
AND Port classification is being determined
THEN:
• The port is classified as PAPER
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo with haulage automation flag and a classified port type.
Trigger Criteria:
Context: A cargo with haulage automation flag and a classified port type
Applied to: Current Haulage Status vs Port Type Mismatch?
Action: The request action is SEND AND cargo is haulage type
Logic Flow:
IF A cargo with haulage automation flag and a classified port type
AND The request action is SEND AND cargo is haulage type
THEN:
• Check if automated haulage with paper port OR manual haulage with automated port creates a mismatch
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when haulage cargo with automation status that conflicts with port classification.
Trigger Criteria:
Context: A haulage cargo with automation status that conflicts with port classification
Applied to: Update Haulage Automation Flag
Action: A mismatch is detected between haulage status and port type
Logic Flow:
IF A haulage cargo with automation status that conflicts with port classification
AND A mismatch is detected between haulage status and port type
THEN:
• Update haulage automation flag to 'N' for paper ports or 'Y' for automated ports
R-GCX003-cbl-00584File: GCX003.cblBusiness Rule: AEI Request Type Classification
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train export request is received with a specific request type code.
Trigger Criteria:
Context: A train export request is received with a specific request type code
Applied to: Check Request Type
Action: The system evaluates the request type against the AEI request type constant
Logic Flow:
IF A train export request is received with a specific request type code
AND The system evaluates the request type against the AEI request type constant
THEN:
• If the request type equals the AEI request type constant, the AEI train send flag is set to YES, otherwise the AEI train send flag is set to NO
Business Justification: Defines the strict business conditions required to proceed when train manifest request is being processed and no errors have occurred so far.
Trigger Criteria:
Context: A train manifest request is being processed and no errors have occurred so far
Applied to: First Equipment Entry Empty?
Action: The first equipment entry in the request is empty (REQ-NO-MORE-EQP(1) is true)
Logic Flow:
IF A train manifest request is being processed and no errors have occurred so far
AND The first equipment entry in the request is empty (REQ-NO-MORE-EQP(1) is true)
THEN:
• The system sets error message MSG-FIVEand adds it to the report index to indicate no equipment was provided
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train manifest request is being processed and no errors have occurred so far.
Trigger Criteria:
Context: A train manifest request is being processed and no errors have occurred so far
Applied to: Equipment Count > 499?
Action: The equipment list contains more than 499 items (NOT REQ-NO-MORE-EQP(500) is true)
Logic Flow:
IF A train manifest request is being processed and no errors have occurred so far
AND The equipment list contains more than 499 items (NOT REQ-NO-MORE-EQP(500) is true)
THEN:
• The system sets error message MSG-FIVEand adds it to the report index to indicate too many equipment items were provided
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train manifest request is being processed.
Trigger Criteria:
Context: A train manifest request is being processed
Applied to: Check if No Errors So Far
Action: Previous validation steps have resulted in errors (RPT-NO-ERROR is false)
Logic Flow:
IF A train manifest request is being processed
AND Previous validation steps have resulted in errors (RPT-NO-ERROR is false)
THEN:
• The system skips equipment limit validation and continues with subsequent processing
Business Justification: Establishes the required business protocol to be followed when waybill is found and equipment type code is available.
Trigger Criteria:
Context: A waybill is found and equipment type code is available
Applied to: Equipment Type = 'SK' Double Stack?
Action: The equipment type code is evaluated
Logic Flow:
IF A waybill is found and equipment type code is available
AND The equipment type code is evaluated
THEN:
• If equipment type is 'SK' then proceed to double stack counting, otherwise continue with normal equipment processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment type is confirmed as double stack ('sk') and waybill root key is available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Equipment type is confirmed as double stack ('SK') and waybill root key is available
Applied to: Call GCCDBL Module with Waybill Number
Action: The GCCDBL module is called with the waybill number
Logic Flow:
IF Equipment type is confirmed as double stack ('SK') and waybill root key is available
AND The GCCDBL module is called with the waybill number
THEN:
• Double stack traffic type and count information is returned for further processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when double stack container information is retrieved and traffic type is determined.
Trigger Criteria:
Context: Double stack container information is retrieved and traffic type is determined
Applied to: Increment CPRS Double Stack Count
Action: The traffic type is CPRS double stack traffic
Logic Flow:
IF Double stack container information is retrieved and traffic type is determined
AND The traffic type is CPRS double stack traffic
THEN:
• Add the double stack count to the CPRS double stack counter in the train list
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when double stack container information is retrieved and traffic type is determined.
Trigger Criteria:
Context: Double stack container information is retrieved and traffic type is determined
Applied to: Increment CSXT Double Stack Count
Action: The traffic type is CSXT double stack traffic
Logic Flow:
IF Double stack container information is retrieved and traffic type is determined
AND The traffic type is CSXT double stack traffic
THEN:
• Add the double stack count to the CSXT double stack counter in the train list
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when double stack container information is retrieved and traffic type is determined.
Trigger Criteria:
Context: Double stack container information is retrieved and traffic type is determined
Applied to: Increment NS Double Stack Count
Action: The traffic type is NS double stack traffic
Logic Flow:
IF Double stack container information is retrieved and traffic type is determined
AND The traffic type is NS double stack traffic
THEN:
• Add the double stack count to the NS double stack counter in the train list
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when double stack container information is retrieved and traffic type is determined.
Trigger Criteria:
Context: Double stack container information is retrieved and traffic type is determined
Applied to: Increment HAUL Double Stack Count
Action: The traffic type is HAUL double stack traffic
Logic Flow:
IF Double stack container information is retrieved and traffic type is determined
AND The traffic type is HAUL double stack traffic
THEN:
• Add the double stack count to the HAUL double stack counter in the train list
Business Justification: Establishes the required business protocol to be followed when waybill exists with routing information in rut-info fields.
Trigger Criteria:
Context: A waybill exists with routing information in RUT-INFO fields
Applied to: Extract Routing Information from Waybill
Action: The system processes the waybill routing data
Logic Flow:
IF A waybill exists with routing information in RUT-INFO fields
AND The system processes the waybill routing data
THEN:
• The routing information is extracted from three RUT-INFO positions and all '!' characters are replaced with spaces
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when routing information has been extracted from waybill.
Trigger Criteria:
Context: Routing information has been extracted from waybill
Applied to: Initialize Route Search Variables
Action: The system begins route analysis
Logic Flow:
IF Routing information has been extracted from waybill
AND The system begins route analysis
THEN:
• Route search variables are set to initial state with route not found status and starting position
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when route analysis variables are initialized and routing information is available.
Trigger Criteria:
Context: Route analysis variables are initialized and routing information is available
Applied to: Check Route Entry
Action: The system processes each route entry up to 9 positions or until route is found
Logic Flow:
IF Route analysis variables are initialized and routing information is available
AND The system processes each route entry up to 9 positions or until route is found
THEN:
• SCAC code and junction/R260 code are extracted from current route position for evaluation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when route entry contains scac codes and junction information.
Trigger Criteria:
Context: Route entry contains SCAC codes and junction information
Applied to: Set Equipment Type 3 - CSXT Haulage
Action: First route SCAC is CSXT and second route SCAC is CPRS and junction is DET
Logic Flow:
IF Route entry contains SCAC codes and junction information
AND First route SCAC is CSXT and second route SCAC is CPRS and junction is DET
THEN:
• Equipment is classified as type 3 for CSXT haulage and marked for report inclusion with route found status
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when route entry contains scac codes and junction information.
Trigger Criteria:
Context: Route entry contains SCAC codes and junction information
Applied to: Set Equipment Type 4 - NS Haulage
Action: First route SCAC is NS and second route SCAC is CPRS and junction is DET
Logic Flow:
IF Route entry contains SCAC codes and junction information
AND First route SCAC is NS and second route SCAC is CPRS and junction is DET
THEN:
• Equipment is classified as type 4 for NS haulage and marked for report inclusion with route found status
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment routing does not match csxt or ns to cprs patterns.
Trigger Criteria:
Context: Equipment routing does not match CSXT or NS to CPRS patterns
Applied to: Set Equipment Type 2 - Hazmat
Action: Equipment IMA code equals 'HM' indicating hazardous materials
Logic Flow:
IF Equipment routing does not match CSXT or NS to CPRS patterns
AND Equipment IMA code equals 'HM' indicating hazardous materials
THEN:
• Equipment is classified as type 2 for hazmat and marked for report inclusion with route found status
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment has been analyzed for routing patterns and hazmat status.
Trigger Criteria:
Context: Equipment has been analyzed for routing patterns and hazmat status
Applied to: Mark Equipment as Empty - Exclude from Report
Action: Equipment does not match CSXT haulage, NS haulage, or hazmat criteria and no route is found after checking all positions
Logic Flow:
IF Equipment has been analyzed for routing patterns and hazmat status
AND Equipment does not match CSXT haulage, NS haulage, or hazmat criteria and no route is found after checking all positions
THEN:
• Equipment empty indicator is set to 1 to exclude from detailed manifest reporting
R-GCX003-cbl-00601 (+5)File: GCX003.cblBusiness Rule: Special Handling Code Processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment has been retrieved from waybill and shipment commodity information is available.
Trigger Criteria:
Context: Equipment has been retrieved from waybill and shipment commodity information is available
Applied to: Check if Equipment is Empty and Has Residue Weight
Action: The equipment load indicator is 'E' (empty) AND the residue weight in shipment commodity is greater than 0
Logic Flow:
IF Equipment has been retrieved from waybill and shipment commodity information is available
AND The equipment load indicator is 'E' (empty) AND the residue weight in shipment commodity is greater than 0
THEN:
• Initialize special handling code processing for empty residue validation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment is empty with residue weight greater than 0 and special handling codes are available in shipment commodity.
Trigger Criteria:
Context: Equipment is empty with residue weight greater than 0 AND special handling codes are available in shipment commodity
Applied to: Special Handling Code = ER Threshold Code?
Action: Any special handling code (positions 1-8) equals the ER threshold code
Logic Flow:
IF Equipment is empty with residue weight greater than 0 AND special handling codes are available in shipment commodity
AND Any special handling code (positions 1-8) equals the ER threshold code
THEN:
• Set ER found flag to true to indicate empty residue threshold validation is required
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment is empty with residue weight and er threshold code is found in special handling codes.
Trigger Criteria:
Context: Equipment is empty with residue weight AND ER threshold code is found in special handling codes
Applied to: ER Weight Threshold > 7?
Action: The residue weight is greater than 7 units
Logic Flow:
IF Equipment is empty with residue weight AND ER threshold code is found in special handling codes
AND The residue weight is greater than 7 units
THEN:
• Set ER weight threshold greater than 7 flag for subsequent error message generation
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment is empty and has residue weight greater than 7 and er threshold code is found and equipment load indicator is 'e' and idler indicator is not 'i'.
Trigger Criteria:
Context: Equipment is empty AND has residue weight greater than 7 AND ER threshold code is found AND equipment load indicator is 'E' AND idler indicator is not 'I'
IF Equipment is empty AND has residue weight greater than 7 AND ER threshold code is found AND equipment load indicator is 'E' AND idler indicator is not 'I'
AND No cargo is found for the waybill
THEN:
• Generate error message 44 with waybill root key and date information
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment has residue weight greater than 0 and er threshold code is found in special handling codes.
Trigger Criteria:
Context: Equipment has residue weight greater than 0 AND ER threshold code is found in special handling codes
Applied to: Skip Equipment from Report
Action: The equipment meets empty residue criteria for special processing
Logic Flow:
IF Equipment has residue weight greater than 0 AND ER threshold code is found in special handling codes
AND The equipment meets empty residue criteria for special processing
THEN:
• Skip the equipment from standard cargo attachment and report generation processes
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is found and cargo type is empty residue.
Trigger Criteria:
Context: Cargo is found AND cargo type is empty residue
Applied to: Continue Normal Processing
Action: The cargo qualifies as empty residue type in the cargo classification
Logic Flow:
IF Cargo is found AND cargo type is empty residue
AND The cargo qualifies as empty residue type in the cargo classification
THEN:
• Continue with normal cargo processing and report generation without applying empty residue restrictions
R-GCX003-cbl-00607 (+11)File: GCX003.cblBusiness Rule: Equipment Type Description Retrieval
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container has been found in the waybill system.
Trigger Criteria:
Context: A container has been found in the waybill system
Applied to: Set Equipment ID for Container
Action: The system processes the container equipment
Logic Flow:
IF A container has been found in the waybill system
AND The system processes the container equipment
THEN:
• The equipment ID should be set to the container ID from the equipment record and the container ID should be assigned to the car type validation input parameter
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when car equipment is being processed from the request.
Trigger Criteria:
Context: A car equipment is being processed from the request
Applied to: Set Equipment ID for Car
Action: The system processes the car equipment
Logic Flow:
IF A car equipment is being processed from the request
AND The system processes the car equipment
THEN:
• The equipment ID should be constructed from the request car ID and assigned to the car type validation input parameter
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container equipment is being processed.
Trigger Criteria:
Context: Container equipment is being processed
Applied to: Set Equipment Type Flag - Container
Action: The system prepares for equipment type validation
Logic Flow:
IF Container equipment is being processed
AND The system prepares for equipment type validation
THEN:
• The equipment type flag should be set to container type
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when car equipment is being processed.
Trigger Criteria:
Context: Car equipment is being processed
Applied to: Set Equipment Type Flag - Car
Action: The system prepares for equipment type validation
Logic Flow:
IF Car equipment is being processed
AND The system prepares for equipment type validation
THEN:
• The equipment type flag should be set to car type
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container equipment is being processed and the shipment record indicates trailer type.
Trigger Criteria:
Context: A container equipment is being processed and the shipment record indicates trailer type
Applied to: Set Trailer Flag for Container
Action: The system checks for special equipment characteristics
Logic Flow:
IF A container equipment is being processed and the shipment record indicates trailer type
AND The system checks for special equipment characteristics
THEN:
• The trailer flag should be set in addition to the container flag
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment id and type flags have been set. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Equipment ID and type flags have been set
Applied to: Call Equipment Type Validation Service
Action: The system needs to validate equipment type
Logic Flow:
IF Equipment ID and type flags have been set
AND The system needs to validate equipment type
THEN:
• The GCCCARTP service should be called with the equipment parameters
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment type validation service has been called. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The equipment type validation service has been called
Applied to: Equipment Type Call Successful?
Action: The system checks the service response
Logic Flow:
IF The equipment type validation service has been called
AND The system checks the service response
THEN:
• If the call was not successful, an equipment error should be generated, otherwise processing should continue with type code retrieval
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment type validation service call has failed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The equipment type validation service call has failed
Applied to: Generate Equipment Error Message
Action: The system processes the validation failure
Logic Flow:
IF The equipment type validation service call has failed
AND The system processes the validation failure
THEN:
• If the equipment is a container, message 35 should be generated, otherwise message 36 should be generated, and the equipment error flag should be set
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment type validation service call was successful. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The equipment type validation service call was successful
Applied to: Retrieve Equipment Type Code
Action: The system processes the validation response
Logic Flow:
IF The equipment type validation service call was successful
AND The system processes the validation response
THEN:
• The equipment type code should be retrieved from the service response
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment type code has been retrieved from the validation service.
Trigger Criteria:
Context: An equipment type code has been retrieved from the validation service
Applied to: Look Up Equipment Type Description in Reference Table
Action: The system needs to get the equipment type description
Logic Flow:
IF An equipment type code has been retrieved from the validation service
AND The system needs to get the equipment type description
THEN:
• The GCSTBRT-VI reference table should be queried using the equipment type code
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment type description lookup was successful.
Trigger Criteria:
Context: The equipment type description lookup was successful
Applied to: Assign Equipment Type Description
Action: The system processes the lookup result
Logic Flow:
IF The equipment type description lookup was successful
AND The system processes the lookup result
THEN:
• The equipment type description should be assigned to the US CCN report field
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment type description lookup was not successful.
Trigger Criteria:
Context: The equipment type description lookup was not successful
Applied to: Set Default Description as Spaces
Action: The system processes the lookup failure
Logic Flow:
IF The equipment type description lookup was not successful
AND The system processes the lookup failure
THEN:
• The equipment type description should be set to spaces as default
R-GCX003-cbl-00619 (+9)File: GCX003.cblBusiness Rule: Locomotive and Equipment Counting
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment item with a car type code.
Trigger Criteria:
Context: An equipment item with a car type code
Applied to: Count as Locomotive
Action: The car type code is 'LO' or 'ET'
Logic Flow:
IF An equipment item with a car type code
AND The car type code is 'LO' or 'ET'
THEN:
• The equipment is classified as a locomotive and added to the locomotive count
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment item with a car type code that is not a locomotive.
Trigger Criteria:
Context: An equipment item with a car type code that is not a locomotive
Applied to: Container Equipment?
Action: The car type code is 'CN'
Logic Flow:
IF An equipment item with a car type code that is not a locomotive
AND The car type code is 'CN'
THEN:
• The equipment is classified as container equipment for container-specific counting
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment item classified as container equipment.
Trigger Criteria:
Context: An equipment item classified as container equipment
Applied to: Count Loaded Container
Action: The load/empty indicator is 'L' (loaded)
Logic Flow:
IF An equipment item classified as container equipment
AND The load/empty indicator is 'L' (loaded)
THEN:
• Add 1 to the total loaded container count
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment item classified as container equipment.
Trigger Criteria:
Context: An equipment item classified as container equipment
Applied to: Count Empty Container
Action: The load/empty indicator is 'E' (empty)
Logic Flow:
IF An equipment item classified as container equipment
AND The load/empty indicator is 'E' (empty)
THEN:
• Add 1 to the total empty container count
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment item that is not a locomotive or container.
Trigger Criteria:
Context: An equipment item that is not a locomotive or container
Applied to: Count Loaded Car
Action: The load/empty indicator is 'L' (loaded)
Logic Flow:
IF An equipment item that is not a locomotive or container
AND The load/empty indicator is 'L' (loaded)
THEN:
• Add 1 to the total loaded car count
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment item that is not a locomotive or container.
Trigger Criteria:
Context: An equipment item that is not a locomotive or container
Applied to: Count Empty Car
Action: The load/empty indicator is 'E' (empty)
Logic Flow:
IF An equipment item that is not a locomotive or container
AND The load/empty indicator is 'E' (empty)
THEN:
• Add 1 to the total empty car count
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment item with associated cargo information.
Trigger Criteria:
Context: An equipment item with associated cargo information
Applied to: Empty Residue Found?
Action: The cargo is classified as empty residue or empty equipment type
Logic Flow:
IF An equipment item with associated cargo information
AND The cargo is classified as empty residue or empty equipment type
THEN:
• The equipment requires adjustment from loaded to empty status in counts
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when container equipment with empty residue cargo and current loaded status.
Trigger Criteria:
Context: A container equipment with empty residue cargo and current loaded status
Applied to: Adjust Container Counts
Action: The load/empty indicator was 'L' but cargo indicates empty residue
Logic Flow:
IF A container equipment with empty residue cargo and current loaded status
AND The load/empty indicator was 'L' but cargo indicates empty residue
THEN:
• Subtract 1 from loaded container count and add 1 to empty container count
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when car equipment with empty residue cargo and current loaded status.
Trigger Criteria:
Context: A car equipment with empty residue cargo and current loaded status
Applied to: Adjust Car Counts
Action: The load/empty indicator was 'L' but cargo indicates empty residue
Logic Flow:
IF A car equipment with empty residue cargo and current loaded status
AND The load/empty indicator was 'L' but cargo indicates empty residue
THEN:
• Subtract 1 from loaded car count and add 1 to empty car count
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment item with empty residue cargo.
Trigger Criteria:
Context: An equipment item with empty residue cargo
Applied to: Update Equipment Status to Empty
Action: The cargo type indicates empty residue or empty equipment
Logic Flow:
IF An equipment item with empty residue cargo
AND The cargo type indicates empty residue or empty equipment
THEN:
• Update the equipment load/empty indicator to 'E' (empty) for both report and new report formats
R-GCX003-cbl-00629 (+3)File: GCX003.cblBusiness Rule: International Service Unit Processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment item is being processed in the train manifest.
Trigger Criteria:
Context: An equipment item is being processed in the train manifest
Applied to: Is Equipment SBU Van?
Action: The system checks the equipment type classification
Logic Flow:
IF An equipment item is being processed in the train manifest
AND The system checks the equipment type classification
THEN:
• The equipment is identified as either SBU van type or regular equipment type
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment item is identified as sbu van type.
Trigger Criteria:
Context: An equipment item is identified as SBU van type
Applied to: Set Load/Empty to 'E' - Empty
Action: The system processes the load/empty indicator
Logic Flow:
IF An equipment item is identified as SBU van type
AND The system processes the load/empty indicator
THEN:
• The load/empty indicator is set to 'E' for Empty status
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment item is identified as sbu van type.
Trigger Criteria:
Context: An equipment item is identified as SBU van type
Applied to: Is Load/Empty Indicator 'E'?
Action: The system checks the current load/empty indicator value
Logic Flow:
IF An equipment item is identified as SBU van type
AND The system checks the current load/empty indicator value
THEN:
• The system determines if the indicator is already set to 'E' for Empty
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment item is sbu van type and has empty load status.
Trigger Criteria:
Context: An equipment item is SBU van type and has empty load status
Applied to: Set Equipment Info to 'INTERNATIONAL SERVICE'
Action: The system assigns equipment information description
Logic Flow:
IF An equipment item is SBU van type and has empty load status
AND The system assigns equipment information description
THEN:
• The equipment information field is set to 'INTERNATIONAL SERVICE'
R-GCX003-cbl-00633 (+4)File: GCX003.cblBusiness Rule: Conveying Flat Car Identification
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill is found for the equipment.
Trigger Criteria:
Context: A waybill is found for the equipment
Applied to: Set Equipment Status to Empty
Action: The equipment is identified as a conveying car (SHRT-CONVEYING-CAR is true)
Logic Flow:
IF A waybill is found for the equipment
AND The equipment is identified as a conveying car (SHRT-CONVEYING-CAR is true)
THEN:
• The equipment load/empty indicator is set to 'E' (empty)
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment is identified as a conveying car and no cargo is found.
Trigger Criteria:
Context: The equipment is identified as a conveying car and no cargo is found
Applied to: Set Info Field to 'CONVEYING FLAT CAR'
Action: The system processes the equipment information field
Logic Flow:
IF The equipment is identified as a conveying car and no cargo is found
AND The system processes the equipment information field
THEN:
• The information field is set to 'CONVEYING FLAT CAR'
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment is a conveying flat car and the load/empty indicator is 'e' (empty).
Trigger Criteria:
Context: The equipment is a conveying flat car and the load/empty indicator is 'E' (empty)
Applied to: Skip Cargo Processing for Empty Conveying Car
Action: The system determines cargo processing requirements
Logic Flow:
IF The equipment is a conveying flat car and the load/empty indicator is 'E' (empty)
AND The system determines cargo processing requirements
THEN:
• Normal cargo processing is bypassed and the system proceeds to format equipment information
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment is either not a conveying car or is a conveying car with containers loaded.
Trigger Criteria:
Context: The equipment is either not a conveying car or is a conveying car with containers loaded
Applied to: Continue Normal Processing
Action: The system determines the processing path
Logic Flow:
IF The equipment is either not a conveying car or is a conveying car with containers loaded
AND The system determines the processing path
THEN:
• Standard equipment and cargo processing procedures are executed
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when conveying flat car has containers loaded on it.
Trigger Criteria:
Context: A conveying flat car has containers loaded on it
Applied to: Retrieve Container Information
Action: The system processes the equipment
Logic Flow:
IF A conveying flat car has containers loaded on it
AND The system processes the equipment
THEN:
• Container information is retrieved and processed through the container handling procedures
R-GCX003-cbl-00638 (+7)File: GCX003.cblBusiness Rule: Bond Number Extraction and Formatting
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed for bond information display.
Trigger Criteria:
Context: A cargo record is being processed for bond information display
Applied to: Extract Bond Number from Entry Number
Action: The entry number field contains a valid non-space value
Logic Flow:
IF A cargo record is being processed for bond information display
AND The entry number field contains a valid non-space value
THEN:
• The entry number should be extracted and stored as the bond number for formatting
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed for bond information display.
Trigger Criteria:
Context: A cargo record is being processed for bond information display
Applied to: Set Bond Number to Spaces
Action: Both the entry number and in-bond control number fields are empty or contain spaces
Logic Flow:
IF A cargo record is being processed for bond information display
AND Both the entry number and in-bond control number fields are empty or contain spaces
THEN:
• The bond number should be set to spaces
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed for bond information display and the entry number is not available.
Trigger Criteria:
Context: A cargo record is being processed for bond information display and the entry number is not available
Applied to: Extract Bond Number from In-Bond Control Number
Action: The in-bond control number field contains a valid non-space value
Logic Flow:
IF A cargo record is being processed for bond information display and the entry number is not available
AND The in-bond control number field contains a valid non-space value
THEN:
• The in-bond control number should be extracted and stored as the bond number for formatting
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has bond information to be formatted for display.
Trigger Criteria:
Context: A cargo record has bond information to be formatted for display
Applied to: Format as 'AMS IT [Bond Number]'
Action: The in-bond type code is 'IT'
Logic Flow:
IF A cargo record has bond information to be formatted for display
AND The in-bond type code is 'IT'
THEN:
• The bond information should be formatted as 'AMS IT [bond number]' in the report info field
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has bond information to be formatted for display.
Trigger Criteria:
Context: A cargo record has bond information to be formatted for display
Applied to: Format as 'AMS IE [Bond Number]'
Action: The in-bond type code is 'IE'
Logic Flow:
IF A cargo record has bond information to be formatted for display
AND The in-bond type code is 'IE'
THEN:
• The bond information should be formatted as 'AMS IE [bond number]' in the report info field
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has bond information to be formatted for display.
Trigger Criteria:
Context: A cargo record has bond information to be formatted for display
Applied to: Format as 'AMS 7512 TE [Bond Number]'
Action: The in-bond type code is 'TE'
Logic Flow:
IF A cargo record has bond information to be formatted for display
AND The in-bond type code is 'TE'
THEN:
• The bond information should be formatted as 'AMS 7512 TE [bond number]' in the report info field
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has bond information to be formatted for display.
Trigger Criteria:
Context: A cargo record has bond information to be formatted for display
Applied to: Format as 'AMS 7512 TR [Bond Number]'
Action: The in-bond type code is 'TR'
Logic Flow:
IF A cargo record has bond information to be formatted for display
AND The in-bond type code is 'TR'
THEN:
• The bond information should be formatted as 'AMS 7512 TR [bond number]' in the report info field
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has bond information to be formatted for display.
Trigger Criteria:
Context: A cargo record has bond information to be formatted for display
Applied to: Format as 'AMS 7512 MT [Bond Number]'
Action: The in-bond type code is 'MT'
Logic Flow:
IF A cargo record has bond information to be formatted for display
AND The in-bond type code is 'MT'
THEN:
• The bond information should be formatted as 'AMS 7512 MT [bond number]' in the report info field
R-GCX003-cbl-00646File: GCX003.cblBusiness Rule: Paper Port 7512 Processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being processed for report formatting.
Trigger Criteria:
Context: A cargo record is being processed for report formatting
Applied to: Check Bill Type Code
Action: The cargo bill type code equals '15'
Logic Flow:
IF A cargo record is being processed for report formatting
AND The cargo bill type code equals '15'
THEN:
• The system sets the cargo information field to 'PPR 7512 15 US-CA-US' to indicate paper port 7512 processing for US-Canada-US movement
R-GCX003-cbl-00647 (+10)File: GCX003.cblBusiness Rule: Special Equipment Description Processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment item is classified as sbu van unit and has empty load indicator.
Trigger Criteria:
Context: An equipment item is classified as SBU Van unit and has empty load indicator
Applied to: Process International Service Unit
Action: The system processes the equipment description
Logic Flow:
IF An equipment item is classified as SBU Van unit and has empty load indicator
AND The system processes the equipment description
THEN:
• The equipment description is set to 'INTERNATIONAL SERVICE' and processing completes
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when no cargo is found for the equipment or cargo is classified as empty equipment type.
Trigger Criteria:
Context: No cargo is found for the equipment or cargo is classified as empty equipment type
Applied to: Process Empty Equipment
Action: The system determines the equipment description
Logic Flow:
IF No cargo is found for the equipment or cargo is classified as empty equipment type
AND The system determines the equipment description
THEN:
• The equipment description is set to 'EMPTY' and load indicator is set to 'E'
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment is classified as conveying car and no cargo is found.
Trigger Criteria:
Context: Equipment is classified as conveying car and no cargo is found
Applied to: Process Conveying Flat Car
Action: The system processes the equipment description
Logic Flow:
IF Equipment is classified as conveying car and no cargo is found
AND The system processes the equipment description
THEN:
• The equipment description is set to 'CONVEYING FLAT CAR'
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has a valid entry number in m1202 field.
Trigger Criteria:
Context: Cargo has a valid entry number in M1202 field
Applied to: Extract Bond Number from Entry Number
Action: The system processes bond information
Logic Flow:
IF Cargo has a valid entry number in M1202 field
AND The system processes bond information
THEN:
• The entry number is saved as the bond number for description formatting
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo entry number is blank and in-bond control number m1206 field contains data.
Trigger Criteria:
Context: Cargo entry number is blank and in-bond control number M1206 field contains data
Applied to: Extract Bond Number from In-Bond Control Number
Action: The system processes bond information
Logic Flow:
IF Cargo entry number is blank and in-bond control number M1206 field contains data
AND The system processes bond information
THEN:
• The in-bond control number is saved as the bond number for description formatting
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo has bill of lading type code equal to '15'.
Trigger Criteria:
Context: Cargo has bill of lading type code equal to '15'
Applied to: Format Paper 7512 US-CA-US Description
Action: The system formats the equipment description
Logic Flow:
IF Cargo has bill of lading type code equal to '15'
AND The system formats the equipment description
THEN:
• The description is set to 'PPR 7512 15 US-CA-US'
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo has in-bond type code of 'it' or 'ie'.
Trigger Criteria:
Context: Cargo has in-bond type code of 'IT' or 'IE'
Applied to: Format AMS IT/IE Bond Description
Action: The system formats the equipment description
Logic Flow:
IF Cargo has in-bond type code of 'IT' or 'IE'
AND The system formats the equipment description
THEN:
• The description is formatted as 'AMS' followed by the bond type and bond number
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has in-bond type code of 'te', 'tr', or 'mt'.
Trigger Criteria:
Context: Cargo has in-bond type code of 'TE', 'TR', or 'MT'
Applied to: Format AMS 7512 TE/TR/MT Bond Description
Action: The system formats the equipment description
Logic Flow:
IF Cargo has in-bond type code of 'TE', 'TR', or 'MT'
AND The system formats the equipment description
THEN:
• The description is formatted as 'AMS 7512' followed by the bond type and bond number
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment description is blank and segment 07 data contains valid equipment descriptions.
Trigger Criteria:
Context: Equipment description is blank and segment 07 data contains valid equipment descriptions
Applied to: Process Segment 07 Equipment Descriptions
Action: The system processes segment 07 entries
Logic Flow:
IF Equipment description is blank and segment 07 data contains valid equipment descriptions
AND The system processes segment 07 entries
THEN:
• Each valid segment 07 description is formatted as a separate report line with equipment totals incremented
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when station table contains special handling type entries for the cargo and type code is 'sfe' for us country.
Trigger Criteria:
Context: Station table contains special handling type entries for the cargo and type code is 'SFE' for US country
Applied to: Process Special Handling Type Entries
Action: The system processes special handling entries
Logic Flow:
IF Station table contains special handling type entries for the cargo and type code is 'SFE' for US country
AND The system processes special handling entries
THEN:
• The special handling description replaces the current equipment description as a new report line
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo is classified as empty equipment or empty residue and equipment was previously counted as loaded.
Trigger Criteria:
Context: Cargo is classified as empty equipment or empty residue and equipment was previously counted as loaded
Applied to: Format Empty Equipment Description
Action: The system reclassifies the equipment as empty
Logic Flow:
IF Cargo is classified as empty equipment or empty residue and equipment was previously counted as loaded
AND The system reclassifies the equipment as empty
THEN:
• The loaded equipment count is decremented and empty equipment count is incremented for the appropriate equipment type
R-GCX003-cbl-00658 (+9)File: GCX003.cblBusiness Rule: Segment 07 Data Processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record needs segment data retrieval.
Trigger Criteria:
Context: A cargo record needs segment data retrieval
Applied to: Initialize Segment Retrieval Parameters
Action: The system begins segment data processing
Logic Flow:
IF A cargo record needs segment data retrieval
AND The system begins segment data processing
THEN:
• The system sets accept status to 'GE', clears working storage areas, enables underscore processing, sets function to Get Unqualified, disables index usage, and enables retrieval of segments 07, 02, and 08
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when segment retrieval parameters are initialized. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Segment retrieval parameters are initialized
Applied to: Call Cargo Segment Retrieval Service
Action: The system calls the cargo segment retrieval service GCCUSIO2
Logic Flow:
IF Segment retrieval parameters are initialized
AND The system calls the cargo segment retrieval service GCCUSIO2
THEN:
• The system retrieves all requested segments (07, 02, 08) and their associated data arrays in one service call
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo segment retrieval service returns successfully with no error number.
Trigger Criteria:
Context: Cargo segment retrieval service returns successfully with no error number
Applied to: Move Retrieved Segment 07 Data to Working Storage
Action: The system processes the retrieved segment data
Logic Flow:
IF Cargo segment retrieval service returns successfully with no error number
AND The system processes the retrieved segment data
THEN:
• The system moves the first occurrence of segment 03, 06, 07, 08, 09, and 12 data from arrays into individual working storage variables
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when segment 02 data has been retrieved from the cargo system.
Trigger Criteria:
Context: Segment 02 data has been retrieved from the cargo system
Applied to: Set Segment 02 Found Flag
Action: The system checks if segment 02 data contains spaces or low-values
Logic Flow:
IF Segment 02 data has been retrieved from the cargo system
AND The system checks if segment 02 data contains spaces or low-values
THEN:
• If segment 02 data is spaces or low-values, set segment 02 not found flag, otherwise set segment 02 found flag
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when segment 07 data has been retrieved from the cargo system.
Trigger Criteria:
Context: Segment 07 data has been retrieved from the cargo system
Applied to: Set Segment 07 Found Flag
Action: The system checks if segment 07 data contains spaces or low-values
Logic Flow:
IF Segment 07 data has been retrieved from the cargo system
AND The system checks if segment 07 data contains spaces or low-values
THEN:
• If segment 07 data is spaces or low-values, set segment 07 not found flag, otherwise set segment 07 found flag
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when segment 08 data has been retrieved from the cargo system.
Trigger Criteria:
Context: Segment 08 data has been retrieved from the cargo system
Applied to: Set Segment 08 Found Flag - Hazmat Indicator
Action: The system checks if segment 08 data contains spaces or low-values
Logic Flow:
IF Segment 08 data has been retrieved from the cargo system
AND The system checks if segment 08 data contains spaces or low-values
THEN:
• If segment 08 data is spaces or low-values, set segment 08 not found flag indicating no hazmat, otherwise set segment 08 found flag indicating hazmat present
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when segment 07 data contains multiple commodity description entries and cargo creation conditions are not met.
Trigger Criteria:
Context: Segment 07 data contains multiple commodity description entries and cargo creation conditions are not met
Applied to: Loop Through All Segment 07 Entries
Action: The system processes segment 07 entries sequentially from 1 to maximum sequence number
Logic Flow:
IF Segment 07 data contains multiple commodity description entries and cargo creation conditions are not met
AND The system processes segment 07 entries sequentially from 1 to maximum sequence number
THEN:
• For each entry that is not spaces or low-values, extract commodity description, create report line, add to equipment count if first entry, and continue until all entries processed or report maximum reached
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when valid segment 07 entry contains commodity description data.
Trigger Criteria:
Context: A valid segment 07 entry contains commodity description data
Applied to: Extract Commodity Description from Each Entry
Action: The system processes the segment 07 entry for report generation
Logic Flow:
IF A valid segment 07 entry contains commodity description data
AND The system processes the segment 07 entry for report generation
THEN:
• The system moves the segment 07 data to working storage, extracts the commodity description field, and formats it for report display
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when segment 07 processing is complete and station table lookup is required.
Trigger Criteria:
Context: Segment 07 processing is complete and station table lookup is required
Applied to: Retrieve Station Table Information
Action: The system retrieves station table data using commodity code ID and 'ST' qualifier
Logic Flow:
IF Segment 07 processing is complete and station table lookup is required
AND The system retrieves station table data using commodity code ID and 'ST' qualifier
THEN:
• If station table data is found successfully, move data to station segment working storage, otherwise set station segment to spaces
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when station table data is available with type code entries.
Trigger Criteria:
Context: Station table data is available with type code entries
Applied to: Check for Special Freight Equipment Type
Action: The system processes station type entries from 1 to 3 and finds type code 'SFE' with country 'US' or spaces
Logic Flow:
IF Station table data is available with type code entries
AND The system processes station type entries from 1 to 3 and finds type code 'SFE' with country 'US' or spaces
THEN:
• If report info is not spaces, add current report line to output and increment report index, then move station type description to report info and set segment indicator to N
Business Justification: Establishes the required business protocol to be followed when equipment processing has retrieved car type code from equipment validation.
Trigger Criteria:
Context: Equipment processing has retrieved car type code from equipment validation
Applied to: Is Equipment Type 'SK' Double Stack?
Action: The car type code equals 'SK'
Logic Flow:
IF Equipment processing has retrieved car type code from equipment validation
AND The car type code equals 'SK'
THEN:
• The equipment is classified as double stack container and double stack counting process is initiated
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment is identified as double stack container type 'sk' and waybill information is available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Equipment is identified as double stack container type 'SK' and waybill information is available
Applied to: Call GCCDBL Module with Waybill Number
Action: GCCDBL module is called with the waybill number from shipment root
Logic Flow:
IF Equipment is identified as double stack container type 'SK' and waybill information is available
AND GCCDBL module is called with the waybill number from shipment root
THEN:
• Double stack container count and traffic type information is retrieved from the module
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when double stack container count is retrieved and traffic type is determined as cprs.
Trigger Criteria:
Context: Double stack container count is retrieved and traffic type is determined as CPRS
IF Double stack container count is retrieved and traffic type is determined as CPRS
AND GCCDBL module indicates CPRS double stack traffic
THEN:
• The container count is added to the CPRS double stack counter in train header
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when double stack container count is retrieved and traffic type is determined as csxt.
Trigger Criteria:
Context: Double stack container count is retrieved and traffic type is determined as CSXT
IF Double stack container count is retrieved and traffic type is determined as CSXT
AND GCCDBL module indicates CSXT double stack traffic
THEN:
• The container count is added to the CSXT double stack counter in train header
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when double stack container count is retrieved and traffic type is determined as ns.
Trigger Criteria:
Context: Double stack container count is retrieved and traffic type is determined as NS
IF Double stack container count is retrieved and traffic type is determined as NS
AND GCCDBL module indicates NS double stack traffic
THEN:
• The container count is added to the NS double stack counter in train header
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when double stack container count is retrieved and traffic type is determined as haul.
Trigger Criteria:
Context: Double stack container count is retrieved and traffic type is determined as HAUL
IF Double stack container count is retrieved and traffic type is determined as HAUL
AND GCCDBL module indicates HAUL double stack traffic
THEN:
• The container count is added to the HAUL traffic counter in train header
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when double stack counters in train header contain spaces or low values.
Trigger Criteria:
Context: Double stack counters in train header contain spaces or low values
Applied to: Store Counts in Train Header Record
Action: Counter initialization is performed for CPRS, CSXT, NS, or HAUL traffic types
Logic Flow:
IF Double stack counters in train header contain spaces or low values
AND Counter initialization is performed for CPRS, CSXT, NS, or HAUL traffic types
THEN:
• Each counter is set to zero before accumulating double stack container counts
R-GCX003-cbl-00675 (+9)File: GCX003.cblBusiness Rule: Equipment Load/Empty Status Counting
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment item with a car type code.
Trigger Criteria:
Context: An equipment item with a car type code
Applied to: Equipment Type = Locomotive?
Action: The car type code is 'LO' or 'ET'
Logic Flow:
IF An equipment item with a car type code
AND The car type code is 'LO' or 'ET'
THEN:
• The equipment is classified as a locomotive and added to the locomotive count
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment item with a car type code that is not a locomotive.
Trigger Criteria:
Context: An equipment item with a car type code that is not a locomotive
Applied to: Equipment Type = Container?
Action: The car type code is 'CN'
Logic Flow:
IF An equipment item with a car type code that is not a locomotive
AND The car type code is 'CN'
THEN:
• The equipment is classified as a container for load/empty status counting
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment item classified as a locomotive.
Trigger Criteria:
Context: An equipment item classified as a locomotive
Applied to: Add 1 to Total Locomotives Count
Action: The equipment type is locomotive (LO or ET)
Logic Flow:
IF An equipment item classified as a locomotive
AND The equipment type is locomotive (LO or ET)
THEN:
• Add 1 to the total locomotives counter
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment item classified as a container.
Trigger Criteria:
Context: An equipment item classified as a container
Applied to: Load/Empty Indicator = Loaded?
Action: The load/empty indicator is evaluated
Logic Flow:
IF An equipment item classified as a container
AND The load/empty indicator is evaluated
THEN:
• Route to loaded container count if indicator is 'L', otherwise route to empty container count
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container equipment with load/empty indicator.
Trigger Criteria:
Context: A container equipment with load/empty indicator
Applied to: Add 1 to Total Loaded Containers
Action: The load/empty indicator is 'L' (loaded)
Logic Flow:
IF A container equipment with load/empty indicator
AND The load/empty indicator is 'L' (loaded)
THEN:
• Add 1 to the total loaded containers counter
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container equipment with load/empty indicator.
Trigger Criteria:
Context: A container equipment with load/empty indicator
Applied to: Add 1 to Total Empty Containers
Action: The load/empty indicator is 'E' (empty)
Logic Flow:
IF A container equipment with load/empty indicator
AND The load/empty indicator is 'E' (empty)
THEN:
• Add 1 to the total empty containers counter
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment item classified as a regular car (not locomotive or container).
Trigger Criteria:
Context: An equipment item classified as a regular car (not locomotive or container)
Applied to: Load/Empty Indicator = Loaded?
Action: The load/empty indicator is evaluated
Logic Flow:
IF An equipment item classified as a regular car (not locomotive or container)
AND The load/empty indicator is evaluated
THEN:
• Route to loaded car count if indicator is 'L', otherwise route to empty car count
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when regular car equipment with load/empty indicator.
Trigger Criteria:
Context: A regular car equipment with load/empty indicator
Applied to: Add 1 to Total Loaded Cars
Action: The load/empty indicator is 'L' (loaded)
Logic Flow:
IF A regular car equipment with load/empty indicator
AND The load/empty indicator is 'L' (loaded)
THEN:
• Add 1 to the total loaded cars counter
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when regular car equipment with load/empty indicator.
Trigger Criteria:
Context: A regular car equipment with load/empty indicator
Applied to: Add 1 to Total Empty Cars
Action: The load/empty indicator is 'E' (empty)
Logic Flow:
IF A regular car equipment with load/empty indicator
AND The load/empty indicator is 'E' (empty)
THEN:
• Add 1 to the total empty cars counter
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment item has been classified and its specific counter incremented.
Trigger Criteria:
Context: An equipment item has been classified and its specific counter incremented
Applied to: Update Equipment Summary Counters
Action: The equipment counting process is complete for the item
Logic Flow:
IF An equipment item has been classified and its specific counter incremented
AND The equipment counting process is complete for the item
THEN:
• All equipment summary counters are updated to reflect the current totals
R-GCX003-cbl-00685 (+15)File: GCX003.cblBusiness Rule: Cargo Bond Type Processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo processing request is initiated.
Trigger Criteria:
Context: A cargo processing request is initiated
Applied to: Cargo Found?
Action: The system checks for cargo existence
Logic Flow:
IF A cargo processing request is initiated
AND The system checks for cargo existence
THEN:
• If no cargo is found, skip bond type processing and end the process
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo is found and bond type code is available.
Trigger Criteria:
Context: Cargo is found and bond type code is available
Applied to: Bond Type = IT or IE?
Action: The bond type code equals 'IT' or 'IE'
Logic Flow:
IF Cargo is found and bond type code is available
AND The bond type code equals 'IT' or 'IE'
THEN:
• Process as IT/IE bond, validate entry number or in-bond control number, extract bond number, and format as 'AMS [bond_type] [bond_number]' display
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo is found and bond type code is available.
Trigger Criteria:
Context: Cargo is found and bond type code is available
Applied to: Bond Type = TE?
Action: The bond type code equals 'TE'
Logic Flow:
IF Cargo is found and bond type code is available
AND The bond type code equals 'TE'
THEN:
• Process as TE bond, validate transport export requirements, check if port change is required, and format as 'AMS 7512 TE [bond_number]' display
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo is found and bond type code is available.
Trigger Criteria:
Context: Cargo is found and bond type code is available
Applied to: Bond Type = TR?
Action: The bond type code equals 'TR'
Logic Flow:
IF Cargo is found and bond type code is available
AND The bond type code equals 'TR'
THEN:
• Process as TR bond, validate transit bond requirements, check if diversion is required, and format as 'AMS 7512 TR [bond_number]' display
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo is found and bond type code is available.
Trigger Criteria:
Context: Cargo is found and bond type code is available
Applied to: Bond Type = MT?
Action: The bond type code equals 'MT'
Logic Flow:
IF Cargo is found and bond type code is available
AND The bond type code equals 'MT'
THEN:
• Process as MT bond, validate marine terminal requirements, check vessel name compliance, and format as 'AMS 7512 MT [bond_number]' display
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when bond type requires bond number extraction.
Trigger Criteria:
Context: A bond type requires bond number extraction
Applied to: Extract Bond Number
Action: Entry number is not spaces
Logic Flow:
IF A bond type requires bond number extraction
AND Entry number is not spaces
THEN:
• Use entry number as bond number, otherwiseif in-bond control number is not spaces, use in-bond control number as bond number, otherwise set bond number to spaces
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo has it bond type and is not already created for it.
Trigger Criteria:
Context: Cargo has IT bond type and is not already created for IT
Applied to: Check Special Manifest Original
Action: Special manifest original flag is not set
Logic Flow:
IF Cargo has IT bond type and is not already created for IT
AND Special manifest original flag is not set
THEN:
• If action is SEND and user is not authorized for special manifest, generate error message 43, otherwise generate message 23 and set IT export spawn flag for special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo has te bond type and is not created for it and cargo status is not export and cargo is billed as cprs.
Trigger Criteria:
Context: Cargo has TE bond type and is not created for IT and cargo status is not export and cargo is billed as CPRS
Applied to: Check Port Change Conditions
Action: Location ID1 does not match the station crossing port code
Logic Flow:
IF Cargo has TE bond type and is not created for IT and cargo status is not export and cargo is billed as CPRS
AND Location ID1 does not match the station crossing port code
THEN:
• If action is REPORT, generate message 19 with station code, otherwiseif action is SEND and user is not authorized for special manifest, generate error message 43, otherwise generate message 20 and set port change spawn flag
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo has tr bond type and is not created for it.
Trigger Criteria:
Context: Cargo has TR bond type and is not created for IT
Applied to: Check Release Status
Action: Cargo short description equals release status
Logic Flow:
IF Cargo has TR bond type and is not created for IT
AND Cargo short description equals release status
THEN:
• If action is REPORT, generate message 18, otherwiseif action is SEND and user is not authorized for special manifest, generate error message 43, otherwise generate message 23 and set detour spawn flag
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo has mt bond type.
Trigger Criteria:
Context: Cargo has MT bond type
Applied to: Check Vessel Name = TRAIN
Action: Vessel name is not 'TRAIN' and not spaces and station crossing port code equals cargo location ID
Logic Flow:
IF Cargo has MT bond type
AND Vessel name is not 'TRAIN' and not spaces and station crossing port code equals cargo location ID
THEN:
• Generate error message 25 for invalid vessel name and location combination
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo has te bond type.
Trigger Criteria:
Context: Cargo has TE bond type
Applied to: Check Vessel Name
Action: Vessel name character at position 23 is 'T'
Logic Flow:
IF Cargo has TE bond type
AND Vessel name character at position 23 is 'T'
THEN:
• Generate error message 17 for invalid TE vessel name format
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo bond type is not te and not mt.
Trigger Criteria:
Context: Cargo bond type is not TE and not MT
Applied to: Check Vessel Name
Action: Vessel name is not 'TRAIN'
Logic Flow:
IF Cargo bond type is not TE and not MT
AND Vessel name is not 'TRAIN'
THEN:
• Generate error message 17 for invalid vessel name
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is found with empty equipment or export bond type.
Trigger Criteria:
Context: Cargo is found with empty equipment or export bond type
Applied to: Default Bond Processing
Action: Bond type code is spaces or cargo is empty equipment or export type
Logic Flow:
IF Cargo is found with empty equipment or export bond type
AND Bond type code is spaces or cargo is empty equipment or export type
THEN:
• Skip bond number processing and continue with default cargo information display
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo is found with specific bond type.
Trigger Criteria:
Context: Cargo is found with specific bond type
Applied to: Default Bond Processing
Action: BOL type code equals '15'
Logic Flow:
IF Cargo is found with specific bond type
AND BOL type code equals '15'
THEN:
• Format display as 'PPR 7512 15 US-CA-US' for the cargo information
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo has default bond type and is not created for it.
Trigger Criteria:
Context: Cargo has default bond type and is not created for IT
Applied to: Check Special Manifest Requirements
Action: Cargo short description equals release status
Logic Flow:
IF Cargo has default bond type and is not created for IT
AND Cargo short description equals release status
THEN:
• If action is REPORT, generate message 18, otherwiseif action is SEND and user is not authorized for special manifest, generate error message 43, otherwise generate message 23 and set detour spawn flag
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo has export bond type and special manifest flag is spaces and origin-destination country codes equal 'usmx'.
Trigger Criteria:
Context: Cargo has export bond type and special manifest flag is spaces and origin-destination country codes equal 'USMX'
Applied to: Check Special Manifest Requirements
Action: Action is REPORT
Logic Flow:
IF Cargo has export bond type and special manifest flag is spaces and origin-destination country codes equal 'USMX'
AND Action is REPORT
THEN:
• Generate message 50, otherwiseif action is SEND and user is not authorized for special manifest, generate error message 43, otherwise generate message 23 and set 88 TR detour spawn flag
R-GCX003-cbl-00701 (+8)File: GCX003.cblBusiness Rule: Special Manifest Creation Triggers
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo is found and has it bond type (m1201-in-bond-typ-cde = 'it').
Trigger Criteria:
Context: Cargo is found and has IT bond type (M1201-IN-BOND-TYP-CDE = 'IT')
Applied to: Create IT Export Special Manifest
Action: Special manifest original flag is set (GCUSRT-SPECIAL-MFST-ORIG is true) and user is authorized for special manifests
Logic Flow:
IF Cargo is found and has IT bond type (M1201-IN-BOND-TYP-CDE = 'IT')
AND Special manifest original flag is set (GCUSRT-SPECIAL-MFST-ORIG is true) and user is authorized for special manifests
THEN:
• Create IT export special manifest, generate message 23, and spawn GCX101 process with IT export flag
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo is found and has te bond type (88-gcusrt-m1201-transp-export is true).
Trigger Criteria:
Context: Cargo is found and has TE bond type (88-GCUSRT-M1201-TRANSP-EXPORT is true)
Applied to: Create TE Bond Special Manifest
Action: TR was not created for IT (GCUSRT-TR-CREATED-FOR-IT not = 'Y') and cargo status is not export and cargo is billed as CPRS and port location differs from manifest location
Logic Flow:
IF Cargo is found and has TE bond type (88-GCUSRT-M1201-TRANSP-EXPORT is true)
AND TR was not created for IT (GCUSRT-TR-CREATED-FOR-IT not = 'Y') and cargo status is not export and cargo is billed as CPRS and port location differs from manifest location
THEN:
• Create port change special manifest, generate message 20, and spawn GCX101 process with port change flag
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is found and has us-can-us bond type (88-gcusrt-m1201-us-can-us is true) and does not have special tr flag. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Cargo is found and has US-CAN-US bond type (88-GCUSRT-M1201-US-CAN-US is true) and does not have special TR flag
Applied to: Create TR Bond Diversion Special Manifest
Action: TR was not created for IT (GCUSRT-TR-CREATED-FOR-IT = SPACES) and cargo status equals release status (GCUSRT-RT21-USCARGO-SHORT-DESC = WS-GCUSRT-RT21-USCARGO-RELEASE)
Logic Flow:
IF Cargo is found and has US-CAN-US bond type (88-GCUSRT-M1201-US-CAN-US is true) and does not have special TR flag
AND TR was not created for IT (GCUSRT-TR-CREATED-FOR-IT = SPACES) and cargo status equals release status (GCUSRT-RT21-USCARGO-SHORT-DESC = WS-GCUSRT-RT21-USCARGO-RELEASE)
THEN:
• Create detour special manifest, generate message 23, and spawn GCX101 process with detour flag
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is found and has default bond type (88-gcusrt-m1109-default is true).
Trigger Criteria:
Context: Cargo is found and has default bond type (88-GCUSRT-M1109-DEFAULT is true)
Applied to: Create Border Clearance Special Manifest
Action: TR was not created for IT (GCUSRT-TR-CREATED-FOR-IT = SPACES) and cargo status equals release status and special manifest original flag is not set
Logic Flow:
IF Cargo is found and has default bond type (88-GCUSRT-M1109-DEFAULT is true)
AND TR was not created for IT (GCUSRT-TR-CREATED-FOR-IT = SPACES) and cargo status equals release status and special manifest original flag is not set
THEN:
• Create detour special manifest, generate message 23, and spawn GCX101 process with detour flag
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is found and has export bond type (88-gcusrt-m1109-export is true) and country codes equal 'usmx' and station is not laredo.
Trigger Criteria:
Context: Cargo is found and has export bond type (88-GCUSRT-M1109-EXPORT is true) and country codes equal 'USMX' and station is not Laredo
Applied to: Create US-MX Export Special Manifest
Action: Special manifest flag is spaces (GCUSRT-USMX-SPECIAL-MFST = SPACES) and does not have special 88 flag
Logic Flow:
IF Cargo is found and has export bond type (88-GCUSRT-M1109-EXPORT is true) and country codes equal 'USMX' and station is not Laredo
AND Special manifest flag is spaces (GCUSRT-USMX-SPECIAL-MFST = SPACES) and does not have special 88 flag
THEN:
• Create 88 TR detour special manifest, generate message 23, and spawn GCX101 process with 88 TR detour flag
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill is found but no cargo is found and both origin and destination are us locations.
Trigger Criteria:
Context: Waybill is found but no cargo is found and both origin and destination are US locations
Applied to: Create US-US Movement Special Manifest
Action: Equipment is loaded or equipment is empty with residue weight greater than zero and residue found and not conveying car
Logic Flow:
IF Waybill is found but no cargo is found and both origin and destination are US locations
AND Equipment is loaded or equipment is empty with residue weight greater than zero and residue found and not conveying car
THEN:
• Create US-US detour special manifest, generate message 23, and spawn GCX101 process with US-US detour flag
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has te bond type and tr was not created for it and cargo status is not export and cargo is billed as cprs.
Trigger Criteria:
Context: Cargo has TE bond type and TR was not created for IT and cargo status is not export and cargo is billed as CPRS
Applied to: Create Port Change Special Manifest
Action: Cargo location (GCUSRT-M1203-LOCATION-ID1) differs from train crossing port (GCSTBRT-SC-US-STAT-CODE-X) and action is send and user is authorized for special manifests
Logic Flow:
IF Cargo has TE bond type and TR was not created for IT and cargo status is not export and cargo is billed as CPRS
AND Cargo location (GCUSRT-M1203-LOCATION-ID1) differs from train crossing port (GCSTBRT-SC-US-STAT-CODE-X) and action is send and user is authorized for special manifests
THEN:
• Create port change special manifest, generate message 20, and spawn GCX101 process with port change flag
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo has tr bond type and bol type is not '15' and train origin is not spaces.
Trigger Criteria:
Context: Cargo has TR bond type and BOL type is not '15' and train origin is not spaces
Applied to: Create TR Diversion Special Manifest
Action: Train crossing port (GCSTBRT-SC-US-STAT-CODE-X) differs from cargo location (GCUSRT-P401-LOCATION-ID) and action is send
Logic Flow:
IF Cargo has TR bond type and BOL type is not '15' and train origin is not spaces
AND Train crossing port (GCSTBRT-SC-US-STAT-CODE-X) differs from cargo location (GCUSRT-P401-LOCATION-ID) and action is send
THEN:
• Create diversion special manifest, generate message 20, and spawn GCX101 process with diversion flag
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo processing is complete.
Trigger Criteria:
Context: Cargo processing is complete
Applied to: No Special Manifest Required
Action: None of the special manifest trigger conditions are satisfied (IT export, TE bond changes, TR diversions, border clearance, US-MX export, or US-US movements)
Logic Flow:
IF Cargo processing is complete
AND None of the special manifest trigger conditions are satisfied (IT export, TE bond changes, TR diversions, border clearance, US-MX export, or US-US movements)
THEN:
• Continue with normal cargo processing without creating special manifests
R-GCX003-cbl-00710 (+18)File: GCX003.cblBusiness Rule: Equipment Information Field Formatting
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment information is being processed for reporting.
Trigger Criteria:
Context: Equipment information is being processed for reporting
Applied to: Count Locomotives - LO/ET Types
Action: Equipment type is LO (Locomotive) or ET (End of Train)
Logic Flow:
IF Equipment information is being processed for reporting
AND Equipment type is LO (Locomotive) or ET (End of Train)
THEN:
• Add 1 to total locomotive counter
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment type is cn (container).
Trigger Criteria:
Context: Equipment type is CN (Container)
Applied to: Count Containers - CN Type
Action: Load/empty indicator is L (Loaded)
Logic Flow:
IF Equipment type is CN (Container)
AND Load/empty indicator is L (Loaded)
THEN:
• Add 1 to total loaded container counter
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment type is cn (container).
Trigger Criteria:
Context: Equipment type is CN (Container)
Applied to: Count Containers - CN Type
Action: Load/empty indicator is E (Empty)
Logic Flow:
IF Equipment type is CN (Container)
AND Load/empty indicator is E (Empty)
THEN:
• Add 1 to total empty container counter
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment type is not lo, et, or cn.
Trigger Criteria:
Context: Equipment type is not LO, ET, or CN
Applied to: Count Cars - Other Types
Action: Load/empty indicator is L (Loaded)
Logic Flow:
IF Equipment type is not LO, ET, or CN
AND Load/empty indicator is L (Loaded)
THEN:
• Add 1 to total loaded car counter
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment type is not lo, et, or cn.
Trigger Criteria:
Context: Equipment type is not LO, ET, or CN
Applied to: Count Cars - Other Types
Action: Load/empty indicator is E (Empty)
Logic Flow:
IF Equipment type is not LO, ET, or CN
AND Load/empty indicator is E (Empty)
THEN:
• Add 1 to total empty car counter
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment is an sbu van unit.
Trigger Criteria:
Context: Equipment is an SBU van unit
Applied to: Format International Service Unit Description
Action: Load/empty indicator is E (Empty)
Logic Flow:
IF Equipment is an SBU van unit
AND Load/empty indicator is E (Empty)
THEN:
• Set equipment information description to 'INTERNATIONAL SERVICE'
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when no cargo data is available for equipment.
Trigger Criteria:
Context: No cargo data is available for equipment
Applied to: Format Conveying Flat Car Description
Action: Equipment is classified as a conveying car
Logic Flow:
IF No cargo data is available for equipment
AND Equipment is classified as a conveying car
THEN:
• Set equipment information description to 'CONVEYING FLAT CAR'
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when no cargo data is available for equipment and equipment is not a conveying car.
Trigger Criteria:
Context: No cargo data is available for equipment and equipment is not a conveying car
Applied to: Format Empty Equipment Description
Action: Load/empty indicator is E (Empty)
Logic Flow:
IF No cargo data is available for equipment and equipment is not a conveying car
AND Load/empty indicator is E (Empty)
THEN:
• Set equipment information description to 'EMPTY'
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo data is available for equipment.
Trigger Criteria:
Context: Cargo data is available for equipment
Applied to: Extract from Entry Number
Action: Entry number field is not spaces
Logic Flow:
IF Cargo data is available for equipment
AND Entry number field is not spaces
THEN:
• Use entry number as the saved bond number
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo data is available and entry number is spaces.
Trigger Criteria:
Context: Cargo data is available and entry number is spaces
Applied to: Extract from In-Bond Control Number
Action: In-bond control number field is not spaces
Logic Flow:
IF Cargo data is available and entry number is spaces
AND In-bond control number field is not spaces
THEN:
• Use in-bond control number as the saved bond number
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo type is empty equipment.
Trigger Criteria:
Context: Cargo type is empty equipment
Applied to: Format Empty Equipment Info
Action: Equipment information is being formatted
Logic Flow:
IF Cargo type is empty equipment
AND Equipment information is being formatted
THEN:
• Set equipment information to 'EMPTY' and set load/empty indicator to 'E'
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo type is empty residue.
Trigger Criteria:
Context: Cargo type is empty residue
Applied to: Format Empty Residue Info
Action: Equipment was previously counted as loaded container
Logic Flow:
IF Cargo type is empty residue
AND Equipment was previously counted as loaded container
THEN:
• Subtract 1 from loaded container counter and add 1 to empty container counter
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo type is empty residue and equipment type is not cn.
Trigger Criteria:
Context: Cargo type is empty residue and equipment type is not CN
Applied to: Format Empty Residue Info
Action: Equipment was previously counted as loaded car
Logic Flow:
IF Cargo type is empty residue and equipment type is not CN
AND Equipment was previously counted as loaded car
THEN:
• Subtract 1 from loaded car counter and add 1 to empty car counter
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo bol type code is '15'.
Trigger Criteria:
Context: Cargo BOL type code is '15'
Applied to: Format Paper Port 7512 Description
Action: Equipment information is being formatted
Logic Flow:
IF Cargo BOL type code is '15'
AND Equipment information is being formatted
THEN:
• Set equipment information to 'PPR 7512 15 US-CA-US'
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when in-bond type code is 'it' or 'ie'.
Trigger Criteria:
Context: In-bond type code is 'IT' or 'IE'
Applied to: Format AMS IT/IE Bond Description
Action: Equipment information is being formatted
Logic Flow:
IF In-bond type code is 'IT' or 'IE'
AND Equipment information is being formatted
THEN:
• Concatenate 'AMS ', bond type code, space, and saved bond number into equipment information
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when in-bond type code is 'te', 'tr', or 'mt'.
Trigger Criteria:
Context: In-bond type code is 'TE', 'TR', or 'MT'
Applied to: Format AMS 7512 TE/TR/MT Bond Description
Action: Equipment information is being formatted
Logic Flow:
IF In-bond type code is 'TE', 'TR', or 'MT'
AND Equipment information is being formatted
THEN:
• Concatenate 'AMS 7512 ', bond type code, space, and saved bond number into equipment information
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment information is spaces and segment 07 data is available.
Trigger Criteria:
Context: Equipment information is spaces and segment 07 data is available
Applied to: Format Equipment Description from Segment 07
Action: Segment 07 data entry is not spaces or low-values
Logic Flow:
IF Equipment information is spaces and segment 07 data is available
AND Segment 07 data entry is not spaces or low-values
THEN:
• Use segment 07 SED field as equipment information description
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when multiple segment 07 data entries exist.
Trigger Criteria:
Context: Multiple segment 07 data entries exist
Applied to: Process Multiple Description Lines
Action: Processing each segment 07 entry that is not spaces or low-values
Logic Flow:
IF Multiple segment 07 data entries exist
AND Processing each segment 07 entry that is not spaces or low-values
THEN:
• Create separate report line for each description and increment equipment counter only for first description
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when station table entry type is 'sfe' and country is 'us' or spaces.
Trigger Criteria:
Context: Station table entry type is 'SFE' and country is 'US' or spaces
Applied to: Format Special Facility Equipment Description
Action: Equipment information is being processed
Logic Flow:
IF Station table entry type is 'SFE' and country is 'US' or spaces
AND Equipment information is being processed
THEN:
• Use station table type description as equipment information and create additional report line if equipment information already exists
R-GCX003-cbl-00729 (+12)File: GCX003.cblBusiness Rule: Segment 07 Data Processing for Equipment Description
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists for processing.
Trigger Criteria:
Context: A cargo record exists for processing
Applied to: Initialize Segment Retrieval
Action: The system begins segment data retrieval
Logic Flow:
IF A cargo record exists for processing
AND The system begins segment data retrieval
THEN:
• The system should initialize cargo segment retrieval parameters and set function to Get Unique operation
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when segment retrieval is being initialized.
Trigger Criteria:
Context: Segment retrieval is being initialized
Applied to: SEG07, SEG02, SEG08
Action: The system configures segment types for retrieval
Logic Flow:
IF Segment retrieval is being initialized
AND The system configures segment types for retrieval
THEN:
• The system should set flags to retrieve SEG07 equipment descriptions, SEG02 reference numbers, and SEG08 hazmat data
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when segment retrieval parameters are configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Segment retrieval parameters are configured
Applied to: Call GCCUSIO2 to Retrieve Segments
Action: The system calls the cargo I/O module to retrieve segment data
Logic Flow:
IF Segment retrieval parameters are configured
AND The system calls the cargo I/O module to retrieve segment data
THEN:
• The system should execute the database call to fetch SEG07, SEG02, and SEG08 segment information
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo segment data retrieval has been attempted.
Trigger Criteria:
Context: Cargo segment data retrieval has been attempted
Applied to: Segment Retrieval Successful?
Action: The system checks the retrieval operation result
Logic Flow:
IF Cargo segment data retrieval has been attempted
AND The system checks the retrieval operation result
THEN:
• The system should determine if segment data was successfully retrieved based on error status being empty
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when segment data retrieval was successful.
Trigger Criteria:
Context: Segment data retrieval was successful
Applied to: Move Retrieved Data to Working Storage Arrays
Action: The system processes the retrieved data
Logic Flow:
IF Segment data retrieval was successful
AND The system processes the retrieved data
THEN:
• The system should move SEG03, SEG06, SEG07, SEG08, SEG09, and SEG12 data from arrays to individual segment structures
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when segment data has been retrieved and processed.
Trigger Criteria:
Context: Segment data has been retrieved and processed
Applied to: SEG07 Data Found?
Action: The system checks for SEG07 data availability
Logic Flow:
IF Segment data has been retrieved and processed
AND The system checks for SEG07 data availability
THEN:
• The system should set SEG07-FOUND flag if data exists orSEG07-NOT-FOUND flag if data is spaces or low-values
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when segment data has been retrieved and processed.
Trigger Criteria:
Context: Segment data has been retrieved and processed
Applied to: Check SEG07 Data Availability
Action: The system checks for SEG02 data availability
Logic Flow:
IF Segment data has been retrieved and processed
AND The system checks for SEG02 data availability
THEN:
• The system should set SEG02-FOUND flag if data exists orSEG02-NOT-FOUND flag if data is spaces or low-values
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when segment data has been retrieved and processed.
Trigger Criteria:
Context: Segment data has been retrieved and processed
Applied to: Check SEG07 Data Availability
Action: The system checks for SEG08 data availability
Logic Flow:
IF Segment data has been retrieved and processed
AND The system checks for SEG08 data availability
THEN:
• The system should set SEG08-FOUND flag if data exists orSEG08-NOT-FOUND flag if data is spaces or low-values
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment description field is empty and seg07 data processing is required.
Trigger Criteria:
Context: Equipment description field is empty and SEG07 data processing is required
Applied to: Initialize SEG07 Processing Counter
Action: The system initializes SEG07 processing
Logic Flow:
IF Equipment description field is empty and SEG07 data processing is required
AND The system initializes SEG07 processing
THEN:
• The system should set SEG07 written counter to zero and prepare for iterating through SEG07 data array
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when seg07 entry is being processed.
Trigger Criteria:
Context: A SEG07 entry is being processed
Applied to: SEG07 Entry Valid?
Action: The system validates the entry data quality
Logic Flow:
IF A SEG07 entry is being processed
AND The system validates the entry data quality
THEN:
• The system should determine the entry is invalid if the SEG07 description is spaces or low-values
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when valid seg07 entry with equipment description exists.
Trigger Criteria:
Context: A valid SEG07 entry with equipment description exists
Applied to: Move SEG07 Description to Report Info Field
Action: The system processes the equipment description
Logic Flow:
IF A valid SEG07 entry with equipment description exists
AND The system processes the equipment description
THEN:
• The system should move the SEG07 description to both report info field and new report info field, and set SEG07 processing flag to yes
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when seg07 entry has been processed and added to the report.
Trigger Criteria:
Context: A SEG07 entry has been processed and added to the report
Applied to: First SEG07 Entry?
Action: The system checks if this is the first SEG07 entry written
Logic Flow:
IF A SEG07 entry has been processed and added to the report
AND The system checks if this is the first SEG07 entry written
THEN:
• The system should increment the total equipment count only if the SEG07 written counter equals 1
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when station table data is available for processing.
Trigger Criteria:
Context: Station table data is available for processing
Applied to: Process Station Entries for Special Descriptions
Action: The system processes station entries for special descriptions
Logic Flow:
IF Station table data is available for processing
AND The system processes station entries for special descriptions
THEN:
• The system should check for SFE type codes with US country designation and populate special descriptions in report fields while setting SEG07 processing flag to no
R-GCX003-cbl-00742 (+10)File: GCX003.cblBusiness Rule: Container Retrieval from Multiple Sources
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when container retrieval process is initiated and container was not previously found.
Trigger Criteria:
Context: A container retrieval process is initiated and container was not previously found
Applied to: Container Found in Primary System?
Action: The system checks if container exists in primary waybill system
Logic Flow:
IF A container retrieval process is initiated and container was not previously found
AND The system checks if container exists in primary waybill system
THEN:
• Container found status is determined based on primary system availability
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when container is found in primary waybill system.
Trigger Criteria:
Context: Container is found in primary waybill system
Applied to: Get Container Equipment ID
Action: Container data is successfully retrieved
Logic Flow:
IF Container is found in primary waybill system
AND Container data is successfully retrieved
THEN:
• Equipment ID is set to the container's equipment ID value
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container data is successfully retrieved from shiproot database.
Trigger Criteria:
Context: Container data is successfully retrieved from SHIPROOT database
Applied to: Set Container Found Status
Action: Container information is available in primary system
Logic Flow:
IF Container data is successfully retrieved from SHIPROOT database
AND Container information is available in primary system
THEN:
• Container found status is set to true
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container is not found in primary waybill system.
Trigger Criteria:
Context: Container is not found in primary waybill system
Applied to: Fallback to Inquiry System
Action: Primary system retrieval fails or returns no data
Logic Flow:
IF Container is not found in primary waybill system
AND Primary system retrieval fails or returns no data
THEN:
• System initiates inquiry system search process
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when fallback to inquiry system is activated.
Trigger Criteria:
Context: Fallback to inquiry system is activated
Applied to: Access FWCIROOT Database
Action: System needs original waybill information for container search
Logic Flow:
IF Fallback to inquiry system is activated
AND System needs original waybill information for container search
THEN:
• FWCIROOT database is accessed using car ID from container inquiry root
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when original waybill information is retrieved from fwciroot.
Trigger Criteria:
Context: Original waybill information is retrieved from FWCIROOT
Applied to: Access FWIQROOT Database
Action: System needs to find container cross-reference data
Logic Flow:
IF Original waybill information is retrieved from FWCIROOT
AND System needs to find container cross-reference data
THEN:
• FWIQROOT database is accessed using road number, station number, and waybill number
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when fwiqroot database access is successful.
Trigger Criteria:
Context: FWIQROOT database access is successful
Applied to: Retrieve Container Cross-Reference Data
Action: System processes inquiry bottom line records
Logic Flow:
IF FWIQROOT database access is successful
AND System processes inquiry bottom line records
THEN:
• Container cross-reference data is extracted from FWIQBOTL records up to maximum of 30 entries
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container cross-reference data is available from inquiry system.
Trigger Criteria:
Context: Container cross-reference data is available from inquiry system
Applied to: Parse Container Cross-Reference Information
Action: Inquiry bottom line record contains 'T/C XREF' in first 8 characters
Logic Flow:
IF Container cross-reference data is available from inquiry system
AND Inquiry bottom line record contains 'T/C XREF' in first 8 characters
THEN:
• Container ID is extracted from positions 28-39, road number from positions 10-12, station number from positions 14-19, and waybill number from positions 21-26
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when container information is successfully parsed from inquiry system.
Trigger Criteria:
Context: Container information is successfully parsed from inquiry system
Applied to: Set Container Found from Inquiry System
Action: At least one valid container ID is extracted from cross-reference data
Logic Flow:
IF Container information is successfully parsed from inquiry system
AND At least one valid container ID is extracted from cross-reference data
THEN:
• Container found status is set to true and container IQ found status is set to true with first container ID assigned as equipment ID
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container retrieval fails from both primary waybill system and inquiry system.
Trigger Criteria:
Context: Container retrieval fails from both primary waybill system and inquiry system
Applied to: Set Container Not Found Status
Action: No valid container information is available from either source
Logic Flow:
IF Container retrieval fails from both primary waybill system and inquiry system
AND No valid container information is available from either source
THEN:
• Container not found status is set and container IQ not found status is set
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container retrieval process is completed for current container.
Trigger Criteria:
Context: Container retrieval process is completed for current container
Applied to: Continue with Next Container Processing
Action: Container status is determined (found or not found)
Logic Flow:
IF Container retrieval process is completed for current container
AND Container status is determined (found or not found)
THEN:
• System proceeds to next container in the processing sequence
R-GCX003-cbl-00753 (+42)File: GCX003.cblBusiness Rule: Train List Database Storage
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train transmission has been successfully validated and approved for sending.
Trigger Criteria:
Context: A train transmission has been successfully validated and approved for sending
Applied to: Initialize Train Header Information
Action: The system begins the train list storage process
Logic Flow:
IF A train transmission has been successfully validated and approved for sending
AND The system begins the train list storage process
THEN:
• The train header information is initialized and cleared of any previous data to prepare for new train data storage
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train header information has been initialized.
Trigger Criteria:
Context: Train header information has been initialized
Applied to: Set Train Identification Data
Action: Setting train identification data
Logic Flow:
IF Train header information has been initialized
AND Setting train identification data
THEN:
• Train number, train day, train origin, and consist number are copied from the request to the train list structure
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train header information has been initialized.
Trigger Criteria:
Context: Train header information has been initialized
Applied to: Set Train Identification Data
Action: Setting train identification data for database storage
Logic Flow:
IF Train header information has been initialized
AND Setting train identification data for database storage
THEN:
• Train number, train day, train origin, and consist number are stored in the train list record
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train identification data has been set.
Trigger Criteria:
Context: Train identification data has been set
Applied to: Set Origin Station Details
Action: Setting origin station details
Logic Flow:
IF Train identification data has been set
AND Setting origin station details
THEN:
• US station code, station name, and FIRMS code are stored from the validated station information
• Origin station US code, station name, and FIRMS code are stored in the train record
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when origin station details have been set.
Trigger Criteria:
Context: Origin station details have been set
Applied to: Set ETA Information
Action: Setting ETA information
Logic Flow:
IF Origin station details have been set
AND Setting ETA information
THEN:
• ETA date and ETA time are stored from the validated request data
• ETA date and ETA time are stored in the train record
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when eta information has been set.
Trigger Criteria:
Context: ETA information has been set
Applied to: Set AEI Send Flag
Action: The request type indicates AEI transmission
Logic Flow:
IF ETA information has been set
AND The request type indicates AEI transmission
THEN:
• The AEI send flag is set to true, otherwise it is set to false
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when aei send flag has been set.
Trigger Criteria:
Context: AEI send flag has been set
Applied to: Initialize Equipment Counter
Action: Beginning equipment processing
Logic Flow:
IF AEI send flag has been set
AND Beginning equipment processing
THEN:
• Equipment quantity counter is initialized to zero
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when aei send flag has been set.
Trigger Criteria:
Context: AEI send flag has been set
Applied to: Initialize Equipment Counter
Action: Initializing equipment processing
Logic Flow:
IF AEI send flag has been set
AND Initializing equipment processing
THEN:
• Equipment quantity counter is initialized to zero
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment processing is in progress.
Trigger Criteria:
Context: Equipment processing is in progress
Applied to: More Equipment to Process?
Action: Checking for more equipment items
Logic Flow:
IF Equipment processing is in progress
AND Checking for more equipment items
THEN:
• Continue processing if report index is within bounds, equipment table is not full, and current line contains valid equipment data (not message, end report, or blank line)
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when valid equipment line has been identified for processing.
Trigger Criteria:
Context: A valid equipment line has been identified for processing
Applied to: Extract Equipment Details
Action: Extracting equipment details
Logic Flow:
IF A valid equipment line has been identified for processing
AND Extracting equipment details
THEN:
• Equipment counter is incremented and equipment identification data is prepared for type-specific processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment details are being extracted.
Trigger Criteria:
Context: Equipment details are being extracted
Applied to: Equipment Type?
Action: Determining equipment type
Logic Flow:
IF Equipment details are being extracted
AND Determining equipment type
THEN:
• If container ID exists, process as container; otherwise process as railcar
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment has been identified as a container.
Trigger Criteria:
Context: Equipment has been identified as a container
Applied to: Store Container Information
Action: Storing container information
Logic Flow:
IF Equipment has been identified as a container
AND Storing container information
THEN:
• Container ID is stored as equipment ID and container flag is set to true
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment has been identified as a railcar.
Trigger Criteria:
Context: Equipment has been identified as a railcar
Applied to: Store Car Information
Action: Storing car information
Logic Flow:
IF Equipment has been identified as a railcar
AND Storing car information
THEN:
• Car initials and number are combined to form complete equipment ID for storage
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment id has been stored.
Trigger Criteria:
Context: Equipment ID has been stored
Applied to: Set Equipment Type Code
Action: Setting equipment type code
Logic Flow:
IF Equipment ID has been stored
AND Setting equipment type code
THEN:
• Equipment type code from the report working storage is stored in the train list equipment record
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment type code has been set.
Trigger Criteria:
Context: Equipment type code has been set
Applied to: Determine Load/Empty Status
Action: Determining load/empty status
Logic Flow:
IF Equipment type code has been set
AND Determining load/empty status
THEN:
• If cargo control number exists, use load/empty indicator from report; otherwise set status to empty
• If report US CCN key is spaces, then load/empty indicator is set to 'E' (empty), otherwise load/empty indicator is set from report load/empty indicator
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when load/empty status has been determined.
Trigger Criteria:
Context: Load/empty status has been determined
Applied to: Store Cargo Control Number
Action: Storing cargo control number
Logic Flow:
IF Load/empty status has been determined
AND Storing cargo control number
THEN:
• US cargo control number from the report working storage is stored in the equipment record
• US CCN key from report working storage is stored in train equipment US CCN key field
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo control number has been stored.
Trigger Criteria:
Context: Cargo control number has been stored
Applied to: Store Condition Response Code
Action: Storing condition response code
Logic Flow:
IF Cargo control number has been stored
AND Storing condition response code
THEN:
• Cargo condition response code from the report working storage is stored in the equipment record
• Cargo condition response code from report working storage is stored in train equipment condition response code field
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when condition response code has been stored.
Trigger Criteria:
Context: Condition response code has been stored
Applied to: Store Empty Car Indicator
Action: Storing empty car indicator
Logic Flow:
IF Condition response code has been stored
AND Storing empty car indicator
THEN:
• Empty car routing indicator from the report working storage is stored in the equipment record
• Empty car indicator from report working storage is stored in train equipment empty car indicator field
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when all equipment details have been stored for current item.
Trigger Criteria:
Context: All equipment details have been stored for current item
Applied to: Increment Equipment Counter
Action: Completing equipment storage
Logic Flow:
IF All equipment details have been stored for current item
AND Completing equipment storage
THEN:
• Equipment quantity counter is incremented by one
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment counter has been incremented.
Trigger Criteria:
Context: Equipment counter has been incremented
Applied to: Equipment Table Full?
Action: Checking table capacity
Logic Flow:
IF Equipment counter has been incremented
AND Checking table capacity
THEN:
• If equipment quantity equals maximum capacity and more report lines exist, abort with table overflow error; otherwise continue processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment counter has been incremented.
Trigger Criteria:
Context: Equipment counter has been incremented
Applied to: Equipment Table Full?
Action: Checking equipment table capacity
Logic Flow:
IF Equipment counter has been incremented
AND Checking equipment table capacity
THEN:
• If equipment quantity equals equipment maximum AND report index is not greater than report last line, then table overflow error occurs, otherwise continue processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when all equipment has been processed and stored in the train list structure.
Trigger Criteria:
Context: All equipment has been processed and stored in the train list structure
Applied to: Insert Train Record to Database
Action: Inserting train record to database
Logic Flow:
IF All equipment has been processed and stored in the train list structure
AND Inserting train record to database
THEN:
• Complete train list with header and equipment details is inserted into GCSUTRT database
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train record insert has been attempted.
Trigger Criteria:
Context: Train record insert has been attempted
Applied to: Database Insert Successful?
Action: Checking insert operation result
Logic Flow:
IF Train record insert has been attempted
AND Checking insert operation result
THEN:
• If insert failed or record already exists, abort with insert failure error; otherwise complete storage process successfully
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when database insert has completed successfully.
Trigger Criteria:
Context: Database insert has completed successfully
Applied to: Train List Storage Complete
Action: Finalizing storage process
Logic Flow:
IF Database insert has completed successfully
AND Finalizing storage process
THEN:
• Train list storage process completes and control returns to main processing flow
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment table has reached maximum capacity with more items to process.
Trigger Criteria:
Context: Equipment table has reached maximum capacity with more items to process
Applied to: Abort - Table Overflow
Action: Table overflow condition is detected
Logic Flow:
IF Equipment table has reached maximum capacity with more items to process
AND Table overflow condition is detected
THEN:
• System aborts with train list table overflow error message
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when database insert operation has failed or record already exists.
Trigger Criteria:
Context: Database insert operation has failed or record already exists
Applied to: Abort - Insert Failed
Action: Insert failure condition is detected
Logic Flow:
IF Database insert operation has failed or record already exists
AND Insert failure condition is detected
THEN:
• System aborts with database insert failure error message
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train transmission has been successfully processed.
Trigger Criteria:
Context: A train transmission has been successfully processed
Applied to: Initialize Train Header Information
Action: The system begins train list storage process
Logic Flow:
IF A train transmission has been successfully processed
AND The system begins train list storage process
THEN:
• The train header information structure is initialized to empty values
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when eta information has been set and aei train send status is determined.
Trigger Criteria:
Context: ETA information has been set and AEI train send status is determined
Applied to: Set AEI Send Flag
Action: Setting AEI send flag
Logic Flow:
IF ETA information has been set and AEI train send status is determined
AND Setting AEI send flag
THEN:
• If AEI train send is YES, then AEI send flag is set to TRUE, otherwise AEI send flag is set to FALSE
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment counter has been initialized and report processing is in progress.
Trigger Criteria:
Context: Equipment counter has been initialized and report processing is in progress
Applied to: More Equipment to Process?
Action: Checking for more equipment to process
Logic Flow:
IF Equipment counter has been initialized and report processing is in progress
AND Checking for more equipment to process
THEN:
• If report index is less than or equal to report last line AND report index is less than or equal to maximum report line AND equipment quantity is less than equipment maximum, then continue processing, otherwise stop processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when more equipment exists to process.
Trigger Criteria:
Context: More equipment exists to process
Applied to: Extract Equipment Details
Action: Extracting equipment details from report
Logic Flow:
IF More equipment exists to process
AND Extracting equipment details from report
THEN:
• If report line is not a message line AND not an end report line AND not a blank line, then increment equipment quantity and extract equipment information
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment details have been extracted from report.
Trigger Criteria:
Context: Equipment details have been extracted from report
Applied to: Equipment Type?
Action: Determining equipment type
Logic Flow:
IF Equipment details have been extracted from report
AND Determining equipment type
THEN:
• If report shows container information, then process as container, otherwise process as car
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment type is determined to be container.
Trigger Criteria:
Context: Equipment type is determined to be container
Applied to: Store Container Information
Action: Storing container information
Logic Flow:
IF Equipment type is determined to be container
AND Storing container information
THEN:
• Container ID is stored as equipment ID and container flag is set to TRUE
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment type is determined to be car.
Trigger Criteria:
Context: Equipment type is determined to be car
Applied to: Store Car Information
Action: Storing car information
Logic Flow:
IF Equipment type is determined to be car
AND Storing car information
THEN:
• Car initials are moved to equipment initials, zeros are moved to equipment number prefix, car number is moved to equipment number, and constructed equipment ID is stored
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment information has been stored (container or car).
Trigger Criteria:
Context: Equipment information has been stored (container or car)
Applied to: Set Equipment Type Code
Action: Setting equipment type code
Logic Flow:
IF Equipment information has been stored (container or car)
AND Setting equipment type code
THEN:
• Equipment type code from report working storage is stored in train equipment record
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment details have been fully stored.
Trigger Criteria:
Context: Equipment details have been fully stored
Applied to: Increment Equipment Counter
Action: Incrementing equipment counter
Logic Flow:
IF Equipment details have been fully stored
AND Incrementing equipment counter
THEN:
• Equipment quantity counter is incremented by 1
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when all equipment has been processed and table capacity is not exceeded.
Trigger Criteria:
Context: All equipment has been processed and table capacity is not exceeded
Applied to: Insert Train Record to Database
Action: Inserting train record to database
Logic Flow:
IF All equipment has been processed and table capacity is not exceeded
AND Inserting train record to database
THEN:
• Train list record with all equipment details is inserted into the database using GCCUTRIO module
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train record insert operation has been attempted.
Trigger Criteria:
Context: Train record insert operation has been attempted
Applied to: Database Insert Successful?
Action: Validating database insert success
Logic Flow:
IF Train record insert operation has been attempted
AND Validating database insert success
THEN:
• If GCCUTRIO return indicates already exists error, then system abend with insert failed message, otherwise insertion is successful
R-GCX003-cbl-00776 (+18)File: GCX003.cblBusiness Rule: Report Finalization and Header Generation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report is being finalized.
Trigger Criteria:
Context: A report is being finalized
Applied to: Set Report End Marker
Action: The current report line at RPT-IDX is blank
Logic Flow:
IF A report is being finalized
AND The current report line at RPT-IDX is blank
THEN:
• Set the report end marker flag for that line
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report is being finalized.
Trigger Criteria:
Context: A report is being finalized
Applied to: Calculate Report Last Line Index
Action: The report processing is complete
Logic Flow:
IF A report is being finalized
AND The report processing is complete
THEN:
• Set the report last line index to the current RPT-IDX value and set the new report last line index to the current NEW-RPT-IDX value
• Set RPT-LAST-LINE to the current RPT-IDX value andNEW-RPT-LAST-LINE to the current NEW-RPT-IDX value
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report is being finalized.
Trigger Criteria:
Context: A report is being finalized
Applied to: Generate Header Line 1 - Train Information & Generate Header Line 2 - User Information
Action: Generating report headers
Logic Flow:
IF A report is being finalized
AND Generating report headers
THEN:
• Set header line 1 flag, populate train ID from request, and populate origin station name from station code table
• Set header line 2 flag, populate user ID from CCCOM, populate terminal from CCCOM, populate machine date from CCCOM, populate machine hour from CCCOM, and populate machine minutes from CCCOM
• Set header line 1 flag, populate train ID from request, and set origin station name from station code table
• Set header line 2 flag, populate user ID, terminal ID, machine date, hour, and minute from system information
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report is being finalized.
Trigger Criteria:
Context: A report is being finalized
Applied to: Determine Request Action Type & Processing Results
Action: The request action is OTHER
Logic Flow:
IF A report is being finalized
AND The request action is OTHER
THEN:
• Set request type in header and set result abort flag
• Set request type in header and mark result as abort
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report is being finalized.
Trigger Criteria:
Context: A report is being finalized
Applied to: Generate Header Line 4 - Train Details
Action: Generating detailed train headers
Logic Flow:
IF A report is being finalized
AND Generating detailed train headers
THEN:
• Set header line 4 flag, populate US customs train ID from train list, populate ETA year from request, populate ETA month from request, populate ETA day from request, populate ETA hour from request, and populate ETA minutes from request
• Set header line 4 flag, populate US customs train ID, and set ETA year, month, day, hour, and minute components
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report is being finalized.
Trigger Criteria:
Context: A report is being finalized
Applied to: Generate Detail Headers
Action: Setting up detail section headers
Logic Flow:
IF A report is being finalized
AND Setting up detail section headers
THEN:
• Set detail header line 1 flag and set detail header line 2 flag
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report is being finalized.
Trigger Criteria:
Context: A report is being finalized
Applied to: Generate Detail Headers
Action: Setting up report structure
Logic Flow:
IF A report is being finalized
AND Setting up report structure
THEN:
• Set detail header 1 flag for line 6 and detail header 2 flag for line 7
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report action is being processed.
Trigger Criteria:
Context: A report action is being processed
Applied to: Check Processing Status
Action: There are errors or warnings
Logic Flow:
IF A report action is being processed
AND There are errors or warnings
THEN:
• Set message result flag, populate warning count, populate error count, and populate DSP count
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report action is being processed.
Trigger Criteria:
Context: A report action is being processed
Applied to: Set NO MESSAGE Result
Action: There are no errors (RPT-NO-ERROR) and no warnings (RPT-NO-WRN)
Logic Flow:
IF A report action is being processed
AND There are no errors (RPT-NO-ERROR) and no warnings (RPT-NO-WRN)
THEN:
• Set the result status to no message
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report action is being processed.
Trigger Criteria:
Context: A report action is being processed
Applied to: Set MESSAGE Result with Counts
Action: There are errors or warnings present
Logic Flow:
IF A report action is being processed
AND There are errors or warnings present
THEN:
• Set result status to message, populate warning count, error count, and DSP count in the header
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report headers have been generated. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Report headers have been generated
Applied to: Copy Headers to Report Lines
Action: Finalizing report output
Logic Flow:
IF Report headers have been generated
AND Finalizing report output
THEN:
• Copy report line 1 to email text line 1, copy report line 2 to email text line 2, copy report line 3 to email text line 3, copy report line 4 to email text line 4, and copy report line 5 to email text line 5
• Copy report lines 1 through 5 to corresponding email text lines
R-GCX003-cbl-00785 (+16)File: GCX003.cblBusiness Rule: Processing Result Classification
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train processing has completed.
Trigger Criteria:
Context: Train processing has completed
Applied to: SENT
Action: There are no processing errors AND there are no spawn messages
Logic Flow:
IF Train processing has completed
AND There are no processing errors AND there are no spawn messages
THEN:
• Set result status to SENT AND record warning message count
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train processing has completed with no processing errors.
Trigger Criteria:
Context: Train processing has completed with no processing errors
Applied to: NOT SENT
Action: There are spawn messages present
Logic Flow:
IF Train processing has completed with no processing errors
AND There are spawn messages present
THEN:
• Set result status to NOT SENT AND count warning messages AND add spawn count to error count AND set total error count
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train processing completed successfully with spawn messages.
Trigger Criteria:
Context: Train processing completed successfully with spawn messages
Applied to: Trigger Special Manifest Processing
Action: Spawn messages need to be processed
Logic Flow:
IF Train processing completed successfully with spawn messages
AND Spawn messages need to be processed
THEN:
• Execute special manifest processing for each spawn message from 1 to spawn count
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train processing has errors and no spawn messages are present.
Trigger Criteria:
Context: Train processing has errors AND no spawn messages are present
Applied to: Convert Spawn Messages to Report Messages
IF Train processing has errors AND no spawn messages are present
AND Message lines contain spawn division messages OR spawn ITE messages
THEN:
• Convert spawn division messages to message nineteen with station code AND convert spawn ITE messages to message eighteen
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train processing has errors and spawn messages are present.
Trigger Criteria:
Context: Train processing has errors AND spawn messages are present
Applied to: Convert Spawn Messages to Warning Messages
Action: Final message processing occurs
Logic Flow:
IF Train processing has errors AND spawn messages are present
AND Final message processing occurs
THEN:
• Add spawn count to warning message count
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train processing has errors and no spawn messages and message type is 43 (special authorization error).
Trigger Criteria:
Context: Train processing has errors AND no spawn messages AND message type is 43 (special authorization error)
Applied to: Convert Spawn Messages to Report Messages
Action: Total error count equals the count of type 43 errors
Logic Flow:
IF Train processing has errors AND no spawn messages AND message type is 43 (special authorization error)
AND Total error count equals the count of type 43 errors
THEN:
• Convert message 43 to message eighteen AND increment warning count AND decrement error count
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train processing has encountered errors.
Trigger Criteria:
Context: Train processing has encountered errors
Applied to: NOT SENT
Action: Final result classification is performed
Logic Flow:
IF Train processing has encountered errors
AND Final result classification is performed
THEN:
• Set result status to NOT SENT AND record final warning message count AND record final error message count
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train manifest processing request has been completed.
Trigger Criteria:
Context: A train manifest processing request has been completed
Applied to: Any Processing Errors?
Action: The system checks for any processing errors in the report
Logic Flow:
IF A train manifest processing request has been completed
AND The system checks for any processing errors in the report
THEN:
• If no errors exist (RPT-NO-ERROR is true), proceed to check for spawn messages, otherwise proceed to spawn message evaluation for error handling
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train manifest processing completed with no errors and no spawn messages.
Trigger Criteria:
Context: Train manifest processing completed with no errors and no spawn messages
Applied to: SENT
Action: The system determines the final processing result status
Logic Flow:
IF Train manifest processing completed with no errors and no spawn messages
AND The system determines the final processing result status
THEN:
• Set the result status to SENT and record warning count for reporting
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train manifest processing completed with no errors but spawn messages exist.
Trigger Criteria:
Context: Train manifest processing completed with no errors but spawn messages exist
Applied to: NOT SENT
Action: The system determines the final processing result status
Logic Flow:
IF Train manifest processing completed with no errors but spawn messages exist
AND The system determines the final processing result status
THEN:
• Set the result status to NOT SENT, add spawn count to error count, and trigger special manifest processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train manifest processing completed successfully.
Action: The system prepares the final result classification
Logic Flow:
IF Train manifest processing completed successfully
AND The system prepares the final result classification
THEN:
• Count all warning messages and record the warning count in the result status
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train manifest processing has spawn messages that require special processing.
Trigger Criteria:
Context: Train manifest processing has spawn messages that require special processing
Applied to: Add Spawn Count to Error Count
Action: The system calculates the total error count for reporting
Logic Flow:
IF Train manifest processing has spawn messages that require special processing
AND The system calculates the total error count for reporting
THEN:
• Add the spawn message count to the existing error count to get the total error count
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train manifest processing resulted in spawn messages requiring special handling.
Trigger Criteria:
Context: Train manifest processing resulted in spawn messages requiring special handling
Applied to: Trigger Special Manifest Processing
Action: The system needs to process spawned items
Logic Flow:
IF Train manifest processing resulted in spawn messages requiring special handling
AND The system needs to process spawned items
THEN:
• Execute special manifest processing for each spawned item using GCX101 module
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train manifest processing has errors but no spawn messages exist.
Trigger Criteria:
Context: Train manifest processing has errors but no spawn messages exist
Applied to: Convert Error Messages to Warning Messages
Action: The system evaluates message types for final classification
Logic Flow:
IF Train manifest processing has errors but no spawn messages exist
AND The system evaluates message types for final classification
THEN:
• Convert specific error messages (type 43) to warning messages if error count matches the count of type 43 messages, otherwise keep as warnings
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when error messages have been evaluated and potentially converted to warnings.
Trigger Criteria:
Context: Error messages have been evaluated and potentially converted to warnings
Applied to: Update Message Counts
Action: The system finalizes message counts for reporting
Logic Flow:
IF Error messages have been evaluated and potentially converted to warnings
AND The system finalizes message counts for reporting
THEN:
• Increment warning count by 1 and decrement error count by 1 for each converted message
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train manifest processing has both errors and spawn messages.
Trigger Criteria:
Context: Train manifest processing has both errors and spawn messages
Applied to: Convert Error Messages to Warning Messages
Action: The system processes spawn-related messages for final reporting
Logic Flow:
IF Train manifest processing has both errors and spawn messages
AND The system processes spawn-related messages for final reporting
THEN:
• Convert diversion spawn messages to message type 19 and IT export spawn messages to message type 18, then add spawn count to warning count
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when all processing result classifications and message counts have been determined.
Trigger Criteria:
Context: All processing result classifications and message counts have been determined
Applied to: Generate Report Header with Status
Action: The system generates the final report header
Logic Flow:
IF All processing result classifications and message counts have been determined
AND The system generates the final report header
THEN:
• Create report header line 4 with train ID, ETA information, and set the appropriate result status (SENT, NOT SENT, or ABORTED) with final warning and error counts
Business Justification: Dictates the expected operational logic and validation steps when train processing request has been completed with equipment processed and report lines generated.
Trigger Criteria:
Context: A train processing request has been completed with equipment processed and report lines generated
Applied to: Finalize Report Headers and Summary
Action: The system finalizes the report for transmission
Logic Flow:
IF A train processing request has been completed with equipment processed and report lines generated
AND The system finalizes the report for transmission
THEN:
• The system sets the end report marker if the last line is blank, records the last line index, creates header lines with train ID and origin station, adds user ID and terminal information with current date and time, and formats the result status based on the request action type
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train processing request has been finalized with a specific action type and error status.
Trigger Criteria:
Context: A train processing request has been finalized with a specific action type and error status
Applied to: Evaluate Request Action Type
Action: The system evaluates the request for final processing
Logic Flow:
IF A train processing request has been finalized with a specific action type and error status
AND The system evaluates the request for final processing
THEN:
• If the action is SEND with no errors and no spawns, perform full transmission processing; if the action is REPORT, perform report-only processing; otherwise perform error handling with database rollback
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when send request has been validated successfully with no errors and no spawns required.
Trigger Criteria:
Context: A SEND request has been validated successfully with no errors and no spawns required
Applied to: Store Train List in Database
Action: The system processes the train list for storage
Logic Flow:
IF A SEND request has been validated successfully with no errors and no spawns required
AND The system processes the train list for storage
THEN:
• The system saves the train header information including train number, day, origin, consist number, crossing port, station details, ETA date and time, AEI send flag, and all equipment details with their load/empty status and cargo information to the database
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train list has been successfully stored in the database.
Trigger Criteria:
Context: A train list has been successfully stored in the database
Applied to: Transmit Train List to US Customs EDI
Action: The system transmits the train information to customs
Logic Flow:
IF A train list has been successfully stored in the database
AND The system transmits the train information to customs
THEN:
• The system calls the customs EDI transmission module (GCCU358T) in background mode with the complete train list data, andif AEI send flag is set, logs the AEI transmission activity
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report has been generated with potential duplicate equipment entries.
Trigger Criteria:
Context: A report has been generated with potential duplicate equipment entries
Applied to: Remove Duplicate Equipment Entries
Action: The system scans for duplicates
Logic Flow:
IF A report has been generated with potential duplicate equipment entries
AND The system scans for duplicates
THEN:
• For each equipment entry, if the car ID matches the previously held car ID, clear the current car ID to spaces; otherwise update the held car ID with the current car ID, excluding error, warning, and information message lines from duplicate checking
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train report has been finalized and duplicates removed.
Trigger Criteria:
Context: A train report has been finalized and duplicates removed
Applied to: Send Report to Customs MERLIN System
Action: The system sends the report to customs
Logic Flow:
IF A train report has been finalized and duplicates removed
AND The system sends the report to customs
THEN:
• The system formats the report with equipment totals in the status line, sets the sender and recipient to OM01247, uses the first report line as the subject, sets item width to 080, and transmits up to 699 lines per email with continuation handling for larger reports
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train report has been sent to the customs merlin system.
Trigger Criteria:
Context: A train report has been sent to the customs MERLIN system
Applied to: Generate PDF Report
Action: The system generates the PDF report
Logic Flow:
IF A train report has been sent to the customs MERLIN system
AND The system generates the PDF report
THEN:
• The system calls the PDF generation module (GCX904R) with the report message content, email subject from the first report line, train ID, report title as 'Pre-Exit Report', report type as 'EXPORT', PDF length of 80 characters, and the total number of report lines
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when pdf report has been generated for the train processing.
Trigger Criteria:
Context: A PDF report has been generated for the train processing
Applied to: Is Laredo TX Station?
Action: The system determines the station-specific report format
Logic Flow:
IF A PDF report has been generated for the train processing
AND The system determines the station-specific report format
THEN:
• If the crossing port is Laredo TX station, generate an enhanced format report; otherwise generate a Canadian export report
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when processing station is laredo tx.
Trigger Criteria:
Context: The processing station is Laredo TX
Applied to: Generate Enhanced Format Report
Action: The system generates the enhanced report
Logic Flow:
IF The processing station is Laredo TX
AND The system generates the enhanced report
THEN:
• The system creates header lines with train ID, car and container counts by load/empty status, ETA date and time, port code and name, locomotive count, and total equipment count, formats detail lines for each equipment item, and prepares the report for PDF generation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when enhanced format report has been generated for laredo station.
Trigger Criteria:
Context: An enhanced format report has been generated for Laredo station
Applied to: Generate Second PDF Report
Action: The system creates the second PDF report
Logic Flow:
IF An enhanced format report has been generated for Laredo station
AND The system creates the second PDF report
THEN:
• The system calls the PDF generation module (GCX904R) with the enhanced report table, new report subject, train ID, report title as 'Export Train Report', report type as 'EXPORT', PDF length of 132 characters, and the enhanced report line count
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when processing station is not laredo tx.
Trigger Criteria:
Context: The processing station is not Laredo TX
Applied to: Spawn Canadian Export Report
Action: The system spawns the export report
Logic Flow:
IF The processing station is not Laredo TX
AND The system spawns the export report
THEN:
• The system creates a GCX141 message with function name flag, train ID, and message length, then inserts the message to trigger the Canadian export report generation process
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when all transmission and reporting processes have completed successfully for a send request.
Trigger Criteria:
Context: All transmission and reporting processes have completed successfully for a SEND request
Applied to: Set Acknowledgment Only Flag
Action: The system prepares the originator response
Logic Flow:
IF All transmission and reporting processes have completed successfully for a SEND request
AND The system prepares the originator response
THEN:
• The system sets the acknowledgment only flag to true to indicate that only a brief confirmation should be sent rather than the full detailed report
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train processing request has completed with final status determined. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A train processing request has completed with final status determined
Applied to: Send Report to Originator Terminal
Action: The system sends the response to the originator
Logic Flow:
IF A train processing request has completed with final status determined
AND The system sends the response to the originator
THEN:
• If AEI send flag is set, send AEI-specific report; determine destination terminal from alternate terminal or original terminal; set call letters based on error status and action type; send header line first, then send appropriate report content based on acknowledgment flag and warning status, and finally send wrap-up message
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when send request has completed successfully with cargo items added.
Trigger Criteria:
Context: A SEND request has completed successfully with cargo items added
Applied to: Send Activity Audit Logs
Action: The system generates audit logs
Logic Flow:
IF A SEND request has completed successfully with cargo items added
AND The system generates audit logs
THEN:
• For each added US CCN (up to 2499 entries), create a log entry with security byte, US cargo flag, action code 'ZZZ', sending transaction 'GCT0031E', user ACF2 ID, current date and time, the US CCN key, and car added log message, then transmit the log entry
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train processing request has encountered errors or is not a successful send action.
Trigger Criteria:
Context: A train processing request has encountered errors or is not a successful SEND action
Applied to: Perform Database Rollback
Action: The system handles the error condition
Logic Flow:
IF A train processing request has encountered errors or is not a successful SEND action
AND The system handles the error condition
THEN:
• The system performs a database rollback operation to undo all changes made during the current processing session
R-GCX003-cbl-00926 (+4)File: GCX003.cblBusiness Rule: Haulage Automation Flag Management
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with scac code and train origin location.
Trigger Criteria:
Context: A cargo record with SCAC code and train origin location
Applied to: Determine Port Automation Status
Action: The system evaluates port automation status AND ((SCAC is CPRS and train origin is not 9089) OR (SCAC is UPRR and train origin is 9089))
Logic Flow:
IF A cargo record with SCAC code and train origin location
AND The system evaluates port automation status AND ((SCAC is CPRS and train origin is not 9089) OR (SCAC is UPRR and train origin is 9089))
THEN:
• Set port as automated, otherwise set port as paper mode
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record that doesn't meet standard automated port criteria and station table contains port configuration data.
Trigger Criteria:
Context: A cargo record that doesn't meet standard automated port criteria AND station table contains port configuration data
Applied to: Determine Port Automation Status
Action: The system looks up the SCAC and port combination in the station table
Logic Flow:
IF A cargo record that doesn't meet standard automated port criteria AND station table contains port configuration data
AND The system looks up the SCAC and port combination in the station table
THEN:
• Set port automation status based on the automated carrier flag from station table (Y for automated, otherwise paper)
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with haulage indicator and cargo has automated haulage flag and port is determined to be paper mode and request action is send.
Trigger Criteria:
Context: A cargo record with haulage indicator AND cargo has automated haulage flag AND port is determined to be paper mode AND request action is SEND
Applied to: Update Haulage Flag to Manual - Set 'N'
Action: The system detects mismatch between automated haulage and paper port
Logic Flow:
IF A cargo record with haulage indicator AND cargo has automated haulage flag AND port is determined to be paper mode AND request action is SEND
AND The system detects mismatch between automated haulage and paper port
THEN:
• Update the haulage automation flag to 'N' (manual) and replace the cargo record
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with haulage indicator and cargo has manual haulage flag and port is determined to be automated mode and request action is send.
Trigger Criteria:
Context: A cargo record with haulage indicator AND cargo has manual haulage flag AND port is determined to be automated mode AND request action is SEND
Applied to: Update Haulage Flag to Automated - Set 'Y'
Action: The system detects mismatch between manual haulage and automated port
Logic Flow:
IF A cargo record with haulage indicator AND cargo has manual haulage flag AND port is determined to be automated mode AND request action is SEND
AND The system detects mismatch between manual haulage and automated port
THEN:
• Update the haulage automation flag to 'Y' (automated) and replace the cargo record
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record being processed for haulage automation flags.
Trigger Criteria:
Context: A cargo record being processed for haulage automation flags
Applied to: Is Cargo Haulage?
Action: The cargo does not have haulage indicator set
Logic Flow:
IF A cargo record being processed for haulage automation flags
AND The cargo does not have haulage indicator set
THEN:
• Skip all haulage automation flag processing and continue with next processing step
R-GCX003-cbl-00931 (+9)File: GCX003.cblBusiness Rule: Report Message Classification and Counting
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report line has been added to the report at a specific index position.
Trigger Criteria:
Context: A report line has been added to the report at a specific index position
Applied to: Is Message Line?
Action: The system checks if the line contains a message using the message line indicator
Logic Flow:
IF A report line has been added to the report at a specific index position
AND The system checks if the line contains a message using the message line indicator
THEN:
• The system identifies whether the line is a message line that requires classification or a regular report line that should be skipped for message counting
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when message line has been identified in the report.
Trigger Criteria:
Context: A message line has been identified in the report
Applied to: Is Spawn Message?
Action: The system checks if the message is a spawn message type
Logic Flow:
IF A message line has been identified in the report
AND The system checks if the message is a spawn message type
THEN:
• If it is a spawn message, skip the message counting process and proceed to increment report index, otherwise continue with message classification
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when non-spawn message line has been identified.
Trigger Criteria:
Context: A non-spawn message line has been identified
Applied to: Increment Error Count
Action: The message type is classified as an error message
Logic Flow:
IF A non-spawn message line has been identified
AND The message type is classified as an error message
THEN:
• The system increments the error count by 1 for report statistics
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when non-spawn message line has been identified.
Trigger Criteria:
Context: A non-spawn message line has been identified
Applied to: Increment Warning Count
Action: The message type is classified as a warning message
Logic Flow:
IF A non-spawn message line has been identified
AND The message type is classified as a warning message
THEN:
• The system increments the warning count by 1 for report statistics
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when non-spawn message line has been identified.
Trigger Criteria:
Context: A non-spawn message line has been identified
Applied to: Increment Info Count
Action: The message type is classified as an informational message
Logic Flow:
IF A non-spawn message line has been identified
AND The message type is classified as an informational message
THEN:
• The system increments the information count by 1 for report statistics
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when error message has been identified and error count has been incremented.
Trigger Criteria:
Context: An error message has been identified and error count has been incremented
Applied to: Check if Message Type 43
Action: The message type indicator equals 43
Logic Flow:
IF An error message has been identified and error count has been incremented
AND The message type indicator equals 43
THEN:
• The system increments the Type 43 error count by 1 in addition to the general error count
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when warning message has been identified and warning count has been incremented.
Trigger Criteria:
Context: A warning message has been identified and warning count has been incremented
Applied to: Warning Type 49 or 52?
Action: The message type indicator equals 49 or 52
Logic Flow:
IF A warning message has been identified and warning count has been incremented
AND The message type indicator equals 49 or 52
THEN:
• The system increments the DSP count by 1 in addition to the general warning count
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report line has been processed (either message classified or non-message line handled).
Trigger Criteria:
Context: A report line has been processed (either message classified or non-message line handled)
Applied to: Increment Report Index
Action: The system completes processing of the current report line
Logic Flow:
IF A report line has been processed (either message classified or non-message line handled)
AND The system completes processing of the current report line
THEN:
• The system increments the report index by 1 to move to the next report line position
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report index has been incremented to the next position.
Trigger Criteria:
Context: The report index has been incremented to the next position
Applied to: Report Maximum Reached?
Action: The system checks if the report has reached its maximum capacity
Logic Flow:
IF The report index has been incremented to the next position
AND The system checks if the report has reached its maximum capacity
THEN:
• If maximum capacity is reached, set an overflow message indicator, otherwise continue normal processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report has reached its maximum capacity.
Trigger Criteria:
Context: The report has reached its maximum capacity
Applied to: Set Overflow Message
Action: The system detects report overflow condition
Logic Flow:
IF The report has reached its maximum capacity
AND The system detects report overflow condition
THEN:
• The system sets message type 9 (overflow message) at the current report index position to indicate report truncation
Business Justification: Ensures correct system behavior and process compliance when email report needs to be sent with pagination support.
Trigger Criteria:
Context: An email report needs to be sent with pagination support
Applied to: Initialize Email Parameters
Action: The email report process begins
Logic Flow:
IF An email report needs to be sent with pagination support
AND The email report process begins
THEN:
• Email parameters are initialized with default usercode, destination filename, subject, keywords, item specifications, and return status flag are cleared
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when email pagination process is starting or a new email batch is beginning.
Trigger Criteria:
Context: Email pagination process is starting or a new email batch is beginning
Applied to: Set Line Counter to Zero
Action: Line counting needs to be reset
Logic Flow:
IF Email pagination process is starting or a new email batch is beginning
AND Line counting needs to be reset
THEN:
• The line counter is set to zero to start counting lines for the current email batch
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when email report processing is active with lines to send.
Trigger Criteria:
Context: Email report processing is active with lines to send
Applied to: Set Email Status to More Email
Action: Email status needs to be set for active processing
Logic Flow:
IF Email report processing is active with lines to send
AND Email status needs to be set for active processing
THEN:
• Email status is set to 'More Email' indicating active processing state
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when report line exists in the report table and email message buffer has capacity.
Trigger Criteria:
Context: A report line exists in the report table and email message buffer has capacity
Applied to: Add Line to Email Message
Action: A report line needs to be added to the email
Logic Flow:
IF A report line exists in the report table and email message buffer has capacity
AND A report line needs to be added to the email
THEN:
• The report line is moved to the email text message line at the current line position
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when line has been added to the email message buffer.
Trigger Criteria:
Context: A line has been added to the email message buffer
Applied to: Increment Line Counter
Action: Line counting needs to be updated
Logic Flow:
IF A line has been added to the email message buffer
AND Line counting needs to be updated
THEN:
• The line counter is incremented by 1 and email status is set to 'More Email'
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when lines have been added to the current email batch.
Trigger Criteria:
Context: Lines have been added to the current email batch
Applied to: Line Count > 699?
Action: The line counter is evaluated against the maximum limit
Logic Flow:
IF Lines have been added to the current email batch
AND The line counter is evaluated against the maximum limit
THEN:
• If line counter exceeds 699, trigger email batch sending, otherwise continue adding lines
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when email line counter has exceeded 699 lines.
Trigger Criteria:
Context: The email line counter has exceeded 699 lines
Applied to: Set No More Email Status
Action: The current email batch needs to be marked as complete
Logic Flow:
IF The email line counter has exceeded 699 lines
AND The current email batch needs to be marked as complete
THEN:
• Email status is set to 'No More Email' indicating the batch is ready for sending
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when email batch is ready for transmission with accumulated report lines.
Trigger Criteria:
Context: An email batch is ready for transmission with accumulated report lines
Applied to: Send Current Email Batch
Action: Email batch sending is triggered
Logic Flow:
IF An email batch is ready for transmission with accumulated report lines
AND Email batch sending is triggered
THEN:
• The email is sent using EMCSEND3 with all configured parameters and accumulated message lines
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when email batch has been sent and a new batch needs to be prepared.
Trigger Criteria:
Context: An email batch has been sent and a new batch needs to be prepared
Applied to: Clear Email Message Buffer
Action: Email message buffer needs to be cleared
Logic Flow:
IF An email batch has been sent and a new batch needs to be prepared
AND Email message buffer needs to be cleared
THEN:
• The email text message buffer is cleared to spaces
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when email batch has been sent and line counter needs reset for next batch.
Trigger Criteria:
Context: An email batch has been sent and line counter needs reset for next batch
Applied to: Reset Line Counter to Zero
Action: Line counter reset is required
Logic Flow:
IF An email batch has been sent and line counter needs reset for next batch
AND Line counter reset is required
THEN:
• The line counter is set to zero to begin counting lines for the new email batch
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when new email batch is starting after reaching line limits.
Trigger Criteria:
Context: A new email batch is starting after reaching line limits
Applied to: Add Continuation Header Line
Action: Continuation header needs to be added
Logic Flow:
IF A new email batch is starting after reaching line limits
AND Continuation header needs to be added
THEN:
• The message 'CONTINUATION OF REPORT ....' is added as the first line of the new email batch
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when continuation email batch is being prepared.
Trigger Criteria:
Context: A continuation email batch is being prepared
Applied to: Add Report Detail Headers
Action: Report structure headers need to be included
Logic Flow:
IF A continuation email batch is being prepared
AND Report structure headers need to be included
THEN:
• Report detail header lines are added to the email message to maintain column structure
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when continuation header and detail headers have been added to new email batch.
Trigger Criteria:
Context: Continuation header and detail headers have been added to new email batch
Applied to: Update Line Counter for Headers
Action: Line counter needs to reflect added headers
Logic Flow:
IF Continuation header and detail headers have been added to new email batch
AND Line counter needs to reflect added headers
THEN:
• Line counter is updated to account for the header lines added to the email batch
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when email processing is in progress.
Trigger Criteria:
Context: Email processing is in progress
Applied to: More Lines to Process?
Action: System needs to determine if more lines exist to process
Logic Flow:
IF Email processing is in progress
AND System needs to determine if more lines exist to process
THEN:
• If more report lines exist, continue processing loop, otherwise proceed to send final email batch
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when all report lines have been processed and final email batch is ready.
Trigger Criteria:
Context: All report lines have been processed and final email batch is ready
Applied to: Send Final Email Batch
Action: Final email transmission is required
Logic Flow:
IF All report lines have been processed and final email batch is ready
AND Final email transmission is required
THEN:
• The final email batch is sent using EMCSEND3 with all remaining accumulated message lines
R-GCX003-cbl-00956 (+9)File: GCX003.cblBusiness Rule: Email Distribution List Management
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when email distribution list retrieval is required.
Trigger Criteria:
Context: Email distribution list retrieval is required
Applied to: Initialize AELWRKTB Database Access
Action: System begins email distribution setup process
Logic Flow:
IF Email distribution list retrieval is required
AND System begins email distribution setup process
THEN:
• Database access structure AELWRKTB is initialized to empty state
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train origin location is available in request.
Trigger Criteria:
Context: Train origin location is available in request
Applied to: Build Database Key with Train Origin Location
Action: System needs to query email distribution database
Logic Flow:
IF Train origin location is available in request
AND System needs to query email distribution database
THEN:
• Database record key is populated with train origin location in first 4 positions
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when database query key is being constructed.
Trigger Criteria:
Context: Database query key is being constructed
Applied to: Set Record Type to 'CUSEMAIL'
Action: System prepares to retrieve email distribution list
Logic Flow:
IF Database query key is being constructed
AND System prepares to retrieve email distribution list
THEN:
• Record type is set to 'CUSEMAIL' to identify email records
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when database key is constructed with train origin and record type. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Database key is constructed with train origin and record type
Applied to: Call AECWRKTB to Retrieve Email List
Action: System executes AECWRKTB database call
Logic Flow:
IF Database key is constructed with train origin and record type
AND System executes AECWRKTB database call
THEN:
• Database query is performed and return code and SQL code are captured
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when database query has been executed.
Trigger Criteria:
Context: Database query has been executed
Applied to: Database Access Successful?
Action: System checks database return code
Logic Flow:
IF Database query has been executed
AND System checks database return code
THEN:
• If return code equals success constant, processing continues with retrieved data, otherwise error handling is initiated
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when database query returned success status.
Trigger Criteria:
Context: Database query returned success status
Applied to: Process Retrieved Email Distribution List
Action: Email distribution list is available for processing
Logic Flow:
IF Database query returned success status
AND Email distribution list is available for processing
THEN:
• System sets default MERLIN ID as sender and prepares to extract individual email addresses
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when email distribution list record is available and counter is within range 1 to 10.
Trigger Criteria:
Context: Email distribution list record is available and counter is within range 1 to 10
Applied to: Extract User Email ID from Database Record
Action: System processes each email address position
Logic Flow:
IF Email distribution list record is available and counter is within range 1 to 10
AND System processes each email address position
THEN:
• If email address at current position is not spaces, it is added to distribution list
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when database query completed with return code.
Trigger Criteria:
Context: Database query completed with return code
Applied to: Handle No Entry Found Condition
Action: Return code indicates no entry found condition
Logic Flow:
IF Database query completed with return code
AND Return code indicates no entry found condition
THEN:
• System continues processing without error and uses default email configuration
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when database query completed with return code.
Trigger Criteria:
Context: Database query completed with return code
Applied to: Handle Database Error Occurred
Action: Return code indicates error other than no entry found
Logic Flow:
IF Database query completed with return code
AND Return code indicates error other than no entry found
THEN:
• System initiates database error handling procedure
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when database lookup failed or returned no email addresses.
Trigger Criteria:
Context: Database lookup failed or returned no email addresses
Applied to: Set Default Email Recipients
Action: System needs to establish email distribution
Logic Flow:
IF Database lookup failed or returned no email addresses
AND System needs to establish email distribution
THEN:
• Default MERLIN ID is set as both sender and recipient for email notifications
R-GCX003-cbl-00966 (+3)File: GCX003.cblBusiness Rule: Report Subject Line Generation
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train processing request has completed with errors and rpt-error-append is true.
Trigger Criteria:
Context: A train processing request has completed with errors and RPT-ERROR-APPEND is true
Applied to: Generate 'NOT SENT' Subject Line
Action: The system generates an email subject line for AEI notification
Logic Flow:
IF A train processing request has completed with errors and RPT-ERROR-APPEND is true
AND The system generates an email subject line for AEI notification
THEN:
• The subject line should be formatted as 'US TRAIN [train_id] NOT SENT AT [origin_station]'
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train processing request has completed successfully and rpt-error-append is false.
Trigger Criteria:
Context: A train processing request has completed successfully and RPT-ERROR-APPEND is false
Applied to: Generate 'SENT' Subject Line
Action: The system generates an email subject line for AEI notification
Logic Flow:
IF A train processing request has completed successfully and RPT-ERROR-APPEND is false
AND The system generates an email subject line for AEI notification
THEN:
• The subject line should be formatted as 'US TRAIN [train_id] SENT AT [origin_station]'
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when email subject template has been determined based on train send status.
Trigger Criteria:
Context: An email subject template has been determined based on train send status
Applied to: Build Subject String with Train ID
Action: The system builds the complete subject line
Logic Flow:
IF An email subject template has been determined based on train send status
AND The system builds the complete subject line
THEN:
• The train ID from RPT-HDR-TRAIN-ID should be inserted into the subject template
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when email subject template with train id has been partially constructed.
Trigger Criteria:
Context: An email subject template with train ID has been partially constructed
Applied to: Build Subject String with Origin Station
Action: The system completes the subject line building process
Logic Flow:
IF An email subject template with train ID has been partially constructed
AND The system completes the subject line building process
THEN:
• The origin station from RPT-HDR-ORIGIN should be inserted into the subject template to complete the subject line
Business Justification: Establishes the required business protocol to be followed when database operation has been attempted.
Trigger Criteria:
Context: A database operation has been attempted
Applied to: Check Return Code
Action: The system checks the return code from the database operation
Logic Flow:
IF A database operation has been attempted
AND The system checks the return code from the database operation
THEN:
• The system should identify if the operation failed and determine if it is a DB2 SQLCODE error type
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when database error has been detected.
Trigger Criteria:
Context: A database error has been detected
Applied to: Set Support Team as Recipient
Action: The system prepares error notification
Logic Flow:
IF A database error has been detected
AND The system prepares error notification
THEN:
• The email recipient should be set to the support team identifier and the sender should be set to the default Merlin ID
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when db2 sqlcode error has occurred.
Trigger Criteria:
Context: A DB2 SQLCODE error has occurred
Applied to: Format Error Subject Line with SQLCODE
Action: The system formats the error notification
Logic Flow:
IF A DB2 SQLCODE error has occurred
AND The system formats the error notification
THEN:
• The subject line should contain 'GCX003 DB2 SQLCODE:' followed by the specific SQLCODE value and the message text should contain the same error information
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when error notification email is being prepared.
Trigger Criteria:
Context: An error notification email is being prepared
Applied to: Set Email Destination to Support Inbox
Action: The system configures the email delivery settings
Logic Flow:
IF An error notification email is being prepared
AND The system configures the email delivery settings
THEN:
• The email destination should be set to the support inbox and email parameters should be initialized for sending
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when error notification email has been sent to the support team.
Trigger Criteria:
Context: An error notification email has been sent to the support team
Applied to: Email Send Successful?
Action: The system checks the email delivery status
Logic Flow:
IF An error notification email has been sent to the support team
AND The system checks the email delivery status
THEN:
• If the email delivery fails, the system should trigger an abend condition, otherwise it should purge the email transaction and continue processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when database error notification email has failed to send.
Trigger Criteria:
Context: A database error notification email has failed to send
Applied to: System Abend - Email Send Failed
Action: The email delivery validation detects the failure
Logic Flow:
IF A database error notification email has failed to send
AND The email delivery validation detects the failure
THEN:
• The system should set an error message indicating 'SEND TO FILE OF OM01247 FAILED' and perform an abend to halt processing
R-GCX003-cbl-00976 (+8)File: GCX003.cblBusiness Rule: Train List Database Operations
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train list database operation is requested with operation type get and train identifier is provided.
Trigger Criteria:
Context: A train list database operation is requested with operation type GET and train identifier is provided
Applied to: Get Train List Record
Action: The system performs database retrieval operation using train identifier as key
Logic Flow:
IF A train list database operation is requested with operation type GET and train identifier is provided
AND The system performs database retrieval operation using train identifier as key
THEN:
• The system should retrieve the existing train record if found or return not found status
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train record exists in database and is marked as deleted with confirmation status.
Trigger Criteria:
Context: A train record exists in database and is marked as deleted with confirmation status
Applied to: Delete Train List Record
Action: The system performs delete operation on the train record
Logic Flow:
IF A train record exists in database and is marked as deleted with confirmation status
AND The system performs delete operation on the train record
THEN:
• The system should remove the train record from the database permanently
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train request has been validated successfully with no errors and train list data is prepared with equipment details.
Trigger Criteria:
Context: Train request has been validated successfully with no errors and train list data is prepared with equipment details
Applied to: Insert Train List Record
Action: The system performs insert operation for new train record
Logic Flow:
IF Train request has been validated successfully with no errors and train list data is prepared with equipment details
AND The system performs insert operation for new train record
THEN:
• The system should create new train record with all equipment details in the database
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train request contains scac code, train id, train origin, consist number and current system date.
Trigger Criteria:
Context: Train request contains SCAC code, train ID, train origin, consist number and current system date
Applied to: Build Train List Key
Action: The system builds train list key for database operations
Logic Flow:
IF Train request contains SCAC code, train ID, train origin, consist number and current system date
AND The system builds train list key for database operations
THEN:
• The system should create unique train identifier by concatenating SCAC code, train ID, origin, consist number and Julian creation date
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when specific database operation type is determined (get, delete, or insert).
Trigger Criteria:
Context: A specific database operation type is determined (GET, DELETE, or INSERT)
Applied to: Set Database Parameters
Action: The system sets database operation parameters
Logic Flow:
IF A specific database operation type is determined (GET, DELETE, or INSERT)
AND The system sets database operation parameters
THEN:
• The system should configure operation type flags, PCB reference, and data structure parameters appropriate for the requested operation
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when database operation parameters are properly configured and train list data structure is prepared. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Database operation parameters are properly configured and train list data structure is prepared
Applied to: Call Database Interface GCCUTRIO
Action: The system calls database interface GCCUTRIO
Logic Flow:
IF Database operation parameters are properly configured and train list data structure is prepared
AND The system calls database interface GCCUTRIO
THEN:
• The system should execute the database operation and return operation status
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when database operation has been executed through gccutrio interface.
Trigger Criteria:
Context: Database operation has been executed through GCCUTRIO interface
Applied to: Operation Successful?
Action: The system checks operation success status
Logic Flow:
IF Database operation has been executed through GCCUTRIO interface
AND The system checks operation success status
THEN:
• The system should validate return code is successful and no invalid parameters, equipment limits, or other error conditions exist
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when database operation failed with invalid parameters, equipment limit exceeded, or other error conditions.
Trigger Criteria:
Context: Database operation failed with invalid parameters, equipment limit exceeded, or other error conditions
Applied to: Handle Database Error
Action: The system handles database error
Logic Flow:
IF Database operation failed with invalid parameters, equipment limit exceeded, or other error conditions
AND The system handles database error
THEN:
• The system should create detailed error message including operation type and train identifier, then terminate processing with abend
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when database operation has completed either successfully or with handled errors.
Trigger Criteria:
Context: Database operation has completed either successfully or with handled errors
Applied to: Log Operation Result
Action: The system logs operation result
Logic Flow:
IF Database operation has completed either successfully or with handled errors
AND The system logs operation result
THEN:
• The system should record operation outcome and continue with next processing step
R-GCX003-cbl-00985 (+16)File: GCX003.cblBusiness Rule: Cargo Record Database Operations
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record database operation is requested.
Trigger Criteria:
Context: A cargo record database operation is requested
Applied to: Initialize Database Parameters
Action: The system begins the database operation process
Logic Flow:
IF A cargo record database operation is requested
AND The system begins the database operation process
THEN:
• Database parameters are initialized and accept status is set to allow database operations
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when database parameters are initialized.
Trigger Criteria:
Context: Database parameters are initialized
Applied to: Set Cargo Segment Type
Action: The system prepares for cargo record access
Logic Flow:
IF Database parameters are initialized
AND The system prepares for cargo record access
THEN:
• The cargo segment type is set to target cargo records in the database
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo segment type is set.
Trigger Criteria:
Context: The cargo segment type is set
Applied to: Set Database Function Code
Action: The system determines the type of database operation needed
Logic Flow:
IF The cargo segment type is set
AND The system determines the type of database operation needed
THEN:
• The appropriate function code is set for get first (GU), get next (GN), or replace (REPL) operations
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when operation type is determined to be get first record.
Trigger Criteria:
Context: The operation type is determined to be get first record
Applied to: Set GU Function - Get First Record
Action: The system needs to retrieve the initial cargo record for an equipment
Logic Flow:
IF The operation type is determined to be get first record
AND The system needs to retrieve the initial cargo record for an equipment
THEN:
• The database function is set to GU (Get Unique) to fetch the first matching cargo record
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when operation type is determined to be get next record.
Trigger Criteria:
Context: The operation type is determined to be get next record
Applied to: Set GN Function - Get Next Record
Action: The system needs to retrieve additional cargo records for the same equipment
Logic Flow:
IF The operation type is determined to be get next record
AND The system needs to retrieve additional cargo records for the same equipment
THEN:
• The database function is set to GN (Get Next) to fetch the next sequential cargo record
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when operation type is determined to be replace record.
Trigger Criteria:
Context: The operation type is determined to be replace record
Applied to: Set REPL Function - Replace Record
Action: The system needs to update cargo record information
Logic Flow:
IF The operation type is determined to be replace record
AND The system needs to update cargo record information
THEN:
• The database function is set to REPL (Replace) to modify the existing cargo record
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when database function code is set.
Trigger Criteria:
Context: The database function code is set
Applied to: Set Index Type to Car-Waybill
Action: The system prepares to access cargo records
Logic Flow:
IF The database function code is set
AND The system prepares to access cargo records
THEN:
• The index type is set to car-waybill to enable efficient cargo record retrieval by equipment and waybill combination
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when index type is set to car-waybill.
Trigger Criteria:
Context: The index type is set to car-waybill
Applied to: Set Operator to Greater Than
Action: The system needs to perform sequential cargo record searches
Logic Flow:
IF The index type is set to car-waybill
AND The system needs to perform sequential cargo record searches
THEN:
• The search operator is set to greater than (>) to enable sequential record retrieval
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when all database operation parameters are configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All database operation parameters are configured
Applied to: Call Database I/O Module GCCUSIO
Action: The system is ready to perform the cargo record database operation
Logic Flow:
IF All database operation parameters are configured
AND The system is ready to perform the cargo record database operation
THEN:
• The GCCUSIO database I/O module is called to execute the configured operation
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when database i/o module has been called. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The database I/O module has been called
Applied to: Database Call Successful?
Action: The system receives the operation result
Logic Flow:
IF The database I/O module has been called
AND The system receives the operation result
THEN:
• The system validates that no database errors occurred and the operation completed successfully
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is successfully retrieved from the database.
Trigger Criteria:
Context: A cargo record is successfully retrieved from the database
Applied to: Check Equipment ID Match
Action: The system needs to verify the cargo belongs to the correct equipment
Logic Flow:
IF A cargo record is successfully retrieved from the database
AND The system needs to verify the cargo belongs to the correct equipment
THEN:
• The equipment ID from the cargo record is compared with the expected equipment ID to ensure they match
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment id match is verified.
Trigger Criteria:
Context: The equipment ID match is verified
Applied to: Check Waybill Root Date Match
Action: The system needs to verify the cargo belongs to the correct waybill
Logic Flow:
IF The equipment ID match is verified
AND The system needs to verify the cargo belongs to the correct waybill
THEN:
• The waybill root date from the cargo record is compared with the expected waybill root date to ensure they match
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when both equipment id and waybill root date comparisons are completed.
Trigger Criteria:
Context: Both equipment ID and waybill root date comparisons are completed
Applied to: Equipment and Waybill Match?
Action: The system needs to determine if the cargo record is valid
Logic Flow:
IF Both equipment ID and waybill root date comparisons are completed
AND The system needs to determine if the cargo record is valid
THEN:
• If both equipment ID and waybill root date match, the cargo record is considered valid for processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when both equipment id and waybill root date match the retrieved cargo record.
Trigger Criteria:
Context: Both equipment ID and waybill root date match the retrieved cargo record
Applied to: Set Cargo Found Status
Action: The system confirms the cargo record is valid
Logic Flow:
IF Both equipment ID and waybill root date match the retrieved cargo record
AND The system confirms the cargo record is valid
THEN:
• The cargo status is set to found to indicate successful cargo record retrieval
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when either equipment id or waybill root date does not match the retrieved cargo record.
Trigger Criteria:
Context: Either equipment ID or waybill root date does not match the retrieved cargo record
Applied to: Set Cargo Not Found Status
Action: The system determines the cargo record is not valid for the current equipment and waybill
Logic Flow:
IF Either equipment ID or waybill root date does not match the retrieved cargo record
AND The system determines the cargo record is not valid for the current equipment and waybill
THEN:
• The cargo status is set to not found to indicate no valid cargo record exists
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when database operation fails or returns an error.
Trigger Criteria:
Context: The database operation fails or returns an error
Applied to: Handle Database Error
Action: The system detects a database operation failure
Logic Flow:
IF The database operation fails or returns an error
AND The system detects a database operation failure
THEN:
• Error handling procedures are executed and appropriate error status is set for the cargo operation
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record processing is completed (found, not found, or error).
Trigger Criteria:
Context: The cargo record processing is completed (found, not found, or error)
Applied to: Update Cargo Status Code
Action: The system needs to record the final status of the cargo operation
Logic Flow:
IF The cargo record processing is completed (found, not found, or error)
AND The system needs to record the final status of the cargo operation
THEN:
• The cargo status code is updated to reflect the outcome of the database operation
Business Justification: Establishes the required business protocol to be followed when container waybill retrieval process is initiated.
Trigger Criteria:
Context: A container waybill retrieval process is initiated
Applied to: Container Found in Inquiry System?
Action: The system checks if container is found in inquiry system
Logic Flow:
IF A container waybill retrieval process is initiated
AND The system checks if container is found in inquiry system
THEN:
• If container inquiry is found, retrieve from inquiry container database, otherwise check primary system
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when container is not found in inquiry system.
Trigger Criteria:
Context: Container is not found in inquiry system
Applied to: Container Found in Primary System?
Action: The system checks if container exists in primary system
Logic Flow:
IF Container is not found in inquiry system
AND The system checks if container exists in primary system
THEN:
• If container is found in primary system, retrieve from primary container database, otherwise search freight waybill inquiry system
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when container is not found in primary container system.
Trigger Criteria:
Context: Container is not found in primary container system
Applied to: Search Freight Waybill Inquiry System
Action: The system searches freight waybill inquiry system using container inquiry root information
Logic Flow:
IF Container is not found in primary container system
AND The system searches freight waybill inquiry system using container inquiry root information
THEN:
• Retrieve waybill root information from FWIQROOT database
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when search has been performed in freight waybill inquiry system.
Trigger Criteria:
Context: A search has been performed in freight waybill inquiry system
Applied to: Waybill Found in Inquiry?
Action: The system checks the search results
Logic Flow:
IF A search has been performed in freight waybill inquiry system
AND The system checks the search results
THEN:
• If waybill is found, proceed to get waybill root information, otherwise set container not found status
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill root information has been retrieved successfully.
Trigger Criteria:
Context: Waybill root information has been retrieved successfully
Applied to: Extract Container Cross-Reference Data
Action: The system processes FWIQBOTL segments to extract container cross-reference data
Logic Flow:
IF Waybill root information has been retrieved successfully
AND The system processes FWIQBOTL segments to extract container cross-reference data
THEN:
• Identify and extract container IDs, waybill railroad, station, and number information from T/C XREF entries
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container cross-reference data has been extracted from fwiqbotl.
Trigger Criteria:
Context: Container cross-reference data has been extracted from FWIQBOTL
Applied to: Container Cross-Reference Found?
Action: The system validates the extracted cross-reference information
Logic Flow:
IF Container cross-reference data has been extracted from FWIQBOTL
AND The system validates the extracted cross-reference information
THEN:
• If valid container cross-reference is found, get multiple container IDs, otherwise proceed to map inquiry data to standard format
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when valid container cross-reference data is found.
Trigger Criteria:
Context: Valid container cross-reference data is found
Applied to: Get Multiple Container IDs from Cross-Reference
Action: The system processes the cross-reference to extract multiple container IDs
Logic Flow:
IF Valid container cross-reference data is found
AND The system processes the cross-reference to extract multiple container IDs
THEN:
• Store up to 30 container IDs with their associated waybill information for sequential processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill information has been retrieved from inquiry system.
Trigger Criteria:
Context: Waybill information has been retrieved from inquiry system
Applied to: Map Inquiry Data to Standard Format
Action: The system maps inquiry data to standard SHIPROOT format
Logic Flow:
IF Waybill information has been retrieved from inquiry system
AND The system maps inquiry data to standard SHIPROOT format
THEN:
• Convert railroad number, waybill number, car ID, load/empty indicator, container indicator, and waybill date to standard format
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill data has been mapped to standard format.
Trigger Criteria:
Context: Waybill data has been mapped to standard format
Applied to: Get Routing Information from Inquiry
Action: The system retrieves routing information from FWIQINFO with segment type B1
Logic Flow:
IF Waybill data has been mapped to standard format
AND The system retrieves routing information from FWIQINFO with segment type B1
THEN:
• Extract and parse routing fields including SCAC codes and junction information, then format into routing groups
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when container and waybill information has been successfully retrieved and processed.
Trigger Criteria:
Context: Container and waybill information has been successfully retrieved and processed
Applied to: Set Container Found Status
Action: The system completes the retrieval process
Logic Flow:
IF Container and waybill information has been successfully retrieved and processed
AND The system completes the retrieval process
THEN:
• Set container found status to true and container inquiry found status based on the source system used
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when container information cannot be found in any available system.
Trigger Criteria:
Context: Container information cannot be found in any available system
Applied to: Set Container Not Found Status
Action: All retrieval attempts have been exhausted
Logic Flow:
IF Container information cannot be found in any available system
AND All retrieval attempts have been exhausted
THEN:
• Set container not found status and container inquiry not found status to indicate unsuccessful retrieval
R-GCX003-cbl-01013 (+10)File: GCX003.cblBusiness Rule: Car Waybill Database Retrieval
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when car waybill retrieval request is initiated. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A car waybill retrieval request is initiated
Applied to: First Call or Different Car ID?
Action: The system checks if this is the first call to the waybill retrieval function OR the current car ID is different from the previously processed car ID
Logic Flow:
IF A car waybill retrieval request is initiated
AND The system checks if this is the first call to the waybill retrieval function OR the current car ID is different from the previously processed car ID
THEN:
• If either condition is true, proceed with full waybill retrieval process, otherwise use cached information and exit
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when new car waybill retrieval is required.
Trigger Criteria:
Context: A new car waybill retrieval is required
Applied to: Initialize Car Waybill Parameters
Action: The system initializes waybill retrieval parameters
Logic Flow:
IF A new car waybill retrieval is required
AND The system initializes waybill retrieval parameters
THEN:
• Set car type to all except 98-99, status to all status types, exclude EDI incomplete records, include temporary waybills, exclude corrector waybills, return lead waybill, and use latest waybill date
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill retrieval parameters are initialized with car id. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Waybill retrieval parameters are initialized with car ID
Applied to: Call Primary Waybill System FWCARGET
Action: The system calls the primary waybill system FWCARGET
Logic Flow:
IF Waybill retrieval parameters are initialized with car ID
AND The system calls the primary waybill system FWCARGET
THEN:
• Retrieve waybill data from the primary database and return the lookup status
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill record is found in the primary system.
Trigger Criteria:
Context: A waybill record is found in the primary system
Applied to: Has Haulage Right Carrier?
Action: The system checks if the haulage right carrier field contains data
Logic Flow:
IF A waybill record is found in the primary system
AND The system checks if the haulage right carrier field contains data
THEN:
• If haulage right carrier is blank or spaces, accept the waybill as found, otherwise perform additional EDI completion checks
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill has a haulage right carrier assigned.
Trigger Criteria:
Context: A waybill has a haulage right carrier assigned
Applied to: EDI Complete Release Available?
Action: The system checks the EDI completion release status
Logic Flow:
IF A waybill has a haulage right carrier assigned
AND The system checks the EDI completion release status
THEN:
• If EDI completion release equals 'Y', accept the waybill as found, otherwise continue with duplicate key checking
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill key is returned from the primary system and edi release is not complete.
Trigger Criteria:
Context: A waybill key is returned from the primary system and EDI release is not complete
Applied to: Same Waybill Key as Previous?
Action: The system compares the current waybill key feedback with the previously stored waybill key feedback
Logic Flow:
IF A waybill key is returned from the primary system and EDI release is not complete
AND The system compares the current waybill key feedback with the previously stored waybill key feedback
THEN:
• If the keys are identical, mark waybill as not found and exit, otherwise update the stored key and continue with previous status search
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when current waybill does not have edi completion and is not a duplicate key.
Trigger Criteria:
Context: Current waybill does not have EDI completion and is not a duplicate key
Applied to: Set Previous Status Date Flag
Action: The system sets the search criteria to previous status waybill date
Logic Flow:
IF Current waybill does not have EDI completion and is not a duplicate key
AND The system sets the search criteria to previous status waybill date
THEN:
• Update the waybill key feedback tracker and repeat the primary waybill system search with previous status criteria
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when primary waybill system did not find a valid waybill record. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Primary waybill system did not find a valid waybill record
Applied to: Call Inquiry System FWCIIO
Action: The system calls the container inquiry system FWCIIO using the car ID
Logic Flow:
IF Primary waybill system did not find a valid waybill record
AND The system calls the container inquiry system FWCIIO using the car ID
THEN:
• Retrieve container and waybill reference information from the inquiry database
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when container inquiry system returned valid reference data including railroad number, station number, and waybill number. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Container inquiry system returned valid reference data including railroad number, station number, and waybill number
Applied to: Call Waybill Inquiry FWIQIO
Action: The system calls waybill inquiry system FWIQIO with the reference data
Logic Flow:
IF Container inquiry system returned valid reference data including railroad number, station number, and waybill number
AND The system calls waybill inquiry system FWIQIO with the reference data
THEN:
• Retrieve detailed waybill information from the inquiry database
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill inquiry system returned valid waybill data.
Trigger Criteria:
Context: Waybill inquiry system returned valid waybill data
Applied to: Extract Routing Information
Action: The system processes the routing information from the inquiry waybill
Logic Flow:
IF Waybill inquiry system returned valid waybill data
AND The system processes the routing information from the inquiry waybill
THEN:
• Extract routing details and populate routing information fields in the waybill structure
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when valid waybill data is retrieved from inquiry system.
Trigger Criteria:
Context: Valid waybill data is retrieved from inquiry system
Applied to: Map Inquiry Data to Waybill Format
Action: The system maps inquiry fields to standard waybill structure
Logic Flow:
IF Valid waybill data is retrieved from inquiry system
AND The system maps inquiry fields to standard waybill structure
THEN:
• Map railroad number, waybill number, car ID, convert billing code 'ZE' to empty status 'E' otherwise to loaded status 'L', map TOFC/COFC indicator, waybill date, and station number to corresponding waybill fields
R-GCX003-cbl-01024 (+12)File: GCX003.cblBusiness Rule: Equipment Routing Information Processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill inquiry record exists for equipment.
Trigger Criteria:
Context: A waybill inquiry record exists for equipment
Applied to: Access FWIQINFO Segment with B1 Key
Action: System accesses FWIQINFO segment with B1 key
Logic Flow:
IF A waybill inquiry record exists for equipment
AND System accesses FWIQINFO segment with B1 key
THEN:
• Routing information fields are retrieved from the waybill inquiry database
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when routing information has been retrieved from waybill inquiry.
Trigger Criteria:
Context: Routing information has been retrieved from waybill inquiry
Applied to: Routing Info Fields Available?
Action: System checks if routing info fields are spaces or low-values
Logic Flow:
IF Routing information has been retrieved from waybill inquiry
AND System checks if routing info fields are spaces or low-values
THEN:
• Processing continues only if valid routing data is present, otherwise routing processing is skipped
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when valid routing information fields are available.
Trigger Criteria:
Context: Valid routing information fields are available
Applied to: Initialize Field Processing Variables
Action: System begins routing field processing
Logic Flow:
IF Valid routing information fields are available
AND System begins routing field processing
THEN:
• Field processing variables are set to initial values with byte position 1, field number 1, and routing group cleared
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when system is processing routing information bytes.
Trigger Criteria:
Context: System is processing routing information bytes
Applied to: Calculate Field Length
Action: System encounters non-space characters in routing fields
Logic Flow:
IF System is processing routing information bytes
AND System encounters non-space characters in routing fields
THEN:
• Field length counter is incremented until space character is found or maximum field length is reached
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when field length has been calculated for a routing field.
Trigger Criteria:
Context: Field length has been calculated for a routing field
Applied to: Field Length Valid?
Action: System checks if field length is less than 1
Logic Flow:
IF Field length has been calculated for a routing field
AND System checks if field length is less than 1
THEN:
• Field processing terminates if length is invalid, otherwise field extraction continues
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when field number is 1 and field length is valid.
Trigger Criteria:
Context: Field number is 1 and field length is valid
Applied to: Extract SCAC1 Code
Action: System processes the first routing field
Logic Flow:
IF Field number is 1 and field length is valid
AND System processes the first routing field
THEN:
• First carrier SCAC code is extracted and stored, and field number is incremented to 2
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when field number is 2 and field length is valid.
Trigger Criteria:
Context: Field number is 2 and field length is valid
Applied to: Extract Junction1/R260 Code
Action: System processes the second routing field
Logic Flow:
IF Field number is 2 and field length is valid
AND System processes the second routing field
THEN:
• First junction/R260 code is extracted and stored, and field number is incremented to 3
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when field number is 3 and field length is valid.
Trigger Criteria:
Context: Field number is 3 and field length is valid
Applied to: Extract SCAC2 Code
Action: System processes the third routing field
Logic Flow:
IF Field number is 3 and field length is valid
AND System processes the third routing field
THEN:
• Second carrier SCAC code is extracted and stored, and field number is incremented to 4
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when field number is 4 and field length is valid.
Trigger Criteria:
Context: Field number is 4 and field length is valid
Applied to: Extract Junction2/R260 Code
Action: System processes the fourth routing field
Logic Flow:
IF Field number is 4 and field length is valid
AND System processes the fourth routing field
THEN:
• Second junction/R260 code is extracted and stored, and field number is incremented to 5
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when field number is 5 and field length is valid.
Trigger Criteria:
Context: Field number is 5 and field length is valid
Applied to: Extract SCAC3 Code
Action: System processes the fifth routing field
Logic Flow:
IF Field number is 5 and field length is valid
AND System processes the fifth routing field
THEN:
• Third carrier SCAC code is extracted and stored, and field number is incremented to 6
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when field number is 6 and field length is valid.
Trigger Criteria:
Context: Field number is 6 and field length is valid
Applied to: Extract Junction3/R260 Code
Action: System processes the sixth routing field
Logic Flow:
IF Field number is 6 and field length is valid
AND System processes the sixth routing field
THEN:
• Third junction/R260 code is extracted and stored, and field number is incremented to 7
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when field number is 7 and field length is valid.
Trigger Criteria:
Context: Field number is 7 and field length is valid
Applied to: Extract SCAC4 Code
Action: System processes the seventh routing field
Logic Flow:
IF Field number is 7 and field length is valid
AND System processes the seventh routing field
THEN:
• Fourth carrier SCAC code is extracted and stored, and field processing terminates
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when routing information fields have been successfully extracted and processed.
Trigger Criteria:
Context: Routing information fields have been successfully extracted and processed
Applied to: Move Routing Group to Shiproot
Action: System completes routing field processing
Logic Flow:
IF Routing information fields have been successfully extracted and processed
AND System completes routing field processing
THEN:
• Complete routing information group is moved to the equipment shiproot record for further processing
R-GCX003-cbl-01037 (+14)File: GCX003.cblBusiness Rule: Container on Flat Car Database Retrieval
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when container retrieval process is initiated.
Trigger Criteria:
Context: A container retrieval process is initiated
Applied to: Container Already Found?
Action: The system checks the container found status
Logic Flow:
IF A container retrieval process is initiated
AND The system checks the container found status
THEN:
• If container is already found, skip to next container processing, otherwise proceed with container database retrieval
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container is not already found and waybill root key is available.
Trigger Criteria:
Context: Container is not already found and waybill root key is available
Applied to: Access FWSWRWR Database with Waybill Root Key
Action: System performs database lookup in FWSWRWR using the waybill root key
Logic Flow:
IF Container is not already found and waybill root key is available
AND System performs database lookup in FWSWRWR using the waybill root key
THEN:
• Container database record is retrieved if it exists
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when fwswrwr database lookup has been performed.
Trigger Criteria:
Context: FWSWRWR database lookup has been performed
Applied to: Container Found in FWSWRWR?
Action: System evaluates the database response status
Logic Flow:
IF FWSWRWR database lookup has been performed
AND System evaluates the database response status
THEN:
• If container found, proceed to retrieve equipment details, otherwise access FWIQ inquiry database
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container record exists in fwswrwr database.
Trigger Criteria:
Context: Container record exists in FWSWRWR database
Applied to: Retrieve Next Container Equipment Record
Action: System accesses FWSWREQ database for equipment details
Logic Flow:
IF Container record exists in FWSWRWR database
AND System accesses FWSWREQ database for equipment details
THEN:
• Container equipment record is retrieved with detailed information
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when fwswreq database lookup has been performed.
Trigger Criteria:
Context: FWSWREQ database lookup has been performed
Applied to: Container Equipment Record Found?
Action: System evaluates the equipment record retrieval status
Logic Flow:
IF FWSWREQ database lookup has been performed
AND System evaluates the equipment record retrieval status
THEN:
• If equipment record found, set container found status, otherwise generate container not found error
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container not found in fwswrwr database.
Trigger Criteria:
Context: Container not found in FWSWRWR database
Applied to: Access FWIQ Inquiry Database
Action: System performs lookup in FWIQ inquiry database using waybill information
Logic Flow:
IF Container not found in FWSWRWR database
AND System performs lookup in FWIQ inquiry database using waybill information
THEN:
• Inquiry database records are accessed for container search
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when fwiq inquiry database lookup has been performed.
Trigger Criteria:
Context: FWIQ inquiry database lookup has been performed
Applied to: Container Found in FWIQ?
Action: System evaluates the inquiry database response
Logic Flow:
IF FWIQ inquiry database lookup has been performed
AND System evaluates the inquiry database response
THEN:
• If container found, proceed to scan bottom line records, otherwise generate container not found error
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when container exists in fwiq inquiry database.
Trigger Criteria:
Context: Container exists in FWIQ inquiry database
Applied to: Scan FWIQ Bottom Line Records
Action: System scans FWIQBOTL bottom line records
Logic Flow:
IF Container exists in FWIQ inquiry database
AND System scans FWIQBOTL bottom line records
THEN:
• Each bottom line record is examined for container cross-reference data
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when bottom line records are being scanned.
Trigger Criteria:
Context: Bottom line records are being scanned
Applied to: T/C XREF Record Found?
Action: System examines each record for 'T/C XREF' identifier in positions 1-8
Logic Flow:
IF Bottom line records are being scanned
AND System examines each record for 'T/C XREF' identifier in positions 1-8
THEN:
• If T/C XREF record found, extract container information, otherwise continue scanning records
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when t/c xref record is identified in bottom line data.
Trigger Criteria:
Context: T/C XREF record is identified in bottom line data
Applied to: Extract Container ID and Waybill Information
Action: System processes the record data
Logic Flow:
IF T/C XREF record is identified in bottom line data
AND System processes the record data
THEN:
• Container ID is extracted from positions 28-39, waybill railroad from positions 10-12, station from positions 14-19, and number from positions 21-26
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when container information has been successfully extracted or retrieved.
Trigger Criteria:
Context: Container information has been successfully extracted or retrieved
Applied to: Set Container Found Status
Action: System updates container processing status
Logic Flow:
IF Container information has been successfully extracted or retrieved
AND System updates container processing status
THEN:
• Container found flag is set to true and container ID is stored for processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container lookup has failed in all available databases.
Trigger Criteria:
Context: Container lookup has failed in all available databases
Applied to: Generate Container Not Found Error
Action: System determines container cannot be found
Logic Flow:
IF Container lookup has failed in all available databases
AND System determines container cannot be found
THEN:
• Error message 11 is generated indicating container not found
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when current container processing is complete (found or error generated).
Trigger Criteria:
Context: Current container processing is complete (found or error generated)
Applied to: Move to Next Container in Sequence
Action: System advances container processing sequence
Logic Flow:
IF Current container processing is complete (found or error generated)
AND System advances container processing sequence
THEN:
• Container sequence index is incremented to process next container
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when container sequence has been advanced.
Trigger Criteria:
Context: Container sequence has been advanced
Applied to: More Containers to Process?
Action: System checks for remaining containers in the sequence
Logic Flow:
IF Container sequence has been advanced
AND System checks for remaining containers in the sequence
THEN:
• If more containers exist and sequence index is within limits (≤30), continue processing, otherwise set no more containers flag
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when no more containers remain in the processing sequence.
Trigger Criteria:
Context: No more containers remain in the processing sequence
Applied to: Set No More Containers Flag
Action: System completes container sequence processing
Logic Flow:
IF No more containers remain in the processing sequence
AND System completes container sequence processing
THEN:
• No more containers flag is set to terminate container retrieval process
R-GCX003-cbl-01052 (+15)File: GCX003.cblBusiness Rule: Waybill Inquiry System Integration
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment information is not found in the primary waybill system.
Trigger Criteria:
Context: Equipment information is not found in the primary waybill system
Applied to: Initialize Inquiry System Parameters
Action: The system needs to query the inquiry database for missing equipment details
Logic Flow:
IF Equipment information is not found in the primary waybill system
AND The system needs to query the inquiry database for missing equipment details
THEN:
• Initialize inquiry system parameters and clear all status codes and segment data
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when container root data contains origin road number, station number, and waybill number.
Trigger Criteria:
Context: Container root data contains origin road number, station number, and waybill number
Applied to: Set Waybill Number from Container Root
Action: Building the inquiry system key for waybill lookup
Logic Flow:
IF Container root data contains origin road number, station number, and waybill number
AND Building the inquiry system key for waybill lookup
THEN:
• Set inquiry road number from container origin road number, inquiry station number from container origin station number, and inquiry waybill number from container waybill number
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when inquiry system parameters are properly initialized with waybill key information. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Inquiry system parameters are properly initialized with waybill key information
Applied to: Call Waybill Inquiry System - FWIQIO
Action: Executing waybill inquiry system call with FWIQIO module
Logic Flow:
IF Inquiry system parameters are properly initialized with waybill key information
AND Executing waybill inquiry system call with FWIQIO module
THEN:
• Call FWIQIO module using inquiry parameters and waybill root segment to retrieve equipment data
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill inquiry system call has been executed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Waybill inquiry system call has been executed
Applied to: Inquiry System Response?
Action: Checking the response status from the inquiry system
Logic Flow:
IF Waybill inquiry system call has been executed
AND Checking the response status from the inquiry system
THEN:
• If status code is blank then inquiry was successful, otherwise inquiry failed and equipment information is not available
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill inquiry system returned valid equipment data.
Trigger Criteria:
Context: Waybill inquiry system returned valid equipment data
Applied to: Map Inquiry Data to Standard Format
Action: Converting inquiry data to standard equipment format
Logic Flow:
IF Waybill inquiry system returned valid equipment data
AND Converting inquiry data to standard equipment format
THEN:
• Map inquiry origin road number to standard origin road number, inquiry waybill number to standard waybill number, inquiry car ID to standard car ID, and determine load/empty status where 'ZE' billing code means empty otherwise loaded
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when inquiry system returned equipment data with billing code.
Trigger Criteria:
Context: Inquiry system returned equipment data with billing code
Applied to: Extract Car ID and Load Status
Action: Determining equipment load status
Logic Flow:
IF Inquiry system returned equipment data with billing code
AND Determining equipment load status
THEN:
• If billing code equals 'ZE' then set equipment status to empty, otherwise set equipment status to loaded
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when inquiry system returned valid waybill information.
Trigger Criteria:
Context: Inquiry system returned valid waybill information
Applied to: Extract Waybill Date Information
Action: Extracting temporal and location data
Logic Flow:
IF Inquiry system returned valid waybill information
AND Extracting temporal and location data
THEN:
• Set waybill date from inquiry waybill date and set origin station number from inquiry origin station number
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when basic waybill information has been successfully retrieved. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Basic waybill information has been successfully retrieved
Applied to: Retrieve Additional Routing Information
Action: Requesting detailed routing information from inquiry system
Logic Flow:
IF Basic waybill information has been successfully retrieved
AND Requesting detailed routing information from inquiry system
THEN:
• Set inquiry segment type to 'FWIQINFO', set inquiry key to 'B1', and call inquiry system to retrieve routing details
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when routing information string contains space-separated routing fields.
Trigger Criteria:
Context: Routing information string contains space-separated routing fields
Applied to: Parse Routing Fields into Structured Format
Action: Parsing routing information into individual components
Logic Flow:
IF Routing information string contains space-separated routing fields
AND Parsing routing information into individual components
THEN:
• If routing information is not blank then iterate through each space-separated field and extract field length by counting characters until space or end of string
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when routing fields have been parsed into individual components.
Trigger Criteria:
Context: Routing fields have been parsed into individual components
Applied to: Extract SCAC Codes and Junction Points
Action: Extracting routing components in sequence
Logic Flow:
IF Routing fields have been parsed into individual components
AND Extracting routing components in sequence
THEN:
• Set field 1 as primary SCAC code, field 2 as first junction R260 code, field 3 as secondary SCAC code, field 4 as second junction R260 code, field 5 as tertiary SCAC code, and field 6 as final junction code
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill inquiry system is available for container cross-reference lookup. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Waybill inquiry system is available for container cross-reference lookup
Applied to: Read Container Cross-Reference
Action: Querying for container cross-reference information
Logic Flow:
IF Waybill inquiry system is available for container cross-reference lookup
AND Querying for container cross-reference information
THEN:
• Set inquiry segment type to 'FWIQBOTL', clear inquiry key, set function to 'GNP', and call inquiry system repeatedly until no more container cross-reference records found or maximum 30 records reached
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when inquiry system returned bottom line data.
Trigger Criteria:
Context: Inquiry system returned bottom line data
Applied to: Container Cross-Reference Found?
Action: Checking for container cross-reference information
Logic Flow:
IF Inquiry system returned bottom line data
AND Checking for container cross-reference information
THEN:
• If inquiry bottom line starts with 'T/C XREF' then container cross-reference record is found, otherwise continue searching
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container cross-reference record is identified in inquiry bottom line.
Trigger Criteria:
Context: Container cross-reference record is identified in inquiry bottom line
Applied to: Extract Container ID
Action: Extracting container and waybill cross-reference data
Logic Flow:
IF Container cross-reference record is identified in inquiry bottom line
AND Extracting container and waybill cross-reference data
THEN:
• Extract container ID from positions 28-39, waybill road number from positions 10-12, waybill station number from positions 14-19, waybill number from positions 21-26, and replace all spaces in waybill information with zeros
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when all inquiry system calls have been completed and data has been extracted.
Trigger Criteria:
Context: All inquiry system calls have been completed and data has been extracted
Applied to: Build Complete Equipment Record
Action: Building the final equipment record
Logic Flow:
IF All inquiry system calls have been completed and data has been extracted
AND Building the final equipment record
THEN:
• Combine waybill information, equipment details, routing data, and container cross-references into a complete equipment record with all fields properly populated
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill inquiry system call returned an error status. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Waybill inquiry system call returned an error status
Applied to: Log Inquiry System Error
Action: Handling inquiry system errors
Logic Flow:
IF Waybill inquiry system call returned an error status
AND Handling inquiry system errors
THEN:
• Set waybill indicator to the error status code and set equipment not found status
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when inquiry system failed to retrieve equipment information or returned errors.
Trigger Criteria:
Context: Inquiry system failed to retrieve equipment information or returned errors
Applied to: Set Equipment Not Found Status
Action: Setting final equipment status
Logic Flow:
IF Inquiry system failed to retrieve equipment information or returned errors
AND Setting final equipment status
THEN:
• Set container not found status and container inquiry not found status to indicate equipment information is unavailable
R-GCX003-cbl-01068 (+16)File: GCX003.cblBusiness Rule: Equipment Information Consolidation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment item needs to be processed.
Trigger Criteria:
Context: An equipment item needs to be processed
Applied to: Equipment Type Check
Action: The system checks if container information exists in the equipment record
Logic Flow:
IF An equipment item needs to be processed
AND The system checks if container information exists in the equipment record
THEN:
• Route to container processing if container found, otherwise route to car processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment is identified as a container type.
Trigger Criteria:
Context: Equipment is identified as a container type
Applied to: Retrieve Container Information from FWSWRWR
Action: System searches FWSWRWR database using waybill root key
Logic Flow:
IF Equipment is identified as a container type
AND System searches FWSWRWR database using waybill root key
THEN:
• Retrieve container segment information and set container status indicator
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment is identified as a car type.
Trigger Criteria:
Context: Equipment is identified as a car type
Applied to: Retrieve Car Information from SHIPROOT
Action: System searches SHIPROOT using car identification details
Logic Flow:
IF Equipment is identified as a car type
AND System searches SHIPROOT using car identification details
THEN:
• Retrieve waybill information and set waybill status indicator
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when system has attempted to retrieve waybill information from primary sources.
Trigger Criteria:
Context: System has attempted to retrieve waybill information from primary sources
Applied to: Primary Waybill Found?
Action: System evaluates the waybill retrieval status
Logic Flow:
IF System has attempted to retrieve waybill information from primary sources
AND System evaluates the waybill retrieval status
THEN:
• Proceed to consolidation if found, otherwise attempt inquiry system retrieval
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when primary waybill data was not found.
Trigger Criteria:
Context: Primary waybill data was not found
Applied to: Retrieve from Inquiry System FWCIROOT
Action: System searches FWCIROOT inquiry system using equipment ID
Logic Flow:
IF Primary waybill data was not found
AND System searches FWCIROOT inquiry system using equipment ID
THEN:
• Retrieve inquiry data and set inquiry status indicator
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when system has searched the inquiry system for equipment data.
Trigger Criteria:
Context: System has searched the inquiry system for equipment data
Applied to: Inquiry Data Found?
Action: System evaluates the inquiry retrieval status
Logic Flow:
IF System has searched the inquiry system for equipment data
AND System evaluates the inquiry retrieval status
THEN:
• Process inquiry data if found, otherwise attempt waybill inquiry database
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when both primary and inquiry systems did not return equipment data.
Trigger Criteria:
Context: Both primary and inquiry systems did not return equipment data
Applied to: Retrieve from FWIQROOT Database
Action: System searches FWIQROOT database using waybill details
Logic Flow:
IF Both primary and inquiry systems did not return equipment data
AND System searches FWIQROOT database using waybill details
THEN:
• Retrieve waybill inquiry data and set final retrieval status
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment data has been retrieved from inquiry systems.
Trigger Criteria:
Context: Equipment data has been retrieved from inquiry systems
Applied to: Move Inquiry Data to Shiproot Format
Action: System processes the inquiry data format
Logic Flow:
IF Equipment data has been retrieved from inquiry systems
AND System processes the inquiry data format
THEN:
• Convert and map inquiry fields to shiproot structure including load/empty status, dates, and identifiers
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment data has been successfully retrieved and converted.
Trigger Criteria:
Context: Equipment data has been successfully retrieved and converted
Applied to: Extract Routing Information from FWIQINFO
Action: System accesses FWIQINFO database for routing details
Logic Flow:
IF Equipment data has been successfully retrieved and converted
AND System accesses FWIQINFO database for routing details
THEN:
• Extract routing information and prepare for field parsing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when raw routing information has been extracted from the database.
Trigger Criteria:
Context: Raw routing information has been extracted from the database
Applied to: Parse Routing Fields into Structured Format
Action: System processes the routing information string
Logic Flow:
IF Raw routing information has been extracted from the database
AND System processes the routing information string
THEN:
• Parse into structured fields including SCAC codes, junction points, and route segments up to 4 routing entries
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment data has been retrieved from one or more data sources.
Trigger Criteria:
Context: Equipment data has been retrieved from one or more data sources
Applied to: Consolidate Equipment Details
Action: System consolidates all available equipment information
Logic Flow:
IF Equipment data has been retrieved from one or more data sources
AND System consolidates all available equipment information
THEN:
• Create unified equipment record with all available details from primary and inquiry sources
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when consolidated equipment record contains equipment type code.
Trigger Criteria:
Context: Consolidated equipment record contains equipment type code
Applied to: Validate Equipment Type and Description
Action: System validates the equipment type against reference tables
Logic Flow:
IF Consolidated equipment record contains equipment type code
AND System validates the equipment type against reference tables
THEN:
• Retrieve equipment type description and validate type code exists in system tables
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment record has been consolidated with cargo information.
Trigger Criteria:
Context: Equipment record has been consolidated with cargo information
Applied to: Set Load/Empty Status
Action: System evaluates cargo presence and equipment characteristics
Logic Flow:
IF Equipment record has been consolidated with cargo information
AND System evaluates cargo presence and equipment characteristics
THEN:
• Set load/empty indicator based on cargo data, with special handling for conveying cars and international service units
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment has been validated and status determined.
Trigger Criteria:
Context: Equipment has been validated and status determined
Applied to: Apply Business Rules for Equipment Classification
Action: System applies classification business rules
Logic Flow:
IF Equipment has been validated and status determined
AND System applies classification business rules
THEN:
• Apply double-stack container counting for SK car types, validate routing information, and set empty indicators based on routing patterns
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when all equipment information has been consolidated and business rules applied.
Trigger Criteria:
Context: All equipment information has been consolidated and business rules applied
Applied to: Create Unified Equipment Record
Action: System creates the final equipment record
Logic Flow:
IF All equipment information has been consolidated and business rules applied
AND System creates the final equipment record
THEN:
• Generate unified record with equipment ID, type, status, routing, and all relevant business attributes
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when container equipment requires cross-reference validation.
Action: System processes FWIQBOTL cross-reference data
Logic Flow:
IF Container equipment requires cross-reference validation
AND System processes FWIQBOTL cross-reference data
THEN:
• Extract container IDs and associated waybill information from cross-reference records
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment may have multiple container associations.
Trigger Criteria:
Context: Equipment may have multiple container associations
Applied to: Process Multiple Container Sources
Action: System processes all container source references
Logic Flow:
IF Equipment may have multiple container associations
AND System processes all container source references
THEN:
• Handle up to 30 container cross-references and manage container sequence processing
R-GCX003-cbl-01085 (+14)File: GCX003.cblBusiness Rule: Equipment Routing Information Extraction
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill inquiry record exists in the system.
Trigger Criteria:
Context: A waybill inquiry record exists in the system
Applied to: Access FWIQINFO Segment with Key 'B1'
Action: The system needs to access routing information using segment key 'B1'
Logic Flow:
IF A waybill inquiry record exists in the system
AND The system needs to access routing information using segment key 'B1'
THEN:
• The FWIQINFO segment is retrieved with routing information fields populated
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when fwiqinfo segment has been accessed.
Trigger Criteria:
Context: FWIQINFO segment has been accessed
Applied to: Routing Info Fields Available?
Action: The routing information fields are checked for data availability
Logic Flow:
IF FWIQINFO segment has been accessed
AND The routing information fields are checked for data availability
THEN:
• Processing continues only if routing fields are not spaces or low-values, otherwise routing extraction is skipped
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when valid routing information fields are available.
Trigger Criteria:
Context: Valid routing information fields are available
Applied to: Initialize Field Parsing Variables
Action: Field parsing begins
Logic Flow:
IF Valid routing information fields are available
AND Field parsing begins
THEN:
• Field length counter is set to 0, byte position counters are set to 1, and field number is set to 1
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when field parsing is in progress.
Trigger Criteria:
Context: Field parsing is in progress
Applied to: More Fields to Process?
Action: The system checks for more fields to process
Logic Flow:
IF Field parsing is in progress
AND The system checks for more fields to process
THEN:
• Processing continues if current byte position is 34 or less and current field is not spaces, otherwise field processing ends
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when routing field is being processed.
Trigger Criteria:
Context: A routing field is being processed
Applied to: Calculate Field Length by Finding Space Delimiter
Action: Field length calculation is performed
Logic Flow:
IF A routing field is being processed
AND Field length calculation is performed
THEN:
• The system scans from current position until a space is found or position exceeds 34, incrementing both byte position and field length counters
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when field length has been calculated.
Trigger Criteria:
Context: Field length has been calculated
Applied to: Field Length Valid?
Action: Field length validation is performed
Logic Flow:
IF Field length has been calculated
AND Field length validation is performed
THEN:
• Field processing continues only if length is 1 or greater, otherwise field processing terminates
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when valid routing field has been extracted.
Trigger Criteria:
Context: A valid routing field has been extracted
Applied to: Which Field Number?
Action: Field number evaluation is performed
Logic Flow:
IF A valid routing field has been extracted
AND Field number evaluation is performed
THEN:
• Field 1 maps to SCAC1, Field 2 to Junction1, Field 3 to SCAC2, Field 4 to Junction2, Field 5 to SCAC3, Field 6 to Junction3, and Field 7 to SCAC4
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when field number 1 is being processed with valid field length.
Trigger Criteria:
Context: Field number 1 is being processed with valid field length
Applied to: Extract SCAC Code 1
Action: SCAC Code 1 extraction is performed
Logic Flow:
IF Field number 1 is being processed with valid field length
AND SCAC Code 1 extraction is performed
THEN:
• The field value is moved to SCAC1 position in routing group and field number is incremented to 2
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when field number 2 is being processed with valid field length.
Trigger Criteria:
Context: Field number 2 is being processed with valid field length
Applied to: Extract Junction/R260 Code 1
Action: Junction Code 1 extraction is performed
Logic Flow:
IF Field number 2 is being processed with valid field length
AND Junction Code 1 extraction is performed
THEN:
• The field value is moved to Junction1 position in routing group and field number is incremented to 3
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when field number 3 is being processed with valid field length.
Trigger Criteria:
Context: Field number 3 is being processed with valid field length
Applied to: Extract SCAC Code 2
Action: SCAC Code 2 extraction is performed
Logic Flow:
IF Field number 3 is being processed with valid field length
AND SCAC Code 2 extraction is performed
THEN:
• The field value is moved to SCAC2 position in routing group and field number is incremented to 4
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when field number 4 is being processed with valid field length.
Trigger Criteria:
Context: Field number 4 is being processed with valid field length
Applied to: Extract Junction/R260 Code 2
Action: Junction Code 2 extraction is performed
Logic Flow:
IF Field number 4 is being processed with valid field length
AND Junction Code 2 extraction is performed
THEN:
• The field value is moved to Junction2 position in routing group and field number is incremented to 5
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when field number 5 is being processed with valid field length.
Trigger Criteria:
Context: Field number 5 is being processed with valid field length
Applied to: Extract SCAC Code 3
Action: SCAC Code 3 extraction is performed
Logic Flow:
IF Field number 5 is being processed with valid field length
AND SCAC Code 3 extraction is performed
THEN:
• The field value is moved to SCAC3 position in routing group and field number is incremented to 6
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when field number 6 is being processed with valid field length.
Trigger Criteria:
Context: Field number 6 is being processed with valid field length
Applied to: Extract Junction/R260 Code 3
Action: Junction Code 3 extraction is performed
Logic Flow:
IF Field number 6 is being processed with valid field length
AND Junction Code 3 extraction is performed
THEN:
• The field value is moved to Junction3 position in routing group and field number is incremented to 7
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when field number 7 is being processed with valid field length.
Trigger Criteria:
Context: Field number 7 is being processed with valid field length
Applied to: Extract SCAC Code 4
Action: SCAC Code 4 extraction is performed
Logic Flow:
IF Field number 7 is being processed with valid field length
AND SCAC Code 4 extraction is performed
THEN:
• The field value is moved to SCAC4 position in routing group and byte position is set to 35 to terminate processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when routing information has been successfully parsed into structured format.
Trigger Criteria:
Context: Routing information has been successfully parsed into structured format
Applied to: Store Structured Routing Group in SHIPROOT
Action: Routing information storage is performed
Logic Flow:
IF Routing information has been successfully parsed into structured format
AND Routing information storage is performed
THEN:
• The structured routing group containing SCAC codes and junction points is moved to the SHIPROOT routing information field
R-GCX003-cbl-01115 (+10)File: GCX003.cblBusiness Rule: Special Manifest Type Classification
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with bond type and special manifest flags.
Trigger Criteria:
Context: A cargo record exists with bond type and special manifest flags
Applied to: Bond Type = IT?
Action: The cargo bond type is IT and the special manifest original flag is set
Logic Flow:
IF A cargo record exists with bond type and special manifest flags
AND The cargo bond type is IT and the special manifest original flag is set
THEN:
• The system should set IT special manifest found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with bond type and special manifest flags.
Trigger Criteria:
Context: A cargo record exists with bond type and special manifest flags
Applied to: Bond Type = TE?
Action: The cargo bond type is TE and the special manifest special flag is set
Logic Flow:
IF A cargo record exists with bond type and special manifest flags
AND The cargo bond type is TE and the special manifest special flag is set
THEN:
• The system should set TE special manifest found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with bond type and special manifest flags.
Trigger Criteria:
Context: A cargo record exists with bond type and special manifest flags
Applied to: Bond Type = US-CAN-US?
Action: The cargo bond type is US-Canada-US and the special TR flag is set
Logic Flow:
IF A cargo record exists with bond type and special manifest flags
AND The cargo bond type is US-Canada-US and the special TR flag is set
THEN:
• The system should set TR special manifest found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with bond type and special manifest flags.
Trigger Criteria:
Context: A cargo record exists with bond type and special manifest flags
Applied to: Bond Type = Export?
Action: The cargo bond type is Export and the special 88 flag is set
Logic Flow:
IF A cargo record exists with bond type and special manifest flags
AND The cargo bond type is Export and the special 88 flag is set
THEN:
• The system should set US-MX 88 special manifest found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when request action is send and it cargo requires special manifest processing.
Trigger Criteria:
Context: A request action is SEND and IT cargo requires special manifest processing
Applied to: User Authorized for Special Manifests?
Action: The user is not authorized for special manifests
Logic Flow:
IF A request action is SEND and IT cargo requires special manifest processing
AND The user is not authorized for special manifests
THEN:
• The system should generate authorization error message 43 instead of creating the special manifest
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when it cargo requires special manifest processing and user is authorized.
Trigger Criteria:
Context: IT cargo requires special manifest processing and user is authorized
Applied to: Create IT Export Special Manifest
Action: The request action is SEND
Logic Flow:
IF IT cargo requires special manifest processing and user is authorized
AND The request action is SEND
THEN:
• The system should generate message 23, create report line, and set IT export spawn flag for GCX101 processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when te cargo has location mismatch and user is authorized for special manifests.
Trigger Criteria:
Context: TE cargo has location mismatch and user is authorized for special manifests
Applied to: Create TE Port Change Special Manifest
Action: The request action is SEND and cargo location does not match crossing port
Logic Flow:
IF TE cargo has location mismatch and user is authorized for special manifests
AND The request action is SEND and cargo location does not match crossing port
THEN:
• The system should generate message 20, create report line, and set port change spawn flag for GCX101 processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when tr cargo requires detour processing and user is authorized for special manifests.
Trigger Criteria:
Context: TR cargo requires detour processing and user is authorized for special manifests
Applied to: Create TR Detour Special Manifest
Action: The request action is SEND and cargo has release status
Logic Flow:
IF TR cargo requires detour processing and user is authorized for special manifests
AND The request action is SEND and cargo has release status
THEN:
• The system should generate message 23, create report line, and set detour spawn flag for GCX101 processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when us domestic cargo requires detour processing and user is authorized for special manifests.
Trigger Criteria:
Context: US domestic cargo requires detour processing and user is authorized for special manifests
Applied to: Create US-US Detour Special Manifest
Action: The request action is SEND and waybill found with no cargo for US origin and destination
Logic Flow:
IF US domestic cargo requires detour processing and user is authorized for special manifests
AND The request action is SEND and waybill found with no cargo for US origin and destination
THEN:
• The system should generate message 23, create report line, and set US-US detour spawn flag for GCX101 processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when export cargo for us-mexico route without existing special manifest and user is authorized.
Trigger Criteria:
Context: Export cargo for US-Mexico route without existing special manifest and user is authorized
Applied to: Create 88-TR Export Special Manifest
Action: The request action is SEND and cargo is export type with no special manifest flag
Logic Flow:
IF Export cargo for US-Mexico route without existing special manifest and user is authorized
AND The request action is SEND and cargo is export type with no special manifest flag
THEN:
• The system should generate message 23, create report line, and set 88-TR detour spawn flag for GCX101 processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when special manifest processing is required.
Trigger Criteria:
Context: Special manifest processing is required
Applied to: Generate Report-Only Message
Action: The request action is REPORT instead of SEND
Logic Flow:
IF Special manifest processing is required
AND The request action is REPORT instead of SEND
THEN:
• The system should generate appropriate report messages (18, 19, 24, 50) without creating special manifests
Business Justification: Governs the functional prerequisites and system routing when cargo attachment or manifest creation activity needs to be logged.
Trigger Criteria:
Context: A cargo attachment or manifest creation activity needs to be logged
Applied to: Check if US CCN exists for logging
Action: The system checks if the US CCN from the added cargo list is not blank or spaces
Logic Flow:
IF A cargo attachment or manifest creation activity needs to be logged
AND The system checks if the US CCN from the added cargo list is not blank or spaces
THEN:
• If US CCN exists, proceed with log message creation, otherwise skip logging process
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when valid us ccn exists for logging.
Trigger Criteria:
Context: A valid US CCN exists for logging
Applied to: Initialize Log Message Structure
Action: The system initializes the log message structure
Logic Flow:
IF A valid US CCN exists for logging
AND The system initializes the log message structure
THEN:
• The GCX105-INPUT structure is cleared and ready for data population
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when log message structure is initialized.
Trigger Criteria:
Context: The log message structure is initialized
Applied to: Set Security Byte to High Values
Action: The system configures security settings for the log message
Logic Flow:
IF The log message structure is initialized
AND The system configures security settings for the log message
THEN:
• The GCX105-SECURITY-BYTE is set to HIGH-VALUES
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when security byte is configured.
Trigger Criteria:
Context: The security byte is configured
Applied to: Set Record Type to US Cargo
Action: The system sets the record type for the log message
Logic Flow:
IF The security byte is configured
AND The system sets the record type for the log message
THEN:
• The GCX105-US-CARGO flag is set to TRUE to indicate US cargo logging
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when record type is set to us cargo.
Trigger Criteria:
Context: The record type is set to US cargo
Applied to: Set Action Code to ZZZ
Action: The system assigns an action code to the log message
Logic Flow:
IF The record type is set to US cargo
AND The system assigns an action code to the log message
THEN:
• The GCX105-ACTION-CODE is set to 'ZZZ'
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when action code is set to zzz.
Trigger Criteria:
Context: The action code is set to ZZZ
Applied to: Set Sending Transaction ID
Action: The system assigns a transaction identifier
Logic Flow:
IF The action code is set to ZZZ
AND The system assigns a transaction identifier
THEN:
• The GCX105-SENDING-TRANSACTION is set to 'GCT0031E'
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when transaction identifier is assigned.
Trigger Criteria:
Context: The transaction identifier is assigned
Applied to: Capture User ACF2 ID
Action: The system captures user identification information
Logic Flow:
IF The transaction identifier is assigned
AND The system captures user identification information
THEN:
• The GCX105-ACF2-ID is populated with CC-ACF2-USERID from CCCOM
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when user acf2 id is captured.
Trigger Criteria:
Context: The user ACF2 ID is captured
Applied to: Format Current Date from System
Action: The system formats the current date for logging
Logic Flow:
IF The user ACF2 ID is captured
AND The system formats the current date for logging
THEN:
• The GCX105-DATE is populated by concatenating CC-MACHINE-CENTURYandCC-MACHINE-DATE from CCCOM
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when current date is formatted.
Trigger Criteria:
Context: The current date is formatted
Applied to: Capture Current Time from System
Action: The system captures the current time
Logic Flow:
IF The current date is formatted
AND The system captures the current time
THEN:
• The GCX105-TIME is populated with CC-MACHINE-TIME from CCCOM
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when current time is captured.
Trigger Criteria:
Context: The current time is captured
Applied to: Set Train or US CCN Identifier
Action: The system assigns the train or CCN identifier
Logic Flow:
IF The current time is captured
AND The system assigns the train or CCN identifier
THEN:
• The GCX105-TRAIN-OR-US-CCN is populated with ADDED-US-CCN from the cargo counter
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train or ccn identifier is assigned.
Trigger Criteria:
Context: The train or CCN identifier is assigned
Applied to: Set Log Message Text
Action: The system sets the log message text
Logic Flow:
IF The train or CCN identifier is assigned
AND The system sets the log message text
THEN:
• The GCX105-MESSAGE is populated with CAR-ADDED-LOG-MESSAGE
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when log message text is assigned.
Trigger Criteria:
Context: The log message text is assigned
Applied to: Move Log Data to Message Structure
Action: The system prepares the final message structure
Logic Flow:
IF The log message text is assigned
AND The system prepares the final message structure
THEN:
• The GCX105-INPUT is moved to GCT1051E-MSG
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when log data is transferred to the message structure.
Trigger Criteria:
Context: The log data is transferred to the message structure
Applied to: Send Log Message to Alt PCB
Action: The system sends the log message
Logic Flow:
IF The log data is transferred to the message structure
AND The system sends the log message
THEN:
• CIMS is called with CHNG function using ALT-PCBand GCT1051E structure
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when log message is sent to alt pcb.
Trigger Criteria:
Context: The log message is sent to Alt PCB
Applied to: Write Log Message to System
Action: The system writes the log message
Logic Flow:
IF The log message is sent to Alt PCB
AND The system writes the log message
THEN:
• WRITMSGL is called with ALT-PCB, message code, message content, message length, and module name
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when log message is written to the system.
Trigger Criteria:
Context: The log message is written to the system
Applied to: Purge Message from Queue
Action: The system purges the message from queue
Logic Flow:
IF The log message is written to the system
AND The system purges the message from queue
THEN:
• CIMS is called with PURG function using ALT-PCB to clear the message
Business Justification: Ensures correct system behavior and process compliance when report contains equipment entries that need to be scanned for duplicates.
Trigger Criteria:
Context: A report contains equipment entries that need to be scanned for duplicates
Applied to: Start Duplicate Equipment Detection
Action: The duplicate detection process is initiated
Logic Flow:
IF A report contains equipment entries that need to be scanned for duplicates
AND The duplicate detection process is initiated
THEN:
• The scan counter is set to 1 and the scanning process begins for up to 700 report entries
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when duplicate detection process is running with a current scan counter value.
Trigger Criteria:
Context: The duplicate detection process is running with a current scan counter value
Applied to: Scan Counter ≤ 700?
Action: The system checks if more entries need to be processed
Logic Flow:
IF The duplicate detection process is running with a current scan counter value
AND The system checks if more entries need to be processed
THEN:
• Continue scanning if scan counter is 700 or less, otherwise end the process
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when valid scan counter position within the report range.
Trigger Criteria:
Context: A valid scan counter position within the report range
Applied to: Get Equipment Entry at Current Position
Action: The system needs to examine an equipment entry
Logic Flow:
IF A valid scan counter position within the report range
AND The system needs to examine an equipment entry
THEN:
• The equipment entry at the current scan position is retrieved for analysis
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment entry is being examined for duplicate detection.
Trigger Criteria:
Context: An equipment entry is being examined for duplicate detection
Applied to: Equipment ID is Blank or Error/Warning/Info Message?
Action: The equipment ID is blank or the entry contains error messages (ERR>), warning messages (WRN>), or info messages (INF>)
Logic Flow:
IF An equipment entry is being examined for duplicate detection
AND The equipment ID is blank or the entry contains error messages (ERR>), warning messages (WRN>), or info messages (INF>)
THEN:
• Skip this entry and move to the next scan position without duplicate processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when valid equipment entry with a non-blank equipment id.
Trigger Criteria:
Context: A valid equipment entry with a non-blank equipment ID
Applied to: Equipment ID Different from Previously Held ID?
Action: The current equipment ID is compared with the previously held equipment ID
Logic Flow:
IF A valid equipment entry with a non-blank equipment ID
AND The current equipment ID is compared with the previously held equipment ID
THEN:
• If the IDs are different, update the held ID; if the IDs are the same, mark as duplicate
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when current equipment id is different from the previously held equipment id.
Trigger Criteria:
Context: The current equipment ID is different from the previously held equipment ID
Applied to: Update Held Equipment ID with Current ID
Action: A new unique equipment ID is encountered
Logic Flow:
IF The current equipment ID is different from the previously held equipment ID
AND A new unique equipment ID is encountered
THEN:
• Update the held equipment ID with the current equipment ID for future duplicate comparisons
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when current equipment id matches the previously held equipment id.
Trigger Criteria:
Context: The current equipment ID matches the previously held equipment ID
Applied to: Mark Current Equipment Entry as Duplicate by Clearing ID
Action: A duplicate equipment entry is detected
Logic Flow:
IF The current equipment ID matches the previously held equipment ID
AND A duplicate equipment entry is detected
THEN:
• Clear the equipment ID field to mark the entry as a duplicate while keeping the entry in the report
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment entry has been processed for duplicate detection.
Trigger Criteria:
Context: An equipment entry has been processed for duplicate detection
Applied to: Increment Scan Counter
Action: The current entry processing is complete
Logic Flow:
IF An equipment entry has been processed for duplicate detection
AND The current entry processing is complete
THEN:
• Increment the scan counter by 1 to move to the next equipment entry position
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when all equipment entries up to position 700 have been scanned for duplicates.
Trigger Criteria:
Context: All equipment entries up to position 700 have been scanned for duplicates
Applied to: End Duplicate Detection Process
Action: The scan counter exceeds 700 or all entries have been processed
Logic Flow:
IF All equipment entries up to position 700 have been scanned for duplicates
AND The scan counter exceeds 700 or all entries have been processed
THEN:
• Complete the duplicate detection process and return control to the calling procedure
R-GCX003-cbl-01150 (+14)File: GCX003.cblBusiness Rule: Station Code Table Lookup
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when station code lookup request is initiated.
Trigger Criteria:
Context: A station code lookup request is initiated
Applied to: Initialize GCSTBRT Key Structure
Action: The system prepares to search the station reference table
Logic Flow:
IF A station code lookup request is initiated
AND The system prepares to search the station reference table
THEN:
• The GCSTBRT key structure is cleared and initialized to spaces
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when station code validation is required.
Trigger Criteria:
Context: A station code validation is required
Applied to: Set Table Type to SC - Station Code
Action: The system determines the lookup table type
Logic Flow:
IF A station code validation is required
AND The system determines the lookup table type
THEN:
• The table type is set to SC for station code lookup
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train origin station code exists in the request.
Trigger Criteria:
Context: A train origin station code exists in the request
Applied to: Move Station Code to Search Key
Action: The system prepares to validate the station code
Logic Flow:
IF A train origin station code exists in the request
AND The system prepares to validate the station code
THEN:
• The train origin code is moved to the station search key field
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when station search key is populated with a station code. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The station search key is populated with a station code
Applied to: Call GCCTBIO to Retrieve Station Data
Action: The system executes the table lookup operation
Logic Flow:
IF The station search key is populated with a station code
AND The system executes the table lookup operation
THEN:
• The GCCTBIO module is called to retrieve matching station data
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when station code table lookup has been executed.
Trigger Criteria:
Context: A station code table lookup has been executed
Applied to: Station Record Found?
Action: The system checks the lookup results
Logic Flow:
IF A station code table lookup has been executed
AND The system checks the lookup results
THEN:
• The system determines if a matching station record was successfully found
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when valid station record has been found in the table lookup.
Trigger Criteria:
Context: A valid station record has been found in the table lookup
Applied to: Move Station Segment Data to Working Storage
Action: The system processes the retrieved station data
Logic Flow:
IF A valid station record has been found in the table lookup
AND The system processes the retrieved station data
THEN:
• The station segment data is moved to the working storage area
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when station segment data is available in working storage.
Trigger Criteria:
Context: Station segment data is available in working storage
Applied to: Extract US Station Code
Action: The system extracts station identification information
Logic Flow:
IF Station segment data is available in working storage
AND The system extracts station identification information
THEN:
• The US station code is extracted from the station record
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when station segment data contains station details.
Trigger Criteria:
Context: Station segment data contains station details
Applied to: Extract Station Name
Action: The system processes station information
Logic Flow:
IF Station segment data contains station details
AND The system processes station information
THEN:
• The station name is extracted from the station record
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when station record contains time zone data.
Trigger Criteria:
Context: Station record contains time zone data
Applied to: Extract Time Zone Information
Action: The system processes station geographic information
Logic Flow:
IF Station record contains time zone data
AND The system processes station geographic information
THEN:
• The time zone information is extracted for ETA calculations
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when station record contains customs-related codes.
Trigger Criteria:
Context: Station record contains customs-related codes
Applied to: Extract FIRMS Code
Action: The system processes customs information
Logic Flow:
IF Station record contains customs-related codes
AND The system processes customs information
THEN:
• The FIRMS code is extracted from the station record
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when us station code has been extracted from the station record.
Trigger Criteria:
Context: A US station code has been extracted from the station record
Applied to: US Station Code Valid?
Action: The system validates the station code content
Logic Flow:
IF A US station code has been extracted from the station record
AND The system validates the station code content
THEN:
• The US station code must not be spaces or empty to be considered valid
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when valid us station code exists in the station record.
Trigger Criteria:
Context: A valid US station code exists in the station record
Applied to: Set Station Validation Success
Action: The system completes station validation
Logic Flow:
IF A valid US station code exists in the station record
AND The system completes station validation
THEN:
• The station validation status is set to successful
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when station code lookup has been performed.
Trigger Criteria:
Context: A station code lookup has been performed
Applied to: Set Station Not Found Error
Action: No matching station record is found in the reference table
Logic Flow:
IF A station code lookup has been performed
AND No matching station record is found in the reference table
THEN:
• A station not found error is set with message code 2
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when station record has been found but the us station code is spaces or empty.
Trigger Criteria:
Context: A station record has been found but the US station code is spaces or empty
Applied to: Set Invalid US Station Code Error
Action: The system validates the US station code content
Logic Flow:
IF A station record has been found but the US station code is spaces or empty
AND The system validates the US station code content
THEN:
• An invalid US station code error is set with message code 2
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when station validation processing has completed.
Trigger Criteria:
Context: Station validation processing has completed
Applied to: Return Station Information
Action: The system finalizes the station lookup operation
Logic Flow:
IF Station validation processing has completed
AND The system finalizes the station lookup operation
THEN:
• The station information and validation status are returned to the calling process
Business Justification: Establishes the required business protocol to be followed when train request contains equipment items to be processed.
Trigger Criteria:
Context: A train request contains equipment items to be processed
Applied to: More Equipment to Process? REQ-IDX ≤ 499
Action: The system processes equipment items in sequence
Logic Flow:
IF A train request contains equipment items to be processed
AND The system processes equipment items in sequence
THEN:
• Processing stops when either all equipment is processed or the 499 item limit is reached
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when request contains equipment items at specific index positions.
Trigger Criteria:
Context: A request contains equipment items at specific index positions
Applied to: Get Equipment ID from Request
Action: The system processes an equipment item at current index
Logic Flow:
IF A request contains equipment items at specific index positions
AND The system processes an equipment item at current index
THEN:
• The equipment ID is extracted and prepared with size 12 for formatting validation
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment id has been extracted from the request.
Trigger Criteria:
Context: An equipment ID has been extracted from the request
Applied to: Equipment Format Valid?
Action: The equipment formatter GCCCARFM is called to validate the format
Logic Flow:
IF An equipment ID has been extracted from the request
AND The equipment formatter GCCCARFM is called to validate the format
THEN:
• If format is invalid, equipment error message 34 is generated and processing continues to next equipment
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment id has been extracted from the request.
Trigger Criteria:
Context: An equipment ID has been extracted from the request
Applied to: Equipment Format Valid?
Action: The system calls the equipment formatter GCCCARFM
Logic Flow:
IF An equipment ID has been extracted from the request
AND The system calls the equipment formatter GCCCARFM
THEN:
• The system must check ifGCCARFM-RC-SUCCESS is true to determine if the equipment format is valid
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment has been successfully formatted and validated.
Trigger Criteria:
Context: Equipment has been successfully formatted and validated
Applied to: Container Found?
Action: The system checks the equipment type in the waybill database
Logic Flow:
IF Equipment has been successfully formatted and validated
AND The system checks the equipment type in the waybill database
THEN:
• If equipment is identified as a container, container-specific waybill retrieval is performed, otherwise car waybill retrieval is used
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment is identified as a container type.
Trigger Criteria:
Context: Equipment is identified as a container type
Applied to: Retrieve Container Waybill
Action: The system searches for waybill information
Logic Flow:
IF Equipment is identified as a container type
AND The system searches for waybill information
THEN:
• Container waybill data is retrieved from SHIPROOT using container ID as the key
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment is identified as a railcar (not container).
Trigger Criteria:
Context: Equipment is identified as a railcar (not container)
Applied to: Retrieve Car Waybill with Fallback
Action: The system searches for waybill information
Logic Flow:
IF Equipment is identified as a railcar (not container)
AND The system searches for waybill information
THEN:
• Primary waybill lookup is attempted, andif not found, inquiry system (FWCIROOT) is searched as fallback
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill has been located for equipment.
Trigger Criteria:
Context: A waybill has been located for equipment
Applied to: Waybill Found?
Action: The equipment is marked as empty (E) and the waybill shows loaded status (L)
Logic Flow:
IF A waybill has been located for equipment
AND The equipment is marked as empty (E) and the waybill shows loaded status (L)
THEN:
• The waybill is treated as not found to prevent incorrect cargo association
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when valid waybill has been found for the equipment.
Trigger Criteria:
Context: A valid waybill has been found for the equipment
Applied to: Retrieve First Cargo Record
Action: The system searches for associated cargo records
Logic Flow:
IF A valid waybill has been found for the equipment
AND The system searches for associated cargo records
THEN:
• The first cargo record is retrieved using waybill root key, waybill date, and equipment ID as search criteria
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when system has searched for cargo records associated with the waybill.
Trigger Criteria:
Context: The system has searched for cargo records associated with the waybill
Applied to: Cargo Found?
Action: Cargo retrieval operation completes
Logic Flow:
IF The system has searched for cargo records associated with the waybill
AND Cargo retrieval operation completes
THEN:
• If no cargo is found, the no-cargo-found flag is set and error message processing is triggered
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has been found for the equipment.
Trigger Criteria:
Context: A cargo record has been found for the equipment
Applied to: Retrieve Segment 07 Data
Action: The system retrieves detailed segment information
Logic Flow:
IF A cargo record has been found for the equipment
AND The system retrieves detailed segment information
THEN:
• SEG07 (commodity description), SEG02 (reference numbers), and SEG08 (hazmat) data are retrieved and availability flags are set
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment and cargo data have been processed.
Trigger Criteria:
Context: Equipment and cargo data have been processed
Applied to: Build Equipment Report Line
Action: The system builds report output
Logic Flow:
IF Equipment and cargo data have been processed
AND The system builds report output
THEN:
• Detailed report lines are created with equipment details, cargo information, and appropriate formatting for manifest display
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when request action is send and cargo has been processed without errors.
Trigger Criteria:
Context: The request action is SEND and cargo has been processed without errors
Applied to: Attach Cargo to Train SEND Action Only
Action: The system evaluates cargo for train attachment
Logic Flow:
IF The request action is SEND and cargo has been processed without errors
AND The system evaluates cargo for train attachment
THEN:
• Cargo is attached unless it is immediate transport, already created for IT, US-Canada-US with release status, default with release status, empty equipment, or special manifest cargo
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record has been processed for the current equipment.
Trigger Criteria:
Context: A cargo record has been processed for the current equipment
Applied to: Retrieve Next Cargo Record
Action: The system searches for additional cargo records
Logic Flow:
IF A cargo record has been processed for the current equipment
AND The system searches for additional cargo records
THEN:
• The next cargo record with matching waybill and equipment criteria is retrieved for processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo processing is in progress for current equipment.
Trigger Criteria:
Context: Cargo processing is in progress for current equipment
Applied to: More Cargo Records?
Action: The system checks for additional cargo records
Logic Flow:
IF Cargo processing is in progress for current equipment
AND The system checks for additional cargo records
THEN:
• If more cargo records exist with matching waybill and equipment ID, processing continues, otherwise cargo processing completes
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment processing has completed for waybill and cargo retrieval.
Trigger Criteria:
Context: Equipment processing has completed for waybill and cargo retrieval
Applied to: Generate Error Messages
Action: The system evaluates processing results against business rules
Logic Flow:
IF Equipment processing has completed for waybill and cargo retrieval
AND The system evaluates processing results against business rules
THEN:
• Appropriate error messages are generated for conditions like missing waybills, cargo status issues, bond type mismatches, or regulatory violations
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment processing indicates container on flat car scenario or waybill shows conveying car with loaded status.
Trigger Criteria:
Context: Equipment processing indicates container on flat car scenario or waybill shows conveying car with loaded status
Applied to: Retrieve Container on Flat Car
Action: The system searches for container information
Logic Flow:
IF Equipment processing indicates container on flat car scenario or waybill shows conveying car with loaded status
AND The system searches for container information
THEN:
• Container data is retrieved from FWSWRWR database or inquiry system, andif not found, error message 11 is generated
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container retrieval processing has been attempted.
Trigger Criteria:
Context: Container retrieval processing has been attempted
Applied to: Container on Flat Car?
Action: The system checks container processing results
Logic Flow:
IF Container retrieval processing has been attempted
AND The system checks container processing results
THEN:
• If containers are found, processing continues with next container, otherwise container processing completes for current equipment
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when current equipment processing has completed (successful or with errors).
Trigger Criteria:
Context: Current equipment processing has completed (successful or with errors)
Applied to: Increment Equipment Index
Action: The system prepares for next equipment item
Logic Flow:
IF Current equipment processing has completed (successful or with errors)
AND The system prepares for next equipment item
THEN:
• Equipment index is incremented and new report index is advanced for next equipment processing cycle
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train request is being processed with multiple equipment items.
Trigger Criteria:
Context: A train request is being processed with multiple equipment items
Applied to: Equipment Index <= 499?
Action: The system processes equipment items in sequence
Logic Flow:
IF A train request is being processed with multiple equipment items
AND The system processes equipment items in sequence
THEN:
• The system must stop processing when the equipment index exceeds 499 items
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when system is processing equipment items in a loop.
Trigger Criteria:
Context: The system is processing equipment items in a loop
Applied to: More Equipment to Process?
Action: The system checks for the next equipment item to process
Logic Flow:
IF The system is processing equipment items in a loop
AND The system checks for the next equipment item to process
THEN:
• The system must verify that REQ-NO-MORE-EQP flag is not set for the current equipment index
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment item needs to be processed.
Trigger Criteria:
Context: An equipment item needs to be processed
Applied to: Get Equipment ID from Request
Action: The system extracts equipment information from the request
Logic Flow:
IF An equipment item needs to be processed
AND The system extracts equipment information from the request
THEN:
• The system must move the equipment ID from REQ-EQP-ID array to GCCARFM-INPUTand set the size to 12 characters
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment item has passed format validation. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An equipment item has passed format validation
Applied to: Process Equipment with B000-PROCESS-EQUIPMENT
Action: The system processes the equipment
Logic Flow:
IF An equipment item has passed format validation
AND The system processes the equipment
THEN:
• The system must perform B000-PROCESS-EQUIPMENT with TEST AFTER until WS-NO-MORE-CONTAINER is true
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment processing is in progress. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Equipment processing is in progress
Applied to: More Containers on Equipment?
Action: The system checks for additional containers on the equipment
Logic Flow:
IF Equipment processing is in progress
AND The system checks for additional containers on the equipment
THEN:
• The system must continue processing while WS-NO-MORE-CONTAINER is false
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment item fails format validation.
Trigger Criteria:
Context: An equipment item fails format validation
Applied to: Add Equipment Error Message
Action: The system handles the format error
Logic Flow:
IF An equipment item fails format validation
AND The system handles the format error
THEN:
• The system must move REQ-EQP-ID to RPT-CAR-IDandREQ-LE-IND to RPT-LE-IND at the current report index
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment format validation has failed and error details have been recorded.
Trigger Criteria:
Context: Equipment format validation has failed and error details have been recorded
Applied to: Set Equipment Error Flag MSG-THIRTY-FOUR
Action: The system sets error flags
Logic Flow:
IF Equipment format validation has failed and error details have been recorded
AND The system sets error flags
THEN:
• The system must set MSG-THIRTY-FOUR flag to true at the current report index and increment the report index
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when processing of the current equipment item is complete.
Trigger Criteria:
Context: Processing of the current equipment item is complete
Applied to: Increment Equipment Index
Action: The system prepares to process the next equipment item
Logic Flow:
IF Processing of the current equipment item is complete
AND The system prepares to process the next equipment item
THEN:
• The system must increment the equipment index REQ-IDX by 1 to move to the next equipment item
Business Justification: Dictates the expected operational logic and validation steps when user with acf2 user id attempts to access train processing functionality.
Trigger Criteria:
Context: A user with ACF2 user ID attempts to access train processing functionality
Applied to: SCAC Access Valid?
Action: The system validates SCAC access permission for Canadian Pacific (CST-CP-SCAC) through GCCSCAC security module
Logic Flow:
IF A user with ACF2 user ID attempts to access train processing functionality
AND The system validates SCAC access permission for Canadian Pacific (CST-CP-SCAC) through GCCSCAC security module
THEN:
• If SCAC access is invalid AND it is not an AEI train send request, then set access denied message and deny user access
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when user has invalid scac access permission.
Trigger Criteria:
Context: A user has invalid SCAC access permission
Applied to: AEI Train Send Request?
Action: The request type equals AEI request type (AEI-TRAIN-SEND-YES is true)
Logic Flow:
IF A user has invalid SCAC access permission
AND The request type equals AEI request type (AEI-TRAIN-SEND-YES is true)
THEN:
• Allow the user to continue processing despite invalid SCAC access
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when user has valid scac access or aei exception applies.
Trigger Criteria:
Context: A user has valid SCAC access or AEI exception applies
Applied to: User Profile Found?
Action: The system searches for user security profile in GCSTBRT table using ACF2 user ID
Logic Flow:
IF A user has valid SCAC access or AEI exception applies
AND The system searches for user security profile in GCSTBRT table using ACF2 user ID
THEN:
• If profile is found, load user security settings; otherwise set default security settings to spaces
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when user requests to perform a send action (req-action-send is true).
Trigger Criteria:
Context: A user requests to perform a send action (REQ-ACTION-SEND is true)
Applied to: User Has Send Permission?
Action: The system checks user's UTF-ADD permission in security profile
Logic Flow:
IF A user requests to perform a send action (REQ-ACTION-SEND is true)
AND The system checks user's UTF-ADD permission in security profile
THEN:
• If user does not have 'U' or 'S' authorization AND it is not an AEI train send request, then set send permission denied message and deny access
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when user has valid send permissions and no errors have occurred.
Trigger Criteria:
Context: A user has valid send permissions and no errors have occurred
Applied to: User Authorized for Special Manifests?
Action: The system checks user's UTF-SPEC-MANI permission for special manifest authorization
Logic Flow:
IF A user has valid send permissions and no errors have occurred
AND The system checks user's UTF-SPEC-MANI permission for special manifest authorization
THEN:
• If user does not have 'S' authorization AND it is not an AEI train send request, then set user not authorized for special manifest flag
Business Justification: Establishes the required business protocol to be followed when user attempts to access train send functionality.
Trigger Criteria:
Context: A user attempts to access train send functionality
Applied to: SCAC Access Valid?
Action: The system validates SCAC access permissions AND the request is not an AEI request type AND SCAC access is invalid
Logic Flow:
IF A user attempts to access train send functionality
AND The system validates SCAC access permissions AND the request is not an AEI request type AND SCAC access is invalid
THEN:
• Set user access denied flag and generate access denied message
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when valid user id exists in the system.
Trigger Criteria:
Context: A valid user ID exists in the system
Applied to: User Profile Found?
Action: The system attempts to retrieve user profile from GCSTBRT security table
Logic Flow:
IF A valid user ID exists in the system
AND The system attempts to retrieve user profile from GCSTBRT security table
THEN:
• Load user profile segment if found, otherwise initialize with default empty profile settings
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when user requests to send train information and the request action is send.
Trigger Criteria:
Context: A user requests to send train information AND the request action is SEND
Applied to: User Has Send Authority 'U' or 'S'?
Action: The system checks user's UTF-ADD field for send authority
Logic Flow:
IF A user requests to send train information AND the request action is SEND
AND The system checks user's UTF-ADD field for send authority
THEN:
• Allow operation if user has 'U' or 'S' authority OR if request is AEI type, otherwise deny access and generate unauthorized message
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when user has valid send authority and the request is not an aei type.
Trigger Criteria:
Context: A user has valid send authority AND the request is not an AEI type
Applied to: User Has Special Manifest Authority 'S'?
Action: The system checks user's UTF-SPEC-MANI field for special manifest authority
Logic Flow:
IF A user has valid send authority AND the request is not an AEI type
AND The system checks user's UTF-SPEC-MANI field for special manifest authority
THEN:
• Set special manifest authorization flag based on whether user has 'S' authority
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when request has invalid scac access permissions.
Trigger Criteria:
Context: A request has invalid SCAC access permissions
Applied to: AEI Request Override
Action: The request type is identified as AEI request type
Logic Flow:
IF A request has invalid SCAC access permissions
AND The request type is identified as AEI request type
THEN:
• Allow the request to proceed despite invalid SCAC access
R-GCX003-cbl-01193 (+13)File: GCX003.cblBusiness Rule: Train ID Component Assembly
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train manifest is being processed.
Trigger Criteria:
Context: A train manifest is being processed
Applied to: Get SCAC Code from Constants
Action: The system needs to create a unique customs train identifier
Logic Flow:
IF A train manifest is being processed
AND The system needs to create a unique customs train identifier
THEN:
• The SCAC code 'CPRS' (Canadian Pacific Railway) is assigned as the carrier identifier component
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train manifest is being processed.
Trigger Criteria:
Context: A train manifest is being processed
Applied to: Get Current Machine Date
Action: The system needs to create a time-stamped unique identifier
Logic Flow:
IF A train manifest is being processed
AND The system needs to create a time-stamped unique identifier
THEN:
• The current machine date is captured from the system for inclusion in the train ID
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train manifest request is received.
Trigger Criteria:
Context: A train manifest request is received
Applied to: Get Train ID from Request
Action: The system processes the request for customs train ID creation
Logic Flow:
IF A train manifest request is received
AND The system processes the request for customs train ID creation
THEN:
• The train ID from the request is extracted and used as a component in the unique identifier
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train manifest request contains origin station information.
Trigger Criteria:
Context: A train manifest request contains origin station information
Applied to: Get Train Origin from Request
Action: The system builds the unique customs train identifier
Logic Flow:
IF A train manifest request contains origin station information
AND The system builds the unique customs train identifier
THEN:
• The train origin station code is extracted from the request and included as a component
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train manifest request includes a consist number.
Trigger Criteria:
Context: A train manifest request includes a consist number
Applied to: Get Consist Number from Request
Action: The system creates the customs train identifier
Logic Flow:
IF A train manifest request includes a consist number
AND The system creates the customs train identifier
THEN:
• The consist number is extracted from the request and used as an identifier component
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when current machine date has been captured.
Trigger Criteria:
Context: The current machine date has been captured
Applied to: Convert Date to Julian Format
Action: The date needs to be formatted for the customs train identifier
Logic Flow:
IF The current machine date has been captured
AND The date needs to be formatted for the customs train identifier
THEN:
• The date is converted to Julian format (5-digit format) for consistent date representation
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when scac code, train id, origin, consist number, and julian date are available.
Trigger Criteria:
Context: SCAC code, train ID, origin, consist number, and Julian date are available
Applied to: Combine Components into US Customs Train ID
Action: The system creates the final customs identifier
Logic Flow:
IF SCAC code, train ID, origin, consist number, and Julian date are available
AND The system creates the final customs identifier
THEN:
• All components are combined with export indicator 'T' to form the complete US customs train ID
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train identifier is being formatted for customs.
Trigger Criteria:
Context: A train identifier is being formatted for customs
Applied to: SCAC + Train ID + Origin + Consist + Julian Date + Export Indicator
Action: The final identifier format is applied
Logic Flow:
IF A train identifier is being formatted for customs
AND The final identifier format is applied
THEN:
• The export indicator 'T' is appended to signify this is an export train manifest
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when us customs train id has been successfully assembled.
Trigger Criteria:
Context: The US customs train ID has been successfully assembled
Applied to: Store Assembled Train ID
Action: The identifier needs to be persisted for processing
Logic Flow:
IF The US customs train ID has been successfully assembled
AND The identifier needs to be persisted for processing
THEN:
• The assembled train ID is stored in the train header structure for further use
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when unique customs train id has been assembled.
Trigger Criteria:
Context: A unique customs train ID has been assembled
Applied to: Check for Existing Train ID in Database
Action: The system needs to ensure uniqueness
Logic Flow:
IF A unique customs train ID has been assembled
AND The system needs to ensure uniqueness
THEN:
• The database is queried to check if the train ID already exists
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train id exists in the database and is marked as deleted.
Trigger Criteria:
Context: A train ID exists in the database and is marked as deleted
Applied to: Delete Existing Record if Marked for Deletion
Action: The same train ID is being created again
Logic Flow:
IF A train ID exists in the database and is marked as deleted
AND The same train ID is being created again
THEN:
• The existing deleted record is removed from the database to allow the new train creation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train id already exists in the database as an active record.
Trigger Criteria:
Context: A train ID already exists in the database as an active record
Applied to: Generate Error - Duplicate Train ID
Action: An attempt is made to create a new train with the same identifier
Logic Flow:
IF A train ID already exists in the database as an active record
AND An attempt is made to create a new train with the same identifier
THEN:
• An error message (MSG-SIX) is generated indicating the train ID already exists
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when unique train id has been validated and confirmed as available.
Trigger Criteria:
Context: A unique train ID has been validated and confirmed as available
Applied to: Initialize Train Header with New ID
Action: A new train record needs to be created
Logic Flow:
IF A unique train ID has been validated and confirmed as available
AND A new train record needs to be created
THEN:
• The train header structure is initialized with the new customs train identifier
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when new train header has been successfully initialized.
Trigger Criteria:
Context: A new train header has been successfully initialized
Applied to: Mark Train as Added to System
Action: The train creation process is completed
Logic Flow:
IF A new train header has been successfully initialized
AND The train creation process is completed
THEN:
• The train is marked as added to the system for status tracking purposes
R-GCX003-cbl-01207 (+9)File: GCX003.cblBusiness Rule: Existing Train Record Validation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train request with carrier scac code, train id, origin station, consist number, and current system date.
Trigger Criteria:
Context: A train request with carrier SCAC code, train ID, origin station, consist number, and current system date
Applied to: Build US Customs Train ID
Action: The system processes the train identification request
Logic Flow:
IF A train request with carrier SCAC code, train ID, origin station, consist number, and current system date
AND The system processes the train identification request
THEN:
• The system creates a US customs train ID by concatenating carrier SCAC, train ID, origin station, consist number, creation date in Julian format, and export indicator 'T'
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when current system date in yymmdd format and century indicator.
Trigger Criteria:
Context: Current system date in YYMMDD format and century indicator
Applied to: Generate Train Creation Date
Action: The system needs to create a train creation timestamp
Logic Flow:
IF Current system date in YYMMDD format and century indicator
AND The system needs to create a train creation timestamp
THEN:
• The system converts the date to 8-digit format, then to Julian date format, and extracts 5-digit Julian date for train ID construction
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when new train record being created for us customs processing.
Trigger Criteria:
Context: A new train record being created for US customs processing
Applied to: Set Export Indicator to 'T'
Action: The system initializes the train export indicator
Logic Flow:
IF A new train record being created for US customs processing
AND The system initializes the train export indicator
THEN:
• The system sets the export indicator to 'T' to designate this as an export train
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when constructed us customs train id.
Trigger Criteria:
Context: A constructed US customs train ID
Applied to: Search Database for Existing Train Record
Action: The system searches the GCSUTRT database for existing train records
Logic Flow:
IF A constructed US customs train ID
AND The system searches the GCSUTRT database for existing train records
THEN:
• The system performs a database lookup using the train ID as the search key and returns the record status
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when database search result for a specific train id.
Trigger Criteria:
Context: A database search result for a specific train ID
Applied to: Train Record Found?
Action: The system evaluates the search outcome
Logic Flow:
IF A database search result for a specific train ID
AND The system evaluates the search outcome
THEN:
• If a matching train record is found in the database, the system proceeds to deletion status check, otherwise it continues to create a new train record
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when existing train record found in the database.
Trigger Criteria:
Context: An existing train record found in the database
Applied to: Record Marked for Deletion?
Action: The system checks the deletion confirmation status of the record
Logic Flow:
IF An existing train record found in the database
AND The system checks the deletion confirmation status of the record
THEN:
• If the record is marked for deletion, the system proceeds to remove it, otherwise it generates a duplicate train ID error
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when existing train record marked for deletion.
Trigger Criteria:
Context: An existing train record marked for deletion
Applied to: Delete Existing Train Record
Action: The system processes the deletion request
Logic Flow:
IF An existing train record marked for deletion
AND The system processes the deletion request
THEN:
• The system removes the existing train record from the GCSUTRT database and allows the train ID to be reused
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when existing train record that is not marked for deletion.
Trigger Criteria:
Context: An existing train record that is not marked for deletion
Applied to: Generate Duplicate Train ID Error
Action: The system attempts to create a new train with the same identifier
Logic Flow:
IF An existing train record that is not marked for deletion
AND The system attempts to create a new train with the same identifier
THEN:
• The system generates error message 6 indicating a duplicate train ID conflict and prevents the creation of the new record
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when validation that no conflicting train record exists or existing record has been removed.
Trigger Criteria:
Context: Validation that no conflicting train record exists or existing record has been removed
Applied to: Initialize New Train Header
Action: The system prepares to create a new train record
Logic Flow:
IF Validation that no conflicting train record exists or existing record has been removed
AND The system prepares to create a new train record
THEN:
• The system initializes a new train header structure with default values and clears any previous data
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when successfully initialized train header and validated train id.
Trigger Criteria:
Context: A successfully initialized train header and validated train ID
Applied to: Set Train ID for Processing
Action: The system prepares the train record for further processing
Logic Flow:
IF A successfully initialized train header and validated train ID
AND The system prepares the train record for further processing
THEN:
• The system assigns the constructed US customs train ID to both the train header and the added train tracking table for continued processing
R-GCX003-cbl-01217 (+5)File: GCX003.cblBusiness Rule: Equipment Format Validation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment id from the request and equipment id length set to 12 characters. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An equipment ID from the request and equipment ID length set to 12 characters
Applied to: Call GCCCARFM Service for Format Validation
Action: The GCCCARFM service is called to validate the equipment format
Logic Flow:
IF An equipment ID from the request and equipment ID length set to 12 characters
AND The GCCCARFM service is called to validate the equipment format
THEN:
• The system determines if the equipment format is valid or invalid for further processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment format validation has been performed.
Trigger Criteria:
Context: Equipment format validation has been performed
Applied to: Equipment Format Valid - Continue Processing
Action: GCCCARFM validation returns successful status
Logic Flow:
IF Equipment format validation has been performed
AND GCCCARFM validation returns successful status
THEN:
• The equipment is marked as valid and processing continues to the next step
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment format validation has been performed.
Trigger Criteria:
Context: Equipment format validation has been performed
Applied to: Mark as Equipment Format Error
Action: GCCCARFM validation returns unsuccessful status
Logic Flow:
IF Equipment format validation has been performed
AND GCCCARFM validation returns unsuccessful status
THEN:
• The equipment is marked with format error status and added to report with load/empty indicator
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment format validation has failed and equipment type is container.
Trigger Criteria:
Context: Equipment format validation has failed and equipment type is container
Applied to: Set Container Error Message 35
Action: The system determines the equipment is a container type
Logic Flow:
IF Equipment format validation has failed and equipment type is container
AND The system determines the equipment is a container type
THEN:
• Error message 35 is set for the container format validation failure
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment format validation has failed and equipment type is car.
Trigger Criteria:
Context: Equipment format validation has failed and equipment type is car
Applied to: Set Car Error Message 36
Action: The system determines the equipment is a car type
Logic Flow:
IF Equipment format validation has failed and equipment type is car
AND The system determines the equipment is a car type
THEN:
• Error message 36 is set for the car format validation failure
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment format validation has failed and appropriate error message has been generated.
Trigger Criteria:
Context: Equipment format validation has failed and appropriate error message has been generated
Applied to: Skip Further Equipment Processing
Action: The error has been added to the report
Logic Flow:
IF Equipment format validation has failed and appropriate error message has been generated
AND The error has been added to the report
THEN:
• Further processing of this equipment item is skipped and control returns to process the next equipment
Business Justification: Establishes the required business protocol to be followed when equipment processing is starting for a new equipment item.
Trigger Criteria:
Context: Equipment processing is starting for a new equipment item
Applied to: Initialize Equipment Processing Flags
Action: The system begins processing equipment
Logic Flow:
IF Equipment processing is starting for a new equipment item
AND The system begins processing equipment
THEN:
• All processing state flags are set to their initial values: TR bond not found, TR not created for IT, TE bond not found, TE not created for TE, special location codes not found, US-MX export not found, and segment indicators reset
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment item is being processed.
Trigger Criteria:
Context: An equipment item is being processed
Applied to: Container Found?
Action: The system needs to retrieve waybill information
Logic Flow:
IF An equipment item is being processed
AND The system needs to retrieve waybill information
THEN:
• If container is found, use container-specific waybill retrieval, otherwise use car-specific waybill retrieval method
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment is identified as a container.
Trigger Criteria:
Context: Equipment is identified as a container
Applied to: Retrieve Container Waybill
Action: Waybill retrieval is performed
Logic Flow:
IF Equipment is identified as a container
AND Waybill retrieval is performed
THEN:
• System retrieves waybill using container ID through SHIPROOT container lookup or IQ container cross-reference if standard lookup fails
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment is identified as a car (not container).
Trigger Criteria:
Context: Equipment is identified as a car (not container)
Applied to: Retrieve Car Waybill with Fallback
Action: Waybill retrieval is performed
Logic Flow:
IF Equipment is identified as a car (not container)
AND Waybill retrieval is performed
THEN:
• System attempts SHIPROOT car lookup first, then falls back to FWCARGET with specific parameters, and finally tries inquiry database lookup if needed
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill retrieval has been attempted for equipment.
Trigger Criteria:
Context: Waybill retrieval has been attempted for equipment
Applied to: Waybill Found?
Action: System checks waybill status
Logic Flow:
IF Waybill retrieval has been attempted for equipment
AND System checks waybill status
THEN:
• If waybill found and equipment is loaded empty car (EL='L' and empty indicator), treat as waybill not found, otherwise proceed with found waybill
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill has been found for the equipment.
Trigger Criteria:
Context: A waybill has been found for the equipment
Applied to: Check if Conveying Car
Action: System processes the waybill information
Logic Flow:
IF A waybill has been found for the equipment
AND System processes the waybill information
THEN:
• If equipment is identified as conveying car type, set the load/empty indicator to 'E' (empty)
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment has a valid waybill.
Trigger Criteria:
Context: Equipment has a valid waybill
Applied to: Retrieve First Cargo Record
Action: Cargo processing begins
Logic Flow:
IF Equipment has a valid waybill
AND Cargo processing begins
THEN:
• System retrieves first cargo record using waybill root key and equipment ID, setting cargo found status appropriately
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo processing is in progress for equipment.
Trigger Criteria:
Context: Cargo processing is in progress for equipment
Applied to: More Cargo Records?
Action: System checks for more cargo records
Logic Flow:
IF Cargo processing is in progress for equipment
AND System checks for more cargo records
THEN:
• If more cargo records exist for the same equipment and waybill combination, continue processing, otherwise complete cargo processing for this equipment
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed.
Trigger Criteria:
Context: A cargo record is being processed
Applied to: Retrieve Segment 07 Data
Action: Detailed cargo information is needed
Logic Flow:
IF A cargo record is being processed
AND Detailed cargo information is needed
THEN:
• System retrieves segment 07 (cargo details), segment 02 (reference numbers), and segment 08 (hazmat information) and sets appropriate found/not found indicators
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment and cargo data has been retrieved.
Trigger Criteria:
Context: Equipment and cargo data has been retrieved
Applied to: Build Equipment Detail Report Line
Action: Report generation is performed
Logic Flow:
IF Equipment and cargo data has been retrieved
AND Report generation is performed
THEN:
• System creates detail line with equipment ID, load/empty status, cargo descriptions, bond information, and special handling codes formatted for report output
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment processing is complete and cargo exists.
Trigger Criteria:
Context: Equipment processing is complete and cargo exists
Applied to: Send Action and No Errors?
Action: System evaluates cargo attachment
Logic Flow:
IF Equipment processing is complete and cargo exists
AND System evaluates cargo attachment
THEN:
• If request action is SEND and no errors exist and no spawn conditions are met and cargo is not empty residue, proceed with cargo attachment
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo is eligible for attachment to train.
Trigger Criteria:
Context: Cargo is eligible for attachment to train
Applied to: Attach Cargo to Train
Action: Cargo attachment processing occurs
Logic Flow:
IF Cargo is eligible for attachment to train
AND Cargo attachment processing occurs
THEN:
• Skip attachment for immediate transport cargo, cargo already created for IT, US-Canada-US cargo with release status, default cargo with release status, empty equipment cargo, special manifest cargo at specific stations, or export cargo at non-Laredo stations
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when current cargo record processing is complete.
Trigger Criteria:
Context: Current cargo record processing is complete
Applied to: Retrieve Next Cargo Record
Action: System continues cargo processing
Logic Flow:
IF Current cargo record processing is complete
AND System continues cargo processing
THEN:
• Retrieve next cargo record using same equipment and waybill criteria, updating cargo found status
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when all cargo records for equipment have been processed.
Trigger Criteria:
Context: All cargo records for equipment have been processed
Applied to: Check for Special Bond Processing
Action: Special bond processing evaluation occurs
Logic Flow:
IF All cargo records for equipment have been processed
AND Special bond processing evaluation occurs
THEN:
• Check for TR bond creation for IT cargo, TE bond creation for TE cargo, special IT manifest requirements, andUS-MX export conditions
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment processing found it cargo that should have tr bond.
Trigger Criteria:
Context: Equipment processing found IT cargo that should have TR bond
Applied to: TR Bond Created for IT?
Action: TR bond validation occurs
Logic Flow:
IF Equipment processing found IT cargo that should have TR bond
AND TR bond validation occurs
THEN:
• If TR bond was created for IT cargo but TR bond not found during processing, generate message 22 warning and add to report
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when tr bond is required but not found for it cargo.
Trigger Criteria:
Context: TR bond is required but not found for IT cargo
Applied to: Add TR Bond Warning Message
Action: Warning message generation occurs
Logic Flow:
IF TR bond is required but not found for IT cargo
AND Warning message generation occurs
THEN:
• Add message 22 to report with equipment details and increment total equipment count
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment processing found te cargo that should have te bond.
Trigger Criteria:
Context: Equipment processing found TE cargo that should have TE bond
Applied to: TE Bond Created for TE?
Action: TE bond validation occurs
Logic Flow:
IF Equipment processing found TE cargo that should have TE bond
AND TE bond validation occurs
THEN:
• If TE bond was created for TE cargo but TE bond not found during processing, generate message 32 warning and add to report
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when te bond is required but not found for te cargo.
Trigger Criteria:
Context: TE bond is required but not found for TE cargo
Applied to: Add TE Bond Warning Message
Action: Warning message generation occurs
Logic Flow:
IF TE bond is required but not found for TE cargo
AND Warning message generation occurs
THEN:
• Add message 32 to report with equipment details and increment total equipment count
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment processing found special it manifest location code.
Trigger Criteria:
Context: Equipment processing found special IT manifest location code
Applied to: Special IT Manifest Found?
Action: Special manifest validation occurs
Logic Flow:
IF Equipment processing found special IT manifest location code
AND Special manifest validation occurs
THEN:
• If special IT manifest found but corresponding TE manifest location not found, generate message 45 warning and add to report
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when special it manifest found but te manifest requirements not met.
Trigger Criteria:
Context: Special IT manifest found but TE manifest requirements not met
Applied to: Add Special Manifest Message
Action: Special manifest warning generation occurs
Logic Flow:
IF Special IT manifest found but TE manifest requirements not met
AND Special manifest warning generation occurs
THEN:
• Add message 45 to report with equipment details and increment total equipment count
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment processing found us-mx export type 88 cargo.
Trigger Criteria:
Context: Equipment processing found US-MX export type 88 cargo
Applied to:US-MX Export Found?
Action: Export manifest validation occurs
Logic Flow:
IF Equipment processing found US-MX export type 88 cargo
AND Export manifest validation occurs
THEN:
• IfUS-MX export type 88 found but TR manifest location not found, generate message 51 warning and add to report
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when us-mx export type 88 found but tr manifest requirements not met.
Trigger Criteria:
Context:US-MX export type 88 found but TR manifest requirements not met
Applied to: Add Export Message
Action: Export warning generation occurs
Logic Flow:
IFUS-MX export type 88 found but TR manifest requirements not met
AND Export warning generation occurs
THEN:
• Add message 51 to report with equipment details and increment total equipment count
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when no waybill was found for equipment.
Trigger Criteria:
Context: No waybill was found for equipment
Applied to: Waybill Not Found and Loaded Equipment?
Action: Equipment status evaluation occurs
Logic Flow:
IF No waybill was found for equipment
AND Equipment status evaluation occurs
THEN:
• If equipment is loaded and not SBU van type, orif container not found, generate appropriate error messages and build report line
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when loaded equipment has no waybill and is not container or sbu van.
Trigger Criteria:
Context: Loaded equipment has no waybill and is not container or SBU van
Applied to: Add Equipment Not Found Error
Action: Error message generation occurs
Logic Flow:
IF Loaded equipment has no waybill and is not container or SBU van
AND Error message generation occurs
THEN:
• Add message 10 (waybill not found) or message 11 (container not found) to report based on equipment type
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment processing is complete or container found on flat car.
Trigger Criteria:
Context: Equipment processing is complete or container found on flat car
Applied to: Process Container on Flat Car
Action: Container processing occurs
Logic Flow:
IF Equipment processing is complete or container found on flat car
AND Container processing occurs
THEN:
• If container found or waybill indicates conveying car with loaded status, retrieve and process container information
Business Justification: Establishes the required business protocol to be followed when container is not found in the primary system and container inquiry root data exists with original railroad number, station number, and waybill number.
Trigger Criteria:
Context: A container is not found in the primary system and container inquiry root data exists with original railroad number, station number, and waybill number
Applied to: Access Inquiry Root Database FWCIROOT
Action: The system accesses the inquiry root database FWCIROOT
Logic Flow:
IF A container is not found in the primary system and container inquiry root data exists with original railroad number, station number, and waybill number
AND The system accesses the inquiry root database FWCIROOT
THEN:
• The system retrieves container information from the inquiry root database for further processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when system has attempted to access the inquiry root database fwciroot.
Trigger Criteria:
Context: The system has attempted to access the inquiry root database FWCIROOT
Applied to: Container Found in Inquiry Root?
Action: The database access returns a status code
Logic Flow:
IF The system has attempted to access the inquiry root database FWCIROOT
AND The database access returns a status code
THEN:
• If status code is not spaces, container is not found and processing stops, otherwise container is found and processing continues to waybill inquiry
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when container is found in inquiry root database with valid railroad number, station number, and waybill number.
Trigger Criteria:
Context: Container is found in inquiry root database with valid railroad number, station number, and waybill number
Applied to: Access Inquiry Detail Database FWIQROOT
Action: The system accesses the waybill inquiry database FWIQROOT using the extracted identifiers
Logic Flow:
IF Container is found in inquiry root database with valid railroad number, station number, and waybill number
AND The system accesses the waybill inquiry database FWIQROOT using the extracted identifiers
THEN:
• The system retrieves waybill information from the inquiry database for validation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when system has attempted to access the waybill inquiry database fwiqroot.
Trigger Criteria:
Context: The system has attempted to access the waybill inquiry database FWIQROOT
Applied to: Waybill Found in Inquiry?
Action: The database access returns a status code
Logic Flow:
IF The system has attempted to access the waybill inquiry database FWIQROOT
AND The database access returns a status code
THEN:
• If status code is not spaces, waybill is not found and container is marked as not found, otherwise waybill is found and processing continues to cross-reference scanning
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill is found in inquiry database.
Trigger Criteria:
Context: Waybill is found in inquiry database
Applied to: Scan for Container Cross-References FWIQBOTL
Action: The system scans the inquiry bottom line database FWIQBOTL for cross-reference entries
Logic Flow:
IF Waybill is found in inquiry database
AND The system scans the inquiry bottom line database FWIQBOTL for cross-reference entries
THEN:
• The system retrieves cross-reference data for evaluation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when system has retrieved data from inquiry bottom line database.
Trigger Criteria:
Context: The system has retrieved data from inquiry bottom line database
Applied to: Cross-Reference Entry Found?
Action: The first 8 characters of the inquiry bottom line are evaluated
Logic Flow:
IF The system has retrieved data from inquiry bottom line database
AND The first 8 characters of the inquiry bottom line are evaluated
THEN:
• If the first 8 characters equal 'T/C XREF', a cross-reference entry is found and container data is extracted, otherwise continue scanning for more entries
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when valid cross-reference entry with 't/c xref' identifier is found.
Trigger Criteria:
Context: A valid cross-reference entry with 'T/C XREF' identifier is found
Applied to: Extract Container ID from Cross-Reference
Action: The system extracts container information from the cross-reference entry
Logic Flow:
IF A valid cross-reference entry with 'T/C XREF' identifier is found
AND The system extracts container information from the cross-reference entry
THEN:
• The container ID is extracted from positions 28-39 of the inquiry bottom line
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when valid cross-reference entry with 't/c xref' identifier is found.
Trigger Criteria:
Context: A valid cross-reference entry with 'T/C XREF' identifier is found
Applied to: Extract Waybill Information
Action: The system extracts waybill information from the cross-reference entry
Logic Flow:
IF A valid cross-reference entry with 'T/C XREF' identifier is found
AND The system extracts waybill information from the cross-reference entry
THEN:
• Railroad number is extracted from positions 10-12, station number from positions 14-19, waybill number from positions 21-26, and all spaces in the waybill information are replaced with zeros
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when container id and waybill information have been extracted from a cross-reference entry.
Trigger Criteria:
Context: Container ID and waybill information have been extracted from a cross-reference entry
Applied to: Store Container Cross-Reference Data
Action: The system stores the cross-reference data
Logic Flow:
IF Container ID and waybill information have been extracted from a cross-reference entry
AND The system stores the cross-reference data
THEN:
• The container ID and waybill information are stored in the cross-reference table at the current index position
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container cross-reference data has been successfully stored.
Trigger Criteria:
Context: Container cross-reference data has been successfully stored
Applied to: Set Container Found Status
Action: The system updates the container status
Logic Flow:
IF Container cross-reference data has been successfully stored
AND The system updates the container status
THEN:
• The container status is set to found and the container is marked as an inquiry container for subsequent processing
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cross-reference entry has been processed.
Trigger Criteria:
Context: A cross-reference entry has been processed
Applied to: Continue with Next Cross-Reference
Action: The system prepares to process the next entry
Logic Flow:
IF A cross-reference entry has been processed
AND The system prepares to process the next entry
THEN:
• The cross-reference index counter is incremented by 1
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when system has processed a cross-reference entry.
Trigger Criteria:
Context: The system has processed a cross-reference entry
Applied to: More Cross-References?
Action: The system checks for more cross-reference entries
Logic Flow:
IF The system has processed a cross-reference entry
AND The system checks for more cross-reference entries
THEN:
• If database status code is spaces and index is 30 or less, more cross-references are available and scanning continues, otherwise cross-reference resolution is complete
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when no more cross-reference entries are available for processing or the maximum index limit of 30 is reached.
Trigger Criteria:
Context: No more cross-reference entries are available for processing or the maximum index limit of 30 is reached
Applied to: Container Cross-Reference Resolution Complete
Action: The cross-reference resolution process completes
Logic Flow:
IF No more cross-reference entries are available for processing or the maximum index limit of 30 is reached
AND The cross-reference resolution process completes
THEN:
• The system finalizes the container cross-reference data and makes it available for subsequent waybill processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when container is not found in inquiry root database or waybill is not found in inquiry database.
Trigger Criteria:
Context: Container is not found in inquiry root database or waybill is not found in inquiry database
Applied to: Container Not Found - Set Not Found Status
Action: The system determines container cannot be resolved
Logic Flow:
IF Container is not found in inquiry root database or waybill is not found in inquiry database
AND The system determines container cannot be resolved
THEN:
• The container status is set to not found and inquiry container status is set to not found
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill exists with railroad number, station number, and waybill number from container inquiry root.
Trigger Criteria:
Context: A waybill exists with railroad number, station number, and waybill number from container inquiry root
Applied to: Access Inquiry System with Waybill Information
Action: The system accesses the inquiry system using the waybill key information
Logic Flow:
IF A waybill exists with railroad number, station number, and waybill number from container inquiry root
AND The system accesses the inquiry system using the waybill key information
THEN:
• The inquiry system is accessed with the waybill railroad number, station number, and waybill number to retrieve container cross-reference data
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container cross-reference processing is starting.
Trigger Criteria:
Context: Container cross-reference processing is starting
Applied to: Initialize Container Cross-Reference Table
Action: The system begins container cross-reference extraction
Logic Flow:
IF Container cross-reference processing is starting
AND The system begins container cross-reference extraction
THEN:
• The container cross-reference table is cleared and the processing counter is set to position 1
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when inquiry bottom line is being processed.
Trigger Criteria:
Context: An inquiry bottom line is being processed
Applied to: Line Contains 'T/C XREF'?
Action: The system checks if the line contains 'T/C XREF' in positions 1-8
Logic Flow:
IF An inquiry bottom line is being processed
AND The system checks if the line contains 'T/C XREF' in positions 1-8
THEN:
• If the line contains 'T/C XREF', it is identified as a container cross-reference line for further processing, otherwise it is skipped
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when valid container cross-reference line containing 't/c xref'.
Trigger Criteria:
Context: A valid container cross-reference line containing 'T/C XREF'
Applied to: Extract Container ID from Position 28-39
Action: The system processes the container cross-reference information
Logic Flow:
IF A valid container cross-reference line containing 'T/C XREF'
AND The system processes the container cross-reference information
THEN:
• The container ID is extracted from positions 28-39 of the inquiry bottom line and stored in the container cross-reference table
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when valid container cross-reference line containing 't/c xref'.
Trigger Criteria:
Context: A valid container cross-reference line containing 'T/C XREF'
Applied to: Extract Waybill Railroad from Position 10-12 & Extract Waybill Station from Position 14-19 & Extract Waybill Number from Position 21-26
Action: The system processes the waybill information
Logic Flow:
IF A valid container cross-reference line containing 'T/C XREF'
AND The system processes the waybill information
THEN:
• The waybill railroad code is extracted from positions 10-12 of the inquiry bottom line and stored in the container cross-reference entry
• The waybill station code is extracted from positions 14-19 of the inquiry bottom line and stored in the container cross-reference entry
• The waybill number is extracted from positions 21-26 of the inquiry bottom line and stored in the container cross-reference entry
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill railroad, station, and number have been extracted from the container cross-reference line.
Trigger Criteria:
Context: Waybill railroad, station, and number have been extracted from the container cross-reference line
Applied to: Replace Spaces with Zeros in Waybill Fields
Action: The system processes the extracted waybill information
Logic Flow:
IF Waybill railroad, station, and number have been extracted from the container cross-reference line
AND The system processes the extracted waybill information
THEN:
• All spaces in the waybill identification fields are replaced with zeros to create a standardized waybill key
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container id and waybill information have been successfully extracted and formatted.
Trigger Criteria:
Context: Container ID and waybill information have been successfully extracted and formatted
Applied to: Store Container Cross-Reference Entry
Action: The system creates a container cross-reference entry
Logic Flow:
IF Container ID and waybill information have been successfully extracted and formatted
AND The system creates a container cross-reference entry
THEN:
• The container ID and associated waybill information are stored in the container cross-reference table at the current counter position
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when container cross-reference entry has been successfully stored.
Trigger Criteria:
Context: A container cross-reference entry has been successfully stored
Applied to: Increment Cross-Reference Counter
Action: The system completes processing of a container cross-reference line
Logic Flow:
IF A container cross-reference entry has been successfully stored
AND The system completes processing of a container cross-reference line
THEN:
• The cross-reference counter is incremented by 1 to prepare for the next container entry
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container cross-reference entries are being processed and stored.
Trigger Criteria:
Context: Container cross-reference entries are being processed and stored
Applied to: Counter Exceeds 30 Containers?
Action: The system checks the current cross-reference counter
Logic Flow:
IF Container cross-reference entries are being processed and stored
AND The system checks the current cross-reference counter
THEN:
• If the counter exceeds 30 containers, processing stops to prevent system overload, otherwise processing continues
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when all inquiry bottom lines have been processed for container cross-references.
Trigger Criteria:
Context: All inquiry bottom lines have been processed for container cross-references
Applied to: Any Container Cross-References Found?
Action: The system evaluates the results of the container cross-reference extraction
Logic Flow:
IF All inquiry bottom lines have been processed for container cross-references
AND The system evaluates the results of the container cross-reference extraction
THEN:
• If the first container ID entry is not spaces or low-values, container cross-references are considered found, otherwise none were found
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container cross-references have been found in the inquiry system.
Trigger Criteria:
Context: Container cross-references have been found in the inquiry system
Applied to: Set First Container as Active Equipment
Action: The system needs to establish the active equipment for processing
Logic Flow:
IF Container cross-references have been found in the inquiry system
AND The system needs to establish the active equipment for processing
THEN:
• The first container ID from the cross-reference table is assigned as the active equipment ID and the container cross-reference status is set to found
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when valid container cross-references have been extracted and the first container has been set as active equipment.
Trigger Criteria:
Context: Valid container cross-references have been extracted and the first container has been set as active equipment
Applied to: Mark Container Cross-Reference as Found
Action: The system completes successful container cross-reference processing
Logic Flow:
IF Valid container cross-references have been extracted and the first container has been set as active equipment
AND The system completes successful container cross-reference processing
THEN:
• The container cross-reference status is marked as found and the container status is set to found
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when no valid container cross-references were found during inquiry processing or the waybill was not found in the inquiry system.
Trigger Criteria:
Context: No valid container cross-references were found during inquiry processing OR the waybill was not found in the inquiry system
Applied to: Set Container Cross-Reference Not Found
Action: The system completes container cross-reference processing without finding valid entries
Logic Flow:
IF No valid container cross-references were found during inquiry processing OR the waybill was not found in the inquiry system
AND The system completes container cross-reference processing without finding valid entries
THEN:
• The container cross-reference status is set to not found and the container status is set to not found
Business Justification: Establishes the required business protocol to be followed when waybill retrieval request is initiated for an equipment id. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A waybill retrieval request is initiated for an equipment ID
Applied to: First Call or Different Equipment ID?
Action: The system checks if this is the first FWCARGET call OR the current equipment ID is different from the previously held equipment ID
Logic Flow:
IF A waybill retrieval request is initiated for an equipment ID
AND The system checks if this is the first FWCARGET call OR the current equipment ID is different from the previously held equipment ID
THEN:
• The system proceeds with waybill retrieval if either condition is true, otherwise skips the retrieval process
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill retrieval is proceeding for a specific equipment id.
Trigger Criteria:
Context: A waybill retrieval is proceeding for a specific equipment ID
Applied to: Set Equipment ID as Current
Action: The system needs to track the current equipment ID for future comparison
Logic Flow:
IF A waybill retrieval is proceeding for a specific equipment ID
AND The system needs to track the current equipment ID for future comparison
THEN:
• The system stores the current equipment ID as the held equipment ID and marks that this is no longer the first call
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when system needs to retrieve waybill information for an equipment.
Trigger Criteria:
Context: The system needs to retrieve waybill information for an equipment
Applied to: Set Retrieval Criteria
Action: FWCARGET parameters are being configured
Logic Flow:
IF The system needs to retrieve waybill information for an equipment
AND FWCARGET parameters are being configured
THEN:
• The system sets all waybill types except 98 and 99, includes all status types, excludes EDI incomplete waybills, includes temporary waybills, excludes corrector waybills, returns lead waybill, and gets latest waybill date
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when fwcarget parameters are properly configured for an equipment id. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: FWCARGET parameters are properly configured for an equipment ID
Applied to: Execute FWCARGET Call
Action: The system executes the FWCARGET service call
Logic Flow:
IF FWCARGET parameters are properly configured for an equipment ID
AND The system executes the FWCARGET service call
THEN:
• The system invokes FWCARGET service and receives waybill information or error status
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when fwcarget service call has completed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: FWCARGET service call has completed
Applied to: FWCARGET Error or Not Found?
Action: The system checks the return status from FWCARGET
Logic Flow:
IF FWCARGET service call has completed
AND The system checks the return status from FWCARGET
THEN:
• If FWCARGET returned an error or not found status, the system terminates the retrieval loop, otherwise continues with waybill validation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill record has been retrieved successfully from fwcarget.
Trigger Criteria:
Context: A waybill record has been retrieved successfully from FWCARGET
Applied to: Haulage Right Carrier Empty?
Action: The system checks if the haulage right carrier field is empty or spaces
Logic Flow:
IF A waybill record has been retrieved successfully from FWCARGET
AND The system checks if the haulage right carrier field is empty or spaces
THEN:
• If haulage right carrier is empty, the system accepts the waybill and terminates the loop, otherwise continues with additional validation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill record has haulage right carrier populated.
Trigger Criteria:
Context: A waybill record has haulage right carrier populated
Applied to: EDI Complete Release = 'Y'?
Action: The system checks if EDI complete 418 release flag equals 'Y'
Logic Flow:
IF A waybill record has haulage right carrier populated
AND The system checks if EDI complete 418 release flag equals 'Y'
THEN:
• If EDI complete release is 'Y', the system accepts the waybill and terminates the loop, otherwise continues with duplicate check
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill record does not have edi complete release status.
Trigger Criteria:
Context: A waybill record does not have EDI complete release status
Applied to: Same FWBX Key as Previous?
Action: The system compares the current FWBX key feedback with the previously stored FWBX key feedback
Logic Flow:
IF A waybill record does not have EDI complete release status
AND The system compares the current FWBX key feedback with the previously stored FWBX key feedback
THEN:
• If the FWBX keys are identical, the system sets not found status and terminates the loop, otherwise updates the stored key and continues
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when current waybill is not acceptable and fwbx key is different from previous.
Trigger Criteria:
Context: The current waybill is not acceptable and FWBX key is different from previous
Applied to: Set Previous Status Waybill Date
Action: The system needs to search for an alternative waybill
Logic Flow:
IF The current waybill is not acceptable and FWBX key is different from previous
AND The system needs to search for an alternative waybill
THEN:
• The system sets FWCARGET to retrieve previous status waybill date and updates the stored FWBX key feedback
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when fwcarget has completed processing but no acceptable waybill was found.
Trigger Criteria:
Context: FWCARGET has completed processing but no acceptable waybill was found
Applied to: Execute Inquiry Fallback Logic
Action: The system determines that waybill was not found through primary method
Logic Flow:
IF FWCARGET has completed processing but no acceptable waybill was found
AND The system determines that waybill was not found through primary method
THEN:
• The system executes inquiry fallback logic to attempt waybill retrieval through alternative database queries
R-GCX003-cbl-01272 (+15)File: GCX003.cblBusiness Rule: Inquiry System Fallback Processing
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment waybill lookup has failed in primary system.
Trigger Criteria:
Context: Equipment waybill lookup has failed in primary system
Applied to: Primary Waybill System Failed
Action: System determines waybill was not found and container is not found
Logic Flow:
IF Equipment waybill lookup has failed in primary system
AND System determines waybill was not found and container is not found
THEN:
• Initiate inquiry system fallback processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment id is available for lookup.
Trigger Criteria:
Context: Equipment ID is available for lookup
Applied to: Access Inquiry System FWCIROOT
Action: System accesses FWCIROOT with equipment car ID
Logic Flow:
IF Equipment ID is available for lookup
AND System accesses FWCIROOT with equipment car ID
THEN:
• Retrieve container inquiry root record or return not found status
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when container inquiry system has been accessed.
Trigger Criteria:
Context: Container inquiry system has been accessed
Applied to: Inquiry Root Record Found?
Action: System checks for valid inquiry root record
Logic Flow:
IF Container inquiry system has been accessed
AND System checks for valid inquiry root record
THEN:
• Continue processing if found, otherwise return waybill not found
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when valid inquiry root record exists.
Trigger Criteria:
Context: Valid inquiry root record exists
Applied to: Extract Road/Station/Waybill Numbers
Action: System processes the inquiry root data
Logic Flow:
IF Valid inquiry root record exists
AND System processes the inquiry root data
THEN:
• Extract original road number, CSC station number, and waybill number for further processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when road number, station number, and waybill number are available.
Trigger Criteria:
Context: Road number, station number, and waybill number are available
Applied to: Retrieve Waybill from FWIQROOT
Action: System accesses FWIQROOT with these key components
Logic Flow:
IF Road number, station number, and waybill number are available
AND System accesses FWIQROOT with these key components
THEN:
• Retrieve waybill inquiry record or return not found status
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill inquiry system has been accessed.
Trigger Criteria:
Context: Waybill inquiry system has been accessed
Applied to: Waybill Found in Inquiry?
Action: System checks for valid waybill inquiry record
Logic Flow:
IF Waybill inquiry system has been accessed
AND System checks for valid waybill inquiry record
THEN:
• Continue processing if found, otherwise return waybill not found
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill inquiry record contains billing code.
Trigger Criteria:
Context: Waybill inquiry record contains billing code
Applied to: Convert Load/Empty Status
Action: Billing code equals 'ZE'
Logic Flow:
IF Waybill inquiry record contains billing code
AND Billing code equals 'ZE'
THEN:
• Set equipment status to 'E' for empty, otherwise set to 'L' for loaded
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when valid waybill inquiry record exists.
Trigger Criteria:
Context: Valid waybill inquiry record exists
Applied to: Map Date and Origin Information
Action: System maps inquiry data to standard format
Logic Flow:
IF Valid waybill inquiry record exists
AND System maps inquiry data to standard format
THEN:
• Transfer road number, waybill number, car ID, load/empty status, TOFC/COFC indicator, waybill date, and origin station to standard waybill structure
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when inquiry data has been successfully mapped.
Trigger Criteria:
Context: Inquiry data has been successfully mapped
Applied to: Map Inquiry Data to Standard Format
Action: System transfers data to standard format
Logic Flow:
IF Inquiry data has been successfully mapped
AND System transfers data to standard format
THEN:
• Populate shipment root structure with all waybill information for downstream processing
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when valid waybill exists in inquiry system.
Trigger Criteria:
Context: Valid waybill exists in inquiry system
Applied to: Retrieve Routing Information
Action: System accesses FWIQINFO with waybill key and routing segment 'B1'
Logic Flow:
IF Valid waybill exists in inquiry system
AND System accesses FWIQINFO with waybill key and routing segment 'B1'
THEN:
• Retrieve routing information or continue without routing data
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when routing information system has been accessed.
Trigger Criteria:
Context: Routing information system has been accessed
Applied to: Routing Info Available?
Action: System checks if routing info fields contain data
Logic Flow:
IF Routing information system has been accessed
AND System checks if routing info fields contain data
THEN:
• Process routing data if available, otherwise complete waybill processing without routing information
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when routing information contains data.
Trigger Criteria:
Context: Routing information contains data
Applied to: Extract Routing Fields
Action: System parses routing info fields by spaces
Logic Flow:
IF Routing information contains data
AND System parses routing info fields by spaces
THEN:
• Extract individual routing fields with their lengths for further processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when individual routing fields have been extracted.
Trigger Criteria:
Context: Individual routing fields have been extracted
Applied to: Parse SCAC and Junction Data
Action: System processes each field sequentially
Logic Flow:
IF Individual routing fields have been extracted
AND System processes each field sequentially
THEN:
• Assign fields to SCAC codes and junction R260 codes in alternating pattern up to 4 SCAC entries
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when scac codes and junction data have been parsed.
Trigger Criteria:
Context: SCAC codes and junction data have been parsed
Applied to: Build Routing Information Array
Action: System builds routing information structure
Logic Flow:
IF SCAC codes and junction data have been parsed
AND System builds routing information structure
THEN:
• Create routing information array with SCAC and junction pairs for shipment root structure
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill data has been successfully retrieved and mapped.
Trigger Criteria:
Context: Waybill data has been successfully retrieved and mapped
Applied to: Return Waybill Data Success
Action: All processing steps complete successfully
Logic Flow:
IF Waybill data has been successfully retrieved and mapped
AND All processing steps complete successfully
THEN:
• Return waybill found status with complete waybill and routing information
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill lookup has failed in inquiry system.
Trigger Criteria:
Context: Waybill lookup has failed in inquiry system
Applied to: Return Waybill Not Found
Action: Either inquiry root record or waybill inquiry record is not found
Logic Flow:
IF Waybill lookup has failed in inquiry system
AND Either inquiry root record or waybill inquiry record is not found
THEN:
• Return waybill not found status to calling process
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with bond type classification.
Trigger Criteria:
Context: A cargo record exists with bond type classification
Applied to: Is Cargo Immediate Transport Bond?
Action: The cargo bond type is classified as immediate transport (M1201)
Logic Flow:
IF A cargo record exists with bond type classification
AND The cargo bond type is classified as immediate transport (M1201)
THEN:
• Skip cargo attachment and mark for special processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with tr bond status indicator.
Trigger Criteria:
Context: A cargo record with TR bond status indicator
Applied to: Is TR Bond Created for IT?
Action: The TR created for IT flag equals 'Y'
Logic Flow:
IF A cargo record with TR bond status indicator
AND The TR created for IT flag equals 'Y'
THEN:
• Skip cargo attachment and mark for special processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with us-canada-us bond type, empty tr created for it status, and cargo status information.
Trigger Criteria:
Context: A cargo record with US-Canada-US bond type, empty TR created for IT status, and cargo status information
Applied to: Is Bond Type US-CAN-US? AND Is TR Created for IT Empty? AND Is Cargo Status Release?
Action: The bond type is US-CAN-US AND TR created for IT is empty AND cargo short description equals release status
Logic Flow:
IF A cargo record with US-Canada-US bond type, empty TR created for IT status, and cargo status information
AND The bond type is US-CAN-US AND TR created for IT is empty AND cargo short description equals release status
THEN:
• Skip cargo attachment and mark for special processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with default bond type, empty tr created for it status, and cargo status information.
Trigger Criteria:
Context: A cargo record with default bond type, empty TR created for IT status, and cargo status information
Applied to: Is Bond Type Default? AND Is TR Created for IT Empty? AND Is Cargo Status Release?
Action: The bond type is default (M1109) AND TR created for IT is empty AND cargo short description equals release status
Logic Flow:
IF A cargo record with default bond type, empty TR created for IT status, and cargo status information
AND The bond type is default (M1109) AND TR created for IT is empty AND cargo short description equals release status
THEN:
• Skip cargo attachment and mark for special processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with bond type classification.
Trigger Criteria:
Context: A cargo record with bond type classification
Applied to: Is Bond Type Empty Equipment?
Action: The cargo bond type is classified as empty equipment (M1109)
Logic Flow:
IF A cargo record with bond type classification
AND The cargo bond type is classified as empty equipment (M1109)
THEN:
• Skip cargo attachment and mark for special processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with special manifest status and current station information.
Trigger Criteria:
Context: A cargo record with special manifest status and current station information
Applied to: Is Special Manifest Original? AND Is Station Woburn PQ?
Action: The cargo has special manifest original status AND the current station is Woburn PQ
Logic Flow:
IF A cargo record with special manifest status and current station information
AND The cargo has special manifest original status AND the current station is Woburn PQ
THEN:
• Skip cargo attachment and mark for special processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with special manifest status and current station information.
Trigger Criteria:
Context: A cargo record with special manifest status and current station information
Applied to: Is Special Manifest Special? AND Is Station NOT Woburn PQ?
Action: The cargo has special manifest special status AND the current station is NOT Woburn PQ
Logic Flow:
IF A cargo record with special manifest status and current station information
AND The cargo has special manifest special status AND the current station is NOT Woburn PQ
THEN:
• Skip cargo attachment and mark for special processing
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with export bond type, origin-destination country codes, and current station information.
Trigger Criteria:
Context: A cargo record with export bond type, origin-destination country codes, and current station information
Applied to: Is Bond Type Export? AND Is Origin-Destination US-MX? AND Is Station NOT Laredo TX?
Action: The bond type is export (M1109) AND origin-destination codes equal 'USMX' AND the current station is NOT Laredo TX
Logic Flow:
IF A cargo record with export bond type, origin-destination country codes, and current station information
AND The bond type is export (M1109) AND origin-destination codes equal 'USMX' AND the current station is NOT Laredo TX
THEN:
• Skip cargo attachment and mark for special processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record that has been evaluated against all skip criteria.
Trigger Criteria:
Context: A cargo record that has been evaluated against all skip criteria
Applied to: Attach Cargo to Train
Action: The cargo does not meet any of the skip conditions for special processing
Logic Flow:
IF A cargo record that has been evaluated against all skip criteria
AND The cargo does not meet any of the skip conditions for special processing
THEN:
• Attach the cargo to the train for standard manifest processing
R-GCX003-cbl-01297 (+18)File: GCX003.cblBusiness Rule: Equipment Information Assembly
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment item is being processed.
Trigger Criteria:
Context: An equipment item is being processed
Applied to: Equipment Type?
Action: The system evaluates equipment characteristics
Logic Flow:
IF An equipment item is being processed
AND The system evaluates equipment characteristics
THEN:
• Equipment is classified as either container or car type for appropriate processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment is classified as a container.
Trigger Criteria:
Context: Equipment is classified as a container
Applied to: Process Container Equipment
Action: Container processing is initiated
Logic Flow:
IF Equipment is classified as a container
AND Container processing is initiated
THEN:
• Container ID is set from equipment ID, load/empty indicator is set from shipment root, and container flag is activated with trailer flag if applicable
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment is classified as a car.
Trigger Criteria:
Context: Equipment is classified as a car
Applied to: Process Car Equipment
Action: Car processing is initiated
Logic Flow:
IF Equipment is classified as a car
AND Car processing is initiated
THEN:
• Car ID is set from request equipment ID, load/empty indicator is set from request, car flag is activated, and equipment ID components are parsed
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment id and type flags are set. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Equipment ID and type flags are set
Applied to: Call Equipment Type Validation Service
Action: Equipment type validation is required
Logic Flow:
IF Equipment ID and type flags are set
AND Equipment type validation is required
THEN:
• GCCCARTP service is called with equipment parameters to validate and retrieve equipment type information
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment type validation service call fails. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Equipment type validation service call fails
Applied to: Generate Equipment Error Message
Action: Validation failure is detected
Logic Flow:
IF Equipment type validation service call fails
AND Validation failure is detected
THEN:
• Error message 35 is generated for container validation failure or error message 36 for car validation failure, equipment error flag is set, and processing continues to next equipment
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment validation is successful.
Trigger Criteria:
Context: Equipment validation is successful
Applied to: Retrieve Equipment Type Description
Action: Equipment type information is needed
Logic Flow:
IF Equipment validation is successful
AND Equipment type information is needed
THEN:
• Equipment car code is retrieved from validation service, station table is queried for equipment type description, and description is stored in report fields
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment has a waybill and car code is available.
Trigger Criteria:
Context: Equipment has a waybill and car code is available
Applied to: Check Double Stack Container Classification
Action: Car code equals 'SK'
Logic Flow:
IF Equipment has a waybill and car code is available
AND Car code equals 'SK'
THEN:
• Equipment is classified as double stack container for traffic counting
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment is classified as double stack container.
Trigger Criteria:
Context: Equipment is classified as double stack container
Applied to: Count by Traffic Type - CPRS/CSXT/NS/HAUL
Action: Double stack counting service is called
Logic Flow:
IF Equipment is classified as double stack container
AND Double stack counting service is called
THEN:
• Container count is added to appropriate traffic type counter (CPRS, CSXT, NS, or HAUL) based on traffic classification
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment has an associated waybill.
Trigger Criteria:
Context: Equipment has an associated waybill
Applied to: Extract Waybill Routing Information
Action: Routing information is needed
Logic Flow:
IF Equipment has an associated waybill
AND Routing information is needed
THEN:
• Routing information is extracted from shipment root, exclamation marks are replaced with spaces, and routing analysis is prepared
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when routing information is available from waybill.
Trigger Criteria:
Context: Routing information is available from waybill
Applied to: Analyze Equipment Routing Patterns
Action: Routing pattern analysis is performed
Logic Flow:
IF Routing information is available from waybill
AND Routing pattern analysis is performed
THEN:
• System checks for specific routing patterns including CSXT/NS to CPRS via DET junction and sets appropriate routing indicators
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment routing information is not available or waybill is not found.
Trigger Criteria:
Context: Equipment routing information is not available or waybill is not found
Applied to: Set Empty Equipment Indicator
Action: Equipment processing continues
Logic Flow:
IF Equipment routing information is not available or waybill is not found
AND Equipment processing continues
THEN:
• Empty equipment indicator is set to 1 in report fields
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment type information is available.
Trigger Criteria:
Context: Equipment type information is available
Applied to: Equipment Category?
Action: Equipment categorization is needed
Logic Flow:
IF Equipment type information is available
AND Equipment categorization is needed
THEN:
• Equipment is classified as locomotive, container, or car based on car type code
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment car type is 'lo' or 'et'.
Trigger Criteria:
Context: Equipment car type is 'LO' or 'ET'
Applied to: Count Locomotives
Action: Equipment counting is performed
Logic Flow:
IF Equipment car type is 'LO' or 'ET'
AND Equipment counting is performed
THEN:
• Total locomotive count is incremented by 1
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment car type is 'cn' (container).
Trigger Criteria:
Context: Equipment car type is 'CN' (container)
Applied to: Count Loaded/Empty Containers
Action: Container counting is performed
Logic Flow:
IF Equipment car type is 'CN' (container)
AND Container counting is performed
THEN:
• If load indicator is 'L' then loaded container count is incremented, otherwiseif load indicator is 'E' then empty container count is incremented
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment car type is not locomotive or container.
Trigger Criteria:
Context: Equipment car type is not locomotive or container
Applied to: Count Loaded/Empty Cars
Action: Car counting is performed
Logic Flow:
IF Equipment car type is not locomotive or container
AND Car counting is performed
THEN:
• If load indicator is 'L' then loaded car count is incremented, otherwiseif load indicator is 'E' then empty car count is incremented
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment information is assembled.
Trigger Criteria:
Context: Equipment information is assembled
Applied to: Special Equipment Type?
Action: Special equipment evaluation is performed
Logic Flow:
IF Equipment information is assembled
AND Special equipment evaluation is performed
THEN:
• Equipment is classified as SBU van, conveying car, or regular equipment for appropriate processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment is classified as sbu van unit.
Trigger Criteria:
Context: Equipment is classified as SBU van unit
Applied to: Process International Service Unit
Action: Load indicator is 'E' (empty)
Logic Flow:
IF Equipment is classified as SBU van unit
AND Load indicator is 'E' (empty)
THEN:
• Equipment description is set to 'INTERNATIONAL SERVICE' and processing is completed
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment is classified as conveying car.
Trigger Criteria:
Context: Equipment is classified as conveying car
Applied to: Process Conveying Flat Car
Action: Conveying car processing is initiated
Logic Flow:
IF Equipment is classified as conveying car
AND Conveying car processing is initiated
THEN:
• Equipment description is set to 'CONVEYING FLAT CAR' and load indicator is set to 'E'
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment processing is complete and cargo information is available.
Trigger Criteria:
Context: Equipment processing is complete and cargo information is available
Applied to: Set Equipment Load/Empty Status
Action: Final load status determination is needed
Logic Flow:
IF Equipment processing is complete and cargo information is available
AND Final load status determination is needed
THEN:
• Load indicator is set based on cargo presence, equipment type, and special conditions with appropriate status adjustments for empty residue and empty equipment cargo
R-GCX003-cbl-01316 (+9)File: GCX003.cblBusiness Rule: Cargo Information Integration
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with bond type code is being processed.
Trigger Criteria:
Context: A cargo record with bond type code is being processed
Applied to: Bond Type Classification
Action: The system evaluates the bond type code from the cargo record
Logic Flow:
IF A cargo record with bond type code is being processed
AND The system evaluates the bond type code from the cargo record
THEN:
• The system should classify the bond as IT (Immediate Transport), TE (Transport Export), TR (Transit), IE (Immediate Export), or MT (Marine Transport) and apply corresponding processing rules
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record is being processed for bond information.
Trigger Criteria:
Context: A cargo record is being processed for bond information
Applied to: Extract Entry Number for Bond Display
Action: The system checks for entry number or in-bond control number availability
Logic Flow:
IF A cargo record is being processed for bond information
AND The system checks for entry number or in-bond control number availability
THEN:
• The system should extract the entry number if available, otherwise use the in-bond control number, or set to spaces if neither is available
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with load/empty status code is being processed.
Trigger Criteria:
Context: A cargo record with load/empty status code is being processed
Applied to: Process Load/Empty Status Code
Action: The system extracts the VID10 load/empty code from the cargo record
Logic Flow:
IF A cargo record with load/empty status code is being processed
AND The system extracts the VID10 load/empty code from the cargo record
THEN:
• The system should set the equipment load/empty indicator and apply corresponding validation rules based on the status
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being evaluated for empty equipment status.
Trigger Criteria:
Context: A cargo record is being evaluated for empty equipment status
Applied to: Process Empty Residue Handling
Action: The cargo has BOL type code indicating empty equipment or empty residue
Logic Flow:
IF A cargo record is being evaluated for empty equipment status
AND The cargo has BOL type code indicating empty equipment or empty residue
THEN:
• The system should classify the cargo as empty, update load/empty indicators, adjust equipment counts, and set appropriate display information
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record is being evaluated for special manifest requirements.
Trigger Criteria:
Context: A cargo record is being evaluated for special manifest requirements
Applied to: Set Special Manifest Flags
Action: The cargo has special manifest origin flag or special manifest special flag set
Logic Flow:
IF A cargo record is being evaluated for special manifest requirements
AND The cargo has special manifest origin flag or special manifest special flag set
THEN:
• The system should set corresponding special manifest processing flags (IT found, TE found, TR found, or USMX 88 found) based on cargo type and routing
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with bond type and control numbers is being processed.
Trigger Criteria:
Context: A cargo record with bond type and control numbers is being processed
Applied to: Process AMS Bond Information
Action: The system formats cargo information for display
Logic Flow:
IF A cargo record with bond type and control numbers is being processed
AND The system formats cargo information for display
THEN:
• The system should format bond information as 'AMS [bond_type] [bond_number]' for IT/IE types or 'AMS 7512 [bond_type] [bond_number]' for TE/TR/MT types, or 'PPR 7512 15 US-CA-US' for BOL type 15
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with status indicators is being processed.
Trigger Criteria:
Context: A cargo record with status indicators is being processed
Applied to: Validate Cargo Status Codes
Action: The system checks cargo status codes for pending, deleted, or error conditions
Logic Flow:
IF A cargo record with status indicators is being processed
AND The system checks cargo status codes for pending, deleted, or error conditions
THEN:
• The system should generate appropriate error messages (message 16) if cargo is in pending, deleted, or error status
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed at laredo tx station with segment 02 data.
Trigger Criteria:
Context: A cargo record is being processed at Laredo TX station with segment 02 data
Applied to: Process FEN Reference Numbers
Action: The system searches for FEN and KCM reference number qualifiers in the segment data
Logic Flow:
IF A cargo record is being processed at Laredo TX station with segment 02 data
AND The system searches for FEN and KCM reference number qualifiers in the segment data
THEN:
• The system should set FEN found flag if FEN qualifier exists with non-blank reference number, and KCM found flag if KCM qualifier exists with non-blank reference number
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with haulage information is being processed for send action.
Trigger Criteria:
Context: A cargo record with haulage information is being processed for send action
Applied to: Set Haulage Automation Flags
Action: The system determines port type (automated or paper) and current haulage automation status
Logic Flow:
IF A cargo record with haulage information is being processed for send action
AND The system determines port type (automated or paper) and current haulage automation status
THEN:
• The system should update haulage automation flag to 'N' if automated haulage at paper port, or to 'Y' if manual haulage at automated port
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record is being processed for condition information.
Trigger Criteria:
Context: A cargo record is being processed for condition information
Applied to: Extract Cargo Condition Response Code
Action: The system extracts the M1011 condition response code from the cargo record
Logic Flow:
IF A cargo record is being processed for condition information
AND The system extracts the M1011 condition response code from the cargo record
THEN:
• The system should store the condition response code in the report working storage for equipment tracking
R-GCX003-cbl-01326 (+5)File: GCX003.cblBusiness Rule: IT Bond Special Processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when it bond cargo is detected for processing.
Trigger Criteria:
Context: An IT bond cargo is detected for processing
Applied to: IT Bond Already Created for Train?
Action: The system checks if TR (Transport Record) has already been created for IT bond (GCUSRT-TR-CREATED-FOR-IT equals 'Y')
Logic Flow:
IF An IT bond cargo is detected for processing
AND The system checks if TR (Transport Record) has already been created for IT bond (GCUSRT-TR-CREATED-FOR-IT equals 'Y')
THEN:
• Skip IT bond processing and continue with next equipment item
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when it bond cargo requires processing and no tr has been created yet.
Trigger Criteria:
Context: An IT bond cargo requires processing and no TR has been created yet
Applied to: Request Action Type?
Action: The request action is evaluated (REQ-ACTION-SEND vs REQ-ACTION-REPORT)
Logic Flow:
IF An IT bond cargo requires processing and no TR has been created yet
AND The request action is evaluated (REQ-ACTION-SEND vs REQ-ACTION-REPORT)
THEN:
• Route to either authorization check for SEND actions or generate report-only message for REPORT actions
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when send action is requested for it bond processing. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A SEND action is requested for IT bond processing
Applied to: User Authorized for Special Manifests?
Action: The system checks user authorization flag (WS-USER-NOT-AUTH-4-SPCL-MANIF)
Logic Flow:
IF A SEND action is requested for IT bond processing
AND The system checks user authorization flag (WS-USER-NOT-AUTH-4-SPCL-MANIF)
THEN:
• If user is not authorized, generate authorization error message (43), otherwise proceed with special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when send action is requested for it bond processing. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A SEND action is requested for IT bond processing
Applied to: Generate Authorization Error Message
Action: User is not authorized for special manifests (WS-USER-NOT-AUTH-4-SPCL-MANIF is true)
Logic Flow:
IF A SEND action is requested for IT bond processing
AND User is not authorized for special manifests (WS-USER-NOT-AUTH-4-SPCL-MANIF is true)
THEN:
• Generate message 43 (authorization error) and add equipment line to report without creating special manifest
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when user is authorized for special manifests and request action is send.
Trigger Criteria:
Context: User is authorized for special manifests and request action is SEND
Applied to: Generate Special Manifest Creation Message
Action: IT bond processing requires special manifest creation
Logic Flow:
IF User is authorized for special manifests and request action is SEND
AND IT bond processing requires special manifest creation
THEN:
• Generate message 23 (special manifest creation), set IT export spawn flag, and initiate special manifest creation process
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when it bond cargo requires processing and no tr has been created.
Trigger Criteria:
Context: IT bond cargo requires processing and no TR has been created
Applied to: Generate Report-Only Message
Action: The request action is REPORT (not SEND)
Logic Flow:
IF IT bond cargo requires processing and no TR has been created
AND The request action is REPORT (not SEND)
THEN:
• Generate message 24 (report-only notification) and add equipment line to report
R-GCX003-cbl-01332 (+21)File: GCX003.cblBusiness Rule: TE Bond Port Change Processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being processed for port change validation.
Trigger Criteria:
Context: A cargo record is being processed for port change validation
Applied to: Cargo Found with TE Bond Type?
Action: The system checks if cargo exists and has Transport Export (TE) bond type
Logic Flow:
IF A cargo record is being processed for port change validation
AND The system checks if cargo exists and has Transport Export (TE) bond type
THEN:
• Processing continues only if cargo is found and bond type is TE, otherwise port change processing is skipped
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record is being processed for port change validation.
Trigger Criteria:
Context: A cargo record is being processed for port change validation
Applied to: Is TE Bond Cargo?
Action: The system checks the cargo's in-bond type code
Logic Flow:
IF A cargo record is being processed for port change validation
AND The system checks the cargo's in-bond type code
THEN:
• If the cargo is not TE (Transport Export) bond type, skip port change processing and exit
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when te bond cargo is being evaluated for port change.
Trigger Criteria:
Context: A TE bond cargo is being evaluated for port change
Applied to: TR Created for IT = Spaces?
Action: The system checks the TR Created for IT field
Logic Flow:
IF A TE bond cargo is being evaluated for port change
AND The system checks the TR Created for IT field
THEN:
• Port change processing continues only if TR Created for IT field is empty (spaces), otherwise processing is skipped
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when te bond cargo with empty tr created for it field is being processed.
Trigger Criteria:
Context: A TE bond cargo with empty TR Created for IT field is being processed
Applied to: Cargo Status ≠ Export Status?
Action: The system compares cargo short description with export status value
Logic Flow:
IF A TE bond cargo with empty TR Created for IT field is being processed
AND The system compares cargo short description with export status value
THEN:
• Port change processing continues only if cargo status does not equal export status, otherwise processing is skipped
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when te bond cargo that meets previous validation criteria is being processed.
Trigger Criteria:
Context: A TE bond cargo that meets previous validation criteria is being processed
Applied to: Cargo Billed as CPRS?
Action: The system checks if cargo is billed as CPRS
Logic Flow:
IF A TE bond cargo that meets previous validation criteria is being processed
AND The system checks if cargo is billed as CPRS
THEN:
• Port change processing continues only if cargo is billed as CPRS, otherwise processing is skipped
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when te bond cargo that is billed as cprs is being processed.
Trigger Criteria:
Context: A TE bond cargo that is billed as CPRS is being processed
Applied to: Location ID1 ≠ Current Station?
Action: The system compares cargo Location ID1 with current station code
Logic Flow:
IF A TE bond cargo that is billed as CPRS is being processed
AND The system compares cargo Location ID1 with current station code
THEN:
• Port change processing is triggered only if Location ID1 does not match current station code, otherwise processing is skipped
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when te bond cargo requires port change processing due to location mismatch.
Trigger Criteria:
Context: A TE bond cargo requires port change processing due to location mismatch
Applied to: Request Action = REPORT?
Action: The request action is REPORT
Logic Flow:
IF A TE bond cargo requires port change processing due to location mismatch
AND The request action is REPORT
THEN:
• Generate port change warning message (Message 19) with station information and add to report without creating special manifest
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when te bond cargo requires port change processing and request action is not report.
Trigger Criteria:
Context: A TE bond cargo requires port change processing and request action is not REPORT
Applied to: Request Action = SEND?
Action: The system checks if request action is SEND
Logic Flow:
IF A TE bond cargo requires port change processing and request action is not REPORT
AND The system checks if request action is SEND
THEN:
• Proceed to authorization validation if action is SEND, otherwise skip port change processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when te bond cargo requires port change processing and request action is send.
Trigger Criteria:
Context: A TE bond cargo requires port change processing and request action is SEND
Applied to: User Authorized for Special Manifests?
Action: The system checks user authorization for special manifests
Logic Flow:
IF A TE bond cargo requires port change processing and request action is SEND
AND The system checks user authorization for special manifests
THEN:
• If user is not authorized, generate authorization error message (Message 43) and add to report; if authorized, proceed with port change notification
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when te bond cargo requires port change and user is authorized for special manifests.
Trigger Criteria:
Context: A TE bond cargo requires port change and user is authorized for special manifests
Applied to: Generate Port Change Notification Message
Action: The system generates port change notification
Logic Flow:
IF A TE bond cargo requires port change and user is authorized for special manifests
AND The system generates port change notification
THEN:
• Create port change notification message (Message 20) and add to report
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when port change notification has been generated for authorized user.
Trigger Criteria:
Context: Port change notification has been generated for authorized user
Applied to: Set Port Change Spawn Flag
Action: The system sets processing flags
Logic Flow:
IF Port change notification has been generated for authorized user
AND The system sets processing flags
THEN:
• Set port change spawn flag to TRUE to trigger special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when port change spawn flag has been set for te bond cargo.
Trigger Criteria:
Context: Port change spawn flag has been set for TE bond cargo
Applied to: Create Special Manifest Request
Action: The system creates special manifest request
Logic Flow:
IF Port change spawn flag has been set for TE bond cargo
AND The system creates special manifest request
THEN:
• Execute special manifest creation process (Z870-CREATE-SPECIAL-MANIFEST) to generate required documentation for port change
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when te bond cargo is being processed for port change.
Trigger Criteria:
Context: A TE bond cargo is being processed for port change
Applied to: TR Created for IT = Spaces?
Action: The system checks if a TR record was previously created for IT purposes
Logic Flow:
IF A TE bond cargo is being processed for port change
AND The system checks if a TR record was previously created for IT purposes
THEN:
• If TR was already created for IT (field is not spaces), skip port change processing and exit
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when te bond cargo with no tr created for it is being processed.
Trigger Criteria:
Context: A TE bond cargo with no TR created for IT is being processed
Applied to: Cargo Status ≠ Export?
Action: The system checks the cargo's short description status
Logic Flow:
IF A TE bond cargo with no TR created for IT is being processed
AND The system checks the cargo's short description status
THEN:
• If the cargo status equals export status, skip port change processing and exit
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when te bond cargo that is not in export status and has no tr created for it.
Trigger Criteria:
Context: A TE bond cargo that is not in export status and has no TR created for IT
Applied to: Is CPRS Bill?
Action: The system checks if the cargo is billed as CPRS
Logic Flow:
IF A TE bond cargo that is not in export status and has no TR created for IT
AND The system checks if the cargo is billed as CPRS
THEN:
• If the cargo is not billed as CPRS, skip port change processing and exit
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when te bond cargo that is cprs billed and meets all previous validation criteria.
Trigger Criteria:
Context: A TE bond cargo that is CPRS billed and meets all previous validation criteria
Applied to: Location ID1 ≠ Current Port?
Action: The system compares the cargo's location ID1 with the current station crossing port code
Logic Flow:
IF A TE bond cargo that is CPRS billed and meets all previous validation criteria
AND The system compares the cargo's location ID1 with the current station crossing port code
THEN:
• If the locations match, skip port change processing and exit; if they differ, proceed with port change handling
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when port location mismatch is detected for te bond cargo.
Trigger Criteria:
Context: A port location mismatch is detected for TE bond cargo
Applied to: Generate Port Change Warning Message
Action: The request action is set to REPORT
Logic Flow:
IF A port location mismatch is detected for TE bond cargo
AND The request action is set to REPORT
THEN:
• Generate message nineteen with the current station crossing port code and add the report line to output
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when port location mismatch is detected and the request action is send.
Trigger Criteria:
Context: A port location mismatch is detected and the request action is SEND
Applied to: User Authorized for Special Manifest?
Action: The system checks if the user is authorized for special manifest creation
Logic Flow:
IF A port location mismatch is detected and the request action is SEND
AND The system checks if the user is authorized for special manifest creation
THEN:
• If not authorized, generate authorization error message and exit; if authorized, proceed with port change processing
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when user attempts to process a port change with send action.
Trigger Criteria:
Context: A user attempts to process a port change with send action
Applied to: Generate Authorization Error Message
Action: The user is not authorized for special manifest creation
Logic Flow:
IF A user attempts to process a port change with send action
AND The user is not authorized for special manifest creation
THEN:
• Generate message forty-three, add the report line to output, and exit port change processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when authorized user is processing a port change with send action.
Trigger Criteria:
Context: An authorized user is processing a port change with send action
Applied to: Generate Port Change Processing Message
Action: All validation criteria are met for port change processing
Logic Flow:
IF An authorized user is processing a port change with send action
AND All validation criteria are met for port change processing
THEN:
• Generate message twenty, add the report line to output, and prepare for special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when port change processing message has been generated for authorized user.
Trigger Criteria:
Context: Port change processing message has been generated for authorized user
Applied to: Set Port Change Spawn Flag
Action: The system prepares to create a special manifest for the port change
Logic Flow:
IF Port change processing message has been generated for authorized user
AND The system prepares to create a special manifest for the port change
THEN:
• Set the port change spawn flag to true to trigger special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when port change spawn flag has been set to true. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The port change spawn flag has been set to true
Applied to: Create Special Manifest for Port Change
Action: The system needs to create a special manifest for the port change
Logic Flow:
IF The port change spawn flag has been set to true
AND The system needs to create a special manifest for the port change
THEN:
• Call the special manifest creation procedure to handle the port change scenario
R-GCX003-cbl-01343 (+19)File: GCX003.cblBusiness Rule: TR Bond Diversion Processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record is being processed for tr bond diversion.
Trigger Criteria:
Context: A cargo record is being processed for TR bond diversion
Applied to: Cargo Found with TR Bond Type?
Action: The system checks if cargo exists and has TR bond type
Logic Flow:
IF A cargo record is being processed for TR bond diversion
AND The system checks if cargo exists and has TR bond type
THEN:
• Processing continues only if cargo is found and bond type is TR, otherwise diversion processing is skipped
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo with tr bond type exists.
Trigger Criteria:
Context: Cargo with TR bond type exists
Applied to: TR Created for IT = Spaces?
Action: The system checks the TR created for IT field
Logic Flow:
IF Cargo with TR bond type exists
AND The system checks the TR created for IT field
THEN:
• Diversion processing continues only if TR created for IT field is spaces (not already created), otherwise processing is skipped
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo with tr bond type exists and tr has not been created for it.
Trigger Criteria:
Context: Cargo with TR bond type exists and TR has not been created for IT
Applied to: Cargo Status = Release?
Action: The system checks the cargo short description status
Logic Flow:
IF Cargo with TR bond type exists and TR has not been created for IT
AND The system checks the cargo short description status
THEN:
• Diversion processing continues only if cargo status equals release status, otherwise processing is skipped
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo qualifies for tr bond diversion processing.
Trigger Criteria:
Context: Cargo qualifies for TR bond diversion processing
Applied to: Request Action Type?
Action: The system evaluates the request action type
Logic Flow:
IF Cargo qualifies for TR bond diversion processing
AND The system evaluates the request action type
THEN:
• If action is REPORT, generate report message; if action is SEND, proceed to authorization check
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo qualifies for tr bond diversion and request action is report.
Trigger Criteria:
Context: Cargo qualifies for TR bond diversion and request action is REPORT
Applied to: Generate Message 18 - TR Bond Diversion Report
Action: The system processes the diversion for reporting
Logic Flow:
IF Cargo qualifies for TR bond diversion and request action is REPORT
AND The system processes the diversion for reporting
THEN:
• Message 18 is generated indicating TR bond diversion detected and added to report lines
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo qualifies for tr bond diversion and request action is send.
Trigger Criteria:
Context: Cargo qualifies for TR bond diversion and request action is SEND
Applied to: User Authorized for Special Manifest?
Action: The system checks user authorization for special manifest creation
Logic Flow:
IF Cargo qualifies for TR bond diversion and request action is SEND
AND The system checks user authorization for special manifest creation
THEN:
• If user is not authorized, generate error message 43; if authorized, proceed with manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when user attempts to send tr bond diversion but lacks special manifest authorization.
Trigger Criteria:
Context: User attempts to send TR bond diversion but lacks special manifest authorization
Applied to: Generate Message 43 - Not Authorized Error
Action: The system validates user permissions
Logic Flow:
IF User attempts to send TR bond diversion but lacks special manifest authorization
AND The system validates user permissions
THEN:
• Message 43 is generated indicating user is not authorized for special manifest creation and processing continues without manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when user is authorized to create special manifests for tr bond diversion.
Trigger Criteria:
Context: User is authorized to create special manifests for TR bond diversion
Applied to: Generate Message 23 - TR Bond Diversion Send
Action: The system processes the send request
Logic Flow:
IF User is authorized to create special manifests for TR bond diversion
AND The system processes the send request
THEN:
• Message 23 is generated confirming TR bond diversion will be sent and special manifest creation is initiated
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when authorized tr bond diversion send request is being processed.
Trigger Criteria:
Context: Authorized TR bond diversion send request is being processed
Applied to: Set Detour Spawn Flag
Action: The system prepares for special manifest creation
Logic Flow:
IF Authorized TR bond diversion send request is being processed
AND The system prepares for special manifest creation
THEN:
• Detour spawn flag is set to trigger subsequent special manifest processing workflow
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when detour spawn flag is set for tr bond diversion.
Trigger Criteria:
Context: Detour spawn flag is set for TR bond diversion
Applied to: Create Special Manifest for TR Diversion
Action: The system initiates special manifest creation
Logic Flow:
IF Detour spawn flag is set for TR bond diversion
AND The system initiates special manifest creation
THEN:
• Special manifest creation process is invoked to handle the TR bond diversion with appropriate cargo and equipment details
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record is being processed for detour evaluation.
Trigger Criteria:
Context: A cargo record is being processed for detour evaluation
Applied to: Cargo Found with TR Bond Type?
Action: The system checks the cargo bond type code
Logic Flow:
IF A cargo record is being processed for detour evaluation
AND The system checks the cargo bond type code
THEN:
• If cargo has bond type 'US-CAN-US' and is not flagged with special USMX TR processing, proceed with TR bond detour processing, otherwise skip TR bond processing
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo with tr bond type is being evaluated for detour processing.
Trigger Criteria:
Context: Cargo with TR bond type is being evaluated for detour processing
Applied to: TR Created for IT Flag = Spaces?
Action: The system checks the TR created for IT flag
Logic Flow:
IF Cargo with TR bond type is being evaluated for detour processing
AND The system checks the TR created for IT flag
THEN:
• If the TR created for IT flag is blank (spaces), continue with TR bond detour processing, otherwise skip processing as TR already exists
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when tr bond cargo with blank tr created flag is being processed.
Trigger Criteria:
Context: TR bond cargo with blank TR created flag is being processed
Applied to: Cargo Status = Release?
Action: The system compares the cargo short description with the release status constant
Logic Flow:
IF TR bond cargo with blank TR created flag is being processed
AND The system compares the cargo short description with the release status constant
THEN:
• If cargo short description equals the release status value, proceed with action-based processing, otherwise skip TR bond detour processing
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when tr bond cargo with release status is ready for detour processing.
Trigger Criteria:
Context: TR bond cargo with release status is ready for detour processing
Applied to: Request Action Type?
Action: The system evaluates the request action type
Logic Flow:
IF TR bond cargo with release status is ready for detour processing
AND The system evaluates the request action type
THEN:
• If action is REPORT, generate warning message 18 for TR bond detour detection; if action is SEND, check user authorization for special manifests
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when send request requires tr bond detour processing.
Trigger Criteria:
Context: A SEND request requires TR bond detour processing
Applied to: User Authorized for Special Manifests?
Action: The system checks if user is authorized for special manifest creation
Logic Flow:
IF A SEND request requires TR bond detour processing
AND The system checks if user is authorized for special manifest creation
THEN:
• If user is not authorized for special manifests, generate error message 43 for unauthorized access; if authorized, proceed with special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when request action is report and tr bond detour conditions are met.
Trigger Criteria:
Context: Request action is REPORT and TR bond detour conditions are met
Applied to: Generate Warning Message 18
Action: The system processes the TR bond detour for reporting
Logic Flow:
IF Request action is REPORT and TR bond detour conditions are met
AND The system processes the TR bond detour for reporting
THEN:
• Generate warning message 18 indicating TR bond detour detected and add report line to output
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when send request requires special manifest creation but user lacks authorization.
Trigger Criteria:
Context: A SEND request requires special manifest creation but user lacks authorization
Applied to: Generate Error Message 43
Action: The system attempts to create a special manifest
Logic Flow:
IF A SEND request requires special manifest creation but user lacks authorization
AND The system attempts to create a special manifest
THEN:
• Generate error message 43 for user not authorized for special manifests and add to report output
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when user is authorized for special manifests and send action is requested.
Trigger Criteria:
Context: User is authorized for special manifests and SEND action is requested
Applied to: Generate Information Message 23
Action: The system creates a TR bond special manifest
Logic Flow:
IF User is authorized for special manifests and SEND action is requested
AND The system creates a TR bond special manifest
THEN:
• Generate information message 23 indicating TR bond special manifest created, set detour spawn flag, and add report line to output
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when tr bond special manifest creation is authorized and initiated.
Trigger Criteria:
Context: TR bond special manifest creation is authorized and initiated
Applied to: Set Detour Spawn Flag
Action: The system prepares for special manifest processing
Logic Flow:
IF TR bond special manifest creation is authorized and initiated
AND The system prepares for special manifest processing
THEN:
• Set the detour spawn flag to true to trigger subsequent special manifest creation workflow
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when detour spawn flag is set for tr bond processing. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Detour spawn flag is set for TR bond processing
Applied to: Create Special Manifest Entry
Action: The system creates the special manifest entry
Logic Flow:
IF Detour spawn flag is set for TR bond processing
AND The system creates the special manifest entry
THEN:
• Call special manifest creation procedure to generate appropriate manifest entry for the TR bond detour scenario
R-GCX003-cbl-01353 (+7)File: GCX003.cblBusiness Rule: Special Manifest Authorization Check
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when user is processing a non-aei train request and user security check is complete.
Trigger Criteria:
Context: A user is processing a non-AEI train request and user security check is complete
Applied to: Check User Special Manifest Authorization Flag
Action: The system checks the user's special manifest authorization flag in the user security table
Logic Flow:
IF A user is processing a non-AEI train request and user security check is complete
AND The system checks the user's special manifest authorization flag in the user security table
THEN:
• If the user's special manifest flag is not 'S' and the request is not an AEI train send, then set the user not authorized for special manifest flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when user is not authorized for special manifests and the action type is send and there are no existing errors.
Trigger Criteria:
Context: A user is not authorized for special manifests and the action type is SEND and there are no existing errors
Applied to: Generate Authorization Error Message
Action: The system processes IT bond cargo that requires special manifest creation or processes TE bond cargo requiring port change or processes TR/default bond cargo requiring detour processing
Logic Flow:
IF A user is not authorized for special manifests and the action type is SEND and there are no existing errors
AND The system processes IT bond cargo that requires special manifest creation or processes TE bond cargo requiring port change or processes TR/default bond cargo requiring detour processing
THEN:
• Generate error message 43 indicating user is not authorized for special manifest operations and add the message to the report
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train request is being processed.
Trigger Criteria:
Context: A train request is being processed
Applied to: User Authorized for Special Manifests?
Action: The request type equals the AEI request type constant
Logic Flow:
IF A train request is being processed
AND The request type equals the AEI request type constant
THEN:
• Set AEI train send flag to YES and bypass special manifest authorization checks
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo is found with it bond type and cargo is not already created for it and cargo does not have special manifest origin flag set.
Trigger Criteria:
Context: Cargo is found with IT bond type and cargo is not already created for IT and cargo does not have special manifest origin flag set
Applied to: Bond Type Requires Special Manifest?
Action: The system processes the cargo for special manifest requirements
Logic Flow:
IF Cargo is found with IT bond type and cargo is not already created for IT and cargo does not have special manifest origin flag set
AND The system processes the cargo for special manifest requirements
THEN:
• If user is authorized for special manifests or action is not SEND, then create special manifest and generate message 23 or 24, otherwise generate authorization error message 43
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo has te bond type and cargo is not created for it and cargo location does not match train crossing port and user is processing the cargo.
Trigger Criteria:
Context: Cargo has TE bond type and cargo is not created for IT and cargo location does not match train crossing port and user is processing the cargo
Applied to: Action Type is SEND?
Action: The action type is SEND and user is not authorized for special manifests
Logic Flow:
IF Cargo has TE bond type and cargo is not created for IT and cargo location does not match train crossing port and user is processing the cargo
AND The action type is SEND and user is not authorized for special manifests
THEN:
• Generate authorization error message 43 and do not create port change manifest, otherwiseif action is SEND and user is authorized, generate message 20 and create port change spawn
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo has us-canada-us bond type and cargo is not created for it and cargo has release status and cargo does not have special tr flag.
Trigger Criteria:
Context: Cargo has US-Canada-US bond type and cargo is not created for IT and cargo has release status and cargo does not have special TR flag
Applied to: Allow Special Manifest Creation
Action: The action type is SEND and user is not authorized for special manifests
Logic Flow:
IF Cargo has US-Canada-US bond type and cargo is not created for IT and cargo has release status and cargo does not have special TR flag
AND The action type is SEND and user is not authorized for special manifests
THEN:
• Generate authorization error message 43 and do not create detour manifest, otherwiseif action is SEND and user is authorized, generate message 23 and create detour spawn
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo has default bond type and cargo is not created for it and cargo does not have special manifest origin flag.
Trigger Criteria:
Context: Cargo has default bond type and cargo is not created for IT and cargo does not have special manifest origin flag
Applied to: Continue Processing
Action: Cargo has release status and action type is SEND and user is not authorized for special manifests
Logic Flow:
IF Cargo has default bond type and cargo is not created for IT and cargo does not have special manifest origin flag
AND Cargo has release status and action type is SEND and user is not authorized for special manifests
THEN:
• Generate authorization error message 43 and do not create detour manifest, otherwiseif cargo has release status and action is SEND and user is authorized, generate message 23 and create detour spawn, orif cargo does not have release status, generate message 31
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has export bond type and cargo does not have special 88 flag and origin-destination country codes are us-mexico and train crossing port is not laredo texas station.
Trigger Criteria:
Context: Cargo has export bond type and cargo does not have special 88 flag and origin-destination country codes are US-Mexico and train crossing port is not Laredo Texas station
Applied to: End Authorization Check
Action: Cargo does not have special manifest flag and action type is SEND and user is not authorized for special manifests
Logic Flow:
IF Cargo has export bond type and cargo does not have special 88 flag and origin-destination country codes are US-Mexico and train crossing port is not Laredo Texas station
AND Cargo does not have special manifest flag and action type is SEND and user is not authorized for special manifests
THEN:
• Generate authorization error message 43 and do not create special manifest, otherwiseif action is SEND and user is authorized, generate message 23 and create 88-TR detour spawn, orif cargo has special manifest flag, generate message 31
R-GCX003-cbl-01361 (+12)File: GCX003.cblBusiness Rule: Special Manifest Creation Logic
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with bond type and special manifest flags.
Trigger Criteria:
Context: A cargo record exists with bond type and special manifest flags
Applied to: IT Bond Type?
Action: The cargo has IT bond type AND the special manifest original flag is set
Logic Flow:
IF A cargo record exists with bond type and special manifest flags
AND The cargo has IT bond type AND the special manifest original flag is set
THEN:
• Set IT export spawn flag and trigger special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists with bond type and special manifest flags.
Trigger Criteria:
Context: A cargo record exists with bond type and special manifest flags
Applied to: TE Bond Type?
Action: The cargo has TE bond type AND the special manifest special flag is set
Logic Flow:
IF A cargo record exists with bond type and special manifest flags
AND The cargo has TE bond type AND the special manifest special flag is set
THEN:
• Set TE port change spawn flag and trigger special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists with export bond type and routing information.
Trigger Criteria:
Context: A cargo record exists with export bond type and routing information
Applied to: Export Bond with USMX Route?
Action: The cargo is export type AND has USMX country codes AND has special 88 flag set
Logic Flow:
IF A cargo record exists with export bond type and routing information
AND The cargo is export type AND has USMX country codes AND has special 88 flag set
THEN:
• Set 88 TR detour spawn flag and trigger special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with bond type and special flags.
Trigger Criteria:
Context: A cargo record exists with bond type and special flags
Applied to:US-CAN-US Bond with Special TR Flag?
Action: The cargo has US-Canada-US bond type AND has special TR flag set
Logic Flow:
IF A cargo record exists with bond type and special flags
AND The cargo has US-Canada-US bond type AND has special TR flag set
THEN:
• Set TR detour spawn flag and trigger special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with bond type classification.
Trigger Criteria:
Context: A cargo record exists with bond type classification
Applied to: Default Bond Type?
Action: The cargo has default bond type
Logic Flow:
IF A cargo record exists with bond type classification
AND The cargo has default bond type
THEN:
• Set detour spawn flag and trigger special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill exists without associated cargo and movement type information.
Trigger Criteria:
Context: A waybill exists without associated cargo and movement type information
Applied to: Original US-US Movement?
Action: The waybill represents original US-US domestic movement
Logic Flow:
IF A waybill exists without associated cargo and movement type information
AND The waybill represents original US-US domestic movement
THEN:
• Set US-US detour spawn flag and trigger special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when special manifest record needs to be created for diversion processing.
Trigger Criteria:
Context: A special manifest record needs to be created for diversion processing
Applied to: Set Diversion Type in Manifest
Action: The manifest type is determined to be diversion
Logic Flow:
IF A special manifest record needs to be created for diversion processing
AND The manifest type is determined to be diversion
THEN:
• Set diversion flag in manifest record and populate equipment ID, waybill number, and waybill date
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when special manifest record needs to be created for it export processing.
Trigger Criteria:
Context: A special manifest record needs to be created for IT export processing
Applied to: Set IT Export Type in Manifest
Action: The manifest type is determined to be IT export
Logic Flow:
IF A special manifest record needs to be created for IT export processing
AND The manifest type is determined to be IT export
THEN:
• Set IT export flag in manifest record and populate equipment ID, waybill number, and waybill date
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when special manifest record needs to be created for port change processing.
Trigger Criteria:
Context: A special manifest record needs to be created for port change processing
Applied to: Set Port Change Type in Manifest
Action: The manifest type is determined to be port change
Logic Flow:
IF A special manifest record needs to be created for port change processing
AND The manifest type is determined to be port change
THEN:
• Set port change flag in manifest record and populate equipment ID
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when special manifest record needs to be created for export tr processing.
Trigger Criteria:
Context: A special manifest record needs to be created for export TR processing
Applied to: Set Export TR Type in Manifest
Action: The manifest type is determined to be export TR
Logic Flow:
IF A special manifest record needs to be created for export TR processing
AND The manifest type is determined to be export TR
THEN:
• Set export TR flag in manifest record and populate equipment ID, waybill number, and waybill date
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when special manifest record needs to be created for us-us detour processing.
Trigger Criteria:
Context: A special manifest record needs to be created for US-US detour processing
Applied to: Set US-US Detour Type in Manifest
Action: The manifest type is determined to be US-US detour
Logic Flow:
IF A special manifest record needs to be created for US-US detour processing
AND The manifest type is determined to be US-US detour
THEN:
• Set US-US detour flag in manifest record, clear CCN field, and populate equipment ID, waybill number, and waybill date
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when special manifest record is being configured with routing information.
Trigger Criteria:
Context: A special manifest record is being configured with routing information
Applied to: Add Border and Country Codes
Action: Border and country code information is available
Logic Flow:
IF A special manifest record is being configured with routing information
AND Border and country code information is available
THEN:
• Populate manifest with border code, border name, origin country, and destination country codes
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when special manifest record has been fully configured with all required information.
Trigger Criteria:
Context: A special manifest record has been fully configured with all required information
Applied to: Queue Manifest for Processing
Action: The manifest is ready for processing
Logic Flow:
IF A special manifest record has been fully configured with all required information
AND The manifest is ready for processing
THEN:
• Add manifest to GCX101 spawn table and increment spawn counter for batch processing
Business Justification: Defines the strict business conditions required to proceed when cargo record exists for the equipment.
Trigger Criteria:
Context: A cargo record exists for the equipment
Applied to: Empty Equipment or Empty Residue?
Action: The cargo is classified as empty equipment (M1109 BOL type) or empty residue
Logic Flow:
IF A cargo record exists for the equipment
AND The cargo is classified as empty equipment (M1109 BOL type) or empty residue
THEN:
• Skip detour processing and continue with normal flow
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo has it bond type and cargo is found.
Trigger Criteria:
Context: Cargo has IT bond type and cargo is found
Applied to: Special Manifest Original?
Action: The cargo has special manifest original flag set
Logic Flow:
IF Cargo has IT bond type and cargo is found
AND The cargo has special manifest original flag set
THEN:
• Skip detour processing and continue with normal flow
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has te (transport export) bond type and cargo is found.
Trigger Criteria:
Context: Cargo has TE (Transport Export) bond type and cargo is found
Applied to: Trigger TE Bond Port Change Processing
Action: The cargo does not have special manifest original flag OR TR created for IT flag is set
Logic Flow:
IF Cargo has TE (Transport Export) bond type and cargo is found
AND The cargo does not have special manifest original flag OR TR created for IT flag is set
THEN:
• Trigger TE bond port change processing through detour mechanism
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo has us-canada-us bond type or default bond type and cargo is found.
Trigger Criteria:
Context: Cargo has US-Canada-US bond type or Default bond type and cargo is found
Applied to: Trigger TR Bond Diversion Processing
Action: TR created for IT flag is spaces (not set) AND cargo status equals release status
Logic Flow:
IF Cargo has US-Canada-US bond type or Default bond type and cargo is found
AND TR created for IT flag is spaces (not set) AND cargo status equals release status
THEN:
• Trigger TR bond diversion processing through detour mechanism
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo has export bond type and cargo is found.
Trigger Criteria:
Context: Cargo has Export bond type and cargo is found
Applied to: Trigger US-MX Export Detour Processing
Action: Origin-destination country codes equal 'USMX' AND current station is not Laredo TX station
Logic Flow:
IF Cargo has Export bond type and cargo is found
AND Origin-destination country codes equal 'USMX' AND current station is not Laredo TX station
THEN:
• Trigger US-Mexico export detour processing through detour mechanism
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when no cargo is found for the equipment.
Trigger Criteria:
Context: No cargo is found for the equipment
Applied to: Trigger Original US-US Movement Detour Processing
Action: Origin province state is US AND destination province state is US AND equipment is loaded AND equipment is not a conveying car
Logic Flow:
IF No cargo is found for the equipment
AND Origin province state is US AND destination province state is US AND equipment is loaded AND equipment is not a conveying car
THEN:
• Trigger original US-US movement detour processing through detour mechanism
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo and equipment information is available for processing.
Trigger Criteria:
Context: Cargo and equipment information is available for processing
Applied to: No Detour Required
Action: None of the detour trigger conditions are met (empty cargo, special manifests, bond mismatches, or routing issues)
Logic Flow:
IF Cargo and equipment information is available for processing
AND None of the detour trigger conditions are met (empty cargo, special manifests, bond mismatches, or routing issues)
THEN:
• Continue with normal cargo processing without invoking detour procedures
Business Justification: Ensures correct system behavior and process compliance when request for detour processing is initiated.
Trigger Criteria:
Context: A request for detour processing is initiated
Applied to: Cargo Found?
Action: The system checks for cargo existence
Logic Flow:
IF A request for detour processing is initiated
AND The system checks for cargo existence
THEN:
• If cargo is found, proceed to bond type classification; if no cargo is found, proceed to original US-US movement detour processing
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo exists and detour processing is required.
Trigger Criteria:
Context: Cargo exists and detour processing is required
Applied to: Bond Type Classification
Action: The system evaluates the cargo bond type
Logic Flow:
IF Cargo exists and detour processing is required
AND The system evaluates the cargo bond type
THEN:
• If bond type is TE (Transport Export), route to TE bond detour processing; if bond type is TR (Transit), route to TR bond detour processing; if bond type is default, route to border clearance detour processing; if bond type is export, route to US-MX export detour processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when te bond cargo is being processed and cargo is not created for it and cargo status is not export and cargo is billable as cprs.
Trigger Criteria:
Context: TE bond cargo is being processed and cargo is not created for IT and cargo status is not export and cargo is billable as CPRS
Applied to: Port Change Required?
Action: The system compares the cargo location ID with the station code
Logic Flow:
IF TE bond cargo is being processed and cargo is not created for IT and cargo status is not export and cargo is billable as CPRS
AND The system compares the cargo location ID with the station code
THEN:
• If the cargo location ID does not match the station code, proceed to release status check; otherwise, end detour processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo requires detour processing and port change conditions are met.
Trigger Criteria:
Context: Cargo requires detour processing and port change conditions are met
Applied to: Release Status Check
Action: The system checks the cargo release status
Logic Flow:
IF Cargo requires detour processing and port change conditions are met
AND The system checks the cargo release status
THEN:
• If cargo status is not export status and meets release criteria, proceed to user authorization check; otherwise, continue with standard processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when detour processing requires special manifest creation.
Trigger Criteria:
Context: Detour processing requires special manifest creation
Applied to: User Authorization Check
Action: The system validates user authorization for special manifests
Logic Flow:
IF Detour processing requires special manifest creation
AND The system validates user authorization for special manifests
THEN:
• If user is authorized for special manifests, proceed to request action type check; if user is not authorized, generate authorization error message
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when user is authorized and detour processing is required.
Trigger Criteria:
Context: User is authorized and detour processing is required
Applied to: Request Action Type?
Action: The system evaluates the request action type
Logic Flow:
IF User is authorized and detour processing is required
AND The system evaluates the request action type
THEN:
• If request action is SEND, proceed to create special manifest spawn; if request action is REPORT, create warning message only
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when request action is send and user is authorized.
Trigger Criteria:
Context: Request action is SEND and user is authorized
Applied to: Create Special Manifest Spawn
Action: The system creates a special manifest spawn
Logic Flow:
IF Request action is SEND and user is authorized
AND The system creates a special manifest spawn
THEN:
• Set appropriate manifest type flags and generate corresponding manifest based on detour classification
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when request action is report or user lacks special manifest authorization.
Trigger Criteria:
Context: Request action is REPORT or user lacks special manifest authorization
Applied to: Create Warning Message
Action: The system processes the detour requirement
Logic Flow:
IF Request action is REPORT or user lacks special manifest authorization
AND The system processes the detour requirement
THEN:
• Generate appropriate warning message indicating the detour condition without creating special manifest
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when te bond cargo requires port change and user is authorized.
Trigger Criteria:
Context: TE bond cargo requires port change and user is authorized
Applied to: Generate Port Change Manifest
Action: The system generates a port change manifest
Logic Flow:
IF TE bond cargo requires port change and user is authorized
AND The system generates a port change manifest
THEN:
• Create GCX101 spawn with port change flag set and include cargo details for manifest processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when tr bond cargo is not created for it and has release status.
Trigger Criteria:
Context: TR bond cargo is not created for IT and has release status
Applied to: Generate TR Bond Detour Manifest
Action: The system generates a TR bond detour manifest
Logic Flow:
IF TR bond cargo is not created for IT and has release status
AND The system generates a TR bond detour manifest
THEN:
• Create GCX101 spawn with detour flag set and include cargo and equipment details for manifest processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when default bond cargo is not created for it and has release status.
Trigger Criteria:
Context: Default bond cargo is not created for IT and has release status
Applied to: Generate Border Clearance Manifest
Action: The system generates a border clearance manifest
Logic Flow:
IF Default bond cargo is not created for IT and has release status
AND The system generates a border clearance manifest
THEN:
• Create GCX101 spawn with detour flag set for border clearance processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when export cargo with us-mx country codes at non-laredo station and special manifest field is empty.
Trigger Criteria:
Context: Export cargo with US-MX country codes at non-Laredo station and special manifest field is empty
Applied to: Generate US-MX Export Manifest
Action: The system generates a US-MX export manifest
Logic Flow:
IF Export cargo with US-MX country codes at non-Laredo station and special manifest field is empty
AND The system generates a US-MX export manifest
THEN:
• Create GCX101 spawn with export TR flag set for special manifest processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill is found but no cargo exists and origin and destination are both us states.
Trigger Criteria:
Context: Waybill is found but no cargo exists and origin and destination are both US states
Applied to: Generate US-US Detour Manifest
Action: The system generates a US-US movement detour manifest
Logic Flow:
IF Waybill is found but no cargo exists and origin and destination are both US states
AND The system generates a US-US movement detour manifest
THEN:
• Create GCX101 spawn with US-US detour flag set and include waybill details for manifest processing
Business Justification: Defines the strict business conditions required to proceed when report is being finalized.
Trigger Criteria:
Context: A report is being finalized
Applied to: Set Report End Marker
Action: The current report line at the report index is blank
Logic Flow:
IF A report is being finalized
AND The current report line at the report index is blank
THEN:
• Set the report end marker flag for that line to indicate end of report
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report has been built with multiple lines.
Trigger Criteria:
Context: A report has been built with multiple lines
Applied to: Capture Report Line Count
Action: Finalizing the report structure
Logic Flow:
IF A report has been built with multiple lines
AND Finalizing the report structure
THEN:
• Set the last line number to the current report index and new report index
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train manifest report is being generated.
Trigger Criteria:
Context: A train manifest report is being generated
Applied to: Build Header Line 1 - Train Information & Build Header Line 2 - User Information
Action: Building the report header
Logic Flow:
IF A train manifest report is being generated
AND Building the report header
THEN:
• Set header line 1 flag, populate train ID from request, and set origin station name from station table
• Set header line 2 flag and populate user ID, terminal ID, processing date, hour, and minutes from system session
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train manifest report is being generated.
Trigger Criteria:
Context: A train manifest report is being generated
Applied to: Build Header Line 4 - Train Details
Action: Building the detailed train information header
Logic Flow:
IF A train manifest report is being generated
AND Building the detailed train information header
THEN:
• Set header line 4 flag and populate US customs train ID and ETA components (year, month, day, hour, minutes)
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train manifest is being processed.
Trigger Criteria:
Context: A train manifest is being processed
Applied to: Determine Request Action Type
Action: Building the processing status header
Logic Flow:
IF A train manifest is being processed
AND Building the processing status header
THEN:
• Evaluate the request action type and branch to appropriate header processing logic
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train manifest processing request.
Trigger Criteria:
Context: A train manifest processing request
Applied to: Set SEND Action Header
Action: The request action type is SEND
Logic Flow:
IF A train manifest processing request
AND The request action type is SEND
THEN:
• Set the header to indicate SEND action type
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train manifest processing request.
Trigger Criteria:
Context: A train manifest processing request
Applied to: Set REPORT Action Header
Action: The request action type is REPORT
Logic Flow:
IF A train manifest processing request
AND The request action type is REPORT
THEN:
• Set the header to indicate REPORT action and determine result status based on errors and warnings
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train manifest processing request.
Trigger Criteria:
Context: A train manifest processing request
Applied to: Set OTHER Action Header
Action: The request action type is neither SEND nor REPORT
Logic Flow:
IF A train manifest processing request
AND The request action type is neither SEND nor REPORT
THEN:
• Set the header to show the request type and mark result as ABORT
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when send action has been processed.
Trigger Criteria:
Context: A SEND action has been processed
Applied to: Check Processing Results
Action: Determining the processing results
Logic Flow:
IF A SEND action has been processed
AND Determining the processing results
THEN:
• If no errors and no spawns occurred, set SENT status with warning count, otherwise set NOT SENT status with error and warning counts
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when send action completed without errors or spawns.
Trigger Criteria:
Context: A SEND action completed without errors or spawns
Applied to: Set SENT Status with Warning Count
Action: Setting the processing result status
Logic Flow:
IF A SEND action completed without errors or spawns
AND Setting the processing result status
THEN:
• Set result as SENT and include the warning count in the header
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when send action encountered errors or spawns.
Trigger Criteria:
Context: A SEND action encountered errors or spawns
Applied to: Set NOT SENT Status with Error/Warning Counts
Action: Setting the processing result status
Logic Flow:
IF A SEND action encountered errors or spawns
AND Setting the processing result status
THEN:
• Set result as NOT SENT and include both error count and warning count in the header
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report action has been processed.
Trigger Criteria:
Context: A REPORT action has been processed
Applied to: Set REPORT Action Header
Action: Setting the processing result status
Logic Flow:
IF A REPORT action has been processed
AND Setting the processing result status
THEN:
• If no errors and no warnings, set result as NO MESSAGE, otherwise set result as MESSAGE with warning and error counts including DSP count
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train manifest report structure is being finalized.
Trigger Criteria:
Context: A train manifest report structure is being finalized
Applied to: Build Detail Headers
Action: Setting up the detail section headers
Logic Flow:
IF A train manifest report structure is being finalized
AND Setting up the detail section headers
THEN:
• Set detail header line 1 and detail header line 2 flags to create column headers for equipment and cargo details
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when all report header lines have been constructed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All report header lines have been constructed
Applied to: Copy Headers to Report Lines
Action: Finalizing the report structure
Logic Flow:
IF All report header lines have been constructed
AND Finalizing the report structure
THEN:
• Copy the first five report lines to the corresponding email text lines for output
R-GCX003-cbl-01409 (+10)File: GCX003.cblBusiness Rule: Processing Result Determination
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train manifest processing request has been completed.
Trigger Criteria:
Context: A train manifest processing request has been completed
Applied to: Any Processing Errors?
Action: The system checks for any processing errors in the report
Logic Flow:
IF A train manifest processing request has been completed
AND The system checks for any processing errors in the report
THEN:
• The system branches to either successful processing path or error handling path based on error presence
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train manifest processing has completed with no errors and no spawn messages.
Trigger Criteria:
Context: Train manifest processing has completed with no errors and no spawn messages
Applied to: SENT
Action: The system determines the final result status
Logic Flow:
IF Train manifest processing has completed with no errors and no spawn messages
AND The system determines the final result status
THEN:
• The result status is set to SENT indicating successful transmission to customs
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train manifest processing has completed with no errors but has spawn messages.
Trigger Criteria:
Context: Train manifest processing has completed with no errors but has spawn messages
Applied to: NOT SENT
Action: The system determines the final result status
Logic Flow:
IF Train manifest processing has completed with no errors but has spawn messages
AND The system determines the final result status
THEN:
• The result status is set to NOT SENT indicating special processing is required
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train manifest processing has completed successfully. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Train manifest processing has completed successfully
Applied to: Copy Warning Count to Display
Action: The system prepares the result display information
Logic Flow:
IF Train manifest processing has completed successfully
AND The system prepares the result display information
THEN:
• The warning count is copied to the appropriate display field for the success scenario
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train manifest processing has spawn messages that need special handling.
Trigger Criteria:
Context: Train manifest processing has spawn messages that need special handling
Applied to: Add Spawn Count to Error Count
Action: The system calculates the total error count for display
Logic Flow:
IF Train manifest processing has spawn messages that need special handling
AND The system calculates the total error count for display
THEN:
• The spawn count is added to the existing error count to show total issues
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train manifest processing completed successfully but generated spawn messages.
Trigger Criteria:
Context: Train manifest processing completed successfully but generated spawn messages
Applied to: Trigger Special Manifest Processing
Action: The system needs to handle special processing requirements
Logic Flow:
IF Train manifest processing completed successfully but generated spawn messages
AND The system needs to handle special processing requirements
THEN:
• Special manifest processing is triggered using GCX101 spawn functionality
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train manifest processing has errors but no spawn messages.
Trigger Criteria:
Context: Train manifest processing has errors but no spawn messages
Applied to: Convert Error Messages to Warning Messages
Action: The system processes error messages for final reporting
Logic Flow:
IF Train manifest processing has errors but no spawn messages
AND The system processes error messages for final reporting
THEN:
• Specific error messages (type 43) are converted to warning messages if error count matches type 43 count
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train manifest processing has both errors and spawn messages.
Trigger Criteria:
Context: Train manifest processing has both errors and spawn messages
Applied to: Convert Spawn Messages to Diversion Messages
Action: The system processes messages for final reporting
Logic Flow:
IF Train manifest processing has both errors and spawn messages
AND The system processes messages for final reporting
THEN:
• Spawn diversion messages are converted to message 19 (diversion) and spawn ITE messages are converted to message 18 (detour)
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train manifest processing has both errors and spawn messages.
Trigger Criteria:
Context: Train manifest processing has both errors and spawn messages
Applied to: Add Spawn Count to Warning Count
Action: The system calculates final warning count for display
Logic Flow:
IF Train manifest processing has both errors and spawn messages
AND The system calculates final warning count for display
THEN:
• The spawn count is added to the existing warning count
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train manifest processing result determination is complete.
Trigger Criteria:
Context: Train manifest processing result determination is complete
Applied to: Set Train Header Information
Action: The system prepares the final report header
Logic Flow:
IF Train manifest processing result determination is complete
AND The system prepares the final report header
THEN:
• The train header line 4 is set and US customer train ID is populated from the train list
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train header information has been set.
Trigger Criteria:
Context: Train header information has been set
Applied to: Set ETA Information in Header
Action: The system completes the header information
Logic Flow:
IF Train header information has been set
AND The system completes the header information
THEN:
• ETA year, month, day, hour, and minute are populated in the report header from the request data
Business Justification: Defines the strict business conditions required to proceed when train manifest processing request is being finalized.
Trigger Criteria:
Context: A train manifest processing request is being finalized
Applied to: Initialize Report Headers and Status Lines
Action: The system begins report formatting
Logic Flow:
IF A train manifest processing request is being finalized
AND The system begins report formatting
THEN:
• Report index is set to last line position, new report index is set to last line position, and all header lines are prepared for content
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report headers are being initialized.
Trigger Criteria:
Context: Report headers are being initialized
Applied to: Set Report Header Line 1 - Train ID and Origin
Action: The system formats header line 1
Logic Flow:
IF Report headers are being initialized
AND The system formats header line 1
THEN:
• Header line 1 is marked as header type, train ID is populated from request, and origin station name is populated from station table
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when header line 1 has been formatted.
Trigger Criteria:
Context: Header line 1 has been formatted
Applied to: Set Report Header Line 2 - User Info and Timestamp
Action: The system formats header line 2
Logic Flow:
IF Header line 1 has been formatted
AND The system formats header line 2
THEN:
• Header line 2 is marked as header type, user ID is populated from system context, terminal ID is populated, machine date is populated, and machine time components (hour and minute) are populated
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when header lines 1 and 2 have been formatted.
Trigger Criteria:
Context: Header lines 1 and 2 have been formatted
Applied to: Set Report Header Line 3 - Action Type and Results
Action: The system evaluates the request action type
Logic Flow:
IF Header lines 1 and 2 have been formatted
AND The system evaluates the request action type
THEN:
• If action is SEND then SEND report formatting is applied, elseif action is REPORT then REPORT formatting is applied, else OTHER/ABORT formatting is applied
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when request action type is send.
Trigger Criteria:
Context: Request action type is SEND
Applied to: Format SEND Report Header with Train ID and ETA
Action: The system formats the SEND report header
Logic Flow:
IF Request action type is SEND
AND The system formats the SEND report header
THEN:
• Header line 3 is marked as SEND type, header line 4 is marked as header type, US customer train ID is populated, and ETA components (year, month, day, hour, minute) are populated from request
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when request action type is report.
Trigger Criteria:
Context: Request action type is REPORT
Applied to: Format REPORT Header with Message Counts
Action: The system formats the REPORT header
Logic Flow:
IF Request action type is REPORT
AND The system formats the REPORT header
THEN:
• Header line 3 is marked as REPORT type, andif no errors and no warnings then result is set to no messages, else result is set to show messages with warning count and error count populated
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when request action type is neither send nor report.
Trigger Criteria:
Context: Request action type is neither SEND nor REPORT
Applied to: Format OTHER/ABORT Header with Request Type
Action: The system formats the OTHER action header
Logic Flow:
IF Request action type is neither SEND nor REPORT
AND The system formats the OTHER action header
THEN:
• Request type is populated in header and result is set to ABORT status
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report action headers have been formatted.
Trigger Criteria:
Context: Report action headers have been formatted
Applied to: Set Detail Header Lines 1 and 2
Action: The system sets up detail headers
Logic Flow:
IF Report action headers have been formatted
AND The system sets up detail headers
THEN:
• Detail header line 1 is marked as detail header type and detail header line 2 is marked as detail header type
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when all header lines have been formatted. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All header lines have been formatted
Applied to: Copy Header Lines to Email Text Lines
Action: The system prepares email content
Logic Flow:
IF All header lines have been formatted
AND The system prepares email content
THEN:
• Report lines 1 through 5 are copied to corresponding email text lines
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when header lines have been copied to email format.
Trigger Criteria:
Context: Header lines have been copied to email format
Applied to: Format Status Line with Equipment Totals
Action: The system formats the status line
Logic Flow:
IF Header lines have been copied to email format
AND The system formats the status line
THEN:
• Total equipment count is populated in status line and status line is copied to email text line 5
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report content has been formatted. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Report content has been formatted
Applied to: Set Email Parameters - From/To User Codes
Action: The system sets up email parameters
Logic Flow:
IF Report content has been formatted
AND The system sets up email parameters
THEN:
• From user code is set to OM01247, to user code is set to OM01247, keywords are cleared, and copy user code is cleared
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when email parameters have been configured.
Trigger Criteria:
Context: Email parameters have been configured
Applied to: Set Email Subject Line from Report Header
Action: The system sets the email subject
Logic Flow:
IF Email parameters have been configured
AND The system sets the email subject
THEN:
• Email subject is populated from report line 1 content
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when email subject has been set.
Trigger Criteria:
Context: Email subject has been set
Applied to: Set Email Item Width to 080 Characters
Action: The system configures email formatting
Logic Flow:
IF Email subject has been set
AND The system configures email formatting
THEN:
• Email item width is set to 080 characters, item sequence numbers are cleared, and item alpha sequence is cleared
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when email formatting has been configured.
Trigger Criteria:
Context: Email formatting has been configured
Applied to: Initialize Email Return Status Flags
Action: The system initializes status tracking
Logic Flow:
IF Email formatting has been configured
AND The system initializes status tracking
THEN:
• Email return status flags are cleared and no-more-email flag is set to true and line counter is reset to zero
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when email status has been initialized and report content is being processed.
Trigger Criteria:
Context: Email status has been initialized and report content is being processed
Applied to: Large Report Check - Lines > 699?
Action: The system checks current line count
Logic Flow:
IF Email status has been initialized and report content is being processed
AND The system checks current line count
THEN:
• If line counter exceeds 699 then report must be split into multiple parts, else report can be sent as single email
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report line count exceeds 699 lines.
Trigger Criteria:
Context: Report line count exceeds 699 lines
Applied to: Split Report into Multiple Email Parts
Action: The system splits the report
Logic Flow:
IF Report line count exceeds 699 lines
AND The system splits the report
THEN:
• No-more-email flag is set to true, current email segment is sent, email text is cleared, and line counter is reset to zero
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when report has been split and new email segment is starting.
Trigger Criteria:
Context: A report has been split and new email segment is starting
Applied to: Add Continuation Header for Next Part
Action: The system adds continuation header
Logic Flow:
IF A report has been split and new email segment is starting
AND The system adds continuation header
THEN:
• Continuation message is added to line 1, detail header 1 is added to line 2, detail header 2 is added to line 3, and line counter is incremented by 3
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report line count is 699 or fewer and more-email flag is true.
Trigger Criteria:
Context: Report line count is 699 or fewer and more-email flag is true
Applied to: Format Single Email with All Content
Action: The system formats single email
Logic Flow:
IF Report line count is 699 or fewer and more-email flag is true
AND The system formats single email
THEN:
• Complete report content is prepared for transmission in single email message
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when email content has been formatted (single or multi-part).
Trigger Criteria:
Context: Email content has been formatted (single or multi-part)
Applied to: Set Email Destination to OM01247
Action: The system sets final destination
Logic Flow:
IF Email content has been formatted (single or multi-part)
AND The system sets final destination
THEN:
• Email destination is confirmed as OM01247 for customs authority delivery
Business Justification: Defines the strict business conditions required to proceed when customs report needs to be transmitted via email. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A customs report needs to be transmitted via email
Applied to: Initialize Email Parameters
Action: The email transmission process is initiated
Logic Flow:
IF A customs report needs to be transmitted via email
AND The email transmission process is initiated
THEN:
• The system shall set the sender as OM01247, clear recipient and copy fields, set item width to 080 characters, and initialize return status flags
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when email parameters have been initialized for report transmission. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Email parameters have been initialized for report transmission
Applied to: Set Email Headers and Subject
Action: Email headers and subject are being configured
Logic Flow:
IF Email parameters have been initialized for report transmission
AND Email headers and subject are being configured
THEN:
• The system shall set the sender and recipient to OM01247, clear keywords and copy fields, use the first report line as the subject, and clear item sequence numbers
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when email headers have been configured.
Trigger Criteria:
Context: Email headers have been configured
Applied to: Initialize Line Counter
Action: The line counting process is initialized
Logic Flow:
IF Email headers have been configured
AND The line counting process is initialized
THEN:
• The system shall set the line counter to zero and establish email continuation flags
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when report lines are being processed for email transmission.
Trigger Criteria:
Context: Report lines are being processed for email transmission
Applied to: More Report Lines to Process?
Action: The system checks for remaining lines to process
Logic Flow:
IF Report lines are being processed for email transmission
AND The system checks for remaining lines to process
THEN:
• The system shall continue processing if the current line is not empty or low-values and the maximum email line limit has not been exceeded
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report line is available for processing and email buffer has capacity. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A report line is available for processing and email buffer has capacity
Applied to: Add Line to Email Message
Action: The line is added to the email message
Logic Flow:
IF A report line is available for processing and email buffer has capacity
AND The line is added to the email message
THEN:
• The system shall copy the report line to the corresponding email text line position
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report line has been added to the email message.
Trigger Criteria:
Context: A report line has been added to the email message
Applied to: Increment Line Counter
Action: The line counter is updated
Logic Flow:
IF A report line has been added to the email message
AND The line counter is updated
THEN:
• The system shall increment the line counter by one and set the email continuation flag to indicate more content exists
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when lines have been added to the email message buffer.
Trigger Criteria:
Context: Lines have been added to the email message buffer
Applied to: Line Count > 699?
Action: The system checks the current line count
Logic Flow:
IF Lines have been added to the email message buffer
AND The system checks the current line count
THEN:
• The system shall trigger email transmission if the line count exceeds 699 lines
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when email message is ready for transmission with proper headers and content. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email message is ready for transmission with proper headers and content
Applied to: Send Current Email Batch
Action: The email send operation is executed
Logic Flow:
IF An email message is ready for transmission with proper headers and content
AND The email send operation is executed
THEN:
• The system shall call the email service with all configured parameters including sender, recipient, subject, content, and formatting options
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when email transmission attempt has been completed.
Trigger Criteria:
Context: An email transmission attempt has been completed
Applied to: Email Send Successful?
Action: The system evaluates the transmission result
Logic Flow:
IF An email transmission attempt has been completed
AND The system evaluates the transmission result
THEN:
• The system shall check the email return status flag to determine if the transmission was successful
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when email transmission has failed.
Trigger Criteria:
Context: An email transmission has failed
Applied to: Handle Email Failure
Action: The failure handling process is initiated
Logic Flow:
IF An email transmission has failed
AND The failure handling process is initiated
THEN:
• The system shall clear the recipient usercode field and prepare alternative recipient addresses for error notification
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when email transmission has failed and error handling is in progress.
Trigger Criteria:
Context: An email transmission has failed and error handling is in progress
Applied to: Send Error Notification to Support
Action: Error notification is sent to support
Logic Flow:
IF An email transmission has failed and error handling is in progress
AND Error notification is sent to support
THEN:
• The system shall set AEI9999 as the first recipient, OM01247 as the second recipient, and attempt to send the error notification
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when email batch has been sent successfully or after error handling.
Trigger Criteria:
Context: An email batch has been sent successfully or after error handling
Applied to: Reset Email Message Buffer
Action: The message buffer is reset for continuation
Logic Flow:
IF An email batch has been sent successfully or after error handling
AND The message buffer is reset for continuation
THEN:
• The system shall clear the email text content and reset the line counter to zero
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when large report requires multiple email messages and a new message is being prepared.
Trigger Criteria:
Context: A large report requires multiple email messages and a new message is being prepared
Applied to: Add Continuation Header
Action: Continuation headers are added
Logic Flow:
IF A large report requires multiple email messages and a new message is being prepared
AND Continuation headers are added
THEN:
• The system shall add 'CONTINUATION OF REPORT ....' as the first line and increment the line counter to 1
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when continuation email is being prepared with continuation header already added.
Trigger Criteria:
Context: A continuation email is being prepared with continuation header already added
Applied to: Add Report Headers to New Email
Action: Report headers are added to the new email
Logic Flow:
IF A continuation email is being prepared with continuation header already added
AND Report headers are added to the new email
THEN:
• The system shall add the detail header lines as the second and third lines and increment the line counter to 3
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when all report lines have been processed and the final email batch is ready.
Trigger Criteria:
Context: All report lines have been processed and the final email batch is ready
Applied to: Send Final Email Batch
Action: The final email transmission is executed
Logic Flow:
IF All report lines have been processed and the final email batch is ready
AND The final email transmission is executed
THEN:
• The system shall send the email using the same transmission service with all configured parameters
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when email has been successfully transmitted to the customs system.
Trigger Criteria:
Context: An email has been successfully transmitted to the customs system
Applied to: Log Email Success
Action: Success logging is performed
Logic Flow:
IF An email has been successfully transmitted to the customs system
AND Success logging is performed
THEN:
• The system shall record the successful transmission without generating error messages
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when email transmission has been completed successfully. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Email transmission has been completed successfully
Applied to: Purge Message Queue
Action: Message queue purging is performed
Logic Flow:
IF Email transmission has been completed successfully
AND Message queue purging is performed
THEN:
• The system shall clear the accept status and call the message purge service to clean up communication resources
R-GCX003-cbl-01456 (+11)File: GCX003.cblBusiness Rule: Report Distribution Logic
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train request is being processed.
Trigger Criteria:
Context: A train request is being processed
Applied to: Is AEI Train Send Request?
Action: The request type equals the AEI request type constant
Logic Flow:
IF A train request is being processed
AND The request type equals the AEI request type constant
THEN:
• Set AEI train send flag to YES, otherwise set to NO
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when aei train send request is being processed.
Trigger Criteria:
Context: An AEI train send request is being processed
Applied to: Retrieve AEI Email Distribution List
Action: The system calls AECWRKTB with train origin as record key and CUSEMAIL as record type
Logic Flow:
IF An AEI train send request is being processed
AND The system calls AECWRKTB with train origin as record key and CUSEMAIL as record type
THEN:
• Return the email distribution configuration for the specified origin
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when aei email distribution retrieval has been attempted.
Trigger Criteria:
Context: AEI email distribution retrieval has been attempted
Applied to: Email Distribution Found?
Action: The return code equals AEI success constant
Logic Flow:
IF AEI email distribution retrieval has been attempted
AND The return code equals AEI success constant
THEN:
• Use retrieved email recipients, otherwise use default MERLIN recipients
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when aei email distribution list was successfully retrieved.
Trigger Criteria:
Context: AEI email distribution list was successfully retrieved
Applied to: Use Retrieved Email Recipients
Action: Processing email recipients from CUSEMAIL user IDs
Logic Flow:
IF AEI email distribution list was successfully retrieved
AND Processing email recipients from CUSEMAIL user IDs
THEN:
• Assign each non-blank CUSEMAIL user ID to email recipient list up to maximum of 10 recipients
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when aei email distribution list retrieval failed or returned no entry.
Trigger Criteria:
Context: AEI email distribution list retrieval failed or returned no entry
Applied to: Use Default MERLIN Recipients
Action: No specific email recipients are configured
Logic Flow:
IF AEI email distribution list retrieval failed or returned no entry
AND No specific email recipients are configured
THEN:
• Set both FROM and TO email addresses to default MERLIN ID constant
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when report distribution is being configured.
Trigger Criteria:
Context: Report distribution is being configured
Applied to: Alternate Terminal Configured?
Action: The alternate terminal field in GCSTBRT terminal configuration is not blank
Logic Flow:
IF Report distribution is being configured
AND The alternate terminal field in GCSTBRT terminal configuration is not blank
THEN:
• Use the alternate terminal, otherwise use the original request terminal
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report is being prepared for distribution.
Trigger Criteria:
Context: A report is being prepared for distribution
Applied to: Request Action Type?
Action: The request action type and error status are evaluated
Logic Flow:
IF A report is being prepared for distribution
AND The request action type and error status are evaluated
THEN:
• Set train error classification if errors exist, train sent classification for send actions, or train report classification for report actions
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report classification has been determined.
Trigger Criteria:
Context: Report classification has been determined
Applied to: Report Distribution Mode?
Action: The report distribution mode is evaluated
Logic Flow:
IF Report classification has been determined
AND The report distribution mode is evaluated
THEN:
• Send all report lines for full reports, or send selective lines based on warning presence for summary reports
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when selective report distribution mode is active.
Trigger Criteria:
Context: Selective report distribution mode is active
Applied to: Any Warnings Present?
Action: The report warning status is evaluated
Logic Flow:
IF Selective report distribution mode is active
AND The report warning status is evaluated
THEN:
• Send header lines only if no warnings exist, otherwise send header plus warning lines
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report distribution parameters are being finalized.
Trigger Criteria:
Context: Report distribution parameters are being finalized
Applied to: Report Status?
Action: The report transmission status is evaluated
Logic Flow:
IF Report distribution parameters are being finalized
AND The report transmission status is evaluated
THEN:
• Generate 'NOT SENT' subject line for errors or failed transmissions, otherwise generate 'SENT' subject line for successful transmissions
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when aei train report was successfully transmitted.
Trigger Criteria:
Context: An AEI train report was successfully transmitted
Applied to: Generate _SENT_ Subject
Action: Generating the email subject line
Logic Flow:
IF An AEI train report was successfully transmitted
AND Generating the email subject line
THEN:
• Create subject line with format 'US TRAIN [train_id] SENT AT [origin]' using report header train ID and origin
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when aei train report failed transmission or contains errors.
Trigger Criteria:
Context: An AEI train report failed transmission or contains errors
Applied to: Generate _NOT SENT_ Subject
Action: Generating the email subject line
Logic Flow:
IF An AEI train report failed transmission or contains errors
AND Generating the email subject line
THEN:
• Create subject line with format 'US TRAIN [train_id] NOT SENT AT [origin]' using report header train ID and origin
R-GCX003-cbl-01468 (+6)File: GCX003.cblBusiness Rule: Message Type Classification
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when message line has been added to the report.
Trigger Criteria:
Context: A message line has been added to the report
Applied to: Is Spawn Message?
Action: The message is identified as a spawn message
Logic Flow:
IF A message line has been added to the report
AND The message is identified as a spawn message
THEN:
• Skip all message type classification and counting processes
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when non-spawn message line exists in the report.
Trigger Criteria:
Context: A non-spawn message line exists in the report
Applied to: Error Message?
Action: The message is classified as an error message (MSG-ERR)
Logic Flow:
IF A non-spawn message line exists in the report
AND The message is classified as an error message (MSG-ERR)
THEN:
• Increment the total error count by 1
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when non-spawn message line exists in the report.
Trigger Criteria:
Context: A non-spawn message line exists in the report
Applied to: Warning Message?
Action: The message is classified as a warning message (MSG-WRN)
Logic Flow:
IF A non-spawn message line exists in the report
AND The message is classified as a warning message (MSG-WRN)
THEN:
• Increment the total warning count by 1
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when non-spawn message line exists in the report.
Trigger Criteria:
Context: A non-spawn message line exists in the report
Applied to: Information Message?
Action: The message is classified as an information message (MSG-INF)
Logic Flow:
IF A non-spawn message line exists in the report
AND The message is classified as an information message (MSG-INF)
THEN:
• Increment the total information count by 1
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when error message has been identified.
Trigger Criteria:
Context: An error message has been identified
Applied to: Check if Message Type 43
Action: The message type indicator equals 43
Logic Flow:
IF An error message has been identified
AND The message type indicator equals 43
THEN:
• Increment the type 43 error count by 1
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when warning message has been identified.
Trigger Criteria:
Context: A warning message has been identified
Applied to: DSP Message Type 49 or 52?
Action: The message type indicator equals 49 or 52
Logic Flow:
IF A warning message has been identified
AND The message type indicator equals 49 or 52
THEN:
• Increment the dispatcher count by 1
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when entry has been added to the report.
Trigger Criteria:
Context: An entry has been added to the report
Applied to: Is Message Line?
Action: The entry is evaluated for message line status
Logic Flow:
IF An entry has been added to the report
AND The entry is evaluated for message line status
THEN:
• Continue with message type classification if it is a message line, otherwise skip processing
Business Justification: Defines the strict business conditions required to proceed when message line is being processed for counter updates.
Trigger Criteria:
Context: A message line is being processed for counter updates
Applied to: Skip Counter Update
Action: The message line is identified as a spawn message type
Logic Flow:
IF A message line is being processed for counter updates
AND The message line is identified as a spawn message type
THEN:
• The system skips all counter updates and proceeds to report index management
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when message line is classified as an error message and is not a spawn message.
Trigger Criteria:
Context: A message line is classified as an error message and is not a spawn message
Applied to: Increment Error Counter
Action: The message type is determined to be an error
Logic Flow:
IF A message line is classified as an error message and is not a spawn message
AND The message type is determined to be an error
THEN:
• The system adds 1 to the error message counter
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when error message is being processed.
Trigger Criteria:
Context: An error message is being processed
Applied to: Increment ERR-43 Counter
Action: The message type indicator equals 43
Logic Flow:
IF An error message is being processed
AND The message type indicator equals 43
THEN:
• The system adds 1 to the ERR-43 counter in addition to the general error counter
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when message line is classified as a warning message and is not a spawn message.
Trigger Criteria:
Context: A message line is classified as a warning message and is not a spawn message
Applied to: Increment Warning Counter
Action: The message type is determined to be a warning
Logic Flow:
IF A message line is classified as a warning message and is not a spawn message
AND The message type is determined to be a warning
THEN:
• The system adds 1 to the warning message counter
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when warning message is being processed.
Trigger Criteria:
Context: A warning message is being processed
Applied to: Increment DSP Counter
Action: The message type indicator is 49 or 52
Logic Flow:
IF A warning message is being processed
AND The message type indicator is 49 or 52
THEN:
• The system adds 1 to the DSP counter in addition to the warning counter
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when message line is classified as an informational message and is not a spawn message.
Trigger Criteria:
Context: A message line is classified as an informational message and is not a spawn message
Applied to: Increment Info Counter
Action: The message type is determined to be informational
Logic Flow:
IF A message line is classified as an informational message and is not a spawn message
AND The message type is determined to be informational
THEN:
• The system adds 1 to the informational message counter
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when message line has been processed for counter updates.
Trigger Criteria:
Context: A message line has been processed for counter updates
Applied to: Update Report Index
Action: Counter processing is complete
Logic Flow:
IF A message line has been processed for counter updates
AND Counter processing is complete
THEN:
• The system adds 1 to the report line index
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when report line index is being updated.
Trigger Criteria:
Context: The report line index is being updated
Applied to: Set Overflow Message
Action: The maximum number of report lines has been reached
Logic Flow:
IF The report line index is being updated
AND The maximum number of report lines has been reached
THEN:
• The system sets message type 9 as an overflow indicator
R-GCX003-cbl-01483 (+14)File: GCX003.cblBusiness Rule: Action Type Processing Coordination
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train manifest request with action type send.
Trigger Criteria:
Context: A train manifest request with action type SEND
Applied to: SEND Action with No Errors and No Spawns?
Action: The request has no validation errors AND no spawn processing requirements
Logic Flow:
IF A train manifest request with action type SEND
AND The request has no validation errors AND no spawn processing requirements
THEN:
• Execute the full transmission workflow including database storage, EDI transmission, duplicate removal, customs reporting, PDF generation, station-specific processing, acknowledgment, and audit logging
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when validated train manifest with send action and no errors.
Trigger Criteria:
Context: A validated train manifest with SEND action and no errors
Applied to: Store Train List in Database
Action: The system processes the successful request
Logic Flow:
IF A validated train manifest with SEND action and no errors
AND The system processes the successful request
THEN:
• Store the train list data in the GCSUTRT database table with all equipment and cargo details
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train list stored in the database. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A train list stored in the database
Applied to: Transmit Train List to US Customs EDI
Action: The system processes the transmission step
Logic Flow:
IF A train list stored in the database
AND The system processes the transmission step
THEN:
• Call GCCU358T module to transmit the train list data via EDI to US Customs
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when processed train manifest report with potential duplicate equipment entries.
Trigger Criteria:
Context: A processed train manifest report with potential duplicate equipment entries
Applied to: Remove Duplicate Equipment Entries
Action: The system performs duplicate checking
Logic Flow:
IF A processed train manifest report with potential duplicate equipment entries
AND The system performs duplicate checking
THEN:
• Scan through report lines and remove duplicate car IDs while preserving the first occurrence
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when processed train manifest with complete report data.
Trigger Criteria:
Context: A processed train manifest with complete report data
Applied to: Send Report to Customs MERLIN System
Action: The system sends the report to customs
Logic Flow:
IF A processed train manifest with complete report data
AND The system sends the report to customs
THEN:
• Format and send the report via EMCSEND3 to usercode OM01247 with train details, equipment counts, and cargo information
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when processed train manifest with report data. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A processed train manifest with report data
Applied to: Generate PDF Report
Action: The system generates PDF documentation
Logic Flow:
IF A processed train manifest with report data
AND The system generates PDF documentation
THEN:
• Call GCX904R module to create PDF report with Pre-Exit Report title and EXPORT type
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train manifest with a defined crossing station.
Trigger Criteria:
Context: A train manifest with a defined crossing station
Applied to: Is Laredo TX Station?
Action: The system checks the station location
Logic Flow:
IF A train manifest with a defined crossing station
AND The system checks the station location
THEN:
• If the station is Laredo TX, execute enhanced reporting; otherwise, execute standard Canadian export processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train manifest crossing at laredo tx station.
Trigger Criteria:
Context: A train manifest crossing at Laredo TX station
Applied to: Generate Enhanced Format Report
Action: The system processes Laredo-specific reporting
Logic Flow:
IF A train manifest crossing at Laredo TX station
AND The system processes Laredo-specific reporting
THEN:
• Generate new format report with detailed equipment counts, port information, and enhanced layout
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when enhanced format report generated for laredo tx station. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An enhanced format report generated for Laredo TX station
Applied to: Generate Second PDF Report
Action: The system creates the second PDF
Logic Flow:
IF An enhanced format report generated for Laredo TX station
AND The system creates the second PDF
THEN:
• Call GCX904R module to create PDF with Export Train Report title and 132-character width
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train manifest crossing at a station other than laredo tx.
Trigger Criteria:
Context: A train manifest crossing at a station other than Laredo TX
Applied to: Spawn Canadian Export Report
Action: The system processes export reporting
Logic Flow:
IF A train manifest crossing at a station other than Laredo TX
AND The system processes export reporting
THEN:
• Send message to GCX141 queue to spawn Canadian export report processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when successfully processed and transmitted train manifest.
Trigger Criteria:
Context: A successfully processed and transmitted train manifest
Applied to: Set Acknowledgment Only Flag
Action: The system prepares the originator response
Logic Flow:
IF A successfully processed and transmitted train manifest
AND The system prepares the originator response
THEN:
• Set the report flag to RPT-ACK-ONLY to indicate acknowledgment-only response
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when processed train manifest request with determined response type. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A processed train manifest request with determined response type
Applied to: Send Report to Originator
Action: The system sends the response to the originator
Logic Flow:
IF A processed train manifest request with determined response type
AND The system sends the response to the originator
THEN:
• Call GCSTONLY module to send formatted report to the originating terminal with appropriate status indicators
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when successfully processed train manifest with cargo additions.
Trigger Criteria:
Context: A successfully processed train manifest with cargo additions
Applied to: Send Activity Audit Logs
Action: The system creates audit trails
Logic Flow:
IF A successfully processed train manifest with cargo additions
AND The system creates audit trails
THEN:
• For each added US CCN, create audit log entry with user ID, timestamp, and cargo addition message via GCT1051E
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train manifest request with action type report.
Trigger Criteria:
Context: A train manifest request with action type REPORT
Applied to: REPORT Action?
Action: The system processes the report-only request
Logic Flow:
IF A train manifest request with action type REPORT
AND The system processes the report-only request
THEN:
• Execute duplicate removal and send report to originator without database storage or EDI transmission
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train manifest request that encountered processing errors.
Trigger Criteria:
Context: A train manifest request that encountered processing errors
Applied to: Rollback Database Changes
Action: The system handles the error condition
Logic Flow:
IF A train manifest request that encountered processing errors
AND The system handles the error condition
THEN:
• Execute database rollback operation to undo any partial changes made during processing
R-GCX003-cbl-01498 (+14)File: GCX003.cblBusiness Rule: Final Processing Steps Execution
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train processing request has been completed with processing results available.
Trigger Criteria:
Context: A train processing request has been completed with processing results available
Applied to: Generate Final Report Headers and Summary
Action: The system generates the final report headers and summary
Logic Flow:
IF A train processing request has been completed with processing results available
AND The system generates the final report headers and summary
THEN:
• The report must include train ID in header line 1, user ID and terminal info in header line 2, action type and result status in header line 3, US customer train ID and ETA details in header line 4, detail headers in lines 6-7, and all header lines must be copied to email text lines
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train processing request with a specific action type.
Trigger Criteria:
Context: A train processing request with a specific action type
Applied to: Evaluate Request Action Type
Action: The system evaluates the request action type and error status
Logic Flow:
IF A train processing request with a specific action type
AND The system evaluates the request action type and error status
THEN:
• If action is SEND with no errors and no spawns, execute full send processing; if action is REPORT, execute report-only processing; otherwise execute error processing with database rollback
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when send action request with no errors and no spawn conditions.
Trigger Criteria:
Context: A SEND action request with no errors and no spawn conditions
Applied to: SEND Action Processing
Action: The system processes the SEND action
Logic Flow:
IF A SEND action request with no errors and no spawn conditions
AND The system processes the SEND action
THEN:
• The system must store train list in database, transmit via EDI, check for duplicates, send reports to customs, generate export reports, send acknowledgment to originator, and create audit logs
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when validated train list with equipment details and no processing errors.
Trigger Criteria:
Context: A validated train list with equipment details and no processing errors
Applied to: Store Train List in Database
Action: The system stores the train list in the database
Logic Flow:
IF A validated train list with equipment details and no processing errors
AND The system stores the train list in the database
THEN:
• The train header information including train number, day, origin, consist number, crossing port, ETA details, and all equipment records with their cargo information must be inserted into the database
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when stored train list ready for customs transmission.
Trigger Criteria:
Context: A stored train list ready for customs transmission
Applied to: Transmit Train List via EDI
Action: The system transmits the train list via EDI
Logic Flow:
IF A stored train list ready for customs transmission
AND The system transmits the train list via EDI
THEN:
• The complete train manifest must be sent to customs system via GCCU358T module in background mode, andif AEI send is enabled, an AEI send log entry must be created
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when completed report with potential duplicate equipment entries.
Trigger Criteria:
Context: A completed report with potential duplicate equipment entries
Applied to: Remove Duplicate Equipment Entries
Action: The system scans for duplicate equipment
Logic Flow:
IF A completed report with potential duplicate equipment entries
AND The system scans for duplicate equipment
THEN:
• If the same car ID appears multiple times consecutively, all subsequent occurrences must be blanked out while preserving the first occurrence
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when finalized train manifest report ready for customs distribution.
Trigger Criteria:
Context: A finalized train manifest report ready for customs distribution
Applied to: Send Report to Customs MERLIN System
Action: The system sends the report to customs MERLIN system
Logic Flow:
IF A finalized train manifest report ready for customs distribution
AND The system sends the report to customs MERLIN system
THEN:
• The report must be sent to OM01247 usercode via EMCSEND3 module with proper formatting, andif the report exceeds 699 lines, it must be split into multiple emails with continuation headers
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when processed train manifest for laredo tx station crossing.
Trigger Criteria:
Context: A processed train manifest for Laredo TX station crossing
Applied to: Generate Canadian Export Reports
Action: The system generates Canadian export reports
Logic Flow:
IF A processed train manifest for Laredo TX station crossing
AND The system generates Canadian export reports
THEN:
• A new format report must be created with train ID, equipment counts by type (cars loaded/empty, containers loaded/empty, locomotives), ETA details, port information, and total equipment count
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when processed train manifest for non-laredo station crossing.
Trigger Criteria:
Context: A processed train manifest for non-Laredo station crossing
Applied to: Generate Enhanced Format Reports
Action: The system generates enhanced format reports
Logic Flow:
IF A processed train manifest for non-Laredo station crossing
AND The system generates enhanced format reports
THEN:
• A GCX141 message must be created with the US customer train ID and sent via message queue for enhanced report generation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when completed train manifest reports in text format.
Trigger Criteria:
Context: Completed train manifest reports in text format
Applied to: Generate PDF Reports
Action: The system generates PDF reports
Logic Flow:
IF Completed train manifest reports in text format
AND The system generates PDF reports
THEN:
• Two PDF reports must be created: a pre-exit report with 80-character width and an export train report with 132-character width, both containing the complete manifest data
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when completed train processing request with results. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A completed train processing request with results
Applied to: Send Acknowledgment to Originator
Action: The system sends acknowledgment to the originator
Logic Flow:
IF A completed train processing request with results
AND The system sends acknowledgment to the originator
THEN:
• The acknowledgment must include appropriate call letters based on processing result (error, sent, or report), complete report content based on report type (all lines for full report, headers only for summary), and be sent to the originating terminal or alternate terminal if specified
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo records that were added during train processing.
Trigger Criteria:
Context: Cargo records that were added during train processing
Applied to: Create Activity Audit Logs
Action: The system creates activity audit logs
Logic Flow:
IF Cargo records that were added during train processing
AND The system creates activity audit logs
THEN:
• For each added cargo record, a log entry must be created with US cargo type, action code ZZZ, sending transaction GCT0031E, user ACF2 ID, current date and time, cargo CCN number, and cargo added message
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report action request.
Trigger Criteria:
Context: A REPORT action request
Applied to: REPORT Action Processing
Action: The system processes the REPORT action
Logic Flow:
IF A REPORT action request
AND The system processes the REPORT action
THEN:
• The system must check for duplicates, generate and send the report to originator without storing data or transmitting to customs
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when invalid action type or error conditions during processing.
Trigger Criteria:
Context: An invalid action type or error conditions during processing
Applied to: OTHER Action Processing
Action: The system executes error processing
Logic Flow:
IF An invalid action type or error conditions during processing
AND The system executes error processing
THEN:
• The system must perform database rollback to undo any changes, check for duplicates, and send error report to originator
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when aei-enabled train request that has been processed.
Trigger Criteria:
Context: An AEI-enabled train request that has been processed
Applied to: Send Acknowledgment to Originator
Action: The system sends AEI email notifications
Logic Flow:
IF An AEI-enabled train request that has been processed
AND The system sends AEI email notifications
THEN:
• Email notifications must be sent to configured AEI users retrieved from database, or to default MERLIN ID if no users configured, with subject indicating train sent or not sent status and complete report content
Business Justification: Ensures correct system behavior and process compliance when cargo record exists for processing.
Trigger Criteria:
Context: A cargo record exists for processing
Applied to: Empty Residue Cargo?
Action: The cargo is classified as empty residue (88-GCUSRT-M1109-EMPTY-RESIDUE)
Logic Flow:
IF A cargo record exists for processing
AND The cargo is classified as empty residue (88-GCUSRT-M1109-EMPTY-RESIDUE)
THEN:
• Skip all error message generation and exit the error processing routine
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when no cargo is found for the equipment and residue weight is greater than 0 and emergency response code is not found or emergency response weight threshold is less than or equal to 7.
Trigger Criteria:
Context: No cargo is found for the equipment AND residue weight is greater than 0 AND emergency response code is not found OR emergency response weight threshold is less than or equal to 7
Applied to: No Cargo Found with Residue Weight?
Action: The equipment is marked as empty
Logic Flow:
IF No cargo is found for the equipment AND residue weight is greater than 0 AND emergency response code is not found OR emergency response weight threshold is less than or equal to 7
AND The equipment is marked as empty
THEN:
• Skip error message generation and exit the error processing routine
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo is found and cargo type is empty equipment (88-gcusrt-m1109-empty-equip).
Trigger Criteria:
Context: Cargo is found AND cargo type is empty equipment (88-GCUSRT-M1109-EMPTY-EQUIP)
Applied to: Empty Equipment with Country Codes CAMX/MXCA?
Action: The origin-destination country codes are NOT 'CAMX' or 'MXCA'
Logic Flow:
IF Cargo is found AND cargo type is empty equipment (88-GCUSRT-M1109-EMPTY-EQUIP)
AND The origin-destination country codes are NOT 'CAMX' or 'MXCA'
THEN:
• Generate message 27 (empty equipment warning)
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is found and bond type is 'it' (in-transit).
Trigger Criteria:
Context: Cargo is found AND bond type is 'IT' (in-transit)
Applied to: IT Bond Type Found?
Action: The cargo does NOT have special manifest original designation
Logic Flow:
IF Cargo is found AND bond type is 'IT' (in-transit)
AND The cargo does NOT have special manifest original designation
THEN:
• Execute Crowley process logic (B525-CROWLEY-PROCESS)
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill is found and cargo is found and cargo has special manifest original designation.
Trigger Criteria:
Context: Waybill is found AND cargo is found AND cargo has special manifest original designation
Applied to: Special Manifest at Woburn-PQ Station?
Action: The crossing port is Woburn-PQ station
Logic Flow:
IF Waybill is found AND cargo is found AND cargo has special manifest original designation
AND The crossing port is Woburn-PQ station
THEN:
• Continue processing without generating error messages
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill is found and cargo is found and cargo has special manifest special designation.
Trigger Criteria:
Context: Waybill is found AND cargo is found AND cargo has special manifest special designation
Applied to: Special Manifest Special Type?
Action: The crossing port is NOT Woburn-PQ station
Logic Flow:
IF Waybill is found AND cargo is found AND cargo has special manifest special designation
AND The crossing port is NOT Woburn-PQ station
THEN:
• Continue processing without generating error messages
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill is found and cargo is found and bond type is us-canada-us (88-gcusrt-m1201-us-can-us) and cargo has special tr designation.
Trigger Criteria:
Context: Waybill is found AND cargo is found AND bond type is US-Canada-US (88-GCUSRT-M1201-US-CAN-US) AND cargo has special TR designation
Applied to:US-CAN-US Bond with Special TR?
Action: The crossing port is Laredo TX station
Logic Flow:
IF Waybill is found AND cargo is found AND bond type is US-Canada-US (88-GCUSRT-M1201-US-CAN-US) AND cargo has special TR designation
AND The crossing port is Laredo TX station
THEN:
• Set the special TR found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill is found and cargo is found and bond type is export (88-gcusrt-m1109-export) and cargo has special 88 designation.
Trigger Criteria:
Context: Waybill is found AND cargo is found AND bond type is export (88-GCUSRT-M1109-EXPORT) AND cargo has special 88 designation
Applied to: Export Bond with Special 88?
Action: Processing the cargo record
Logic Flow:
IF Waybill is found AND cargo is found AND bond type is export (88-GCUSRT-M1109-EXPORT) AND cargo has special 88 designation
AND Processing the cargo record
THEN:
• Set the US-Mexico 88 found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill is found and cargo is found and bond type is export (88-gcusrt-m1109-export) and cargo does not have special 88 designation and origin-destination country codes are 'usmx'.
Trigger Criteria:
Context: Waybill is found AND cargo is found AND bond type is export (88-GCUSRT-M1109-EXPORT) AND cargo does NOT have special 88 designation AND origin-destination country codes are 'USMX'
Applied to: Export Bond without Special 88?
Action: The crossing port is NOT Laredo TX station
Logic Flow:
IF Waybill is found AND cargo is found AND bond type is export (88-GCUSRT-M1109-EXPORT) AND cargo does NOT have special 88 designation AND origin-destination country codes are 'USMX'
AND The crossing port is NOT Laredo TX station
THEN:
• Execute US-Mexico export detour process (B550-DETOUR-PROCESS)
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill is found and cargo is found.
Trigger Criteria:
Context: Waybill is found AND cargo is found
Applied to: Cargo Found with Various Bond Conditions?
Action: Bond type is transport export OR US-Canada-US (without special TR) OR default type AND specific cargo status conditions are met AND cargo is marked for IT creation
Logic Flow:
IF Waybill is found AND cargo is found
AND Bond type is transport export OR US-Canada-US (without special TR) OR default type AND specific cargo status conditions are met AND cargo is marked for IT creation
THEN:
• Execute appropriate detour processing logic and set corresponding creation flags
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container is not found and equipment is marked as loaded and equipment is not a special business unit van.
Trigger Criteria:
Context: Container is not found AND equipment is marked as loaded AND equipment is not a special business unit van
Applied to: Waybill Not Found Scenarios?
Action: Waybill is not found OR waybill is not found and container is not found
Logic Flow:
IF Container is not found AND equipment is marked as loaded AND equipment is not a special business unit van
AND Waybill is not found OR waybill is not found and container is not found
THEN:
• Generate message 10 (waybill not found error)
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill is found and no cargo is found and equipment is marked as loaded and equipment is not a conveying car and idler indicator is not 'i'.
Trigger Criteria:
Context: Waybill is found AND no cargo is found AND equipment is marked as loaded AND equipment is not a conveying car AND idler indicator is not 'I'
Applied to: Waybill Found but No Cargo?
Action: Container is not found OR container is found but load/empty indicator is 'L'
Logic Flow:
IF Waybill is found AND no cargo is found AND equipment is marked as loaded AND equipment is not a conveying car AND idler indicator is not 'I'
AND Container is not found OR container is found but load/empty indicator is 'L'
THEN:
• Generate message 15 (no cargo found error) with waybill root key and date
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is found.
Trigger Criteria:
Context: Cargo is found
Applied to: Cargo Status Issues?
Action: Cargo status is pending (88-GCUSRT-RT10-CPCARGO-PENDING) OR deleted (88-GCUSRT-RT10-CPCARGO-DELETED) OR error (88-GCUSRT-RT10-CPCARGO-ERROR)
Logic Flow:
IF Cargo is found
AND Cargo status is pending (88-GCUSRT-RT10-CPCARGO-PENDING) OR deleted (88-GCUSRT-RT10-CPCARGO-DELETED) OR error (88-GCUSRT-RT10-CPCARGO-ERROR)
THEN:
• Generate message 16 (cargo status error)
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo is found.
Trigger Criteria:
Context: Cargo is found
Applied to: Laredo Station Specific Checks?
Action: The crossing port is Laredo TX station
Logic Flow:
IF Cargo is found
AND The crossing port is Laredo TX station
THEN:
• Evaluate cargo hold status and border conditions to generate messages 46-52 (FEN not found, KCM not found, hold border, hold apply, hold border apply)
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo is found and bond type is 'tr' (transit).
Trigger Criteria:
Context: Cargo is found AND bond type is 'TR' (transit)
Applied to: TR Bond Export Status?
Action: Cargo status description equals export status constant
Logic Flow:
IF Cargo is found AND bond type is 'TR' (transit)
AND Cargo status description equals export status constant
THEN:
• Generate message 12 (TR bond status error)
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo is found and bond type is 'mt' (merchandise in transit) and vessel name is not 'train' and not spaces.
Trigger Criteria:
Context: Cargo is found AND bond type is 'MT' (merchandise in transit) AND vessel name is not 'TRAIN' and not spaces
Applied to: MT Bond Vessel Issues?
Action: The crossing port station code equals the cargo location ID
Logic Flow:
IF Cargo is found AND bond type is 'MT' (merchandise in transit) AND vessel name is not 'TRAIN' and not spaces
AND The crossing port station code equals the cargo location ID
THEN:
• Generate message 25 (MT bond vessel error)
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo is found and bond type is 'te' (transport export).
Trigger Criteria:
Context: Cargo is found AND bond type is 'TE' (transport export)
Applied to: TE Bond Vessel Issues?
Action: Vessel name character 23 is 'T'
Logic Flow:
IF Cargo is found AND bond type is 'TE' (transport export)
AND Vessel name character 23 is 'T'
THEN:
• Generate message 17 (TE bond vessel error)
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo is found and bond type is not 'te' and not 'mt'.
Trigger Criteria:
Context: Cargo is found AND bond type is NOT 'TE' and NOT 'MT'
Applied to: Non-Train Vessel Issues?
Action: Vessel name is not 'TRAIN'
Logic Flow:
IF Cargo is found AND bond type is NOT 'TE' and NOT 'MT'
AND Vessel name is not 'TRAIN'
THEN:
• Generate message 17 (non-train vessel error)
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo is found and bond type is transport export and cargo is not created for it and cargo status is not export and cargo is billable as cprs.
Trigger Criteria:
Context: Cargo is found AND bond type is transport export AND cargo is not created for IT AND cargo status is not export AND cargo is billable as CPRS
Applied to: TE Bond Port Change Conditions?
Action: Cargo location ID does not match the crossing port station code
Logic Flow:
IF Cargo is found AND bond type is transport export AND cargo is not created for IT AND cargo status is not export AND cargo is billable as CPRS
AND Cargo location ID does not match the crossing port station code
THEN:
• Execute TE bond detour processing (B551-DETOUR-FOR-TE-BOND)
Business Justification: Governs the functional prerequisites and system routing when user attempts to access the train manifest system with their acf2 user id and cp-scac code.
Trigger Criteria:
Context: A user attempts to access the train manifest system with their ACF2 user ID and CP-SCAC code
Applied to: SCAC Access Valid?
Action: The SCAC access validation returns invalid AND the request is not an AEI train send request
Logic Flow:
IF A user attempts to access the train manifest system with their ACF2 user ID and CP-SCAC code
AND The SCAC access validation returns invalid AND the request is not an AEI train send request
THEN:
• The system should set message fourteen as active, perform report index increment, set user access to denied, and terminate security validation
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when user has passed scac access validation.
Trigger Criteria:
Context: A user has passed SCAC access validation
Applied to: User Profile Found?
Action: The system attempts to retrieve the user's security profile from GCSTBRT table using their ACF2 user ID
Logic Flow:
IF A user has passed SCAC access validation
AND The system attempts to retrieve the user's security profile from GCSTBRT table using their ACF2 user ID
THEN:
• If the profile is found successfully, load the user security segment data, otherwise initialize an empty security segment
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when user requests to perform a send action on train manifest data.
Trigger Criteria:
Context: A user requests to perform a send action on train manifest data
Applied to: User Has UTF-ADD Authority?
Action: The user does not have UTF-ADD authority of 'U' or 'S' AND the request is not an AEI train send request
Logic Flow:
IF A user requests to perform a send action on train manifest data
AND The user does not have UTF-ADD authority of 'U' or 'S' AND the request is not an AEI train send request
THEN:
• The system should set message thirteen as active, perform report index increment, and set user access to denied
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when user has valid send action permissions and no errors have occurred.
Trigger Criteria:
Context: A user has valid send action permissions and no errors have occurred
Applied to: User Has Special Manifest Authority?
Action: The user's UTF special manifest authority is not 'S' AND the request is not an AEI train send request
Logic Flow:
IF A user has valid send action permissions and no errors have occurred
AND The user's UTF special manifest authority is not 'S' AND the request is not an AEI train send request
THEN:
• The system should set the user as not authorized for special manifest processing
R-GCX003-cbl-01536 (+14)File: GCX003.cblBusiness Rule: O: Check for Special Bond Processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo exists for the equipment.
Trigger Criteria:
Context: Cargo exists for the equipment
Applied to: Bond Type = IT or IE?
Action: The cargo bond type code is 'IT' or 'IE'
Logic Flow:
IF Cargo exists for the equipment
AND The cargo bond type code is 'IT' or 'IE'
THEN:
• Set IT bond found flag to true for subsequent special manifest evaluation
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo exists for the equipment.
Trigger Criteria:
Context: Cargo exists for the equipment
Applied to: Bond Type = TE?
Action: The cargo bond type code is 'TE'
Logic Flow:
IF Cargo exists for the equipment
AND The cargo bond type code is 'TE'
THEN:
• Set TE bond found flag to true for subsequent port change evaluation
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo exists for the equipment.
Trigger Criteria:
Context: Cargo exists for the equipment
Applied to: Bond Type = TR?
Action: The cargo bond type code is 'TR'
Logic Flow:
IF Cargo exists for the equipment
AND The cargo bond type code is 'TR'
THEN:
• Set TR bond found flag to true for subsequent diversion evaluation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo has it bond type and tr created for it flag is not 'y' and special manifest original is not set.
Trigger Criteria:
Context: Cargo has IT bond type and TR created for IT flag is not 'Y' and special manifest original is not set
Applied to: Create IT Export Special Manifest
Action: Action is SEND and user is authorized for special manifests
Logic Flow:
IF Cargo has IT bond type and TR created for IT flag is not 'Y' and special manifest original is not set
AND Action is SEND and user is authorized for special manifests
THEN:
• Generate message 23, add report line, set IT export spawn flag, and perform special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo has te bond type and tr created for it is spaces and cargo status is not export and cargo is billed as cprs and location id does not equal station code.
Trigger Criteria:
Context: Cargo has TE bond type and TR created for IT is spaces and cargo status is not export and cargo is billed as CPRS and location ID does not equal station code
Applied to: Create TE Port Change Manifest
Action: Action is SEND and user is authorized for special manifests
Logic Flow:
IF Cargo has TE bond type and TR created for IT is spaces and cargo status is not export and cargo is billed as CPRS and location ID does not equal station code
AND Action is SEND and user is authorized for special manifests
THEN:
• Generate message 20, add report line, set port change spawn flag, and perform special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo has tr bond type and tr created for it is spaces and cargo status equals release.
Trigger Criteria:
Context: Cargo has TR bond type and TR created for IT is spaces and cargo status equals release
Applied to: Create TR Diversion Manifest
Action: Action is SEND and user is authorized for special manifests
Logic Flow:
IF Cargo has TR bond type and TR created for IT is spaces and cargo status equals release
AND Action is SEND and user is authorized for special manifests
THEN:
• Generate message 23, add report line, set detour spawn flag, and perform special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo has default bond type and tr created for it is spaces and cargo status equals release and special manifest original is not set.
Trigger Criteria:
Context: Cargo has default bond type and TR created for IT is spaces and cargo status equals release and special manifest original is not set
Applied to: Create Border Clearance Manifest
Action: Action is SEND and user is authorized for special manifests
Logic Flow:
IF Cargo has default bond type and TR created for IT is spaces and cargo status equals release and special manifest original is not set
AND Action is SEND and user is authorized for special manifests
THEN:
• Generate message 23, add report line, set detour spawn flag, and perform special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo has export bond type and special manifest is spaces and origin-destination country codes equal 'usmx' and station is not laredo tx.
Trigger Criteria:
Context: Cargo has export bond type and special manifest is spaces and origin-destination country codes equal 'USMX' and station is not Laredo TX
Applied to: Create US-MX Export Manifest
Action: Action is SEND and user is authorized for special manifests
Logic Flow:
IF Cargo has export bond type and special manifest is spaces and origin-destination country codes equal 'USMX' and station is not Laredo TX
AND Action is SEND and user is authorized for special manifests
THEN:
• Generate message 23, add report line, set 88 TR detour spawn flag, and perform special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when special manifest processing is required for any bond type.
Trigger Criteria:
Context: Special manifest processing is required for any bond type
Applied to: Generate Authorization Error Message
Action: Action is SEND and user is not authorized for special manifests
Logic Flow:
IF Special manifest processing is required for any bond type
AND Action is SEND and user is not authorized for special manifests
THEN:
• Generate message 43, add report line to output, and continue normal processing without creating special manifest
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo exists with us-canada-us bond type and tr created for it is not 'y' and cargo is not usmx special tr.
Trigger Criteria:
Context: Cargo exists with US-Canada-US bond type and TR created for IT is not 'Y' and cargo is not USMX special TR
Applied to: Set TR Bond Found Flag
Action: Processing cargo information
Logic Flow:
IF Cargo exists with US-Canada-US bond type and TR created for IT is not 'Y' and cargo is not USMX special TR
AND Processing cargo information
THEN:
• Set TR bond found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo exists with transport export bond type and tr created for it is not 'y'.
Trigger Criteria:
Context: Cargo exists with transport export bond type and TR created for IT is not 'Y'
Applied to: Set TE Bond Found Flag
Action: Processing cargo information
Logic Flow:
IF Cargo exists with transport export bond type and TR created for IT is not 'Y'
AND Processing cargo information
THEN:
• Set TE bond found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo exists.
Trigger Criteria:
Context: Cargo exists
Applied to: Set IT Bond Found Flag
Action: Cargo special manifest original flag is set
Logic Flow:
IF Cargo exists
AND Cargo special manifest original flag is set
THEN:
• Set special manifest IT found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo exists with transport export bond type.
Trigger Criteria:
Context: Cargo exists with transport export bond type
Applied to: Set TE Bond Found Flag
Action: Cargo special manifest special flag is set
Logic Flow:
IF Cargo exists with transport export bond type
AND Cargo special manifest special flag is set
THEN:
• Set special manifest TE found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo exists with export bond type.
Trigger Criteria:
Context: Cargo exists with export bond type
Applied to: Set Special Manifest Spawn Flag
Action: Cargo USMX special 88 flag is set
Logic Flow:
IF Cargo exists with export bond type
AND Cargo USMX special 88 flag is set
THEN:
• Set USMX 88 found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo exists with us-canada-us bond type.
Trigger Criteria:
Context: Cargo exists with US-Canada-US bond type
Applied to: Set Special Manifest Spawn Flag
Action: Cargo USMX special TR flag is set
Logic Flow:
IF Cargo exists with US-Canada-US bond type
AND Cargo USMX special TR flag is set
THEN:
• Set special TR found flag to true
R-GCX003-cbl-01551 (+17)File: GCX003.cblBusiness Rule: F: Scan for Container Cross
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when container cross-reference scanning process is starting.
Trigger Criteria:
Context: Container cross-reference scanning process is starting
Applied to: Initialize Container Table and Counters
Action: System begins processing inquiry bottom line records
Logic Flow:
IF Container cross-reference scanning process is starting
AND System begins processing inquiry bottom line records
THEN:
• Container table is cleared, container counter is set to 1, and container cross-reference table is initialized to spaces
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container processing has been initialized.
Trigger Criteria:
Context: Container processing has been initialized
Applied to: Position to First FWIQBOTL Record
Action: System needs to start reading inquiry bottom line records
Logic Flow:
IF Container processing has been initialized
AND System needs to start reading inquiry bottom line records
THEN:
• System positions to first FWIQBOTL record with segment type 'FWIQBOTL', clears key field, and sets function to GNP
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when system is processing inquiry bottom line records.
Trigger Criteria:
Context: System is processing inquiry bottom line records
Applied to: More FWIQBOTL Records Available?
Action: System checks for additional records to process
Logic Flow:
IF System is processing inquiry bottom line records
AND System checks for additional records to process
THEN:
• Processing continues if status code is spaces AND container counter is 30 or less, otherwise processing stops
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when more inquiry records are available for processing. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: More inquiry records are available for processing
Applied to: Read Next FWIQBOTL Record
Action: System reads the next FWIQBOTL record
Logic Flow:
IF More inquiry records are available for processing
AND System reads the next FWIQBOTL record
THEN:
• System calls FWIQIO with GNP function to retrieve next inquiry bottom line record
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when inquiry bottom line record has been retrieved.
Trigger Criteria:
Context: An inquiry bottom line record has been retrieved
Applied to: Is Record Type 'T/C XREF'?
Action: System examines the record content
Logic Flow:
IF An inquiry bottom line record has been retrieved
AND System examines the record content
THEN:
• Record is processed as container cross-reference if positions 1-8 contain 'T/C XREF', otherwise record is skipped
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when record is confirmed as container cross-reference type.
Trigger Criteria:
Context: Record is confirmed as container cross-reference type
Applied to: Extract Container ID from Position 28-39
Action: System processes the container information
Logic Flow:
IF Record is confirmed as container cross-reference type
AND System processes the container information
THEN:
• Container ID is extracted from positions 28-39 of the inquiry bottom line record
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container id has been extracted from the record.
Trigger Criteria:
Context: Container ID has been extracted from the record
Applied to: Extract Waybill Railroad from Position 10-12
Action: System processes waybill reference information
Logic Flow:
IF Container ID has been extracted from the record
AND System processes waybill reference information
THEN:
• Waybill railroad code is extracted from positions 10-12 of the inquiry record
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill railroad code has been extracted.
Trigger Criteria:
Context: Waybill railroad code has been extracted
Applied to: Extract Waybill Station from Position 14-19
Action: System continues processing waybill reference information
Logic Flow:
IF Waybill railroad code has been extracted
AND System continues processing waybill reference information
THEN:
• Waybill station code is extracted from positions 14-19 of the inquiry record
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill station code has been extracted.
Trigger Criteria:
Context: Waybill station code has been extracted
Applied to: Extract Waybill Number from Position 21-26
Action: System completes waybill reference extraction
Logic Flow:
IF Waybill station code has been extracted
AND System completes waybill reference extraction
THEN:
• Waybill number is extracted from positions 21-26 of the inquiry record
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when all waybill reference components have been extracted.
Trigger Criteria:
Context: All waybill reference components have been extracted
Applied to: Replace Spaces with Zeros in Waybill Fields
Action: System standardizes the waybill reference format
Logic Flow:
IF All waybill reference components have been extracted
AND System standardizes the waybill reference format
THEN:
• All spaces in the combined waybill reference are replaced with zeros
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container id and standardized waybill reference have been extracted.
Trigger Criteria:
Context: Container ID and standardized waybill reference have been extracted
Applied to: Store Container Cross-Reference Data
Action: System stores the cross-reference information
Logic Flow:
IF Container ID and standardized waybill reference have been extracted
AND System stores the cross-reference information
THEN:
• Container ID and waybill reference are stored in the container cross-reference table at the current counter position
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container cross-reference data has been stored.
Trigger Criteria:
Context: Container cross-reference data has been stored
Applied to: Increment Container Counter
Action: System prepares for next container record
Logic Flow:
IF Container cross-reference data has been stored
AND System prepares for next container record
THEN:
• Container counter is incremented by 1
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when container counter has been incremented.
Trigger Criteria:
Context: Container counter has been incremented
Applied to: Container Counter > 30?
Action: System checks processing limits
Logic Flow:
IF Container counter has been incremented
AND System checks processing limits
THEN:
• Processing stops if container counter exceeds 30, otherwise processing continues with next record
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when record does not contain 't/c xref' in positions 1-8.
Trigger Criteria:
Context: Record does not contain 'T/C XREF' in positions 1-8
Applied to: Skip Non-Container Record
Action: System processes the non-container record
Logic Flow:
IF Record does not contain 'T/C XREF' in positions 1-8
AND System processes the non-container record
THEN:
• Record is skipped and system continues to next available record
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when all available inquiry records have been processed.
Trigger Criteria:
Context: All available inquiry records have been processed
Applied to: Any Containers Found?
Action: System evaluates processing results
Logic Flow:
IF All available inquiry records have been processed
AND System evaluates processing results
THEN:
• Container processing is successful if first container ID is not spaces or low-values, otherwise no containers are found
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when at least one valid container cross-reference was found.
Trigger Criteria:
Context: At least one valid container cross-reference was found
Applied to: Set First Container as Current Equipment
Action: System initializes equipment processing
Logic Flow:
IF At least one valid container cross-reference was found
AND System initializes equipment processing
THEN:
• First container ID from the cross-reference table is set as current equipment ID
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when first container has been set as current equipment.
Trigger Criteria:
Context: First container has been set as current equipment
Applied to: Mark Container Found Status
Action: System updates processing status
Logic Flow:
IF First container has been set as current equipment
AND System updates processing status
THEN:
• Container found status and container IQ found status are both set to true
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when no valid container cross-references were found.
Trigger Criteria:
Context: No valid container cross-references were found
Applied to: Mark No Containers Found Status
Action: System updates processing status
Logic Flow:
IF No valid container cross-references were found
AND System updates processing status
THEN:
• Container not found status and container IQ not found status are both set to true
Business Justification: Defines the strict business conditions required to proceed when waybill retrieval request is initiated for an equipment id. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A waybill retrieval request is initiated for an equipment ID
Applied to: First Call or Different Equipment ID?
Action: The system checks if this is the first FWCARGET call or if the current equipment ID differs from the previously held equipment ID
Logic Flow:
IF A waybill retrieval request is initiated for an equipment ID
AND The system checks if this is the first FWCARGET call or if the current equipment ID differs from the previously held equipment ID
THEN:
• The system proceeds with parameter initialization if it's a first call or different equipment, otherwise exits the process
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill retrieval operation needs to be performed.
Trigger Criteria:
Context: A waybill retrieval operation needs to be performed
Applied to: Initialize FWCARGET Parameters
Action: The system initializes FWCARGET parameters
Logic Flow:
IF A waybill retrieval operation needs to be performed
AND The system initializes FWCARGET parameters
THEN:
• SHIPROOT andFWWARGET-PARM structures are cleared and the current equipment ID is stored as the held equipment ID
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when fwcarget parameters are being configured.
Trigger Criteria:
Context: FWCARGET parameters are being configured
Applied to: Set Waybill Type Criteria - Exclude Types 98/99
Action: The system sets waybill type criteria
Logic Flow:
IF FWCARGET parameters are being configured
AND The system sets waybill type criteria
THEN:
• Waybill types 98 and 99 are excluded from the retrieval process
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when fwcarget parameters are being configured.
Trigger Criteria:
Context: FWCARGET parameters are being configured
Applied to: Set Status Criteria - Include All Status Types
Action: The system sets status criteria
Logic Flow:
IF FWCARGET parameters are being configured
AND The system sets status criteria
THEN:
• All status types are included in the waybill retrieval process
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when fwcarget parameters are being configured.
Trigger Criteria:
Context: FWCARGET parameters are being configured
Applied to: Set EDI Criteria - Exclude Incomplete EDI
Action: The system sets EDI criteria
Logic Flow:
IF FWCARGET parameters are being configured
AND The system sets EDI criteria
THEN:
• Waybills with incomplete EDI processing are excluded from retrieval
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when fwcarget parameters are being configured.
Trigger Criteria:
Context: FWCARGET parameters are being configured
Applied to: Include Temporary Waybills
Action: The system sets temporary waybill criteria
Logic Flow:
IF FWCARGET parameters are being configured
AND The system sets temporary waybill criteria
THEN:
• Temporary waybills are included in the retrieval process
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when fwcarget parameters are being configured.
Trigger Criteria:
Context: FWCARGET parameters are being configured
Applied to: Exclude Corrector Waybills
Action: The system sets corrector waybill criteria
Logic Flow:
IF FWCARGET parameters are being configured
AND The system sets corrector waybill criteria
THEN:
• Corrector waybills are excluded from the retrieval process
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when fwcarget parameters are being configured.
Trigger Criteria:
Context: FWCARGET parameters are being configured
Applied to: Request Latest Waybill Date
Action: The system sets date criteria
Logic Flow:
IF FWCARGET parameters are being configured
AND The system sets date criteria
THEN:
• The retrieval is configured to return the waybill with the latest date
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when all fwcarget parameters are properly configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All FWCARGET parameters are properly configured
Applied to: Execute FWCARGET Call
Action: The system calls the FWCARGET external program
Logic Flow:
IF All FWCARGET parameters are properly configured
AND The system calls the FWCARGET external program
THEN:
• The waybill retrieval operation is executed and results are returned
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when fwcarget call has been executed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: FWCARGET call has been executed
Applied to: FWCARGET Error or Not Found?
Action: The system evaluates the return status
Logic Flow:
IF FWCARGET call has been executed
AND The system evaluates the return status
THEN:
• If error or not found condition exists, the system branches to error handling, otherwise continues with validation checks
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill has been successfully retrieved.
Trigger Criteria:
Context: A waybill has been successfully retrieved
Applied to: Haulage Right Carrier Present?
Action: The system checks the haulage right carrier field
Logic Flow:
IF A waybill has been successfully retrieved
AND The system checks the haulage right carrier field
THEN:
• If haulage right carrier is blank or spaces, the waybill is accepted, otherwise additional EDI validation is required
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill has a haulage right carrier specified.
Trigger Criteria:
Context: A waybill has a haulage right carrier specified
Applied to: EDI 418 Release Complete?
Action: The system checks the EDI completion status
Logic Flow:
IF A waybill has a haulage right carrier specified
AND The system checks the EDI completion status
THEN:
• If EDI 418 release equals 'Y', the waybill is accepted, otherwise the system continues searching for previous waybills
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill requires further processing due to incomplete edi.
Trigger Criteria:
Context: A waybill requires further processing due to incomplete EDI
Applied to: Same Waybill Key as Previous?
Action: The system compares the current waybill key with the previously stored feedback key
Logic Flow:
IF A waybill requires further processing due to incomplete EDI
AND The system compares the current waybill key with the previously stored feedback key
THEN:
• If keys match, the search is terminated as not found, otherwise the system continues with previous status search
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when current waybill has incomplete edi and is not a duplicate key.
Trigger Criteria:
Context: Current waybill has incomplete EDI and is not a duplicate key
Applied to: Set Previous Status Waybill Date
Action: The system sets search criteria for previous status
Logic Flow:
IF Current waybill has incomplete EDI and is not a duplicate key
AND The system sets search criteria for previous status
THEN:
• Search parameters are updated to look for waybills with previous status and earlier waybill dates
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill key needs to be tracked for duplicate detection.
Trigger Criteria:
Context: A waybill key needs to be tracked for duplicate detection
Applied to: Update Waybill Key Feedback
Action: The system updates the feedback mechanism
Logic Flow:
IF A waybill key needs to be tracked for duplicate detection
AND The system updates the feedback mechanism
THEN:
• The current waybill key is stored in the feedback field for future comparison
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill search has exhausted all possibilities or encountered duplicate keys.
Trigger Criteria:
Context: Waybill search has exhausted all possibilities or encountered duplicate keys
Applied to: Mark as Not Found and Exit
Action: The system determines no valid waybill exists
Logic Flow:
IF Waybill search has exhausted all possibilities or encountered duplicate keys
AND The system determines no valid waybill exists
THEN:
• The waybill status is set to not found and the process exits
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when fwcarget call has completed with error or not found status. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: FWCARGET call has completed with error or not found status
Applied to: FWCARGET Error?
Action: The system evaluates the specific return condition
Logic Flow:
IF FWCARGET call has completed with error or not found status
AND The system evaluates the specific return condition
THEN:
• If a system error occurred, fallback to inquiry system is attempted, otherwise waybill is marked as not found
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when fwcarget call has failed with a system error. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: FWCARGET call has failed with a system error
Applied to: Fallback to Inquiry System
Action: The system initiates fallback processing
Logic Flow:
IF FWCARGET call has failed with a system error
AND The system initiates fallback processing
THEN:
• Alternative inquiry system is called to attempt waybill retrieval
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill has been successfully retrieved and validated.
Trigger Criteria:
Context: Waybill has been successfully retrieved and validated
Applied to: Return Waybill Found
Action: All validation criteria are met
Logic Flow:
IF Waybill has been successfully retrieved and validated
AND All validation criteria are met
THEN:
• Waybill status is set to found and waybill data is available for subsequent processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when all waybill retrieval attempts have been exhausted.
Trigger Criteria:
Context: All waybill retrieval attempts have been exhausted
Applied to: Return Waybill Not Found
Action: No valid waybill meeting criteria is found
Logic Flow:
IF All waybill retrieval attempts have been exhausted
AND No valid waybill meeting criteria is found
THEN:
• Waybill status is set to not found and no waybill data is available
Business Justification: Dictates the expected operational logic and validation steps when waybill exists with routing information in rut-info fields.
Trigger Criteria:
Context: A waybill exists with routing information in RUT-INFO fields
Applied to: Extract Routing Information from Waybill
Action: The system processes the waybill for routing analysis
Logic Flow:
IF A waybill exists with routing information in RUT-INFO fields
AND The system processes the waybill for routing analysis
THEN:
• The routing information from RUT-INFO fields 1, 2, and 3 is extracted and stored in working storage routing variables
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when routing information contains special characters including exclamation marks.
Trigger Criteria:
Context: Routing information contains special characters including exclamation marks
Applied to: Clean Routing Data - Replace Special Characters
Action: The system processes the routing data
Logic Flow:
IF Routing information contains special characters including exclamation marks
AND The system processes the routing data
THEN:
• All exclamation marks in the routing information are replaced with spaces
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment routing analysis is starting.
Trigger Criteria:
Context: Equipment routing analysis is starting
Applied to: Initialize Routing Variables
Action: The system initializes routing variables
Logic Flow:
IF Equipment routing analysis is starting
AND The system initializes routing variables
THEN:
• The route status is set to not found as the default state
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment has an ima code in the waybill.
Trigger Criteria:
Context: Equipment has an IMA code in the waybill
Applied to: Check Hazmat Code 'HM'?
Action: The IMA code equals 'HM'
Logic Flow:
IF Equipment has an IMA code in the waybill
AND The IMA code equals 'HM'
THEN:
• The equipment empty indicator is set to 2 for hazmat routing and route found flag is set to true
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when routing entry exists in the routing information array.
Trigger Criteria:
Context: A routing entry exists in the routing information array
Applied to: Validate Routing Entry Format
Action: The routing entry is spaces, low values, or empty
Logic Flow:
IF A routing entry exists in the routing information array
AND The routing entry is spaces, low values, or empty
THEN:
• The routing validation loop is terminated and processing moves to the next step
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when valid routing entries with scac carrier codes and junction information exist.
Trigger Criteria:
Context: Valid routing entries with SCAC carrier codes and junction information exist
Applied to: Analyze SCAC Carrier Patterns
Action: The system processes consecutive routing entries to identify carrier patterns
Logic Flow:
IF Valid routing entries with SCAC carrier codes and junction information exist
AND The system processes consecutive routing entries to identify carrier patterns
THEN:
• The routing information is parsed into SCAC codes and junction codes for pattern analysis
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when routing shows first scac as csxt or ns, second scac as cprs, and junction as det.
Trigger Criteria:
Context: Routing shows first SCAC as CSXT or NS, second SCAC as CPRS, and junction as DET
Applied to: Set CSXT Routing Classification
Action: The first SCAC is specifically CSXT
Logic Flow:
IF Routing shows first SCAC as CSXT or NS, second SCAC as CPRS, and junction as DET
AND The first SCAC is specifically CSXT
THEN:
• The equipment empty indicator is set to 3 for CSXT routing classification and route found flag is set to true
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when routing shows first scac as csxt or ns, second scac as cprs, and junction as det.
Trigger Criteria:
Context: Routing shows first SCAC as CSXT or NS, second SCAC as CPRS, and junction as DET
Applied to: Set NS Routing Classification
Action: The first SCAC is specifically NS
Logic Flow:
IF Routing shows first SCAC as CSXT or NS, second SCAC as CPRS, and junction as DET
AND The first SCAC is specifically NS
THEN:
• The equipment empty indicator is set to 4 for NS routing classification and route found flag is set to true
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment processing is complete and no specific routing pattern was identified or no waybill was found.
Trigger Criteria:
Context: Equipment processing is complete and no specific routing pattern was identified OR no waybill was found
Applied to: Set Equipment Empty Indicator Based on Routing
Action: The route was not found or waybill is not available
Logic Flow:
IF Equipment processing is complete and no specific routing pattern was identified OR no waybill was found
AND The route was not found or waybill is not available
THEN:
• The equipment empty indicator is set to 1 as the default value
R-GCX003-cbl-01598 (+6)File: GCX003.cblBusiness Rule: P: Process Special Handling Codes
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment has empty status and contains residue weight greater than zero.
Trigger Criteria:
Context: Equipment has empty status and contains residue weight greater than zero
Applied to: Check Equipment Load/Empty Status
Action: System processes equipment for special handling codes
Logic Flow:
IF Equipment has empty status and contains residue weight greater than zero
AND System processes equipment for special handling codes
THEN:
• System initiates empty residue code scanning and weight threshold evaluation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment has residue weight and special handling codes exist.
Trigger Criteria:
Context: Equipment has residue weight and special handling codes exist
Applied to: Scan Special Handling Codes Array
Action: System scans through special handling codes array up to 8 positions
Logic Flow:
IF Equipment has residue weight and special handling codes exist
AND System scans through special handling codes array up to 8 positions
THEN:
• System identifies if empty residue threshold code is present and sets appropriate flag
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment contains residue weight.
Trigger Criteria:
Context: Equipment contains residue weight
Applied to: Evaluate Residue Weight Against Threshold
Action: System evaluates residue weight against threshold of 7000 pounds
Logic Flow:
IF Equipment contains residue weight
AND System evaluates residue weight against threshold of 7000 pounds
THEN:
• System sets high residue weight flag if weight exceeds 7000 pounds, otherwise sets low residue weight flag
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment cargo data is being processed.
Trigger Criteria:
Context: Equipment cargo data is being processed
Applied to: Check Segment 08 Data for Hazmat
Action: System checks for Segment 08 data availability
Logic Flow:
IF Equipment cargo data is being processed
AND System checks for Segment 08 data availability
THEN:
• System sets hazmat flag to Yes if Segment 08 data is found, otherwise sets hazmat flag to No
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment has been evaluated for empty residue and weight thresholds.
Trigger Criteria:
Context: Equipment has been evaluated for empty residue and weight thresholds
Applied to: Process Empty Residue Business Rules
Action: System processes empty residue business rules with cargo found status and weight classifications
Logic Flow:
IF Equipment has been evaluated for empty residue and weight thresholds
AND System processes empty residue business rules with cargo found status and weight classifications
THEN:
• System determines appropriate processing path based on empty residue presence, weight threshold, and cargo availability
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment has empty residue code found and residue weight exceeds 7000 pounds and equipment is empty and not idler.
Trigger Criteria:
Context: Equipment has empty residue code found and residue weight exceeds 7000 pounds and equipment is empty and not idler
Applied to: Generate Empty Residue Error Message
Action: System processes waybill found with no cargo found condition
Logic Flow:
IF Equipment has empty residue code found and residue weight exceeds 7000 pounds and equipment is empty and not idler
AND System processes waybill found with no cargo found condition
THEN:
• System generates message 44 with waybill root key and date information
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment is marked as loaded and has residue weight with empty residue code found but no cargo data available.
Trigger Criteria:
Context: Equipment is marked as loaded and has residue weight with empty residue code found but no cargo data available
Applied to: Generate Loaded Equipment Missing Cargo Message
Action: System processes equipment with waybill found but cargo not found condition
Logic Flow:
IF Equipment is marked as loaded and has residue weight with empty residue code found but no cargo data available
AND System processes equipment with waybill found but cargo not found condition
THEN:
• System generates appropriate missing cargo message for loaded equipment
R-GCX003-cbl-01605 (+9)File: GCX003.cblBusiness Rule: E: User Authorized for Special Manifests
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when user acf2 id is provided for authorization check. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A user ACF2 ID is provided for authorization check
Applied to: Read User Security Table GCSTBRT-US
Action: The system queries the user security table GCSTBRT-US with the user's ACF2 ID
Logic Flow:
IF A user ACF2 ID is provided for authorization check
AND The system queries the user security table GCSTBRT-US with the user's ACF2 ID
THEN:
• The system retrieves the user's security record containing authorization flags and permissions
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when query has been made to retrieve user security information.
Trigger Criteria:
Context: A query has been made to retrieve user security information
Applied to: User Record Found?
Action: The system checks if a valid user security record was returned from the database
Logic Flow:
IF A query has been made to retrieve user security information
AND The system checks if a valid user security record was returned from the database
THEN:
• The system determines if the user has a valid security profile or should use default authorization settings
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when valid user security record exists in the database.
Trigger Criteria:
Context: A valid user security record exists in the database
Applied to: Initialize User Authorization Flags
Action: The system processes the user security information
Logic Flow:
IF A valid user security record exists in the database
AND The system processes the user security information
THEN:
• The system copies the user security segment data to working storage for authorization processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when user security information is available for processing.
Trigger Criteria:
Context: User security information is available for processing
Applied to: Check UTF-SPEC-MANI Field
Action: The system checks the UTF-SPEC-MANI field in the user's security profile
Logic Flow:
IF User security information is available for processing
AND The system checks the UTF-SPEC-MANI field in the user's security profile
THEN:
• The system determines if the field contains 'S' indicating special manifest authorization or any other value indicating no authorization
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when user's utf-spec-mani field contains 's'.
Trigger Criteria:
Context: The user's UTF-SPEC-MANI field contains 'S'
Applied to: Set User Authorized for Special Manifests
Action: The system evaluates special manifest authorization
Logic Flow:
IF The user's UTF-SPEC-MANI field contains 'S'
AND The system evaluates special manifest authorization
THEN:
• The system sets the user as authorized for special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when user's utf-spec-mani field does not contain 's' or no user security record exists.
Trigger Criteria:
Context: The user's UTF-SPEC-MANI field does not contain 'S' OR no user security record exists
Applied to: Set User NOT Authorized for Special Manifests
Action: The system evaluates special manifest authorization
Logic Flow:
IF The user's UTF-SPEC-MANI field does not contain 'S' OR no user security record exists
AND The system evaluates special manifest authorization
THEN:
• The system sets the user as not authorized for special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when user authorization status has been determined.
Trigger Criteria:
Context: User authorization status has been determined
Applied to: Special Manifest Required?
Action: The system evaluates if the current cargo or train processing requires special manifest creation
Logic Flow:
IF User authorization status has been determined
AND The system evaluates if the current cargo or train processing requires special manifest creation
THEN:
• The system determines whether special manifest authorization check is needed for the current operation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when special manifest creation is required for the current operation.
Trigger Criteria:
Context: Special manifest creation is required for the current operation
Applied to: User Authorized for Special Manifests?
Action: The system checks the user's special manifest authorization status
Logic Flow:
IF Special manifest creation is required for the current operation
AND The system checks the user's special manifest authorization status
THEN:
• The system determines if the user is authorized to proceed with special manifest creation or should be denied
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when special manifest is required and user is authorized for special manifests.
Trigger Criteria:
Context: Special manifest is required AND user is authorized for special manifests
Applied to: Allow Special Manifest Creation
Action: The system processes the authorization decision
Logic Flow:
IF Special manifest is required AND user is authorized for special manifests
AND The system processes the authorization decision
THEN:
• The system allows the special manifest creation process to continue
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when special manifest is required and user is not authorized for special manifests.
Trigger Criteria:
Context: Special manifest is required AND user is not authorized for special manifests
Applied to: Generate Error Message 43 - Not Authorized
Action: The system processes the authorization decision
Logic Flow:
IF Special manifest is required AND user is not authorized for special manifests
AND The system processes the authorization decision
THEN:
• The system generates error message 43 indicating the user is not authorized for special manifest creation
R-GCX003-cbl-01615 (+8)File: GCX003.cblBusiness Rule: C: Empty Equipment or Empty Residue
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists for the equipment.
Trigger Criteria:
Context: A cargo record exists for the equipment
Applied to: Is Equipment Marked as Empty?
Action: The cargo BOL type code indicates empty equipment (M1109 empty equipment condition)
Logic Flow:
IF A cargo record exists for the equipment
AND The cargo BOL type code indicates empty equipment (M1109 empty equipment condition)
THEN:
• The equipment should be processed as empty equipment cargo
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record exists for the equipment.
Trigger Criteria:
Context: A cargo record exists for the equipment
Applied to: Check Equipment Load Indicator
Action: The cargo BOL type code indicates empty residue (M1109 empty residue condition)
Logic Flow:
IF A cargo record exists for the equipment
AND The cargo BOL type code indicates empty residue (M1109 empty residue condition)
THEN:
• The equipment should be processed as empty residue cargo
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when empty car has residue weight and special handling codes are present.
Trigger Criteria:
Context: An empty car has residue weight and special handling codes are present
Applied to: Validate Residue Weight Threshold
Action: The residue weight is greater than 7000 pounds
Logic Flow:
IF An empty car has residue weight and special handling codes are present
AND The residue weight is greater than 7000 pounds
THEN:
• The car should be flagged for special residue handling
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when shipment has special handling codes and residue weight greater than 0.
Trigger Criteria:
Context: A shipment has special handling codes and residue weight greater than 0
Applied to: Check Special Handling Codes
Action: One of the special handling codes equals 'ER' (Empty Residue threshold code)
Logic Flow:
IF A shipment has special handling codes and residue weight greater than 0
AND One of the special handling codes equals 'ER' (Empty Residue threshold code)
THEN:
• The empty residue condition should be flagged as found
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment has empty equipment cargo and origin-destination country codes are available.
Trigger Criteria:
Context: Equipment has empty equipment cargo and origin-destination country codes are available
Applied to: Route = CAMX or MXCA?
Action: The origin-destination country codes equal 'CAMX' or 'MXCA'
Logic Flow:
IF Equipment has empty equipment cargo and origin-destination country codes are available
AND The origin-destination country codes equal 'CAMX' or 'MXCA'
THEN:
• Empty equipment error message should be skipped and processing should continue
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment has empty equipment cargo and route is not canada-mexico or mexico-canada.
Trigger Criteria:
Context: Equipment has empty equipment cargo and route is not Canada-Mexico or Mexico-Canada
Applied to: Generate Empty Equipment Error Message
Action: The cargo is found and marked as empty equipment
Logic Flow:
IF Equipment has empty equipment cargo and route is not Canada-Mexico or Mexico-Canada
AND The cargo is found and marked as empty equipment
THEN:
• Error message 27 (empty equipment message) should be generated
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment is determined to be empty (either empty equipment or empty residue).
Trigger Criteria:
Context: Equipment is determined to be empty (either empty equipment or empty residue)
Applied to: Set Equipment as Empty
Action: The equipment type is container and current load indicator is 'L' (loaded)
Logic Flow:
IF Equipment is determined to be empty (either empty equipment or empty residue)
AND The equipment type is container and current load indicator is 'L' (loaded)
THEN:
• The load indicator should be changed to 'E' (empty), container loaded count should be decremented by 1, and container empty count should be incremented by 1
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment is determined to be empty and equipment type is not container.
Trigger Criteria:
Context: Equipment is determined to be empty and equipment type is not container
Applied to: Update Load/Empty Counters
Action: The current load indicator is 'L' (loaded)
Logic Flow:
IF Equipment is determined to be empty and equipment type is not container
AND The current load indicator is 'L' (loaded)
THEN:
• The load indicator should be changed to 'E' (empty), car loaded count should be decremented by 1, and car empty count should be incremented by 1
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment is validated as empty equipment or empty residue.
Trigger Criteria:
Context: Equipment is validated as empty equipment or empty residue
Applied to: Format Equipment Info Field
Action: The cargo type is empty equipment or empty residue
Logic Flow:
IF Equipment is validated as empty equipment or empty residue
AND The cargo type is empty equipment or empty residue
THEN:
• The equipment information field should be set to 'EMPTY' and load/empty indicator should be set to 'E'
Business Justification: Ensures correct system behavior and process compliance when train processing has completed with potential errors and spawn activities.
Trigger Criteria:
Context: Train processing has completed with potential errors and spawn activities
Applied to: Any Processing Errors?
Action: The system checks for any processing errors in the report
Logic Flow:
IF Train processing has completed with potential errors and spawn activities
AND The system checks for any processing errors in the report
THEN:
• If no errors exist, proceed to check spawn activities; if errors exist, proceed to error handling with spawn check
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train processing has no errors and no spawn activities.
Trigger Criteria:
Context: Train processing has no errors and no spawn activities
Applied to: SENT
Action: The system evaluates the final processing status
Logic Flow:
IF Train processing has no errors and no spawn activities
AND The system evaluates the final processing status
THEN:
• Set the result status to SENT and count warning messages only
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train processing has no errors but has spawn activities.
Trigger Criteria:
Context: Train processing has no errors but has spawn activities
Applied to: NOT SENT
Action: The system evaluates the final processing status
Logic Flow:
IF Train processing has no errors but has spawn activities
AND The system evaluates the final processing status
THEN:
• Set the result status to NOT SENT, count warnings, add spawn count to error count, and trigger special manifest processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train processing has errors.
Trigger Criteria:
Context: Train processing has errors
Applied to: Any Spawn Activities?
Action: The system checks for spawn activities
Logic Flow:
IF Train processing has errors
AND The system checks for spawn activities
THEN:
• If no spawns exist, check message types for error classification; if spawns exist, check for diversion and IT export messages
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when processing has errors with no spawn activities and message type 43 is found.
Trigger Criteria:
Context: Processing has errors with no spawn activities and message type 43 is found
Applied to: Convert Error 43 to Warning 18
Action: The system processes error message classification
Logic Flow:
IF Processing has errors with no spawn activities and message type 43 is found
AND The system processes error message classification
THEN:
• Convert message type 43 to message type 18, increase warning count by 1, and decrease error count by 1
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when processing has errors with spawn activities and diversion messages are found.
Trigger Criteria:
Context: Processing has errors with spawn activities and diversion messages are found
Applied to: Convert to Message 19 with Station Code
Action: The system processes spawn message conversion
Logic Flow:
IF Processing has errors with spawn activities and diversion messages are found
AND The system processes spawn message conversion
THEN:
• Convert diversion messages to message 19 and include the station code from GCSTBRT-SC-US-STAT-CODE-X
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when processing has errors with spawn activities and it export messages are found.
Trigger Criteria:
Context: Processing has errors with spawn activities and IT export messages are found
Applied to: Convert to Message 18
Action: The system processes spawn message conversion
Logic Flow:
IF Processing has errors with spawn activities and IT export messages are found
AND The system processes spawn message conversion
THEN:
• Convert IT export messages to message type 18
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when processing has errors with spawn activities and message conversion is complete.
Trigger Criteria:
Context: Processing has errors with spawn activities and message conversion is complete
Applied to: Add Spawn Count to Warning Count
Action: The system calculates final warning count
Logic Flow:
IF Processing has errors with spawn activities and message conversion is complete
AND The system calculates final warning count
THEN:
• Add the spawn count to the existing warning count to get the final warning total
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when processing result status has been determined and counts have been finalized.
Trigger Criteria:
Context: Processing result status has been determined and counts have been finalized
Applied to: Generate Report Header Line 4
Action: The system generates the final report header
Logic Flow:
IF Processing result status has been determined and counts have been finalized
AND The system generates the final report header
THEN:
• Set header line 4 flag to true, populate US customer train ID from GCWTL-M1005-US-CUST-TRAIN-ID, and set ETA year, month, day, hour, and minute from request ETA fields
R-GCX003-cbl-01633 (+10)File: GCX003.cblBusiness Rule: Q: Large Report Check
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when email report is being processed with multiple report lines.
Trigger Criteria:
Context: An email report is being processed with multiple report lines
Applied to: Check Line Counter > 699?
Action: The line counter exceeds 699 lines in the current email message
Logic Flow:
IF An email report is being processed with multiple report lines
AND The line counter exceeds 699 lines in the current email message
THEN:
• The system should send the current email batch, clear the message buffer, reset the line counter, and add continuation headers for the next batch
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report line is available for processing and the line counter is within limits.
Trigger Criteria:
Context: A report line is available for processing and the line counter is within limits
Applied to: Add Current Line to Email Message
Action: The system processes the current report line
Logic Flow:
IF A report line is available for processing and the line counter is within limits
AND The system processes the current report line
THEN:
• The report line should be added to the email message buffer at the current line position
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report line has been successfully added to the email message.
Trigger Criteria:
Context: A report line has been successfully added to the email message
Applied to: Increment Line Counter
Action: The line addition is complete
Logic Flow:
IF A report line has been successfully added to the email message
AND The line addition is complete
THEN:
• The line counter should be incremented by one to track the current message size
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when email message buffer contains report lines ready for transmission.
Trigger Criteria:
Context: An email message buffer contains report lines ready for transmission
Applied to: Send Current Email Batch via EMCSEND3
Action: The pagination limit is reached or all lines are processed
Logic Flow:
IF An email message buffer contains report lines ready for transmission
AND The pagination limit is reached or all lines are processed
THEN:
• The system should invoke EMCSEND3 to transmit the email batch to the designated recipients
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when email batch has been successfully transmitted.
Trigger Criteria:
Context: An email batch has been successfully transmitted
Applied to: Clear Email Message Buffer
Action: The system needs to prepare for the next batch of report lines
Logic Flow:
IF An email batch has been successfully transmitted
AND The system needs to prepare for the next batch of report lines
THEN:
• The email message buffer should be cleared and reset to spaces
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when email batch has been sent and the buffer has been cleared.
Trigger Criteria:
Context: An email batch has been sent and the buffer has been cleared
Applied to: Reset Line Counter to Zero
Action: The system prepares for the next batch of report lines
Logic Flow:
IF An email batch has been sent and the buffer has been cleared
AND The system prepares for the next batch of report lines
THEN:
• The line counter should be reset to zero to start counting lines for the new batch
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when new email batch is being prepared after pagination.
Trigger Criteria:
Context: A new email batch is being prepared after pagination
Applied to: Add Continuation Header Line
Action: The system starts a continuation email
Logic Flow:
IF A new email batch is being prepared after pagination
AND The system starts a continuation email
THEN:
• A continuation header message should be added as the first line indicating this is a continuation of the report
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when continuation email batch is being prepared.
Trigger Criteria:
Context: A continuation email batch is being prepared
Applied to: Add Report Detail Headers
Action: The continuation header has been added
Logic Flow:
IF A continuation email batch is being prepared
AND The continuation header has been added
THEN:
• The standard report detail headers should be added to maintain consistent report formatting across email batches
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when continuation header and report detail headers have been added to a new email batch.
Trigger Criteria:
Context: Continuation header and report detail headers have been added to a new email batch
Applied to: Set Line Counter to 3
Action: The system prepares to continue adding report lines
Logic Flow:
IF Continuation header and report detail headers have been added to a new email batch
AND The system prepares to continue adding report lines
THEN:
• The line counter should be set to 3 to account for the three header lines already added
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when system is processing report lines for email transmission.
Trigger Criteria:
Context: The system is processing report lines for email transmission
Applied to: More Report Lines to Process?
Action: A line has been processed or a batch has been sent
Logic Flow:
IF The system is processing report lines for email transmission
AND A line has been processed or a batch has been sent
THEN:
• The system should check if more report lines exist to determine whether to continue processing or finalize the email transmission
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when all report lines have been processed and added to the current email message.
Trigger Criteria:
Context: All report lines have been processed and added to the current email message
Applied to: Send Final Email Batch
Action: No more report lines remain to be processed
Logic Flow:
IF All report lines have been processed and added to the current email message
AND No more report lines remain to be processed
THEN:
• The system should send the final email batch containing the remaining report lines
R-GCX003-cbl-01644 (+9)File: GCX003.cblBusiness Rule: D: Evaluate Message Type
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when report entry has been added to the report index.
Trigger Criteria:
Context: A report entry has been added to the report index
Applied to: Is Message Line?
Action: The system checks if the entry is a message line
Logic Flow:
IF A report entry has been added to the report index
AND The system checks if the entry is a message line
THEN:
• The system identifies whether the entry contains a message that needs to be classified for counting purposes
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when message line has been identified in the report.
Trigger Criteria:
Context: A message line has been identified in the report
Applied to: Is Spawn Message?
Action: The system checks if the message is a spawn message
Logic Flow:
IF A message line has been identified in the report
AND The system checks if the message is a spawn message
THEN:
• Spawn messages are excluded from error, warning, and information counting but still increment the report index
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when non-spawn message line exists in the report.
Trigger Criteria:
Context: A non-spawn message line exists in the report
Applied to: Error Message - Add to Error Count
Action: The message is classified as an error type
Logic Flow:
IF A non-spawn message line exists in the report
AND The message is classified as an error type
THEN:
• The system increments the error count by 1
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when non-spawn message line exists in the report.
Trigger Criteria:
Context: A non-spawn message line exists in the report
Applied to: Warning Message - Add to Warning Count
Action: The message is classified as a warning type
Logic Flow:
IF A non-spawn message line exists in the report
AND The message is classified as a warning type
THEN:
• The system increments the warning count by 1
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when non-spawn message line exists in the report.
Trigger Criteria:
Context: A non-spawn message line exists in the report
Applied to: Information Message - Add to Info Count
Action: The message is classified as an information type
Logic Flow:
IF A non-spawn message line exists in the report
AND The message is classified as an information type
THEN:
• The system increments the information count by 1
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when error message has been identified and counted.
Trigger Criteria:
Context: An error message has been identified and counted
Applied to: Is Message Type 43?
Action: The error message type is 43 (authorization failure)
Logic Flow:
IF An error message has been identified and counted
AND The error message type is 43 (authorization failure)
THEN:
• The system increments the special error count 43 by 1 in addition to the general error count
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when warning message has been identified and counted.
Trigger Criteria:
Context: A warning message has been identified and counted
Applied to: Is Message Type 49 or 52?
Action: The warning message type is 49 or 52 (DSP hold conditions)
Logic Flow:
IF A warning message has been identified and counted
AND The warning message type is 49 or 52 (DSP hold conditions)
THEN:
• The system increments the DSP hold count by 1 in addition to the general warning count
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when message has been processed and classified.
Trigger Criteria:
Context: A message has been processed and classified
Applied to: Increment Report Index
Action: The system completes message processing
Logic Flow:
IF A message has been processed and classified
AND The system completes message processing
THEN:
• The report index is incremented by 1 to point to the next available report line
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report index has been incremented.
Trigger Criteria:
Context: The report index has been incremented
Applied to: Report Index at Maximum?
Action: The report index reaches the maximum allowed report lines
Logic Flow:
IF The report index has been incremented
AND The report index reaches the maximum allowed report lines
THEN:
• The system detects a report overflow condition
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when report index has reached maximum capacity.
Trigger Criteria:
Context: The report index has reached maximum capacity
Applied to: Set Report Overflow Message
Action: A report overflow condition is detected
Logic Flow:
IF The report index has reached maximum capacity
AND A report overflow condition is detected
THEN:
• The system sets message type 9 (report overflow) to notify users that the report is truncated
R-GCX003-cbl-01654 (+4)File: GCX003.cblBusiness Rule: C: SEND Action with No Errors and No Spawns
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when send action is being processed for a train manifest.
Trigger Criteria:
Context: A SEND action is being processed for a train manifest
Applied to: Check Processing Status
Action: The system checks the processing status for errors and spawn conditions
Logic Flow:
IF A SEND action is being processed for a train manifest
AND The system checks the processing status for errors and spawn conditions
THEN:
• The system determines if the train can be transmitted based on error-free processing and no spawn requirements
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train processing has completed with no errors and no spawn requirements.
Trigger Criteria:
Context: Train processing has completed with no errors and no spawn requirements
Applied to: Set RPT-RESULT-SENT Status
Action: The system sets the transmission result status
Logic Flow:
IF Train processing has completed with no errors and no spawn requirements
AND The system sets the transmission result status
THEN:
• The result status is set to SENT and warning count is recorded
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train processing has completed with no errors but has spawn requirements.
Trigger Criteria:
Context: Train processing has completed with no errors but has spawn requirements
Applied to: Set RPT-RESULT-NO-SENT Status
Action: The system evaluates the transmission eligibility
Logic Flow:
IF Train processing has completed with no errors but has spawn requirements
AND The system evaluates the transmission eligibility
THEN:
• The result status is set to NO-SENT, spawn count is added to error count, and special manifest processing is prepared
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train processing has completed with errors.
Trigger Criteria:
Context: Train processing has completed with errors
Applied to: Set RPT-RESULT-NO-SENT Status
Action: The system evaluates the transmission eligibility
Logic Flow:
IF Train processing has completed with errors
AND The system evaluates the transmission eligibility
THEN:
• The result status is set to NO-SENTand both warning and error counts are recorded
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when train processing has spawn requirements that need special manifest generation.
Trigger Criteria:
Context: Train processing has spawn requirements that need special manifest generation
Applied to: Prepare Special Manifest Processing
Action: The system prepares to handle spawn processing
Logic Flow:
IF Train processing has spawn requirements that need special manifest generation
AND The system prepares to handle spawn processing
THEN:
• Special manifest processing is invoked for each spawn requirement
R-GCX003-cbl-01659 (+5)File: GCX003.cblBusiness Rule: J[Process Crowley IT Bond Logic]
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when it bond cargo record exists in the system.
Trigger Criteria:
Context: An IT bond cargo record exists in the system
Applied to: Is TR Already Created for IT?
Action: The system checks if TR has already been created for IT cargo by evaluating GCUSRT-TR-CREATED-FOR-IT field
Logic Flow:
IF An IT bond cargo record exists in the system
AND The system checks if TR has already been created for IT cargo by evaluating GCUSRT-TR-CREATED-FOR-IT field
THEN:
• If TR is already created (GCUSRT-TR-CREATED-FOR-IT = 'Y'), skip further IT bond processing and exit the Crowley process
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when it bond cargo requires processing and tr has not been created.
Trigger Criteria:
Context: An IT bond cargo requires processing and TR has not been created
Applied to: Is Request Action SEND?
Action: The system evaluates the request action type (REQ-ACTION-SEND)
Logic Flow:
IF An IT bond cargo requires processing and TR has not been created
AND The system evaluates the request action type (REQ-ACTION-SEND)
THEN:
• If request action is SEND, proceed to check user authorization for special manifests; if request action is REPORT, generate report message MSG-24
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when send request for it bond cargo that requires special manifest creation. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A SEND request for IT bond cargo that requires special manifest creation
Applied to: User Authorized for Special Manifests?
Action: The system checks user authorization status (WS-USER-NOT-AUTH-4-SPCL-MANIF)
Logic Flow:
IF A SEND request for IT bond cargo that requires special manifest creation
AND The system checks user authorization status (WS-USER-NOT-AUTH-4-SPCL-MANIF)
THEN:
• If user is not authorized for special manifests, generate authorization error MSG-43; if user is authorized, proceed to create IT export special manifest MSG-23
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when send request for it bond cargo from an authorized user. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A SEND request for IT bond cargo from an authorized user
Applied to: Create IT Export Special Manifest MSG-23
Action: The system creates an IT export special manifest
Logic Flow:
IF A SEND request for IT bond cargo from an authorized user
AND The system creates an IT export special manifest
THEN:
• Generate message MSG-23, set IT export spawn flag (WS-IT-EXPORT-SPAWN), and call special manifest creation process (Z870-CREATE-SPECIAL-MANIFEST)
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when send request for it bond cargo from an unauthorized user. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A SEND request for IT bond cargo from an unauthorized user
Applied to: Generate Authorization Error MSG-43
Action: The system detects user is not authorized for special manifests (WS-USER-NOT-AUTH-4-SPCL-MANIF is true)
Logic Flow:
IF A SEND request for IT bond cargo from an unauthorized user
AND The system detects user is not authorized for special manifests (WS-USER-NOT-AUTH-4-SPCL-MANIF is true)
THEN:
• Generate authorization error message MSG-43and add it to the report without creating special manifest
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when it bond cargo with report action request and tr not already created.
Trigger Criteria:
Context: An IT bond cargo with REPORT action request and TR not already created
Applied to: Generate Report Message MSG-24
Action: The system processes a REPORT action for IT bond
Logic Flow:
IF An IT bond cargo with REPORT action request and TR not already created
AND The system processes a REPORT action for IT bond
THEN:
• Generate report message MSG-24and add it to the report without creating special manifest or spawn processes
R-GCX003-cbl-01665 (+5)File: GCX003.cblBusiness Rule: N{User Has UTF
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when user attempts to process a train request with their acf2 user id and the system needs to validate scac access for cp (canadian pacific) operations.
Trigger Criteria:
Context: A user attempts to process a train request with their ACF2 user ID and the system needs to validate SCAC access for CP (Canadian Pacific) operations
Applied to: SCAC Access Valid?
Action: The system calls GCCSCAC to validate SCAC access and the validation returns SCAC-ACCESS-INVALID flag and the request is not an AEI train send request
Logic Flow:
IF A user attempts to process a train request with their ACF2 user ID and the system needs to validate SCAC access for CP (Canadian Pacific) operations
AND The system calls GCCSCAC to validate SCAC access and the validation returns SCAC-ACCESS-INVALID flag and the request is not an AEI train send request
THEN:
• The system sets user access to denied, generates error message fourteen, and prevents further processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when user with valid scac access needs their security profile validated for train processing operations.
Trigger Criteria:
Context: A user with valid SCAC access needs their security profile validated for train processing operations
Applied to: User Profile Found?
Action: The system performs a database lookup for the user's ACF2 ID in the GCSTBRT-US table
Logic Flow:
IF A user with valid SCAC access needs their security profile validated for train processing operations
AND The system performs a database lookup for the user's ACF2 ID in the GCSTBRT-US table
THEN:
• If the profile is found, the system loads the user segment data, otherwise initializes an empty profile with spaces
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when user requests to send train data and the system has retrieved their security profile.
Trigger Criteria:
Context: A user requests to send train data and the system has retrieved their security profile
Applied to:UTF-ADD = 'U' or 'S'?
Action: The request action is SEND and the user's UTF-ADD field contains value 'U' (Update) or 'S' (Special) or the request is an AEI train send request
Logic Flow:
IF A user requests to send train data and the system has retrieved their security profile
AND The request action is SEND and the user's UTF-ADD field contains value 'U' (Update) or 'S' (Special) or the request is an AEI train send request
THEN:
• The system grants send authorization and allows the user to proceed with sending train data
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when user lacks standard utf-add authorization ('u' or 's') for send operations.
Trigger Criteria:
Context: A user lacks standard UTF-ADD authorization ('U' or 'S') for send operations
Applied to: AEI Train Send Request?
Action: The request is identified as an AEI train send request
Logic Flow:
IF A user lacks standard UTF-ADD authorization ('U' or 'S') for send operations
AND The request is identified as an AEI train send request
THEN:
• The system grants send authorization despite the lack of standard UTF-ADD permissions
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when user requests to send train data but lacks proper authorization.
Trigger Criteria:
Context: A user requests to send train data but lacks proper authorization
Applied to: Set No User Access - Send Not Authorized
Action: The request action is SEND and the user's UTF-ADD field is not 'U' or 'S' and the request is not an AEI train send request
Logic Flow:
IF A user requests to send train data but lacks proper authorization
AND The request action is SEND and the user's UTF-ADD field is not 'U' or 'S' and the request is not an AEI train send request
THEN:
• The system sets user access to denied, generates error message thirteen, and prevents send operations
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when user has been granted send authorization and the system needs to check special manifest permissions.
Trigger Criteria:
Context: A user has been granted send authorization and the system needs to check special manifest permissions
Applied to:UTF-SPEC-MANI = 'S'?
Action: The user's UTF-SPEC-MANI field does not equal 'S' (Special) and the request is not an AEI train send request
Logic Flow:
IF A user has been granted send authorization and the system needs to check special manifest permissions
AND The user's UTF-SPEC-MANI field does not equal 'S' (Special) and the request is not an AEI train send request
THEN:
• The system sets the user as not authorized for special manifest operations
R-GCX003-cbl-01671 (+8)File: GCX003.cblBusiness Rule: K[Check Special Manifest Conditions]
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with bond type classification.
Trigger Criteria:
Context: A cargo record exists with bond type classification
Applied to: Is Cargo Immediate Transport Bond?
Action: The cargo is classified as immediate transport bond (M1201 movement type)
Logic Flow:
IF A cargo record exists with bond type classification
AND The cargo is classified as immediate transport bond (M1201 movement type)
THEN:
• The system skips cargo attachment and exits the attachment process
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with tr created for it indicator.
Trigger Criteria:
Context: A cargo record with TR created for IT indicator
Applied to: Is TR Created for IT = 'Y'?
Action: The TR created for IT flag equals 'Y'
Logic Flow:
IF A cargo record with TR created for IT indicator
AND The TR created for IT flag equals 'Y'
THEN:
• The system skips cargo attachment and exits the attachment process
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with us-canada-us movement type, empty tr created for it indicator, and cargo short description.
Trigger Criteria:
Context: A cargo record with US-Canada-US movement type, empty TR created for IT indicator, and cargo short description
Applied to: Is Cargo US-Canada-US Movement? AND Is TR Created for IT Empty? AND Is Cargo Short Description = Release?
Action: The cargo is US-Canada-US movement AND TR created for IT is empty AND cargo short description equals release status
Logic Flow:
IF A cargo record with US-Canada-US movement type, empty TR created for IT indicator, and cargo short description
AND The cargo is US-Canada-US movement AND TR created for IT is empty AND cargo short description equals release status
THEN:
• The system skips cargo attachment and exits the attachment process
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with default movement type, empty tr created for it indicator, and cargo short description.
Trigger Criteria:
Context: A cargo record with default movement type, empty TR created for IT indicator, and cargo short description
Applied to: Is Cargo Default Movement? AND Is TR Created for IT Empty? AND Is Cargo Short Description = Release?
Action: The cargo is default movement AND TR created for IT is empty AND cargo short description equals release status
Logic Flow:
IF A cargo record with default movement type, empty TR created for IT indicator, and cargo short description
AND The cargo is default movement AND TR created for IT is empty AND cargo short description equals release status
THEN:
• The system skips cargo attachment and exits the attachment process
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with equipment load status classification.
Trigger Criteria:
Context: A cargo record with equipment load status classification
Applied to: Is Cargo Empty Equipment?
Action: The cargo is classified as empty equipment
Logic Flow:
IF A cargo record with equipment load status classification
AND The cargo is classified as empty equipment
THEN:
• The system skips cargo attachment and exits the attachment process
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with special manifest classification and current station location.
Trigger Criteria:
Context: A cargo record with special manifest classification and current station location
Applied to: Is Special Manifest Original? AND Is Woburn PQ Station?
Action: The cargo has special manifest original status AND the current station is Woburn PQ
Logic Flow:
IF A cargo record with special manifest classification and current station location
AND The cargo has special manifest original status AND the current station is Woburn PQ
THEN:
• The system skips cargo attachment and exits the attachment process
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with special manifest classification and current station location.
Trigger Criteria:
Context: A cargo record with special manifest classification and current station location
Applied to: Is Special Manifest Special? AND Is NOT Woburn PQ Station?
Action: The cargo has special manifest special status AND the current station is not Woburn PQ
Logic Flow:
IF A cargo record with special manifest classification and current station location
AND The cargo has special manifest special status AND the current station is not Woburn PQ
THEN:
• The system skips cargo attachment and exits the attachment process
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with export movement type, origin-destination country codes, and current station location.
Trigger Criteria:
Context: A cargo record with export movement type, origin-destination country codes, and current station location
Applied to: Is Export Movement? AND Is Origin-Destination = US-Mexico? AND Is NOT Laredo TX Station?
Action: The cargo is export movement AND origin-destination is US-Mexico AND the current station is not Laredo TX
Logic Flow:
IF A cargo record with export movement type, origin-destination country codes, and current station location
AND The cargo is export movement AND origin-destination is US-Mexico AND the current station is not Laredo TX
THEN:
• The system skips cargo attachment and exits the attachment process
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record that does not meet any skip attachment conditions.
Trigger Criteria:
Context: A cargo record that does not meet any skip attachment conditions
Applied to: Attach Cargo to Train
Action: None of the special manifest, bond type, or routing skip conditions are met
Logic Flow:
IF A cargo record that does not meet any skip attachment conditions
AND None of the special manifest, bond type, or routing skip conditions are met
THEN:
• The system proceeds with standard cargo attachment to the train manifest
R-GCX003-cbl-01680 (+7)File: GCX003.cblBusiness Rule: F{Is Record Type 'T/C XREF'?}
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when inquiry bottom line record is being processed.
Trigger Criteria:
Context: An inquiry bottom line record is being processed
Applied to: Is Record Type 'T/C XREF'?
Action: The system checks the record type in the first 8 positions of the inquiry record
Logic Flow:
IF An inquiry bottom line record is being processed
AND The system checks the record type in the first 8 positions of the inquiry record
THEN:
• The system should identify if the record contains container cross-reference data by matching 'T/C XREF' pattern
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when valid 't/c xref' record is being processed.
Trigger Criteria:
Context: A valid 'T/C XREF' record is being processed
Applied to: Extract Container ID from Position 28-39
Action: The system extracts data from positions 28 through 39 of the inquiry record
Logic Flow:
IF A valid 'T/C XREF' record is being processed
AND The system extracts data from positions 28 through 39 of the inquiry record
THEN:
• The system should capture the 12-character container ID and store it in the container table
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when valid 't/c xref' record is being processed.
Trigger Criteria:
Context: A valid 'T/C XREF' record is being processed
Applied to: Extract Waybill Railroad from Position 10-12
Action: The system extracts data from positions 10 through 12 of the inquiry record
Logic Flow:
IF A valid 'T/C XREF' record is being processed
AND The system extracts data from positions 10 through 12 of the inquiry record
THEN:
• The system should capture the 3-character railroad code for the waybill reference
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when valid 't/c xref' record is being processed.
Trigger Criteria:
Context: A valid 'T/C XREF' record is being processed
Applied to: Extract Waybill Station from Position 14-19
Action: The system extracts data from positions 14 through 19 of the inquiry record
Logic Flow:
IF A valid 'T/C XREF' record is being processed
AND The system extracts data from positions 14 through 19 of the inquiry record
THEN:
• The system should capture the 6-character station code for the waybill reference
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when valid 't/c xref' record is being processed.
Trigger Criteria:
Context: A valid 'T/C XREF' record is being processed
Applied to: Extract Waybill Number from Position 21-26
Action: The system extracts data from positions 21 through 26 of the inquiry record
Logic Flow:
IF A valid 'T/C XREF' record is being processed
AND The system extracts data from positions 21 through 26 of the inquiry record
THEN:
• The system should capture the 6-character waybill number for the waybill reference
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill reference data has been extracted from the container cross-reference record.
Trigger Criteria:
Context: Waybill reference data has been extracted from the container cross-reference record
Applied to: Replace Spaces with Zeros in Waybill Fields
Action: The system processes the combined waybill railroad, station, and number fields
Logic Flow:
IF Waybill reference data has been extracted from the container cross-reference record
AND The system processes the combined waybill railroad, station, and number fields
THEN:
• The system should replace all space characters with zero characters to create a standardized waybill reference
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container id and waybill reference data have been successfully extracted and standardized.
Trigger Criteria:
Context: Container ID and waybill reference data have been successfully extracted and standardized
Applied to: Store Container Cross-Reference Data
Action: The system stores the cross-reference information
Logic Flow:
IF Container ID and waybill reference data have been successfully extracted and standardized
AND The system stores the cross-reference information
THEN:
• The system should save the container ID and associated waybill reference in the container table at the current index position
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when container cross-reference record has been successfully processed and stored.
Trigger Criteria:
Context: A container cross-reference record has been successfully processed and stored
Applied to: Increment Container Counter
Action: The system completes the storage of container cross-reference data
Logic Flow:
IF A container cross-reference record has been successfully processed and stored
AND The system completes the storage of container cross-reference data
THEN:
• The system should increment the container counter by one to prepare for processing the next container record
R-GCX003-cbl-01688 (+9)File: GCX003.cblBusiness Rule: L{Haulage Right Carrier Present?}
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill retrieval request is initiated for equipment processing. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A waybill retrieval request is initiated for equipment processing
Applied to: First Call or Different Equipment ID?
Action: The system checks if this is the first call to the waybill retrieval function OR the current equipment ID is different from the previously held equipment ID
Logic Flow:
IF A waybill retrieval request is initiated for equipment processing
AND The system checks if this is the first call to the waybill retrieval function OR the current equipment ID is different from the previously held equipment ID
THEN:
• If it is the first call OR the equipment ID has changed, proceed with waybill retrieval processing, otherwise skip the retrieval and exit
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill retrieval is proceeding for an equipment id. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Waybill retrieval is proceeding for an equipment ID
Applied to: First Call or Different Equipment ID?
Action: The system processes the equipment ID
Logic Flow:
IF Waybill retrieval is proceeding for an equipment ID
AND The system processes the equipment ID
THEN:
• Store the current equipment ID as the held equipment ID for future comparison AND set the processing flag to indicate this is no longer the first call
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill retrieval is initiated for a car equipment.
Trigger Criteria:
Context: Waybill retrieval is initiated for a car equipment
Applied to: Set Car Retrieval Criteria
Action: The system sets up retrieval parameters
Logic Flow:
IF Waybill retrieval is initiated for a car equipment
AND The system sets up retrieval parameters
THEN:
• Configure retrieval to include all car types except 98 and 99 AND include all status types AND exclude EDI incomplete records AND include temporary waybills AND exclude corrector waybills AND return the latest waybill with the most recent date
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when waybill retrieval parameters are configured for an equipment id. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Waybill retrieval parameters are configured for an equipment ID
Applied to: Call Waybill Retrieval System
Action: The system calls the external waybill retrieval service (FWCARGET)
Logic Flow:
IF Waybill retrieval parameters are configured for an equipment ID
AND The system calls the external waybill retrieval service (FWCARGET)
THEN:
• Execute the waybill retrieval call and return the waybill information and processing status
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill retrieval operation has been executed.
Trigger Criteria:
Context: A waybill retrieval operation has been executed
Applied to: Retrieval Error?
Action: The system checks the return status from the waybill retrieval service
Logic Flow:
IF A waybill retrieval operation has been executed
AND The system checks the return status from the waybill retrieval service
THEN:
• If the return status indicates an error OR not found condition, set the waybill status to the error condition, otherwise continue processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill has been successfully retrieved.
Trigger Criteria:
Context: A waybill has been successfully retrieved
Applied to: Haulage Right Carrier Present?
Action: The system checks the haulage right carrier field in the waybill
Logic Flow:
IF A waybill has been successfully retrieved
AND The system checks the haulage right carrier field in the waybill
THEN:
• If the haulage right carrier field contains spaces or is empty, accept the waybill for processing, otherwise perform additional EDI completion validation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill has a haulage right carrier assigned. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A waybill has a haulage right carrier assigned
Applied to: EDI Completion Status Released?
Action: The system checks the EDI completion release status (EDI-COMP-418-RELEASE)
Logic Flow:
IF A waybill has a haulage right carrier assigned
AND The system checks the EDI completion release status (EDI-COMP-418-RELEASE)
THEN:
• If the EDI completion status equals 'Y' (released), accept the waybill for processing, otherwise perform waybill key comparison validation
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill with haulage right carrier has edi completion status not released.
Trigger Criteria:
Context: A waybill with haulage right carrier has EDI completion status not released
Applied to: Same Waybill Key as Previous?
Action: The system compares the current waybill feedback key with the previously processed waybill feedback key
Logic Flow:
IF A waybill with haulage right carrier has EDI completion status not released
AND The system compares the current waybill feedback key with the previously processed waybill feedback key
THEN:
• If the current waybill feedback key matches the previous waybill feedback key, set status to not found and stop processing, otherwise continue with previous waybill date processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when current waybill does not meet edi completion criteria and is not a duplicate key.
Trigger Criteria:
Context: Current waybill does not meet EDI completion criteria and is not a duplicate key
Applied to: Set Previous Waybill Date Processing
Action: The system prepares to search for previous waybill versions
Logic Flow:
IF Current waybill does not meet EDI completion criteria and is not a duplicate key
AND The system prepares to search for previous waybill versions
THEN:
• Set the retrieval parameter to search for previous status waybill date AND update the feedback key tracking with the current waybill feedback key
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when primary waybill retrieval indicates no waybill found.
Trigger Criteria:
Context: Primary waybill retrieval indicates no waybill found
Applied to: Waybill Found?
Action: The system determines that no waybill was located in the primary system
Logic Flow:
IF Primary waybill retrieval indicates no waybill found
AND The system determines that no waybill was located in the primary system
THEN:
• Initiate alternative waybill search using the inquiry root system (Z450-GU-SHIPROOT-INQ) to locate waybill information
Business Justification: Defines the strict business conditions required to proceed when waybill exists with routing information in rut-info fields 1, 2, and 3.
Trigger Criteria:
Context: A waybill exists with routing information in RUT-INFO fields 1, 2, and 3
Applied to: Extract Routing Information from Waybill
Action: The system processes the waybill routing data
Logic Flow:
IF A waybill exists with routing information in RUT-INFO fields 1, 2, and 3
AND The system processes the waybill routing data
THEN:
• The routing information is extracted into working storage fields and exclamation marks are replaced with spaces for proper parsing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when routing information contains exclamation marks as field delimiters.
Trigger Criteria:
Context: Routing information contains exclamation marks as field delimiters
Applied to: Replace Exclamation Marks with Spaces
Action: The system processes the routing data
Logic Flow:
IF Routing information contains exclamation marks as field delimiters
AND The system processes the routing data
THEN:
• All exclamation marks in the routing information line are replaced with spaces
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when routing analysis is about to begin.
Trigger Criteria:
Context: Routing analysis is about to begin
Applied to: Initialize Route Search Variables
Action: The system starts route pattern analysis
Logic Flow:
IF Routing analysis is about to begin
AND The system starts route pattern analysis
THEN:
• Route not found flag is set to true and route search counter is initialized to begin pattern matching loop
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill has routing information to be analyzed.
Trigger Criteria:
Context: A waybill has routing information to be analyzed
Applied to: Check Route Pattern Loop
Action: The IMA code equals 'HM' indicating hazardous materials
Logic Flow:
IF A waybill has routing information to be analyzed
AND The IMA code equals 'HM' indicating hazardous materials
THEN:
• Route type is set to 2 for hazmat, route found flag is set to true, and normal pattern analysis is bypassed
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when routing information fields contain carrier and junction data.
Trigger Criteria:
Context: Routing information fields contain carrier and junction data
Applied to: Extract SCAC Code from Route Info
Action: The system processes each routing field in sequence
Logic Flow:
IF Routing information fields contain carrier and junction data
AND The system processes each routing field in sequence
THEN:
• SCAC codes and junction codes are extracted from consecutive routing information array elements for pattern analysis
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when routing information contains carrier scac codes and junction information.
Trigger Criteria:
Context: Routing information contains carrier SCAC codes and junction information
Applied to: SCAC1 = CSXT or NS?
Action: First SCAC equals CSXT or NS AND second SCAC equals CPRS AND junction code equals DET
Logic Flow:
IF Routing information contains carrier SCAC codes and junction information
AND First SCAC equals CSXT or NS AND second SCAC equals CPRS AND junction code equals DET
THEN:
• The routing pattern is recognized as a valid CSXT/NS to CPRS via Detroit connection
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when valid csxt to cprs via det routing pattern is identified.
Trigger Criteria:
Context: A valid CSXT to CPRS via DET routing pattern is identified
Applied to: Set Route Type = 3 - CSXT to CPRS via DET
Action: The first SCAC code is CSXT
Logic Flow:
IF A valid CSXT to CPRS via DET routing pattern is identified
AND The first SCAC code is CSXT
THEN:
• Route type is set to 3 and empty indicator is set to 3 to represent CSXT to CPRS via Detroit routing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when valid ns to cprs via det routing pattern is identified.
Trigger Criteria:
Context: A valid NS to CPRS via DET routing pattern is identified
Applied to: Set Route Type = 4 - NS to CPRS via DET
Action: The first SCAC code is NS
Logic Flow:
IF A valid NS to CPRS via DET routing pattern is identified
AND The first SCAC code is NS
THEN:
• Route type is set to 4 and empty indicator is set to 4 to represent NS to CPRS via Detroit routing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when valid carrier routing pattern has been identified.
Trigger Criteria:
Context: A valid carrier routing pattern has been identified
Applied to: Set Route Found Flag
Action: Route type has been determined (hazmat, CSXT, or NS pattern)
Logic Flow:
IF A valid carrier routing pattern has been identified
AND Route type has been determined (hazmat, CSXT, or NS pattern)
THEN:
• Route found flag is set to true to indicate successful pattern matching and stop further search iterations
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when route search has completed all iterations without finding valid patterns.
Trigger Criteria:
Context: Route search has completed all iterations without finding valid patterns
Applied to: Set Route Not Found Flag
Action: No hazmat code exists AND no CSXT/NS to CPRS via DET patterns are found
Logic Flow:
IF Route search has completed all iterations without finding valid patterns
AND No hazmat code exists AND no CSXT/NS to CPRS via DET patterns are found
THEN:
• Route not found flag remains true and empty indicator is set to 1 to indicate no recognized routing pattern
R-GCX003-cbl-01708 (+13)File: GCX003.cblBusiness Rule: G[Evaluate Residue Weight Against Threshold]
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment item is being processed for residue weight evaluation.
Trigger Criteria:
Context: An equipment item is being processed for residue weight evaluation
Applied to: Is Equipment Empty?
Action: The equipment load/empty indicator is checked
Logic Flow:
IF An equipment item is being processed for residue weight evaluation
AND The equipment load/empty indicator is checked
THEN:
• If equipment is empty, proceed to retrieve shipment comments for residue weight analysis, otherwise skip residue weight processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when empty equipment requires residue weight evaluation.
Action: System attempts to retrieve SHIPCOMM segment using waybill root key
Logic Flow:
IF Empty equipment requires residue weight evaluation
AND System attempts to retrieve SHIPCOMM segment using waybill root key
THEN:
• Retrieve shipment comments data including residue weight and special handling codes for threshold analysis
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when system has attempted to retrieve shipcomm segment.
Trigger Criteria:
Context: System has attempted to retrieve SHIPCOMM segment
Applied to: SHIPCOMM Retrieved Successfully?
Action: Database status code is evaluated
Logic Flow:
IF System has attempted to retrieve SHIPCOMM segment
AND Database status code is evaluated
THEN:
• If retrieval successful, use retrieved data; if failed, initialize SHIPCOMM to spaces to prevent processing errors
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when shipcomm segment retrieval has failed.
Trigger Criteria:
Context: SHIPCOMM segment retrieval has failed
Applied to: Initialize SHIPCOMM to Spaces
Action: System needs to continue processing without shipment comments data
Logic Flow:
IF SHIPCOMM segment retrieval has failed
AND System needs to continue processing without shipment comments data
THEN:
• Initialize SHIPCOMM structure to spaces to ensure clean data state for subsequent processing
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when shipcomm data is available for processing.
Trigger Criteria:
Context: SHIPCOMM data is available for processing
Applied to: Residue Weight > 0?
Action: Residue weight value is evaluated
Logic Flow:
IF SHIPCOMM data is available for processing
AND Residue weight value is evaluated
THEN:
• If residue weight is greater than zero, proceed with special handling code analysis and threshold evaluation
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment has residue weight greater than zero.
Trigger Criteria:
Context: Equipment has residue weight greater than zero
Applied to: Check Special Handling Codes
Action: Special handling codes array is scanned for ER threshold code
Logic Flow:
IF Equipment has residue weight greater than zero
AND Special handling codes array is scanned for ER threshold code
THEN:
• Iterate through up to 8 special handling code positions to locate ER threshold code indicator
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when special handling codes are being analyzed for er threshold code.
Trigger Criteria:
Context: Special handling codes are being analyzed for ER threshold code
Applied to: ER Threshold Code Found?
Action: Each special handling code position is compared against ER threshold code value
Logic Flow:
IF Special handling codes are being analyzed for ER threshold code
AND Each special handling code position is compared against ER threshold code value
THEN:
• If ER threshold code is found in any position, set ER found flag; otherwise set ER not found flag
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when er threshold code has been located in special handling codes.
Trigger Criteria:
Context: ER threshold code has been located in special handling codes
Applied to: Set ER Found Flag
Action: System needs to record ER code presence for threshold evaluation
Logic Flow:
IF ER threshold code has been located in special handling codes
AND System needs to record ER code presence for threshold evaluation
THEN:
• Set ER found indicator to true for subsequent weight threshold processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when er threshold code has not been found in special handling codes after complete scan.
Trigger Criteria:
Context: ER threshold code has not been found in special handling codes after complete scan
Applied to: Set ER Not Found Flag
Action: System needs to record ER code absence for threshold evaluation
Logic Flow:
IF ER threshold code has not been found in special handling codes after complete scan
AND System needs to record ER code absence for threshold evaluation
THEN:
• Set ER found indicator to false for subsequent weight threshold processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment has measurable residue weight and er code status is determined.
Trigger Criteria:
Context: Equipment has measurable residue weight and ER code status is determined
Applied to: Residue Weight > 7000 lbs?
Action: Residue weight value is compared against 7000 pound threshold
Logic Flow:
IF Equipment has measurable residue weight and ER code status is determined
AND Residue weight value is compared against 7000 pound threshold
THEN:
• If weight exceeds 7000 pounds, set weight threshold GT7 flag; otherwise set weight threshold LE7 flag
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when residue weight has been determined to exceed 7000 pounds.
Trigger Criteria:
Context: Residue weight has been determined to exceed 7000 pounds
Applied to: Set ER Weight Threshold GT7
Action: System needs to classify weight threshold status
Logic Flow:
IF Residue weight has been determined to exceed 7000 pounds
AND System needs to classify weight threshold status
THEN:
• Set weight threshold greater than 7000 indicator for subsequent compliance processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when residue weight has been determined to be 7000 pounds or less.
Trigger Criteria:
Context: Residue weight has been determined to be 7000 pounds or less
Applied to: Set ER Weight Threshold LE7
Action: System needs to classify weight threshold status
Logic Flow:
IF Residue weight has been determined to be 7000 pounds or less
AND System needs to classify weight threshold status
THEN:
• Set weight threshold less than or equal to 7000 indicator for subsequent compliance processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment has either er code present with weight at or below 7000 pounds, or er code absent with weight exceeding 7000 pounds.
Trigger Criteria:
Context: Equipment has either ER code present with weight at or below 7000 pounds, or ER code absent with weight exceeding 7000 pounds
Applied to: Continue Processing - Within Threshold
Action: Residue weight compliance status is evaluated
Logic Flow:
IF Equipment has either ER code present with weight at or below 7000 pounds, or ER code absent with weight exceeding 7000 pounds
AND Residue weight compliance status is evaluated
THEN:
• Continue normal equipment processing without generating threshold violation errors
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment has either er code present with weight exceeding 7000 pounds, or er code absent with weight at or below 7000 pounds.
Trigger Criteria:
Context: Equipment has either ER code present with weight exceeding 7000 pounds, or ER code absent with weight at or below 7000 pounds
Applied to: Generate Error Message - Threshold Exceeded
Action: Residue weight compliance status indicates threshold violation
Logic Flow:
IF Equipment has either ER code present with weight exceeding 7000 pounds, or ER code absent with weight at or below 7000 pounds
AND Residue weight compliance status indicates threshold violation
THEN:
• Generate appropriate error message for residue weight threshold non-compliance
Business Justification: Defines the strict business conditions required to proceed when user is processing a train request with send action.
Trigger Criteria:
Context: A user is processing a train request with send action
Applied to: Check UTF-SPEC-MANI Field
Action: The system validates special manifest authorization AND the request action is SEND AND the user's UTF-SPEC-MANI field is not equal to 'S' AND the AEI train send flag is set to NO
Logic Flow:
IF A user is processing a train request with send action
AND The system validates special manifest authorization AND the request action is SEND AND the user's UTF-SPEC-MANI field is not equal to 'S' AND the AEI train send flag is set to NO
THEN:
• The system sets the user as NOT authorized for special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when user is processing a train request with send action.
Trigger Criteria:
Context: A user is processing a train request with send action
Applied to: Set User Authorized for Special Manifest
Action: The system validates special manifest authorization AND the request action is SEND AND (the user's UTF-SPEC-MANI field equals 'S' OR the AEI train send flag is set to YES)
Logic Flow:
IF A user is processing a train request with send action
AND The system validates special manifest authorization AND the request action is SEND AND (the user's UTF-SPEC-MANI field equals 'S' OR the AEI train send flag is set to YES)
THEN:
• The system sets the user as authorized for special manifest creation
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when user is processing a train request.
Trigger Criteria:
Context: A user is processing a train request
Applied to: Continue Processing
Action: The system validates special manifest authorization AND the request action is NOT SEND
Logic Flow:
IF A user is processing a train request
AND The system validates special manifest authorization AND the request action is NOT SEND
THEN:
• The system continues processing without setting special manifest authorization status
R-GCX003-cbl-01725 (+13)File: GCX003.cblBusiness Rule: G[Check Special Handling Codes]
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when special handling code processing is starting.
Trigger Criteria:
Context: Special handling code processing is starting
Applied to: Initialize ER Indicator to 'N'
Action: The system begins to check for empty residue codes
Logic Flow:
IF Special handling code processing is starting
AND The system begins to check for empty residue codes
THEN:
• The ER indicator should be set to 'N' as the default value
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment has load/empty status and residue weight information.
Trigger Criteria:
Context: Equipment has load/empty status and residue weight information
Applied to: Check if Equipment is Empty AND Residue Weight > 0?
Action: The equipment load indicator is 'E' for empty AND the residue weight is greater than 0
Logic Flow:
IF Equipment has load/empty status and residue weight information
AND The equipment load indicator is 'E' for empty AND the residue weight is greater than 0
THEN:
• The system should proceed with special handling code array processing
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment qualifies for special handling code processing with empty status and residue weight.
Trigger Criteria:
Context: Equipment qualifies for special handling code processing with empty status and residue weight
Applied to: Start Loop Through Special Handling Codes Array
Action: The system starts processing the special handling codes array
Logic Flow:
IF Equipment qualifies for special handling code processing with empty status and residue weight
AND The system starts processing the special handling codes array
THEN:
• The system should initialize array processing from position 1 and set loop control variables
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when special handling codes array processing is in progress.
Trigger Criteria:
Context: Special handling codes array processing is in progress
Applied to: More Codes in Array AND ER Not Found?
Action: The current array position is less than or equal to 7 AND ER found flag is not set to true
Logic Flow:
IF Special handling codes array processing is in progress
AND The current array position is less than or equal to 7 AND ER found flag is not set to true
THEN:
• The system should continue processing the next code in the array
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when array iteration is continuing and current position is valid.
Trigger Criteria:
Context: Array iteration is continuing and current position is valid
Applied to: Get Next Special Handling Code from Array Position
Action: The system needs to examine the next special handling code
Logic Flow:
IF Array iteration is continuing and current position is valid
AND The system needs to examine the next special handling code
THEN:
• The system should retrieve the special handling code from the current array position
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when special handling code has been retrieved from the array.
Trigger Criteria:
Context: A special handling code has been retrieved from the array
Applied to: Is Code = 'ER' Threshold Code?
Action: The special handling code equals 'ER'
Logic Flow:
IF A special handling code has been retrieved from the array
AND The special handling code equals 'ER'
THEN:
• The system should identify this as an empty residue threshold code
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when current special handling code equals 'er'.
Trigger Criteria:
Context: The current special handling code equals 'ER'
Applied to: Set ER Found Flag to TRUE
Action: The empty residue threshold code is detected
Logic Flow:
IF The current special handling code equals 'ER'
AND The empty residue threshold code is detected
THEN:
• The system should set the ER found flag to true
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when current special handling code has been processed.
Trigger Criteria:
Context: Current special handling code has been processed
Applied to: Increment Array Position Counter
Action: The system needs to move to the next array position
Logic Flow:
IF Current special handling code has been processed
AND The system needs to move to the next array position
THEN:
• The array position counter should be incremented by 1
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when special handling codes array processing has completed.
Trigger Criteria:
Context: Special handling codes array processing has completed
Applied to: ER Found?
Action: The ER found flag is evaluated
Logic Flow:
IF Special handling codes array processing has completed
AND The ER found flag is evaluated
THEN:
• The system should determine the appropriate processing path based on whether ER was found
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when empty residue threshold code 'er' was found in the special handling codes array.
Trigger Criteria:
Context: Empty residue threshold code 'ER' was found in the special handling codes array
Applied to: Set ER Indicator to 'Y'
Action: The ER found flag is true
Logic Flow:
IF Empty residue threshold code 'ER' was found in the special handling codes array
AND The ER found flag is true
THEN:
• The system should set the ER indicator to 'Y'
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when empty residue processing is active.
Trigger Criteria:
Context: Empty residue processing is active
Applied to: ER Weight Threshold <= 7?
Action: The empty residue weight threshold value is less than or equal to 7
Logic Flow:
IF Empty residue processing is active
AND The empty residue weight threshold value is less than or equal to 7
THEN:
• The system should classify this as low-level empty residue threshold
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when empty residue weight threshold is 7 or below.
Trigger Criteria:
Context: Empty residue weight threshold is 7 or below
Applied to: Set ER Weight Threshold LE7 Flag
Action: The threshold level needs to be classified
Logic Flow:
IF Empty residue weight threshold is 7 or below
AND The threshold level needs to be classified
THEN:
• The system should set the ER weight threshold LE7 flag
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when empty residue processing is active and threshold is not le7.
Trigger Criteria:
Context: Empty residue processing is active and threshold is not LE7
Applied to: ER Weight Threshold > 7?
Action: The empty residue weight threshold value is greater than 7
Logic Flow:
IF Empty residue processing is active and threshold is not LE7
AND The empty residue weight threshold value is greater than 7
THEN:
• The system should classify this as high-level empty residue threshold
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when empty residue weight threshold is above 7.
Trigger Criteria:
Context: Empty residue weight threshold is above 7
Applied to: Set ER Weight Threshold GT7 Flag
Action: The threshold level needs to be classified as high-level
Logic Flow:
IF Empty residue weight threshold is above 7
AND The threshold level needs to be classified as high-level
THEN:
• The system should set the ER weight threshold GT7 flag
R-GCX003-cbl-01739 (+15)File: GCX003.cblBusiness Rule: L[Check Message Types for Error Classification]
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report entry is being processed for error classification.
Trigger Criteria:
Context: A report entry is being processed for error classification
Applied to: Is Message Line?
Action: The system checks if the entry is a message line
Logic Flow:
IF A report entry is being processed for error classification
AND The system checks if the entry is a message line
THEN:
• The system identifies whether the entry contains message content that needs error type analysis
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when message line has been identified for error classification.
Trigger Criteria:
Context: A message line has been identified for error classification
Applied to: Is Spawn Message?
Action: The system checks if the message is a spawn message
Logic Flow:
IF A message line has been identified for error classification
AND The system checks if the message is a spawn message
THEN:
• If it is a spawn message, the system skips error counting and continues processing without incrementing counters
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when non-spawn message line is being processed.
Trigger Criteria:
Context: A non-spawn message line is being processed
Applied to: Message Type = Error?
Action: The system evaluates the message type indicator
Logic Flow:
IF A non-spawn message line is being processed
AND The system evaluates the message type indicator
THEN:
• If the message type is error, the system proceeds to error-specific processing and counter increments
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when non-spawn message line is not classified as an error.
Trigger Criteria:
Context: A non-spawn message line is not classified as an error
Applied to: Message Type = Warning?
Action: The system evaluates the message type indicator
Logic Flow:
IF A non-spawn message line is not classified as an error
AND The system evaluates the message type indicator
THEN:
• If the message type is warning, the system proceeds to warning-specific processing and counter increments
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when non-spawn message line is not classified as error or warning.
Trigger Criteria:
Context: A non-spawn message line is not classified as error or warning
Applied to: Message Type = Info?
Action: The system evaluates the message type indicator
Logic Flow:
IF A non-spawn message line is not classified as error or warning
AND The system evaluates the message type indicator
THEN:
• If the message type is information, the system increments the information counter
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when message has been classified as an error type.
Trigger Criteria:
Context: A message has been classified as an error type
Applied to: Is Error Type 43?
Action: The system checks the specific error type indicator
Logic Flow:
IF A message has been classified as an error type
AND The system checks the specific error type indicator
THEN:
• If the error type is 43, the system increments the error type 43 counter in addition to the general error counter
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when message has been classified as an error type.
Trigger Criteria:
Context: A message has been classified as an error type
Applied to: Increment General Error Counter
Action: The system processes the error classification
Logic Flow:
IF A message has been classified as an error type
AND The system processes the error classification
THEN:
• The system increments the general error counter by 1
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when error message has been identified as type 43.
Trigger Criteria:
Context: An error message has been identified as type 43
Applied to: Increment Error Type 43 Counter
Action: The system processes the error classification
Logic Flow:
IF An error message has been identified as type 43
AND The system processes the error classification
THEN:
• The system increments the error type 43 counter by 1
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when message has been classified as a warning type.
Trigger Criteria:
Context: A message has been classified as a warning type
Applied to: Is Warning Type 49 or 52?
Action: The system checks the specific warning type indicator
Logic Flow:
IF A message has been classified as a warning type
AND The system checks the specific warning type indicator
THEN:
• If the warning type is 49 or 52, the system increments the DSP counter in addition to the warning counter
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when message has been classified as a warning type.
Trigger Criteria:
Context: A message has been classified as a warning type
Applied to: Increment Warning Counter
Action: The system processes the warning classification
Logic Flow:
IF A message has been classified as a warning type
AND The system processes the warning classification
THEN:
• The system increments the warning counter by 1
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when warning message has been identified as type 49 or 52.
Trigger Criteria:
Context: A warning message has been identified as type 49 or 52
Applied to: Increment DSP Counter
Action: The system processes the warning classification
Logic Flow:
IF A warning message has been identified as type 49 or 52
AND The system processes the warning classification
THEN:
• The system increments the DSP counter by 1
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when message has been classified as an information type.
Trigger Criteria:
Context: A message has been classified as an information type
Applied to: Increment Info Counter
Action: The system processes the information classification
Logic Flow:
IF A message has been classified as an information type
AND The system processes the information classification
THEN:
• The system increments the information counter by 1
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when all message processing has been completed and counters have been updated.
Trigger Criteria:
Context: All message processing has been completed and counters have been updated
Applied to: Check Error 43 Count vs Total Errors
Action: The system compares the error type 43 count against the total error count
Logic Flow:
IF All message processing has been completed and counters have been updated
AND The system compares the error type 43 count against the total error count
THEN:
• If the error type 43 count equals the total error count, the system proceeds with error-to-warning conversion
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when all errors in the batch are identified as type 43.
Trigger Criteria:
Context: All errors in the batch are identified as type 43
Applied to: Convert Error 43 to Warning Type 18
Action: The system performs error-to-warning conversion
Logic Flow:
IF All errors in the batch are identified as type 43
AND The system performs error-to-warning conversion
THEN:
• The system changes all error type 43 messages to warning type 18
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when error type 43 messages are being converted to warnings.
Trigger Criteria:
Context: Error type 43 messages are being converted to warnings
Applied to: Adjust Error Counter Down & Adjust Warning Counter Up
Action: The system adjusts the counters for the conversion
Logic Flow:
IF Error type 43 messages are being converted to warnings
AND The system adjusts the counters for the conversion
THEN:
• The system decrements the error counter by 1 for each converted message
• The system increments the warning counter by 1 for each converted message
R-GCX003-cbl-01755 (+6)File: GCX003.cblBusiness Rule: I[Send Current Email Batch via EMCSEND3]
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when email message is being prepared for transmission.
Trigger Criteria:
Context: An email message is being prepared for transmission
Applied to: Email Content Exceeds Line Limit?
Action: The system checks if the current line count exceeds 699 lines
Logic Flow:
IF An email message is being prepared for transmission
AND The system checks if the current line count exceeds 699 lines
THEN:
• The system determines whether to split the email into multiple batches or send as a single transmission
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when email message exceeds the 699 line limit.
Trigger Criteria:
Context: An email message exceeds the 699 line limit
Applied to: Split Email into Batches
Action: The system processes the email for transmission
Logic Flow:
IF An email message exceeds the 699 line limit
AND The system processes the email for transmission
THEN:
• The system sets no-more-email flag to true, clears the message buffer, resets line counter to zero, and prepares continuation header with report headers
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when email has been sent via emcsend3 service.
Trigger Criteria:
Context: An email has been sent via EMCSEND3 service
Applied to: Email Transmission Successful?
Action: The system checks the email return status flag
Logic Flow:
IF An email has been sent via EMCSEND3 service
AND The system checks the email return status flag
THEN:
• The system determines if the transmission was successful based on the return status
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when email transmission has failed.
Trigger Criteria:
Context: An email transmission has failed
Applied to: Handle Transmission Failure
Action: The system processes the transmission failure
Logic Flow:
IF An email transmission has failed
AND The system processes the transmission failure
THEN:
• The system clears the primary recipient, sets fallback recipients to 'AEI9999' and 'OM01247', and attempts retransmission
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when email content is prepared for transmission. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Email content is prepared for transmission
Applied to: Call EMCSEND3 for Current Batch
Action: The system needs to send the email
Logic Flow:
IF Email content is prepared for transmission
AND The system needs to send the email
THEN:
• The system calls EMCSEND3 service with sender ID, destination filename, recipient addresses, subject, keywords, message content, and formatting parameters
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when retry email transmission attempt has been made with fallback recipients.
Trigger Criteria:
Context: A retry email transmission attempt has been made with fallback recipients
Applied to: Retry Successful?
Action: The system checks the retry transmission status
Logic Flow:
IF A retry email transmission attempt has been made with fallback recipients
AND The system checks the retry transmission status
THEN:
• If retry fails, the system generates an error message 'SEND TO FILE OF OM01247 FAILED' and abends the process
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when email transmission has been completed successfully.
Trigger Criteria:
Context: Email transmission has been completed successfully
Applied to: Purge Message Queue
Action: The system finalizes the email process
Logic Flow:
IF Email transmission has been completed successfully
AND The system finalizes the email process
THEN:
• The system initializes accept status and calls CIMS with PURG function to purge the alternate PCB message queue
R-GCX003-cbl-01762 (+5)File: GCX003.cblBusiness Rule: D{Message Type Classification}
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report entry is being processed for message classification.
Trigger Criteria:
Context: A report entry is being processed for message classification
Applied to: Is Message Line Type?
Action: The system checks if the report entry is a message line type
Logic Flow:
IF A report entry is being processed for message classification
AND The system checks if the report entry is a message line type
THEN:
• If the entry is not a message line type, skip all message processing and complete classification
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when message line is identified for processing.
Trigger Criteria:
Context: A message line is identified for processing
Applied to: Is Spawn Message?
Action: The message is classified as a spawn message type
Logic Flow:
IF A message line is identified for processing
AND The message is classified as a spawn message type
THEN:
• Skip the severity classification and counter increment processing but continue with report index addition
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when non-spawn message line is being processed.
Trigger Criteria:
Context: A non-spawn message line is being processed
Applied to: Classify as Error Message
Action: The message severity is classified as error level
Logic Flow:
IF A non-spawn message line is being processed
AND The message severity is classified as error level
THEN:
• Increment the error counter by 1, andif the message type is 43, also increment the special error counter (ERR-43-CNT) by 1
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when non-spawn message line is being processed.
Trigger Criteria:
Context: A non-spawn message line is being processed
Applied to: Classify as Warning Message
Action: The message severity is classified as warning level
Logic Flow:
IF A non-spawn message line is being processed
AND The message severity is classified as warning level
THEN:
• Increment the warning counter by 1, andif the message type is 49 or 52, also increment the DSP counter by 1
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when non-spawn message line is being processed.
Trigger Criteria:
Context: A non-spawn message line is being processed
Applied to: Classify as Information Message
Action: The message severity is classified as information level
Logic Flow:
IF A non-spawn message line is being processed
AND The message severity is classified as information level
THEN:
• Increment the information counter by 1
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when message has been classified and counters updated.
Trigger Criteria:
Context: A message has been classified and counters updated
Applied to: Report Line Limit Reached?
Action: The report index is incremented by 1
Logic Flow:
IF A message has been classified and counters updated
AND The report index is incremented by 1
THEN:
• If the maximum report line limit is reached, set message type 9 (overflow message) at the current report index position
Business Justification: Governs the functional prerequisites and system routing when train manifest processing operation has completed all validation and processing steps.
Trigger Criteria:
Context: A train manifest processing operation has completed all validation and processing steps
Applied to: Check RPT-NO-ERROR Flag
Action: The system checks the error accumulation status using the RPT-NO-ERROR flag
Logic Flow:
IF A train manifest processing operation has completed all validation and processing steps
AND The system checks the error accumulation status using the RPT-NO-ERROR flag
THEN:
• The system determines whether any business rule violations or data validation errors have occurred during processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train manifest processing has completed and error status has been evaluated.
Trigger Criteria:
Context: Train manifest processing has completed and error status has been evaluated
Applied to: Check RPT-NO-SPAWN Flag
Action: The system checks the spawn activity status using the RPT-NO-SPAWN flag
Logic Flow:
IF Train manifest processing has completed and error status has been evaluated
AND The system checks the spawn activity status using the RPT-NO-SPAWN flag
THEN:
• The system determines whether any special manifest creation processes were initiated during cargo processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train manifest request has been received and initial processing completed.
Trigger Criteria:
Context: A train manifest request has been received and initial processing completed
Applied to: Check REQ-ACTION-SEND
Action: The system evaluates the request action type for send operations
Logic Flow:
IF A train manifest request has been received and initial processing completed
AND The system evaluates the request action type for send operations
THEN:
• The system determines whether to proceed with customs transmission or generate reports only
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train manifest request has been received and is not a send action.
Trigger Criteria:
Context: A train manifest request has been received and is not a send action
Applied to: Check REQ-ACTION-REPORT
Action: The system evaluates the request action type for report operations
Logic Flow:
IF A train manifest request has been received and is not a send action
AND The system evaluates the request action type for report operations
THEN:
• The system determines whether to generate reports without customs transmission
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train manifest processing completed with no errors, no spawn activities, and a send action request.
Trigger Criteria:
Context: Train manifest processing completed with no errors, no spawn activities, and a send action request
Applied to: SENT
Action: The system determines the final processing result
Logic Flow:
IF Train manifest processing completed with no errors, no spawn activities, and a send action request
AND The system determines the final processing result
THEN:
• The system sets the processing result to SENT indicating successful customs transmission
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train manifest processing completed with either errors present or spawn activities triggered or both.
Trigger Criteria:
Context: Train manifest processing completed with either errors present or spawn activities triggered or both
Applied to: NOT SENT with Spawns
Action: The system determines the final processing result for send actions
Logic Flow:
IF Train manifest processing completed with either errors present or spawn activities triggered or both
AND The system determines the final processing result for send actions
THEN:
• The system sets the processing result to NOT SENT and indicates special processing activities occurred
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train manifest request specified report action type.
Trigger Criteria:
Context: A train manifest request specified report action type
Applied to: REPORT GENERATED
Action: The system determines the final processing result
Logic Flow:
IF A train manifest request specified report action type
AND The system determines the final processing result
THEN:
• The system sets the processing result to REPORT GENERATED indicating successful report creation without customs transmission
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train manifest request has an action type that is neither send nor report.
Trigger Criteria:
Context: A train manifest request has an action type that is neither send nor report
Applied to: ABORTED
Action: The system determines the final processing result
Logic Flow:
IF A train manifest request has an action type that is neither send nor report
AND The system determines the final processing result
THEN:
• The system sets the processing result to ABORTED indicating the request could not be processed
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train manifest processing has completed and processing result has been determined.
Trigger Criteria:
Context: Train manifest processing has completed and processing result has been determined
Applied to: Validate Error Count Accumulation
Action: The system validates the accumulated error count from all processing steps
Logic Flow:
IF Train manifest processing has completed and processing result has been determined
AND The system validates the accumulated error count from all processing steps
THEN:
• The system ensures accurate error count totals for reporting and decision making
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when error count validation has been completed.
Trigger Criteria:
Context: Error count validation has been completed
Applied to: Validate Warning Count Accumulation
Action: The system validates the accumulated warning count from all processing steps
Logic Flow:
IF Error count validation has been completed
AND The system validates the accumulated warning count from all processing steps
THEN:
• The system ensures accurate warning count totals for reporting purposes
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when warning count validation has been completed.
Trigger Criteria:
Context: Warning count validation has been completed
Applied to: Validate Spawn Count Accumulation
Action: The system validates the accumulated spawn count from all processing steps
Logic Flow:
IF Warning count validation has been completed
AND The system validates the accumulated spawn count from all processing steps
THEN:
• The system ensures accurate spawn activity count totals for processing outcome determination
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when all count validations have been completed.
Trigger Criteria:
Context: All count validations have been completed
Applied to: Calculate Final Error Statistics
Action: The system calculates final error statistics
Logic Flow:
IF All count validations have been completed
AND The system calculates final error statistics
THEN:
• The system produces complete error metrics for inclusion in processing reports and audit trails
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when final error statistics calculation has been completed.
Trigger Criteria:
Context: Final error statistics calculation has been completed
Applied to: Calculate Final Warning Statistics
Action: The system calculates final warning statistics
Logic Flow:
IF Final error statistics calculation has been completed
AND The system calculates final warning statistics
THEN:
• The system produces complete warning metrics for inclusion in processing reports
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when final warning statistics calculation has been completed.
Trigger Criteria:
Context: Final warning statistics calculation has been completed
Applied to: Calculate Final Spawn Statistics
Action: The system calculates final spawn activity statistics
Logic Flow:
IF Final warning statistics calculation has been completed
AND The system calculates final spawn activity statistics
THEN:
• The system produces complete spawn metrics for inclusion in processing reports and audit trails
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when all final statistics calculations have been completed.
Trigger Criteria:
Context: All final statistics calculations have been completed
Applied to: Determine Processing Completion Status
Action: The system determines the overall processing completion status
Logic Flow:
IF All final statistics calculations have been completed
AND The system determines the overall processing completion status
THEN:
• The system establishes whether processing completed successfully, with warnings, with errors, or was aborted
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when processing completion status has been determined.
Trigger Criteria:
Context: Processing completion status has been determined
Applied to: Set Final Processing Outcome
Action: The system sets the final processing outcome
Logic Flow:
IF Processing completion status has been determined
AND The system sets the final processing outcome
THEN:
• The system assigns the appropriate outcome status that accurately reflects the processing results for user notification and audit purposes
R-GCX003-cbl-01784 (+3)File: GCX003.cblBusiness Rule: F[Create IT Export Special Manifest MSG
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when user is attempting to create an it export special manifest for cargo with bond type 'it' and special manifest original flag is set.
Trigger Criteria:
Context: A user is attempting to create an IT export special manifest for cargo with bond type 'IT' and special manifest original flag is set
Applied to: Check User Authorization for Special Manifests?
Action: The request action is SEND and the system checks user authorization for special manifests
Logic Flow:
IF A user is attempting to create an IT export special manifest for cargo with bond type 'IT' and special manifest original flag is set
AND The request action is SEND and the system checks user authorization for special manifests
THEN:
• If the user is not authorized for special manifests, set MSG-43 unauthorized message and continue processing without creating the manifest
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed for potential it export special manifest creation.
Trigger Criteria:
Context: A cargo record is being processed for potential IT export special manifest creation
Applied to: Check Cargo Bond Type = 'IT'?
Action: The system checks if the cargo bond type is 'IT' and the special manifest original flag is not set
Logic Flow:
IF A cargo record is being processed for potential IT export special manifest creation
AND The system checks if the cargo bond type is 'IT' and the special manifest original flag is not set
THEN:
• Only proceed with IT export manifest creation if cargo bond type is 'IT' and special manifest original flag is not set, otherwise continue normal processing
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when it export special manifest is being created for cargo with bond type 'it' and special manifest original flag not set.
Trigger Criteria:
Context: An IT export special manifest is being created for cargo with bond type 'IT' and special manifest original flag not set
Applied to: Check Request Action = SEND?
Action: The system checks the request action type
Logic Flow:
IF An IT export special manifest is being created for cargo with bond type 'IT' and special manifest original flag not set
AND The system checks the request action type
THEN:
• If request action is SEND and user is authorized, create MSG-23and spawn special manifest; if request action is REPORT, create MSG-24 report-only message
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when user is authorized for special manifests, cargo bond type is 'it', special manifest original flag is not set, and request action is send. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: User is authorized for special manifests, cargo bond type is 'IT', special manifest original flag is not set, and request action is SEND
Applied to: Set IT Export Spawn Flag
Action: The system creates the IT export special manifest
Logic Flow:
IF User is authorized for special manifests, cargo bond type is 'IT', special manifest original flag is not set, and request action is SEND
AND The system creates the IT export special manifest
THEN:
• Set MSG-23 message type, copy equipment line to report, add equipment to total count, set IT export spawn flag, initialize special manifest parameters with GCX101 IT export type, copy equipment ID, waybill number, waybill date, border codes, CCN from cargo record, origin/destination codes, and queue special manifest for processing
R-GCX003-cbl-01788 (+18)File: GCX003.cblBusiness Rule: B[Retrieve User SCAC Access]
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when user session is active in the system.
Trigger Criteria:
Context: A user session is active in the system
Applied to: Get User ID from CCCOM
Action: The system needs to validate user access permissions
Logic Flow:
IF A user session is active in the system
AND The system needs to validate user access permissions
THEN:
• The user ID is retrieved from the system communication area
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train security validation is being performed.
Trigger Criteria:
Context: A train security validation is being performed
Applied to: Set SCAC Code to CP-SCAC
Action: The system needs to validate carrier access permissions
Logic Flow:
IF A train security validation is being performed
AND The system needs to validate carrier access permissions
THEN:
• The SCAC code is set to the Canadian Pacific carrier code
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when user id and scac code are available for validation. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: User ID and SCAC code are available for validation
Applied to: Call GCCSCAC Security Module
Action: The system needs to verify carrier access permissions
Logic Flow:
IF User ID and SCAC code are available for validation
AND The system needs to verify carrier access permissions
THEN:
• The GCCSCAC security module is called with user and carrier parameters
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when scac security module has been called.
Trigger Criteria:
Context: The SCAC security module has been called
Applied to: SCAC Access Valid?
Action: The system evaluates the security validation result
Logic Flow:
IF The SCAC security module has been called
AND The system evaluates the security validation result
THEN:
• Access is considered valid unless the SCAC flag indicates invalid access AND the request is not an AEI train send request
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when train processing request is being validated.
Trigger Criteria:
Context: A train processing request is being validated
Applied to: Check if AEI Train Send Request
Action: The system needs to determine the request type
Logic Flow:
IF A train processing request is being validated
AND The system needs to determine the request type
THEN:
• The request is classified as AEI if the request type equals the AEI request type constant
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when scac access validation has failed.
Trigger Criteria:
Context: SCAC access validation has failed
Applied to: Is AEI Request?
Action: The request is an AEI train send request
Logic Flow:
IF SCAC access validation has failed
AND The request is an AEI train send request
THEN:
• Access validation continues without setting access denied flag
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when scac access validation has failed and the request is not an aei request.
Trigger Criteria:
Context: SCAC access validation has failed AND the request is not an AEI request
Applied to: Set Access Denied Flag
Action: The system processes the access validation result
Logic Flow:
IF SCAC access validation has failed AND the request is not an AEI request
AND The system processes the access validation result
THEN:
• The no user access flag is set to true
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when user access has been denied due to invalid scac permissions.
Trigger Criteria:
Context: User access has been denied due to invalid SCAC permissions
Applied to: Generate Security Error Message
Action: The system generates validation error messages
Logic Flow:
IF User access has been denied due to invalid SCAC permissions
AND The system generates validation error messages
THEN:
• Message 14 is set to true and the report index is incremented
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when user id is available for security lookup.
Trigger Criteria:
Context: User ID is available for security lookup
Applied to: Query User Security Table GCSTBRT-US
Action: The system needs to retrieve detailed user permissions
Logic Flow:
IF User ID is available for security lookup
AND The system needs to retrieve detailed user permissions
THEN:
• The GCSTBRT user security table is queried using the ACF2 user ID
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when user security table has been queried.
Trigger Criteria:
Context: The user security table has been queried
Applied to: User Found in Security Table?
Action: The system evaluates the query result
Logic Flow:
IF The user security table has been queried
AND The system evaluates the query result
THEN:
• The user is considered found if the database operation was successful
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when user exists in the security table.
Trigger Criteria:
Context: The user exists in the security table
Applied to: Load User Security Segment
Action: The system loads user permission data
Logic Flow:
IF The user exists in the security table
AND The system loads user permission data
THEN:
• The security segment data is moved to the user security segment structure
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when user does not exist in the security table.
Trigger Criteria:
Context: The user does not exist in the security table
Applied to: Initialize Empty Security Segment
Action: The system initializes user permission data
Logic Flow:
IF The user does not exist in the security table
AND The system initializes user permission data
THEN:
• The user security segment is set to spaces
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when user security permissions have been loaded.
Trigger Criteria:
Context: User security permissions have been loaded
Applied to: Check Send Action Authorization
Action: The request action is SEND
Logic Flow:
IF User security permissions have been loaded
AND The request action is SEND
THEN:
• Authorization is checked based on UTF-ADD permission level and AEI request status
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when send action is being authorized.
Trigger Criteria:
Context: A send action is being authorized
Applied to: Permission Level U or S?
Action: The system checks user permission levels
Logic Flow:
IF A send action is being authorized
AND The system checks user permission levels
THEN:
• Access is granted ifUTF-ADD equals 'U' or 'S' OR the request is an AEI train send request
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when user does not have 'u' or 's' permission level and the request is not an aei request.
Trigger Criteria:
Context: User does not have 'U' or 'S' permission level AND the request is not an AEI request
Applied to: Set No User Access Flag
Action: The system evaluates send action authorization
Logic Flow:
IF User does not have 'U' or 'S' permission level AND the request is not an AEI request
AND The system evaluates send action authorization
THEN:
• The no user access flag is set to true
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when user access has been denied due to insufficient permissions.
Trigger Criteria:
Context: User access has been denied due to insufficient permissions
Applied to: Generate Authorization Error
Action: The system generates authorization error messages
Logic Flow:
IF User access has been denied due to insufficient permissions
AND The system generates authorization error messages
THEN:
• Message 13 is set to true and the report index is incremented
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when no errors have occurred in previous validations and the request action is send.
Trigger Criteria:
Context: No errors have occurred in previous validations AND the request action is SEND
Applied to: Check Special Manifest Authorization
Action: The system checks special manifest permissions
Logic Flow:
IF No errors have occurred in previous validations AND the request action is SEND
AND The system checks special manifest permissions
THEN:
• Authorization is evaluated ifUTF-SPEC-MANI is not 'S' AND the request is not an AEI request
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when user has 's' level special manifest permissions or the request is an aei request.
Trigger Criteria:
Context: User has 'S' level special manifest permissions OR the request is an AEI request
Applied to: Set Special Manifest Auth Flag
Action: The system sets special manifest authorization
Logic Flow:
IF User has 'S' level special manifest permissions OR the request is an AEI request
AND The system sets special manifest authorization
THEN:
• The user is authorized for special manifest operations
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when user does not have 's' level special manifest permissions and the request is not an aei request.
Trigger Criteria:
Context: User does not have 'S' level special manifest permissions AND the request is not an AEI request
Applied to: Set No Special Manifest Auth Flag
Action: The system evaluates special manifest authorization
Logic Flow:
IF User does not have 'S' level special manifest permissions AND the request is not an AEI request
AND The system evaluates special manifest authorization
THEN:
• The user not authorized for special manifest flag is set to true
R-GCX003-cbl-01807 (+9)File: GCX003.cblBusiness Rule: B{Is Cargo Immediate Transport Bond?}
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with m1201 in-bond type code.
Trigger Criteria:
Context: A cargo record with M1201 in-bond type code
Applied to: Is M1201 In-Bond Type Code = 'IT'?
Action: The system evaluates the bond type for immediate transport classification
Logic Flow:
IF A cargo record with M1201 in-bond type code
AND The system evaluates the bond type for immediate transport classification
THEN:
• The cargo is classified as immediate transport bond if M1201 in-bond type code equals 'IT' or 'IE'
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with immediate transport bond type and tr created for it indicator.
Trigger Criteria:
Context: A cargo record with immediate transport bond type and TR created for IT indicator
Applied to: Is TR Created for IT = 'Y'?
Action: The system evaluates cargo attachment eligibility for immediate transport processing
Logic Flow:
IF A cargo record with immediate transport bond type and TR created for IT indicator
AND The system evaluates cargo attachment eligibility for immediate transport processing
THEN:
• The cargo is marked for TR created for IT processing if the TR created for IT flag equals 'Y', otherwise cargo attachment is skipped
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with us-canada-us bond type and tr created for it status as spaces and cargo short description.
Trigger Criteria:
Context: A cargo record with US-Canada-US bond type and TR created for IT status as spaces and cargo short description
Applied to: Is Cargo Status Valid for IT Bond?
Action: The system evaluates cargo attachment eligibility for US-Canada-US processing
Logic Flow:
IF A cargo record with US-Canada-US bond type and TR created for IT status as spaces and cargo short description
AND The system evaluates cargo attachment eligibility for US-Canada-US processing
THEN:
• The cargo attachment is skipped if the cargo short description equals the release status value
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record with default bond type and tr created for it status as spaces and cargo short description.
Trigger Criteria:
Context: A cargo record with default bond type and TR created for IT status as spaces and cargo short description
Applied to: Is Cargo Status Valid for IT Bond?
Action: The system evaluates cargo attachment eligibility for default bond processing
Logic Flow:
IF A cargo record with default bond type and TR created for IT status as spaces and cargo short description
AND The system evaluates cargo attachment eligibility for default bond processing
THEN:
• The cargo attachment is skipped if the cargo short description equals the release status value
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with empty equipment bond type classification.
Trigger Criteria:
Context: A cargo record with empty equipment bond type classification
Applied to: Skip Cargo Attachment - IT Bond
Action: The system evaluates cargo attachment eligibility
Logic Flow:
IF A cargo record with empty equipment bond type classification
AND The system evaluates cargo attachment eligibility
THEN:
• The cargo attachment processing is skipped for empty equipment bonds
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with special manifest origin indicator and crossing station information.
Trigger Criteria:
Context: A cargo record with special manifest origin indicator and crossing station information
Applied to: Is Special Manifest Required?
Action: The system evaluates cargo attachment eligibility for special manifest processing
Logic Flow:
IF A cargo record with special manifest origin indicator and crossing station information
AND The system evaluates cargo attachment eligibility for special manifest processing
THEN:
• The cargo attachment is skipped if special manifest origin is true and the crossing station is Woburn PQ station
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record with special manifest special indicator and crossing station information.
Trigger Criteria:
Context: A cargo record with special manifest special indicator and crossing station information
Applied to: Is Special Manifest Required?
Action: The system evaluates cargo attachment eligibility for special manifest processing
Logic Flow:
IF A cargo record with special manifest special indicator and crossing station information
AND The system evaluates cargo attachment eligibility for special manifest processing
THEN:
• The cargo attachment is skipped if special manifest special is true and the crossing station is not Woburn PQ station
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with export bond type, us-mexico country codes, and station information.
Trigger Criteria:
Context: A cargo record with export bond type, US-Mexico country codes, and station information
Applied to: Process IT Bond for Attachment
Action: The system evaluates cargo attachment eligibility for export processing
Logic Flow:
IF A cargo record with export bond type, US-Mexico country codes, and station information
AND The system evaluates cargo attachment eligibility for export processing
THEN:
• The cargo attachment is skipped if the bond type is export and country codes are 'USMX' and the station is not Laredo TX station
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with bond type of 'te', 'tr', or 'mt' and bond number information.
Trigger Criteria:
Context: A cargo record with bond type of 'TE', 'TR', or 'MT' and bond number information
Applied to: Process as AMS 7512 Bond Type
Action: The system formats the cargo information for reporting
Logic Flow:
IF A cargo record with bond type of 'TE', 'TR', or 'MT' and bond number information
AND The system formats the cargo information for reporting
THEN:
• The bond information is formatted as 'AMS 7512' followed by the bond type code and bond number
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record with bond type of 'it' or 'ie' and bond number information.
Trigger Criteria:
Context: A cargo record with bond type of 'IT' or 'IE' and bond number information
Applied to: Process as Standard AMS Bond Type
Action: The system formats the cargo information for reporting
Logic Flow:
IF A cargo record with bond type of 'IT' or 'IE' and bond number information
AND The system formats the cargo information for reporting
THEN:
• The bond information is formatted as 'AMS' followed by the bond type code and bond number
R-GCX003-cbl-01817 (+5)File: GCX003.cblBusiness Rule: C[Extract Container ID from Position 28
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when database record from the freight inquiry system is being processed.
Trigger Criteria:
Context: A database record from the freight inquiry system is being processed
Applied to: Check Record Type at Position 1-8
Action: The system reads positions 1-8 of the record
Logic Flow:
IF A database record from the freight inquiry system is being processed
AND The system reads positions 1-8 of the record
THEN:
• If the record type equals 'T/C XREF' then process as container cross-reference record, otherwise skip to next record
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when valid container cross-reference record has been identified.
Trigger Criteria:
Context: A valid container cross-reference record has been identified
Applied to: Extract Container ID from Position 28-39
Action: The system processes the record for container information
Logic Flow:
IF A valid container cross-reference record has been identified
AND The system processes the record for container information
THEN:
• Extract the container ID from positions 28-39 of the record and store it in the container work table
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when container id has been successfully extracted from the record.
Trigger Criteria:
Context: A container ID has been successfully extracted from the record
Applied to: Extract Associated Waybill Information
Action: The system processes waybill reference information
Logic Flow:
IF A container ID has been successfully extracted from the record
AND The system processes waybill reference information
THEN:
• Extract railroad number from positions 10-12, station number from positions 14-19, and waybill number from positions 21-26
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill information has been extracted from the database record.
Trigger Criteria:
Context: Waybill information has been extracted from the database record
Applied to: Replace Spaces with Zeroes in Waybill
Action: The waybill number contains space characters
Logic Flow:
IF Waybill information has been extracted from the database record
AND The waybill number contains space characters
THEN:
• Replace all space characters with zeroes in the waybill number to ensure consistent numeric format
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when container has been successfully processed and stored.
Trigger Criteria:
Context: A container has been successfully processed and stored
Applied to: Increment Container Counter
Action: The system updates the container tracking counter
Logic Flow:
IF A container has been successfully processed and stored
AND The system updates the container tracking counter
THEN:
• Increment the container counter by 1 and ensure it does not exceed the maximum limit of 30 containers
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when container processing has been completed for all available records.
Trigger Criteria:
Context: Container processing has been completed for all available records
Applied to: Mark Container as Invalid
Action: The system evaluates the container processing results
Logic Flow:
IF Container processing has been completed for all available records
AND The system evaluates the container processing results
THEN:
• If no valid containers were found or the first container ID is spaces or low-values, then set container status to not found, otherwise set container status to found and mark as IQ container type
Business Justification: Dictates the expected operational logic and validation steps when waybill retrieval request is initiated for an equipment id. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A waybill retrieval request is initiated for an equipment ID
Applied to: First Call or Different Equipment ID?
Action: The system checks if this is the first call to FWCARGET or if the current equipment ID differs from the previously held equipment ID
Logic Flow:
IF A waybill retrieval request is initiated for an equipment ID
AND The system checks if this is the first call to FWCARGET or if the current equipment ID differs from the previously held equipment ID
THEN:
• The system proceeds with parameter initialization if it's a first call or new equipment ID, otherwise skips to exit
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill retrieval parameters need to be configured.
Trigger Criteria:
Context: Waybill retrieval parameters need to be configured
Applied to: Set Retrieval Criteria
Action: The system initializes FWCARGET parameters
Logic Flow:
IF Waybill retrieval parameters need to be configured
AND The system initializes FWCARGET parameters
THEN:
• The system sets retrieval criteria to include all waybill types except 98-99, all status types, exclude EDI incomplete waybills, include temporary waybills, exclude corrector waybills, return lead waybill, and get latest waybill date
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when equipment id is available for waybill lookup.
Trigger Criteria:
Context: Equipment ID is available for waybill lookup
Applied to: Set Equipment ID for Retrieval
Action: The system prepares for waybill retrieval
Logic Flow:
IF Equipment ID is available for waybill lookup
AND The system prepares for waybill retrieval
THEN:
• The system assigns the equipment ID to the CARGET-CAR-ID parameter
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when fwcarget parameters are properly configured with equipment id and retrieval criteria. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: FWCARGET parameters are properly configured with equipment ID and retrieval criteria
Applied to: Call FWCARGET Module
Action: The system needs to retrieve waybill information
Logic Flow:
IF FWCARGET parameters are properly configured with equipment ID and retrieval criteria
AND The system needs to retrieve waybill information
THEN:
• The system calls the FWCARGET module and processes the return status
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when fwcarget module has been executed.
Trigger Criteria:
Context: FWCARGET module has been executed
Applied to: Waybill Found?
Action: The system checks the return status from waybill retrieval
Logic Flow:
IF FWCARGET module has been executed
AND The system checks the return status from waybill retrieval
THEN:
• The system determines if a waybill was found orif an error occurred, and routes processing accordingly
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill has been successfully retrieved.
Trigger Criteria:
Context: A waybill has been successfully retrieved
Applied to: Has Haulage Right Carrier?
Action: The system examines the haulage right carrier field in the waybill
Logic Flow:
IF A waybill has been successfully retrieved
AND The system examines the haulage right carrier field in the waybill
THEN:
• If haulage right carrier is spaces, the system continues retrieval loop; otherwise proceeds to EDI completion check
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill with haulage right carrier has been retrieved.
Trigger Criteria:
Context: A waybill with haulage right carrier has been retrieved
Applied to: EDI Completion Status = 'Y'?
Action: The system checks the EDI completion release status
Logic Flow:
IF A waybill with haulage right carrier has been retrieved
AND The system checks the EDI completion release status
THEN:
• If EDI completion release equals 'Y', the system accepts the waybill; otherwise continues with duplicate key checking
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when waybill with incomplete edi status has been retrieved.
Trigger Criteria:
Context: A waybill with incomplete EDI status has been retrieved
Applied to: Same Waybill Key as Previous?
Action: The system compares the current FWBX key feedback with the previously stored key
Logic Flow:
IF A waybill with incomplete EDI status has been retrieved
AND The system compares the current FWBX key feedback with the previously stored key
THEN:
• If the keys match, the system marks as not found to exit the loop; otherwise updates the stored key and continues
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when current waybill key differs from previous key and edi is not complete.
Trigger Criteria:
Context: Current waybill key differs from previous key and EDI is not complete
Applied to: Set Previous Waybill Date Status
Action: The system needs to retrieve an earlier waybill version
Logic Flow:
IF Current waybill key differs from previous key and EDI is not complete
AND The system needs to retrieve an earlier waybill version
THEN:
• The system sets CARGET to previous status waybill date mode
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when new waybill key has been encountered.
Trigger Criteria:
Context: A new waybill key has been encountered
Applied to: Update Waybill Key Feedback
Action: The system processes waybill retrieval results
Logic Flow:
IF A new waybill key has been encountered
AND The system processes waybill retrieval results
THEN:
• The system stores the current FWBX key feedback for comparison in the next iteration
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when current waybill key matches the previously processed key.
Trigger Criteria:
Context: The current waybill key matches the previously processed key
Applied to: Mark as Not Found
Action: The system detects a potential infinite loop condition
Logic Flow:
IF The current waybill key matches the previously processed key
AND The system detects a potential infinite loop condition
THEN:
• The system sets CARGET-NOT-FOUND status to exit the retrieval loop
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when fwcarget module execution has completed.
Trigger Criteria:
Context: FWCARGET module execution has completed
Applied to: Waybill Retrieval Error?
Action: The system evaluates the return status from waybill retrieval
Logic Flow:
IF FWCARGET module execution has completed
AND The system evaluates the return status from waybill retrieval
THEN:
• IfCARGET-ERROR is true, the system sets error status; otherwise checks for not found condition
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when error has been detected in waybill retrieval.
Trigger Criteria:
Context: An error has been detected in waybill retrieval
Applied to: Set Error Status
Action: The system processes the error condition
Logic Flow:
IF An error has been detected in waybill retrieval
AND The system processes the error condition
THEN:
• The system moves the CARGET return flag to the waybill indicator status
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when no error occurred in waybill retrieval.
Trigger Criteria:
Context: No error occurred in waybill retrieval
Applied to: Check if Waybill Not Found
Action: The system checks the waybill retrieval results
Logic Flow:
IF No error occurred in waybill retrieval
AND The system checks the waybill retrieval results
THEN:
• The system moves the CARGET return flag to waybill indicator and proceeds to inquiry fallback if waybill not found
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when primary waybill retrieval did not find a waybill. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Primary waybill retrieval did not find a waybill
Applied to: Call Inquiry System Fallback
Action: The system needs to attempt alternative retrieval methods
Logic Flow:
IF Primary waybill retrieval did not find a waybill
AND The system needs to attempt alternative retrieval methods
THEN:
• The system performs inquiry system fallback retrieval process
R-GCX003-cbl-01838 (+5)File: GCX003.cblBusiness Rule: G[Extract SCAC Code from Route Info]
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when waybill contains routing information in rut-info fields.
Trigger Criteria:
Context: A waybill contains routing information in RUT-INFO fields
Applied to: Get Routing Information from Waybill
Action: The system processes the waybill routing data
Logic Flow:
IF A waybill contains routing information in RUT-INFO fields
AND The system processes the waybill routing data
THEN:
• The routing information is extracted from the first three RUT-INFO positions and exclamation marks are replaced with spaces for proper parsing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when route processing is in progress with a route segment counter.
Trigger Criteria:
Context: Route processing is in progress with a route segment counter
Applied to: More Route Segments to Process?
Action: The system checks for more route segments to process
Logic Flow:
IF Route processing is in progress with a route segment counter
AND The system checks for more route segments to process
THEN:
• Processing continues if route segment counter is 9 or less and route has not been found, otherwise processing stops
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when route information contains carrier and junction data in structured format.
Trigger Criteria:
Context: Route information contains carrier and junction data in structured format
Applied to: Parse SCAC Code from Route Info
Action: The system parses route segment information
Logic Flow:
IF Route information contains carrier and junction data in structured format
AND The system parses route segment information
THEN:
• SCAC codes are extracted to route SCAC positions and junction/R260 codes are extracted to corresponding route junction positions
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when route information contains scac codes and junction information.
Trigger Criteria:
Context: Route information contains SCAC codes and junction information
Applied to: CSXT/NS to CPRS via DET?
Action: The first route SCAC is CSXT or NS, the second route SCAC is CPRS, and the junction code is DET
Logic Flow:
IF Route information contains SCAC codes and junction information
AND The first route SCAC is CSXT or NS, the second route SCAC is CPRS, and the junction code is DET
THEN:
• The system sets equipment routing classification to 3 for CSXT or 4 for NS and marks the route as found
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when shipment has an ima code field.
Trigger Criteria:
Context: A shipment has an IMA code field
Applied to: Haulage Mark 'HM' Found?
Action: The IMA code equals 'HM'
Logic Flow:
IF A shipment has an IMA code field
AND The IMA code equals 'HM'
THEN:
• The system sets the equipment routing classification to 2 and marks the route as found
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when route processing has completed for an equipment item.
Trigger Criteria:
Context: Route processing has completed for an equipment item
Applied to: Set Empty Equipment Indicator
Action: No valid routing pattern has been found
Logic Flow:
IF Route processing has completed for an equipment item
AND No valid routing pattern has been found
THEN:
• The system sets the empty equipment indicator to 1 to classify the equipment as having no defined route
Business Justification: Governs the functional prerequisites and system routing when train request is being processed and the report has no errors and the request action is send and the request is not an aei train send.
Trigger Criteria:
Context: A train request is being processed AND the report has no errors AND the request action is SEND AND the request is not an AEI train send
Applied to: Is UTF-SPEC-MANI = 'S'?
Action: The system checks the user's UTF special manifest authorization field
Logic Flow:
IF A train request is being processed AND the report has no errors AND the request action is SEND AND the request is not an AEI train send
AND The system checks the user's UTF special manifest authorization field
THEN:
• IfUTF-SPEC-MANI is not equal to 'S', then set the user as not authorized for special manifest processing, otherwise allow the user to proceed with special manifest operations
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when train request is being processed for special manifest authorization.
Trigger Criteria:
Context: A train request is being processed for special manifest authorization
Applied to: Report Has No Errors?
Action: The system evaluates the current report error status
Logic Flow:
IF A train request is being processed for special manifest authorization
AND The system evaluates the current report error status
THEN:
• If the report has no errors, proceed to check request action type, otherwise skip the authorization validation process
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when train request is being processed and the report has no errors.
Trigger Criteria:
Context: A train request is being processed AND the report has no errors
Applied to: Request Action is SEND?
Action: The system evaluates the request action type
Logic Flow:
IF A train request is being processed AND the report has no errors
AND The system evaluates the request action type
THEN:
• If the request action is SEND, proceed to check UTF special manifest authorization, otherwise skip the authorization validation
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when train request is being processed and the report has no errors and the request action is send and the user does not have utf special manifest authorization.
Trigger Criteria:
Context: A train request is being processed AND the report has no errors AND the request action is SEND AND the user does not have UTF special manifest authorization
Applied to: AEI Train Send = NO?
Action: The system checks the AEI train send status
Logic Flow:
IF A train request is being processed AND the report has no errors AND the request action is SEND AND the user does not have UTF special manifest authorization
AND The system checks the AEI train send status
THEN:
• If AEI train send is NO, set the user as not authorized for special manifest, otherwise allow the user to proceed as authorized
R-GCX003-cbl-01848 (+3)File: GCX003.cblBusiness Rule: F[Get Next Special Handling Code from Array Position]
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when shipment has commodity data with special handling codes array and residue weight is greater than 0 and equipment is marked as empty.
Trigger Criteria:
Context: A shipment has commodity data with special handling codes array and residue weight is greater than 0 and equipment is marked as empty
Applied to: Get Next Special Handling Code from Array Position
Action: The system processes each special handling code in the array up to position 8 and finds a code matching the ER threshold code
Logic Flow:
IF A shipment has commodity data with special handling codes array and residue weight is greater than 0 and equipment is marked as empty
AND The system processes each special handling code in the array up to position 8 and finds a code matching the ER threshold code
THEN:
• The system sets the empty residue found flag to true and continues processing remaining codes in the array
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when shipment requires special handling code processing for empty residue detection.
Trigger Criteria:
Context: A shipment requires special handling code processing for empty residue detection
Applied to: Get Next Special Handling Code from Array Position
Action: The system begins processing special handling codes
Logic Flow:
IF A shipment requires special handling code processing for empty residue detection
AND The system begins processing special handling codes
THEN:
• The system sets empty residue indicator to 'N' and initializes array position counter SUB1 to 1
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when special handling codes are being processed from an array with maximum 8 positions.
Trigger Criteria:
Context: Special handling codes are being processed from an array with maximum 8 positions
Applied to: Get Next Special Handling Code from Array Position
Action: The system processes array positions and the current position SUB1 reaches or exceeds 8
Logic Flow:
IF Special handling codes are being processed from an array with maximum 8 positions
AND The system processes array positions and the current position SUB1 reaches or exceeds 8
THEN:
• The system stops processing and exits the special handling code loop
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when special handling code has been processed at the current array position.
Trigger Criteria:
Context: A special handling code has been processed at the current array position
Applied to: Get Next Special Handling Code from Array Position
Action: The system completes processing the current code regardless of whether it matches ER threshold code
Logic Flow:
IF A special handling code has been processed at the current array position
AND The system completes processing the current code regardless of whether it matches ER threshold code
THEN:
• The system increments the array position counter SUB1 by 1 to move to the next code
R-GCX003-cbl-01852 (+9)File: GCX003.cblBusiness Rule: D[Analyze Message Type Indicator]
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report entry at a specific index position.
Trigger Criteria:
Context: A report entry at a specific index position
Applied to: Is Message Line?
Action: The system checks if the entry is classified as a message line
Logic Flow:
IF A report entry at a specific index position
AND The system checks if the entry is classified as a message line
THEN:
• The system identifies whether the entry contains message content that needs further analysis
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when message line entry that has been identified.
Trigger Criteria:
Context: A message line entry that has been identified
Applied to: Is Spawn Message?
Action: The message is classified as a spawn message type
Logic Flow:
IF A message line entry that has been identified
AND The message is classified as a spawn message type
THEN:
• The system skips the statistical counting process and continues to index increment
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when non-spawn message line that requires classification.
Trigger Criteria:
Context: A non-spawn message line that requires classification
Applied to: Classify as Error Message
Action: The message type indicator shows it is an error message
Logic Flow:
IF A non-spawn message line that requires classification
AND The message type indicator shows it is an error message
THEN:
• The system increments the error count by one
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when non-spawn message line that requires classification.
Trigger Criteria:
Context: A non-spawn message line that requires classification
Applied to: Classify as Warning Message
Action: The message type indicator shows it is a warning message
Logic Flow:
IF A non-spawn message line that requires classification
AND The message type indicator shows it is a warning message
THEN:
• The system increments the warning count by one
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when non-spawn message line that requires classification.
Trigger Criteria:
Context: A non-spawn message line that requires classification
Applied to: Classify as Information Message
Action: The message type indicator shows it is an information message
Logic Flow:
IF A non-spawn message line that requires classification
AND The message type indicator shows it is an information message
THEN:
• The system increments the information count by one
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when error message that has been classified and counted.
Trigger Criteria:
Context: An error message that has been classified and counted
Applied to: Check Error Type 43?
Action: The message type indicator equals 43
Logic Flow:
IF An error message that has been classified and counted
AND The message type indicator equals 43
THEN:
• The system increments the special error type 43 counter by one
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when warning message that has been classified and counted.
Trigger Criteria:
Context: A warning message that has been classified and counted
Applied to: Check Warning Types 49/52?
Action: The message type indicator equals 49 or 52
Logic Flow:
IF A warning message that has been classified and counted
AND The message type indicator equals 49 or 52
THEN:
• The system increments the DSP count by one
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when message has been processed and classified.
Trigger Criteria:
Context: A message has been processed and classified
Applied to: Add to Report Index
Action: The message processing is complete
Logic Flow:
IF A message has been processed and classified
AND The message processing is complete
THEN:
• The system increments the report index by one to move to the next entry
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when report index has been incremented.
Trigger Criteria:
Context: The report index has been incremented
Applied to: Check Report Limit?
Action: The system checks if the maximum report capacity has been reached
Logic Flow:
IF The report index has been incremented
AND The system checks if the maximum report capacity has been reached
THEN:
• The system determines whether to set an overflow condition or continue normal processing
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when report has reached its maximum capacity.
Trigger Criteria:
Context: The report has reached its maximum capacity
Applied to: Set Overflow Message
Action: An attempt is made to add another entry beyond the limit
Logic Flow:
IF The report has reached its maximum capacity
AND An attempt is made to add another entry beyond the limit
THEN:
• The system sets message type 9 as an overflow indicator
R-GCX003-cbl-01862 (+8)File: GCX003.cblBusiness Rule: I[Call EMCSEND3 for Current Batch]
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when email transmission process is initiated.
Trigger Criteria:
Context: An email transmission process is initiated
Applied to: Initialize Email Parameters
Action: The system prepares email parameters
Logic Flow:
IF An email transmission process is initiated
AND The system prepares email parameters
THEN:
• FROM usercode is set to default Merlin ID, TO usercode is set to default Merlin ID, subject line is cleared, message content is cleared, and item width is set to 080
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when email message content is being processed with accumulated lines.
Trigger Criteria:
Context: Email message content is being processed with accumulated lines
Applied to: Check Line Count > 699?
Action: The line count reaches or exceeds 699 lines
Logic Flow:
IF Email message content is being processed with accumulated lines
AND The line count reaches or exceeds 699 lines
THEN:
• The current batch must be transmitted immediately and a new batch started
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when email parameters are initialized and message content is prepared. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Email parameters are initialized and message content is prepared
Applied to: Call EMCSEND3 for Current Batch
Action: The system calls EMCSEND3 transmission module
Logic Flow:
IF Email parameters are initialized and message content is prepared
AND The system calls EMCSEND3 transmission module
THEN:
• The email is transmitted with FROM usercode, destination filename, TO usercode, copy usercode, subject, keywords, message text, item formatting parameters, and transmission status is returned
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when emcsend3 email transmission module has been called.
Trigger Criteria:
Context: EMCSEND3 email transmission module has been called
Applied to: Transmission Successful?
Action: The transmission return status is evaluated
Logic Flow:
IF EMCSEND3 email transmission module has been called
AND The transmission return status is evaluated
THEN:
• If return status indicates success, continue normal processing; if return status indicates failure, initiate error notification process
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when email batch has been successfully transmitted and line count exceeded 699.
Trigger Criteria:
Context: An email batch has been successfully transmitted and line count exceeded 699
Applied to: Clear Message Buffer
Action: The system prepares for the next batch
Logic Flow:
IF An email batch has been successfully transmitted and line count exceeded 699
AND The system prepares for the next batch
THEN:
• Message buffer is cleared, continuation header 'CONTINUATION OF REPORT ....' is added, detail headers are added, and line counter is reset to 3
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when email transmission has failed.
Trigger Criteria:
Context: Email transmission has failed
Applied to: Set Error Recipients
Action: The system handles transmission failure
Logic Flow:
IF Email transmission has failed
AND The system handles transmission failure
THEN:
• TO usercode is cleared, error recipient 'AEI9999' is set as first recipient, and 'OM01247' is set as second recipient
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when primary email transmission has failed and error recipients are set. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Primary email transmission has failed and error recipients are set
Applied to: Call EMCSEND3 for Error Notification
Action: The system calls EMCSEND3 for error notification
Logic Flow:
IF Primary email transmission has failed and error recipients are set
AND The system calls EMCSEND3 for error notification
THEN:
• Error notification email is transmitted to designated error recipients with same message content and formatting parameters
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when error notification email has been transmitted via emcsend3.
Trigger Criteria:
Context: Error notification email has been transmitted via EMCSEND3
Applied to: Error Notification Successful?
Action: The error notification transmission status is evaluated
Logic Flow:
IF Error notification email has been transmitted via EMCSEND3
AND The error notification transmission status is evaluated
THEN:
• If error notification succeeds, clear message buffer and continue; if error notification fails, trigger system abend with 'SEND TO FILE OF OM01247 FAILED' message
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when both primary email transmission and error notification transmission have failed.
Trigger Criteria:
Context: Both primary email transmission and error notification transmission have failed
Applied to: System Abend
Action: The system cannot recover from email transmission failures
Logic Flow:
IF Both primary email transmission and error notification transmission have failed
AND The system cannot recover from email transmission failures
THEN:
• System abends with error message 'SEND TO FILE OF OM01247 FAILED'
Business Justification: Governs the functional prerequisites and system routing when report line is being processed for message classification.
Trigger Criteria:
Context: A report line is being processed for message classification
Applied to: Is Message Line?
Action: The report line is not identified as a message line
Logic Flow:
IF A report line is being processed for message classification
AND The report line is not identified as a message line
THEN:
• The system skips message classification and continues processing without incrementing any counters
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when message line is being processed for severity classification.
Trigger Criteria:
Context: A message line is being processed for severity classification
Applied to: Is Spawn Message?
Action: The message is identified as a spawn message
Logic Flow:
IF A message line is being processed for severity classification
AND The message is identified as a spawn message
THEN:
• The system skips severity classification and continues processing without incrementing any counters
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when non-spawn message line is being processed for severity classification.
Trigger Criteria:
Context: A non-spawn message line is being processed for severity classification
Applied to: Error Message?
Action: The message is classified as an error message
Logic Flow:
IF A non-spawn message line is being processed for severity classification
AND The message is classified as an error message
THEN:
• The system increments the error counter by 1
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when error message is being processed.
Trigger Criteria:
Context: An error message is being processed
Applied to: Type 43 Error?
Action: The error message type indicator equals 43
Logic Flow:
IF An error message is being processed
AND The error message type indicator equals 43
THEN:
• The system increments the Type 43 error counter by 1
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when non-spawn, non-error message line is being processed for severity classification.
Trigger Criteria:
Context: A non-spawn, non-error message line is being processed for severity classification
Applied to: Warning Message?
Action: The message is classified as a warning message
Logic Flow:
IF A non-spawn, non-error message line is being processed for severity classification
AND The message is classified as a warning message
THEN:
• The system increments the warning counter by 1
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when warning message is being processed.
Trigger Criteria:
Context: A warning message is being processed
Applied to: DSP Message Type 49 or 52?
Action: The message type indicator equals 49 or 52
Logic Flow:
IF A warning message is being processed
AND The message type indicator equals 49 or 52
THEN:
• The system increments the DSP counter by 1
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when non-spawn, non-error, non-warning message line is being processed for severity classification.
Trigger Criteria:
Context: A non-spawn, non-error, non-warning message line is being processed for severity classification
Applied to: Information Message?
Action: The message is classified as an information message
Logic Flow:
IF A non-spawn, non-error, non-warning message line is being processed for severity classification
AND The message is classified as an information message
THEN:
• The system increments the information counter by 1
Business Justification: Ensures correct system behavior and process compliance when report line exists at a specific index position.
Trigger Criteria:
Context: A report line exists at a specific index position
Applied to: Message Line Type?
Action: The system evaluates the report line type
Logic Flow:
IF A report line exists at a specific index position
AND The system evaluates the report line type
THEN:
• The system identifies whether the line is a message line requiring error count processing or a non-message line to be skipped
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when message line has been identified for processing.
Trigger Criteria:
Context: A message line has been identified for processing
Applied to: Spawn Message?
Action: The system checks if the message is a spawn message type
Logic Flow:
IF A message line has been identified for processing
AND The system checks if the message is a spawn message type
THEN:
• Spawn messages are excluded from error counting while non-spawn messages proceed to error type classification
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when non-spawn message line requires processing.
Trigger Criteria:
Context: A non-spawn message line requires processing
Applied to: Error Type Classification
Action: The system evaluates the message type indicator
Logic Flow:
IF A non-spawn message line requires processing
AND The system evaluates the message type indicator
THEN:
• Messages are classified as errors (increment error counter), warnings (increment warning counter), or information (increment info counter)
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when message has been classified as an error type.
Trigger Criteria:
Context: A message has been classified as an error type
Applied to: Increment Error Counter
Action: The system processes the error message
Logic Flow:
IF A message has been classified as an error type
AND The system processes the error message
THEN:
• The report error counter is incremented by one
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when error message has been processed and error counter incremented.
Trigger Criteria:
Context: An error message has been processed and error counter incremented
Applied to: Check Error Type 43
Action: The system checks if the message type indicator equals 43
Logic Flow:
IF An error message has been processed and error counter incremented
AND The system checks if the message type indicator equals 43
THEN:
• Type 43 errors increment a special Type 43 counter in addition to the general error counter
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when error message has been identified as type 43.
Trigger Criteria:
Context: An error message has been identified as Type 43
Applied to: Increment Type 43 Counter
Action: The system processes the Type 43 error
Logic Flow:
IF An error message has been identified as Type 43
AND The system processes the Type 43 error
THEN:
• The ERR-43-CNT counter is incremented by one
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when message has been classified as a warning type.
Trigger Criteria:
Context: A message has been classified as a warning type
Applied to: Increment Warning Counter
Action: The system processes the warning message
Logic Flow:
IF A message has been classified as a warning type
AND The system processes the warning message
THEN:
• The report warning counter is incremented by one
Rule Belongs to : GCX003.cbl
Business Justification: Defines the strict business conditions required to proceed when warning message has been processed and warning counter incremented.
Trigger Criteria:
Context: A warning message has been processed and warning counter incremented
Applied to: Warning Type 49 or 52?
Action: The system checks if the message type indicator is 49 or 52
Logic Flow:
IF A warning message has been processed and warning counter incremented
AND The system checks if the message type indicator is 49 or 52
THEN:
• Warning types 49 and 52 additionally increment the DSP counter by one
Rule Belongs to : GCX003.cbl
Business Justification: Ensures correct system behavior and process compliance when warning message has been identified as type 49 or 52.
Trigger Criteria:
Context: A warning message has been identified as type 49 or 52
Applied to: Increment DSP Counter
Action: The system processes the special warning type
Logic Flow:
IF A warning message has been identified as type 49 or 52
AND The system processes the special warning type
THEN:
• The RPT-DSP-CNT counter is incremented by one
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when message has been classified as an information type.
Trigger Criteria:
Context: A message has been classified as an information type
Applied to: Increment Info Counter
Action: The system processes the information message
Logic Flow:
IF A message has been classified as an information type
AND The system processes the information message
THEN:
• The report information counter is incremented by one
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when error counting is complete and type 43 error count exists.
Trigger Criteria:
Context: Error counting is complete and Type 43 error count exists
Applied to: Error Type 43 Count Check
Action: The system compares the total error count with the Type 43 error count
Logic Flow:
IF Error counting is complete and Type 43 error count exists
AND The system compares the total error count with the Type 43 error count
THEN:
• If error count equals Type 43 count, processing continues normally; otherwise excess Type 43 errors are converted to warnings with appropriate counter adjustments
Rule Belongs to : GCX003.cbl
Business Justification: Governs the functional prerequisites and system routing when type 43 error count validation has identified a count mismatch.
Trigger Criteria:
Context: Type 43 error count validation has identified a count mismatch
Applied to: Convert Error to Warning
Action: The system processes the count correction
Logic Flow:
IF Type 43 error count validation has identified a count mismatch
AND The system processes the count correction
THEN:
• Excess Type 43 error messages are converted to warning type 18 messages
Rule Belongs to : GCX003.cbl
Business Justification: Dictates the expected operational logic and validation steps when type 43 errors are being converted to warnings.
Trigger Criteria:
Context: Type 43 errors are being converted to warnings
Applied to: Adjust Error Counter
Action: The system adjusts the error count
Logic Flow:
IF Type 43 errors are being converted to warnings
AND The system adjusts the error count
THEN:
• The report error counter is decremented by one for each converted error
Rule Belongs to : GCX003.cbl
Business Justification: Establishes the required business protocol to be followed when type 43 errors are being converted to warnings and error counter has been decremented.
Trigger Criteria:
Context: Type 43 errors are being converted to warnings and error counter has been decremented
Applied to: Adjust Warning Counter
Action: The system adjusts the warning count
Logic Flow:
IF Type 43 errors are being converted to warnings and error counter has been decremented
AND The system adjusts the warning count
THEN:
• The report warning counter is incremented by one for each converted error