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: Establishes the required business protocol to be followed when customs message processing system is starting up.
Trigger Criteria:
Context: The customs message processing system is starting up
Applied to: Initialize Processing Fields
Action: The initialization process begins
Logic Flow:
IF The customs message processing system is starting up
AND The initialization process begins
THEN:
• All processing switches are reset to initial state, counters are set to 1, table keys are cleared, function codes are set to 'GU', table ID is set to 'AD', sequence ID is set to 'ADMINID', accept status is set to 'GE', and admin configuration data is loaded from GCSTBRT-AD-SEGMENTor default value 'OM01247' is used if loading fails
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when message is available in the queue.
Trigger Criteria:
Context: A message is available in the queue
Applied to: Load Message Table
Action: The system attempts to load the message
Logic Flow:
IF A message is available in the queue
AND The system attempts to load the message
THEN:
• If completion code is OK and message entries are less than 1, system abends with 'MESSAGE TOO SHORT' error; if completion code is OK and backout count is not 0, message is marked as SKIP; if completion code is OK and backout count is 0, message is marked as GOOD; if completion code is FAILED and reason is NO-MSG-AVAILABLEor OTHER, system abends with MQGET FAILED error
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when m10 segment is present in the message.
Trigger Criteria:
Context: An M10 segment is present in the message
Applied to: Determine Train or Cargo Processing
Action: The system examines the M10-12-REF-NUM field
Logic Flow:
IF An M10 segment is present in the message
AND The system examines the M10-12-REF-NUM field
THEN:
• If reference number key equals 'TRAIN', processing type is set to TRAIN; if reference number key equals 'CARGO', processing type is set to CARGO; if neither condition is met and M11 segment exists, processing type is set to CARGO using M11 data; otherwise processing type remains UNKNOWN
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when m10 segment with manifest type code is being processed.
Trigger Criteria:
Context: An M10 segment with manifest type code is being processed
Applied to: Set Status Update Decision
Action: The system evaluates the M10-09-MANIFEST-TYP-CDE
Logic Flow:
IF An M10 segment with manifest type code is being processed
AND The system evaluates the M10-09-MANIFEST-TYP-CDE
THEN:
• If manifest type is 'P' or 'Y' or 'S', status should be updated; if manifest type is 'H' and processing type is TRAIN, status should be deleted and updated; if manifest type is 'H' and processing type is CARGO, status should not be updated; otherwise status should not be updated
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when message table entry with id 'm10' is encountered.
Trigger Criteria:
Context: A message table entry with ID 'M10' is encountered
Applied to: Process M10 Manifest Segment
Action: The system processes the M10 segment
Logic Flow:
IF A message table entry with ID 'M10' is encountered
AND The system processes the M10 segment
THEN:
• The M10 segment found flag is set to true and the table entry data is moved to the M10 segment structure
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when message table entry with id 'p4 ' is encountered.
Trigger Criteria:
Context: A message table entry with ID 'P4 ' is encountered
Applied to: Process P4 Segment
Action: The system processes the P4 segment
Logic Flow:
IF A message table entry with ID 'P4 ' is encountered
AND The system processes the P4 segment
THEN:
• The P4 segment found flag is set to true and the table entry data is moved to the P4 segment structure
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when message table entry with id 'n10' is encountered.
Trigger Criteria:
Context: A message table entry with ID 'N10' is encountered
Applied to: Process N10 Line Release Numbers
Action: The system processes the N10 segment
Logic Flow:
IF A message table entry with ID 'N10' is encountered
AND The system processes the N10 segment
THEN:
• The table entry data is moved to N10 segment structure and the line release number (N10-09) is stored in working storage hold field
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when message table entry with id 'k1 ' is encountered.
Trigger Criteria:
Context: A message table entry with ID 'K1 ' is encountered
Applied to: Process K1 Error Messages
Action: The system evaluates the K1-02-MSG-NUMBER
Logic Flow:
IF A message table entry with ID 'K1 ' is encountered
AND The system evaluates the K1-02-MSG-NUMBER
THEN:
• If message number is '000', severity is set to Informational and status to ACK; if message number is '009', '017', '038', '040', '291', or '630', severity is set to Fatal and status to ERROR; if message number is '631', '632', '633', '634', '695', '696', '697', '698', or '699', severity is set to Warning and status to ACK; if message number is '695', '697', or '699', email warning is sent; for all other message numbers, severity is set to Unknown and status to ACK; free form message content is logged if present
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when k3 segment is being processed.
Trigger Criteria:
Context: A K3 segment is being processed
Applied to: Process K3 Accept/Reject Counts
Action: The system evaluates K3-01-TOTAL-REJECT and K3-01-TOTAL-ACCEPT counts
Logic Flow:
IF A K3 segment is being processed
AND The system evaluates K3-01-TOTAL-REJECT and K3-01-TOTAL-ACCEPT counts
THEN:
• If total reject is zero and total accept is greater than zero and train is pre-arrived, status is set to PRE-ARRIVAL; if total reject is zero and total accept is greater than zero and train is review complete, status is set to REVIEW-COMPLETED; if total reject is zero and total accept is greater than zero for other cases, status is set to ACK; if total reject is zero and total accept is zero, 'USCS K3 RECORD HAS ZERO COUNTS' is logged and status is set to ACK; if total reject is greater than zero, status is set to ERROR
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when customs transaction message has been processed.
Trigger Criteria:
Context: A customs transaction message has been processed
Applied to: Validate Required Segments Present
Action: The system validates required segments
Logic Flow:
IF A customs transaction message has been processed
AND The system validates required segments
THEN:
• If M10 segment is not found, 'M10 SEGMENT NOT FOUND ON 355 TRANSACTION' is logged; if P4 segment is not found, 'P4 SEGMENT NOT FOUND ON 355 TRANSACTION' is logged; if K3 segment is not found, 'K3 SEGMENT NOT FOUND ON 355 TRANSACTION' is logged and a default K3 segment is processed
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when processing type is determined as cargo.
Trigger Criteria:
Context: Processing type is determined as CARGO
Applied to: Retrieve Cargo Root Information
Action: The system attempts to retrieve cargo root data using the US CCN key
Logic Flow:
IF Processing type is determined as CARGO
AND The system attempts to retrieve cargo root data using the US CCN key
THEN:
• If cargo record is found, the cargo data is loaded and cargo/train found flag is set to true with equipment car number as sub-key; if cargo record is not found, cargo/train not found flag is set to true and 'THIS US-CCN-KEY WAS NOT FOUND' message is logged
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when processing type is determined as train.
Trigger Criteria:
Context: Processing type is determined as TRAIN
Applied to: Retrieve Train Root Information
Action: The system attempts to retrieve train root data using the US customer train ID
Logic Flow:
IF Processing type is determined as TRAIN
AND The system attempts to retrieve train root data using the US customer train ID
THEN:
• If train record is found, the train data is loaded and cargo/train found flag is set to true with US train ID as sub-key; if train record is not found, cargo/train not found flag is set to true and 'THIS US-TRAIN-ID WAS NOT FOUND' message is logged
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when processing type is train and status update is required.
Trigger Criteria:
Context: Processing type is TRAIN and status update is required
Applied to: Update Train Status
Action: The system evaluates train status conditions
Logic Flow:
IF Processing type is TRAIN and status update is required
AND The system evaluates train status conditions
THEN:
• If train is deleted and status is ACK, current status is set to 'DELETED'; if train is delete pending and status is ACK, current status is set to 'DELETED'; if train is not deleted and not delete pending, current status is set to working status; after status update, AEI train send conditions are checked andif train is ACK and arrived pending, train arrival process is triggered
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when processing type is cargo and status update is required.
Trigger Criteria:
Context: Processing type is CARGO and status update is required
Applied to: Update Cargo Status
Action: The system evaluates cargo status conditions
Logic Flow:
IF Processing type is CARGO and status update is required
AND The system evaluates cargo status conditions
THEN:
• If status is ACK and no saved status description exists, USCARGO status is set to ACK; if status is ACK and saved status description exists, saved status and description are restored; if status is ERROR and current status is not ERROR/ACK/ACK-R, current status is saved and USCARGO status is set to ERROR; if status is ERROR and cargo is not deleted, CPCARGO status is set to ERROR
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when train status has been updated.
Trigger Criteria:
Context: A train status has been updated
Applied to: Check AEI Train Send Conditions
Action: The system checks AEI send conditions
Logic Flow:
IF A train status has been updated
AND The system checks AEI send conditions
THEN:
• If train status is ACK and AEI send flag is set and enroute is not reported and train ID ends with 'T', customs transaction GCT1461E is generated, car information is loaded, and customs system is notified; if AEI send flag is set, AEI status message is sent
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when aei customs transaction needs to be sent.
Trigger Criteria:
Context: AEI customs transaction needs to be sent
Applied to: Load Car Information for Customs
Action: The system loads car information from train equipment list
Logic Flow:
IF AEI customs transaction needs to be sent
AND The system loads car information from train equipment list
THEN:
• For each equipment item, if container indicator is not 'C', car initial and number are loaded, car length/empty indicator is determined based on next equipment or current equipment container status, car kind is set to 'L' for LO type or 'E' for ET type or spaces for others; containers are excluded from the customs output
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when aei processing is required for a train.
Trigger Criteria:
Context: AEI processing is required for a train
Applied to: Send AEI Status Message
Action: The system sends AEI status message
Logic Flow:
IF AEI processing is required for a train
AND The system sends AEI status message
THEN:
• AEI Merlin ID is retrieved, message subject is formatted with train ID and current status, and message is sent via Merlin system
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when train status is ack and train is in arrived pending state.
Trigger Criteria:
Context: Train status is ACK and train is in arrived pending state
Applied to: Process Train Arrival
Action: The system processes train arrival
Logic Flow:
IF Train status is ACK and train is in arrived pending state
AND The system processes train arrival
THEN:
• Arrival transaction GCT1121E is generated with action code 'TAR', current machine date and time as event date/time, US customer train ID, and train type flag set to true
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when k1 message number is '695', '697', or '699'.
Trigger Criteria:
Context: K1 message number is '695', '697', or '699'
Applied to: Send Email Warning Notifications
Action: The system processes the warning message
Logic Flow:
IF K1 message number is '695', '697', or '699'
AND The system processes the warning message
THEN:
• Freight forwarder information is retrieved, broker contact details are obtained if available, shipment root data is loaded, comprehensive email is formatted with CCN, equipment details, waybill information, load/empty indicator, content description, origin/destination stations, consignee information, CBP warning message, and occurrence timestamp, and email is sent to appropriate recipients
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when customs transaction has been processed.
Trigger Criteria:
Context: A customs transaction has been processed
Applied to: Log Customs Response Information
Action: The system logs the transaction information
Logic Flow:
IF A customs transaction has been processed
AND The system logs the transaction information
THEN:
• Log message is prepared with train or cargo CCN, processing type flag, action code 'ZZZ', status message content, sending transaction code, ACF2 user ID, current date from K3 segment, and current time from K3 segment, and log entry is spawned via GCT1051E transaction
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when special test transaction with specific reference numbers is being processed.
Trigger Criteria:
Context: A special test transaction with specific reference numbers is being processed
Applied to: Update Manifest Type Timestamps
Action: The system updates manifest type timestamps
Logic Flow:
IF A special test transaction with specific reference numbers is being processed
AND The system updates manifest type timestamps
THEN:
• T1 control table segment is retrieved, if manifest type is 'P', 309-ACK timestamp is updated with current date and time; if manifest type is 'H', 353-ACK timestamp is updated with current date and time; if manifest type is 'S', 358-ACK timestamp is updated with current date and time; updated segment is written back to control table
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when customs transaction has been prepared with car information. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A customs transaction has been prepared with car information
Applied to: Send Customs Transaction
Action: The system sends the transaction to customs system
Logic Flow:
IF A customs transaction has been prepared with car information
AND The system sends the transaction to customs system
THEN:
• Transaction is sent via CIMS call with customs transaction code, message is written using WRITMSGL with customs message length and module name, and transaction is purged after sending
Business Justification: Governs the functional prerequisites and system routing when message processing is starting.
Trigger Criteria:
Context: Message processing is starting
Applied to: Clear Working Variables & Initialize K1 Error Message Table & Set Database Function Codes
Action: The system initializes processing fields
Logic Flow:
IF Message processing is starting
AND The system initializes processing fields
THEN:
• All working variables for train/cargo switches and hold areas are cleared to spaces
• K1 counter is set to 1 and K1 table is initialized to collect error messages
• Database function code is set to 'GU', table ID is set to 'AD', sequence ID is set to 'ADMINID', and accept status is set to 'GE'
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when database access parameters are configured.
Trigger Criteria:
Context: Database access parameters are configured
Applied to: Retrieve Admin Configuration
Action: The system retrieves admin configuration
Logic Flow:
IF Database access parameters are configured
AND The system retrieves admin configuration
THEN:
• The system calls the table segment retrieval function to get administrative settings
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when administrative configuration retrieval is attempted.
Trigger Criteria:
Context: Administrative configuration retrieval is attempted
Applied to: Load Admin Settings
Action: The table segment return flag equals '0' indicating successful retrieval
Logic Flow:
IF Administrative configuration retrieval is attempted
AND The table segment return flag equals '0' indicating successful retrieval
THEN:
• The retrieved table segment is moved to the administrative segment working area
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when administrative configuration retrieval is attempted.
Trigger Criteria:
Context: Administrative configuration retrieval is attempted
Applied to: Set Default Admin ID
Action: The table segment return flag is not equal to '0' indicating retrieval failure
Logic Flow:
IF Administrative configuration retrieval is attempted
AND The table segment return flag is not equal to '0' indicating retrieval failure
THEN:
• The default administrative ID 'OM01247' is set in the administrative configuration area
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when administrative configuration is processed.
Trigger Criteria:
Context: Administrative configuration is processed
Applied to: Initialize Email Subject Fields
Action: The system initializes email fields
Logic Flow:
IF Administrative configuration is processed
AND The system initializes email fields
THEN:
• Email subject area and error report area are initialized to spaces
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when email fields are initialized.
Trigger Criteria:
Context: Email fields are initialized
Applied to: Calculate Message Length Parameters
Action: The system calculates message parameters
Logic Flow:
IF Email fields are initialized
AND The system calculates message parameters
THEN:
• Message header length is set to the length of MQS message header, unused length is set to zero, and single entry length is set to the length of one MQS table entry
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when message length parameters are calculated.
Trigger Criteria:
Context: Message length parameters are calculated
Applied to: Set Processing Status Flags
Action: The system sets processing status flags
Logic Flow:
IF Message length parameters are calculated
AND The system sets processing status flags
THEN:
• US cargo/train not found flag is set to true, M10/P4/K3 segment not found flags are set to true, end not found flag is set to true
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when processing status flags are set.
Trigger Criteria:
Context: Processing status flags are set
Applied to: Initialize Line Counter
Action: The system initializes the line counter
Logic Flow:
IF Processing status flags are set
AND The system initializes the line counter
THEN:
• The error report line counter is set to 1 and error report area is cleared to spaces
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when line counter is initialized.
Trigger Criteria:
Context: Line counter is initialized
Applied to: Set Database Accept Status
Action: The system configures database status
Logic Flow:
IF Line counter is initialized
AND The system configures database status
THEN:
• Database accept status is set to 'GE' for subsequent operations
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when database accept status is configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Database accept status is configured
Applied to: Connect to Message Queue System
Action: The system connects to message queue
Logic Flow:
IF Database accept status is configured
AND The system connects to message queue
THEN:
• Message queue connection is established by calling the queue read function and MQ connection function
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when message queue connection is established.
Trigger Criteria:
Context: Message queue connection is established
Applied to: Open Message Queue for Reading
Action: The system opens the message queue
Logic Flow:
IF Message queue connection is established
AND The system opens the message queue
THEN:
• Message queue is opened for reading by calling the MQ open function
Business Justification: Dictates the expected operational logic and validation steps when system is connected to the message queue. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is connected to the message queue
Applied to: Read Message from MQ Queue
Action: A message read operation is initiated
Logic Flow:
IF The system is connected to the message queue
AND A message read operation is initiated
THEN:
• The system attempts to retrieve the next available message from the queue
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when message has been successfully read from the queue. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A message has been successfully read from the queue
Applied to: Message Too Short?
Action: The message contains less than one complete message entry
Logic Flow:
IF A message has been successfully read from the queue
AND The message contains less than one complete message entry
THEN:
• The system flags the message as too short and terminates processing with error GCT0152E
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when message has been read successfully and is not too short. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A message has been read successfully and is not too short
Applied to: Message Previously Failed?
Action: The message backout count is greater than zero
Logic Flow:
IF A message has been read successfully and is not too short
AND The message backout count is greater than zero
THEN:
• The system skips the message and sets skip message flag to prevent reprocessing
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when message has been read successfully, is not too short, and has not previously failed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A message has been read successfully, is not too short, and has not previously failed
Applied to: Accept Message - Set Good Message Flag
Action: The message backout count equals zero
Logic Flow:
IF A message has been read successfully, is not too short, and has not previously failed
AND The message backout count equals zero
THEN:
• The system accepts the message and sets good message flag for further processing
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when system attempts to read from the message queue. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system attempts to read from the message queue
Applied to: MQ Queue Empty?
Action: The queue returns reason code 2033 indicating no messages available
Logic Flow:
IF The system attempts to read from the message queue
AND The queue returns reason code 2033 indicating no messages available
THEN:
• The system sets finished processing flag and completes the load operation
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when system encounters an error while reading from the message queue.
Trigger Criteria:
Context: The system encounters an error while reading from the message queue
Applied to: Other MQ Error?
Action: The error is not a 'no messages available' condition and completion code indicates failure
Logic Flow:
IF The system encounters an error while reading from the message queue
AND The error is not a 'no messages available' condition and completion code indicates failure
THEN:
• The system sets end of queue flag and terminates processing with appropriate error message
R-GCX015E-cbl-00042 (+16)File: GCX015E.cblBusiness Rule: Determine Train or Cargo Processing
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when message line is being processed.
Trigger Criteria:
Context: A message line is being processed
Applied to: Is Current Line M10 Segment?
Action: The system checks if the current line contains an M10 segment identifier
Logic Flow:
IF A message line is being processed
AND The system checks if the current line contains an M10 segment identifier
THEN:
• The system proceeds to extract M10 data if identified, otherwise continues to next segment
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when m10 segment has been identified in the current message line.
Trigger Criteria:
Context: An M10 segment has been identified in the current message line
Applied to: Get M10-12 Reference Number
Action: The system processes the M10 segment
Logic Flow:
IF An M10 segment has been identified in the current message line
AND The system processes the M10 segment
THEN:
• The M10-12 reference number is extracted and stored for shipment type determination
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when m10-12 reference number has been extracted from the segment.
Trigger Criteria:
Context: An M10-12 reference number has been extracted from the segment
Applied to: Reference Number Key = 'TRAIN'?
Action: The reference number key portion equals 'TRAIN'
Logic Flow:
IF An M10-12 reference number has been extracted from the segment
AND The reference number key portion equals 'TRAIN'
THEN:
• The system sets the train processing flag to true
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when reference number key has been identified as 'train'.
Trigger Criteria:
Context: The reference number key has been identified as 'TRAIN'
Applied to: Set Train Processing Flag
Action: The system determines the shipment type
Logic Flow:
IF The reference number key has been identified as 'TRAIN'
AND The system determines the shipment type
THEN:
• The train processing flag is set to true
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when m10-12 reference number has been extracted and does not contain 'train'.
Trigger Criteria:
Context: An M10-12 reference number has been extracted and does not contain 'TRAIN'
Applied to: Reference Number Key = 'CARGO'?
Action: The reference number key portion equals 'CARGO'
Logic Flow:
IF An M10-12 reference number has been extracted and does not contain 'TRAIN'
AND The reference number key portion equals 'CARGO'
THEN:
• The system sets the cargo processing flag to true
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when reference number key has been identified as 'cargo'.
Trigger Criteria:
Context: The reference number key has been identified as 'CARGO'
Applied to: Set Cargo Processing Flag
Action: The system determines the shipment type
Logic Flow:
IF The reference number key has been identified as 'CARGO'
AND The system determines the shipment type
THEN:
• The cargo processing flag is set to true
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when shipment type has been determined and manifest type code is available.
Trigger Criteria:
Context: A shipment type has been determined and manifest type code is available
Applied to: Manifest Type = P/Y/S?
Action: The manifest type code is 'P' (Preliminary), 'Y' (Yard), or 'S' (Special)
Logic Flow:
IF A shipment type has been determined and manifest type code is available
AND The manifest type code is 'P' (Preliminary), 'Y' (Yard), or 'S' (Special)
THEN:
• The system sets the should update status flag to true
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when manifest type is identified as p, y, or s.
Trigger Criteria:
Context: The manifest type is identified as P, Y, or S
Applied to: Set Should Update Status Flag
Action: The system evaluates update requirements
Logic Flow:
IF The manifest type is identified as P, Y, or S
AND The system evaluates update requirements
THEN:
• The should update status flag is set to true
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when manifest type is not p, y, or s.
Trigger Criteria:
Context: The manifest type is not P, Y, or S
Applied to: Manifest Type = H?
Action: The manifest type code is 'H' (Hold)
Logic Flow:
IF The manifest type is not P, Y, or S
AND The manifest type code is 'H' (Hold)
THEN:
• The system proceeds to evaluate train versus cargo processing for hold manifests
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when manifest type is 'h' (hold).
Trigger Criteria:
Context: The manifest type is 'H' (Hold)
Applied to: Processing Train?
Action: The shipment is being processed as a train
Logic Flow:
IF The manifest type is 'H' (Hold)
AND The shipment is being processed as a train
THEN:
• The system sets both delete status and update status flags to true
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when hold manifest is being processed for a train shipment.
Trigger Criteria:
Context: A hold manifest is being processed for a train shipment
Applied to: Set Should Delete Status Flag
Action: The system determines processing requirements
Logic Flow:
IF A hold manifest is being processed for a train shipment
AND The system determines processing requirements
THEN:
• Both should delete status and should update status flags are set to true
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when manifest type is 'h' for cargo shipments or the manifest type is not p, y, s, or h.
Trigger Criteria:
Context: The manifest type is 'H' for cargo shipments or the manifest type is not P, Y, S, or H
Applied to: Set Should Not Update Status Flag
Action: The system evaluates update requirements
Logic Flow:
IF The manifest type is 'H' for cargo shipments or the manifest type is not P, Y, S, or H
AND The system evaluates update requirements
THEN:
• The should not update status flag is set to true
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when m10 segment processing is complete.
Trigger Criteria:
Context: M10 segment processing is complete
Applied to: Type Still Unknown?
Action: Neither train nor cargo flags have been set
Logic Flow:
IF M10 segment processing is complete
AND Neither train nor cargo flags have been set
THEN:
• The system proceeds to check for M11 segment as alternative data source
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when shipment type remains unknown after m10 processing.
Trigger Criteria:
Context: Shipment type remains unknown after M10 processing
Applied to: Is Current Line M11 Segment?
Action: The current line contains an M11 segment identifier
Logic Flow:
IF Shipment type remains unknown after M10 processing
AND The current line contains an M11 segment identifier
THEN:
• The system extracts M11 segment data for cargo identification
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when m11 segment has been identified.
Trigger Criteria:
Context: An M11 segment has been identified
Applied to: Extract M11 Segment Data
Action: The system processes the M11 segment
Logic Flow:
IF An M11 segment has been identified
AND The system processes the M11 segment
THEN:
• M11 segment data is extracted including SCAC and bill of lading number
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when m11 segment data has been extracted.
Trigger Criteria:
Context: M11 segment data has been extracted
Applied to: Build Cargo Key from M11 Data
Action: The system builds the cargo identification key
Logic Flow:
IF M11 segment data has been extracted
AND The system builds the cargo identification key
THEN:
• A cargo key is constructed using M11-12 SCAC andM11-01 bill of lading number
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo key has been successfully built from m11 data.
Trigger Criteria:
Context: A cargo key has been successfully built from M11 data
Applied to: Set Cargo Processing Flag
Action: The system finalizes shipment type determination
Logic Flow:
IF A cargo key has been successfully built from M11 data
AND The system finalizes shipment type determination
THEN:
• The cargo processing flag is set to true
R-GCX015E-cbl-00059 (+3)File: GCX015E.cblBusiness Rule: Set Status Update Decision
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when customs manifest message is being processed.
Trigger Criteria:
Context: A customs manifest message is being processed
Applied to: Set SHOULD-UPDATE-STATUS
Action: The M10 segment manifest type code is 'P' (Primary), 'Y' (Yes), or 'S' (Supplemental)
Logic Flow:
IF A customs manifest message is being processed
AND The M10 segment manifest type code is 'P' (Primary), 'Y' (Yes), or 'S' (Supplemental)
THEN:
• The system sets the record to require status update
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when customs manifest message is being processed.
Trigger Criteria:
Context: A customs manifest message is being processed
Applied to: Set SHOULD-NOT-UPDATE-STATUS
Action: The M10 segment manifest type code is not 'P', 'Y', 'S', or 'H'
Logic Flow:
IF A customs manifest message is being processed
AND The M10 segment manifest type code is not 'P', 'Y', 'S', or 'H'
THEN:
• The system sets the record to not require status update
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when customs manifest message is being processed and the processing type is determined as train.
Trigger Criteria:
Context: A customs manifest message is being processed AND the processing type is determined as train
Applied to: Set SHOULD-DELETE-STATUS and SHOULD-UPDATE-STATUS
Action: The M10 segment manifest type code is 'H' (Hold)
Logic Flow:
IF A customs manifest message is being processed AND the processing type is determined as train
AND The M10 segment manifest type code is 'H' (Hold)
THEN:
• The system sets the record to require both deletion and status update
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when customs manifest message is being processed and the processing type is determined as cargo.
Trigger Criteria:
Context: A customs manifest message is being processed AND the processing type is determined as cargo
Applied to: Set SHOULD-NOT-UPDATE-STATUS
Action: The M10 segment manifest type code is 'H' (Hold)
Logic Flow:
IF A customs manifest message is being processed AND the processing type is determined as cargo
AND The M10 segment manifest type code is 'H' (Hold)
THEN:
• The system sets the record to not require status update
R-GCX015E-cbl-00063 (+6)File: GCX015E.cblBusiness Rule: Process M10 Manifest Segment
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when m10 segment is being processed with a reference number in m10-12-ref-num field.
Trigger Criteria:
Context: An M10 segment is being processed with a reference number in M10-12-REF-NUM field
Applied to: Reference Number Type?
Action: The reference number contains the text 'TRAIN'
Logic Flow:
IF An M10 segment is being processed with a reference number in M10-12-REF-NUM field
AND The reference number contains the text 'TRAIN'
THEN:
• The system sets the processing type as TRAIN
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when m10 segment is being processed with a reference number in m10-12-ref-num field.
Trigger Criteria:
Context: An M10 segment is being processed with a reference number in M10-12-REF-NUM field
Applied to: Reference Number Type?
Action: The reference number contains the text 'CARGO'
Logic Flow:
IF An M10 segment is being processed with a reference number in M10-12-REF-NUM field
AND The reference number contains the text 'CARGO'
THEN:
• The system sets the processing type as CARGO
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when m10 segment is being processed with a manifest type code in m10-09-manifest-typ-cde field.
Trigger Criteria:
Context: An M10 segment is being processed with a manifest type code in M10-09-MANIFEST-TYP-CDE field
Applied to: Set UPDATE Status Decision
Action: The manifest type code is 'P' or 'Y' or 'S'
Logic Flow:
IF An M10 segment is being processed with a manifest type code in M10-09-MANIFEST-TYP-CDE field
AND The manifest type code is 'P' or 'Y' or 'S'
THEN:
• The system sets SHOULD-UPDATE-STATUS to true
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when m10 segment is being processed with a manifest type code in m10-09-manifest-typ-cde field.
Trigger Criteria:
Context: An M10 segment is being processed with a manifest type code in M10-09-MANIFEST-TYP-CDE field
Applied to: Set NO UPDATE Status Decision
Action: The manifest type code is not 'P', 'Y', 'S', or 'H'
Logic Flow:
IF An M10 segment is being processed with a manifest type code in M10-09-MANIFEST-TYP-CDE field
AND The manifest type code is not 'P', 'Y', 'S', or 'H'
THEN:
• The system sets SHOULD-NOT-UPDATE-STATUS to true
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when m10 segment is being processed with manifest type code 'h' and the processing type is train. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An M10 segment is being processed with manifest type code 'H' and the processing type is TRAIN
Applied to: Set DELETE Status Decision
Action: The manifest type code is 'H' and WS-TRAIN is true
Logic Flow:
IF An M10 segment is being processed with manifest type code 'H' and the processing type is TRAIN
AND The manifest type code is 'H' and WS-TRAIN is true
THEN:
• The system sets both SHOULD-DELETE-STATUSandSHOULD-UPDATE-STATUS to true
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when m10 segment is being processed with manifest type code 'h' and the processing type is cargo. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An M10 segment is being processed with manifest type code 'H' and the processing type is CARGO
Applied to: Set NO UPDATE Status Decision
Action: The manifest type code is 'H' and WS-TRAIN is false
Logic Flow:
IF An M10 segment is being processed with manifest type code 'H' and the processing type is CARGO
AND The manifest type code is 'H' and WS-TRAIN is false
THEN:
• The system sets SHOULD-NOT-UPDATE-STATUS to true
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when m10 segment has been processed successfully. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An M10 segment has been processed successfully
Applied to: Mark M10 Segment as Found
Action: All M10 segment processing is complete
Logic Flow:
IF An M10 segment has been processed successfully
AND All M10 segment processing is complete
THEN:
• The system sets WS-M10-SEGMENT-FOUND to true
R-GCX015E-cbl-00070 (+2)File: GCX015E.cblBusiness Rule: Process P4 Segment
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when message table entry is being processed.
Trigger Criteria:
Context: A message table entry is being processed
Applied to: P4 Segment Found in Message?
Action: The table ID equals 'P4 ' (P4 with trailing space)
Logic Flow:
IF A message table entry is being processed
AND The table ID equals 'P4 ' (P4 with trailing space)
THEN:
• The system sets P4 segment found flag to true and extracts the P4 segment data from the message table entry
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when p4 segment has been identified in the message table.
Trigger Criteria:
Context: A P4 segment has been identified in the message table
Applied to: Extract P4 Segment Data from Message Table
Action: The P4 segment processing is initiated
Logic Flow:
IF A P4 segment has been identified in the message table
AND The P4 segment processing is initiated
THEN:
• The system moves the complete message table entry data to the P4 segment structure for processing
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when p4 segment is being processed from the message table.
Trigger Criteria:
Context: A P4 segment is being processed from the message table
Applied to: Set P4 Segment Found Flag
Action: The P4 segment data extraction begins
Logic Flow:
IF A P4 segment is being processed from the message table
AND The P4 segment data extraction begins
THEN:
• The system sets the P4 segment found indicator to true to track successful P4 segment processing
R-GCX015E-cbl-00073File: GCX015E.cblBusiness Rule: Process N10 Line Release Numbers
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when message segment is being processed during message iteration.
Trigger Criteria:
Context: A message segment is being processed during message iteration
Applied to: Extract Line Release Number from Position 09
Action: The segment identifier equals 'N10'
Logic Flow:
IF A message segment is being processed during message iteration
AND The segment identifier equals 'N10'
THEN:
• The system extracts the line release number from position 09 of the N10 segment and stores it in working storage for later use
R-GCX015E-cbl-00074 (+8)File: GCX015E.cblBusiness Rule: Process K1 Error Messages
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when k1 message segment is being processed with a specific message number.
Trigger Criteria:
Context: A K1 message segment is being processed with a specific message number
Applied to: Message Number Category?
Action: The system evaluates the K1-02-MSG-NUMBER field
Logic Flow:
IF A K1 message segment is being processed with a specific message number
AND The system evaluates the K1-02-MSG-NUMBER field
THEN:
• The message is categorized as Information (000), Fatal (009,017,038,040,291,630), Warning (631,632,633,634,695,696,697,698,699), or Unknown (all other numbers)
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when k1 message with message number '000' is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A K1 message with message number '000' is being processed
Applied to: Set Information Severity Message 000
Action: The message number equals '000'
Logic Flow:
IF A K1 message with message number '000' is being processed
AND The message number equals '000'
THEN:
• The system sets message severity to Information (MSG-SEV-I) and sets acknowledgment status (WS-ACK-STATUS)
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when k1 message with message number in the critical error range is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A K1 message with message number in the critical error range is being processed
Applied to: Set Fatal Severity Messages 009, 017, 038, 040, 291, 630
Action: The message number is '009' OR '017' OR '038' OR '040' OR '291' OR '630'
Logic Flow:
IF A K1 message with message number in the critical error range is being processed
AND The message number is '009' OR '017' OR '038' OR '040' OR '291' OR '630'
THEN:
• The system sets message severity to Fatal (MSG-SEV-F) and sets error status (WS-ERROR-STATUS)
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when k1 message with message number in the warning range is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A K1 message with message number in the warning range is being processed
Applied to: Set Warning Severity Messages 631, 632, 633, 634, 695, 696, 697, 698, 699
Action: The message number is '631' OR '632' OR '633' OR '634' OR '695' OR '696' OR '697' OR '698' OR '699'
Logic Flow:
IF A K1 message with message number in the warning range is being processed
AND The message number is '631' OR '632' OR '633' OR '634' OR '695' OR '696' OR '697' OR '698' OR '699'
THEN:
• The system sets message severity to Warning (MSG-SEV-W) and sets acknowledgment status (WS-ACK-STATUS)
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when k1 message with a message number not in any predefined category is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A K1 message with a message number not in any predefined category is being processed
Applied to: Set Unknown Severity All Other Messages
Action: The message number is not '000', not in fatal range (009,017,038,040,291,630), and not in warning range (631,632,633,634,695,696,697,698,699)
Logic Flow:
IF A K1 message with a message number not in any predefined category is being processed
AND The message number is not '000', not in fatal range (009,017,038,040,291,630), and not in warning range (631,632,633,634,695,696,697,698,699)
THEN:
• The system sets message severity to Unknown (MSG-SEV-U) and sets acknowledgment status (WS-ACK-STATUS)
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when k1 message has been categorized as warning severity.
Trigger Criteria:
Context: A K1 message has been categorized as warning severity
Applied to: Warning Message 695, 697, or 699?
Action: The message number is '695' OR '697' OR '699'
Logic Flow:
IF A K1 message has been categorized as warning severity
AND The message number is '695' OR '697' OR '699'
THEN:
• The system triggers email warning notification process to freight forwarder
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when k1 message with number '695', '697', or '699' requires email notification.
Trigger Criteria:
Context: A K1 message with number '695', '697', or '699' requires email notification
Applied to: Send Email Warning to Freight Forwarder
Action: The email warning process is triggered
Logic Flow:
IF A K1 message with number '695', '697', or '699' requires email notification
AND The email warning process is triggered
THEN:
• The system calls email warning procedure (C100-SEND-EMAIL-WARNING) to notify freight forwarder with shipment details and warning message
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when k1 message segment is being processed.
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Extract Free Form Message Text
Action: The K1-02-FREE-FORM-MESSAGE field contains text data
Logic Flow:
IF A K1 message segment is being processed
AND The K1-02-FREE-FORM-MESSAGE field contains text data
THEN:
• The system extracts the message text and adds it to the processing log (MRLN-LINES) and prepares it for later logging (HOLD-K1-MESSAGE)
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when k1 message segment is being processed for text extraction.
Trigger Criteria:
Context: A K1 message segment is being processed for text extraction
Applied to: Message Text Available?
Action: The system evaluates K1-02-FREE-FORM-MESSAGE field
Logic Flow:
IF A K1 message segment is being processed for text extraction
AND The system evaluates K1-02-FREE-FORM-MESSAGE field
THEN:
• If the field is not spaces, the message text is processed; otherwise, processing continues without text extraction
R-GCX015E-cbl-00083 (+9)File: GCX015E.cblBusiness Rule: Process K3 Accept/Reject Counts
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when message is being processed for accept/reject count validation.
Trigger Criteria:
Context: A message is being processed for accept/reject count validation
Applied to: K3 Segment Found?
Action: The system checks for the presence of K3 segment in the message
Logic Flow:
IF A message is being processed for accept/reject count validation
AND The system checks for the presence of K3 segment in the message
THEN:
• If K3 segment is found, extract the segment data for processing, otherwise create a default K3 segment with current date and time
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when message is being processed and k3 segment is not found.
Trigger Criteria:
Context: A message is being processed and K3 segment is not found
Applied to: Create Default K3 with Current Date/Time
Action: The system needs to process accept/reject counts
Logic Flow:
IF A message is being processed and K3 segment is not found
AND The system needs to process accept/reject counts
THEN:
• Create a default K3 segment using current machine date and time, set K3 segment found flag to true
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when k3 segment data is available for processing.
Trigger Criteria:
Context: K3 segment data is available for processing
Applied to: Total Reject Count = 0?
Action: The system evaluates the total reject count field
Logic Flow:
IF K3 segment data is available for processing
AND The system evaluates the total reject count field
THEN:
• If total reject count equals zero, proceed to validate accept count, otherwise set error status
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when k3 segment has zero reject count.
Trigger Criteria:
Context: K3 segment has zero reject count
Applied to: Total Accept Count > 0?
Action: The system evaluates the total accept count field
Logic Flow:
IF K3 segment has zero reject count
AND The system evaluates the total accept count field
THEN:
• If total accept count is greater than zero, proceed to train status check, otherwise log zero counts message and set acknowledgment status
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when k3 segment has zero rejects and positive accept count.
Trigger Criteria:
Context: K3 segment has zero rejects and positive accept count
Applied to: Train Status Check
Action: The system evaluates the current train status
Logic Flow:
IF K3 segment has zero rejects and positive accept count
AND The system evaluates the current train status
THEN:
• If train is pre-arrived set pre-arrival status, if train is review complete set review completed status, otherwise set acknowledgment status
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when k3 segment has valid accept counts and train is in pre-arrived state.
Trigger Criteria:
Context: K3 segment has valid accept counts and train is in pre-arrived state
Applied to: Set Pre-Arrival Status
Action: The system determines the final processing status
Logic Flow:
IF K3 segment has valid accept counts and train is in pre-arrived state
AND The system determines the final processing status
THEN:
• Set the processing status to pre-arrival status
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when k3 segment has valid accept counts and train is in review complete state.
Trigger Criteria:
Context: K3 segment has valid accept counts and train is in review complete state
Applied to: Set Review Completed Status
Action: The system determines the final processing status
Logic Flow:
IF K3 segment has valid accept counts and train is in review complete state
AND The system determines the final processing status
THEN:
• Set the processing status to review completed status
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when k3 segment has valid accept counts and train is not in pre-arrived or review complete state, or k3 segment has zero counts.
Trigger Criteria:
Context: K3 segment has valid accept counts and train is not in pre-arrived or review complete state, or K3 segment has zero counts
Applied to: Set Acknowledgment Status
Action: The system determines the final processing status
Logic Flow:
IF K3 segment has valid accept counts and train is not in pre-arrived or review complete state, or K3 segment has zero counts
AND The system determines the final processing status
THEN:
• Set the processing status to acknowledgment status
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when k3 segment contains non-zero reject count.
Business Justification: Ensures correct system behavior and process compliance when message is being processed for segment validation.
Trigger Criteria:
Context: A message is being processed for segment validation
Applied to: M10 Segment Found?
Action: The system checks for the presence of M10 segment
Logic Flow:
IF A message is being processed for segment validation
AND The system checks for the presence of M10 segment
THEN:
• If M10 segment is not found, record an error message 'M10 SEGMENT NOT FOUND ON 355 TRANSACTION' and continue validation
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when message is being processed for segment validation and m10 validation is complete.
Trigger Criteria:
Context: A message is being processed for segment validation and M10 validation is complete
Applied to: P4 Segment Found?
Action: The system checks for the presence of P4 segment
Logic Flow:
IF A message is being processed for segment validation and M10 validation is complete
AND The system checks for the presence of P4 segment
THEN:
• If P4 segment is not found, record an error message 'P4 SEGMENT NOT FOUND ON 355 TRANSACTION' and continue validation
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when message is being processed for segment validation and m10 and p4 validations are complete.
Trigger Criteria:
Context: A message is being processed for segment validation and M10 and P4 validations are complete
Applied to: K3 Segment Found?
Action: The system checks for the presence of K3 segment
Logic Flow:
IF A message is being processed for segment validation and M10 and P4 validations are complete
AND The system checks for the presence of K3 segment
THEN:
• If K3 segment is not found, record an error message 'K3 SEGMENT NOT FOUND ON 355 TRANSACTION' and create a default K3 segment using current machine date and time, then set the K3 segment found flag to true
R-GCX015E-cbl-00096 (+9)File: GCX015E.cblBusiness Rule: Retrieve Cargo Root Information
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when cargo retrieval operation is initiated.
Trigger Criteria:
Context: A cargo retrieval operation is initiated
Applied to: Initialize Cargo Segment
Action: The system prepares to query the cargo database
Logic Flow:
IF A cargo retrieval operation is initiated
AND The system prepares to query the cargo database
THEN:
• The cargo segment data structure is cleared to spaces
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record needs to be retrieved from the database.
Trigger Criteria:
Context: A cargo record needs to be retrieved from the database
Applied to: Set Database Function to GET UNIQUE
Action: The system configures the database operation parameters
Logic Flow:
IF A cargo record needs to be retrieved from the database
AND The system configures the database operation parameters
THEN:
• The database function is set to GET UNIQUE and the segment type is set to GCSUSRT
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when m10 segment data contains a us-ccn-key value.
Trigger Criteria:
Context: M10 segment data contains a US-CCN-KEY value
Applied to: Use US-CCN-KEY from M10 Segment
Action: The system prepares to query the cargo database
Logic Flow:
IF M10 segment data contains a US-CCN-KEY value
AND The system prepares to query the cargo database
THEN:
• The US-CCN-KEY from the processed M10 data is used as the database query key
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when database parameters are configured with us-ccn-key and get unique function. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Database parameters are configured with US-CCN-KEY and GET UNIQUE function
Applied to: Call Database to Retrieve Cargo Record
Action: The system executes the database retrieval operation
Logic Flow:
IF Database parameters are configured with US-CCN-KEY and GET UNIQUE function
AND The system executes the database retrieval operation
THEN:
• The GCCUSIO program is called with the cargo segment parameters to retrieve the cargo record
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when database retrieval operation has been executed for a cargo record.
Trigger Criteria:
Context: A database retrieval operation has been executed for a cargo record
Applied to: Cargo Record Found?
Action: The system checks the database operation status code
Logic Flow:
IF A database retrieval operation has been executed for a cargo record
AND The system checks the database operation status code
THEN:
• If the status code is spaces (successful), the cargo record is considered found, otherwise it is not found
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A cargo record has been successfully retrieved from the database
Applied to: Set Cargo Found Flag
Action: The system updates the cargo processing status
Logic Flow:
IF A cargo record has been successfully retrieved from the database
AND The system updates the cargo processing status
THEN:
• The cargo found flag (88-USCARGO-TRAIN-FOUND) is set to true
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record has been successfully retrieved from the database.
Trigger Criteria:
Context: A cargo record has been successfully retrieved from the database
Applied to: Store Equipment/Car Information
Action: The system processes the cargo record data
Logic Flow:
IF A cargo record has been successfully retrieved from the database
AND The system processes the cargo record data
THEN:
• The equipment car ID (GCUSRT-RT081-EQUIPMENT-CAR) is stored as the Merlin sub-key
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record data has been successfully retrieved and equipment information extracted.
Trigger Criteria:
Context: Cargo record data has been successfully retrieved and equipment information extracted
Applied to: Set Merlin Key and Sub-Key
Action: The system sets up Merlin identification keys
Logic Flow:
IF Cargo record data has been successfully retrieved and equipment information extracted
AND The system sets up Merlin identification keys
THEN:
• The Merlin key is set to the processed M10 data and the Merlin sub-key is set to the equipment car ID
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo database retrieval operation has failed to find a matching record.
Trigger Criteria:
Context: A cargo database retrieval operation has failed to find a matching record
Applied to: Set Cargo Not Found Flag
Action: The system updates the cargo processing status
Logic Flow:
IF A cargo database retrieval operation has failed to find a matching record
AND The system updates the cargo processing status
THEN:
• The cargo not found flag (88-USCARGO-TRAIN-NOTFND) is set to true
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record could not be found for the specified us-ccn-key.
Trigger Criteria:
Context: A cargo record could not be found for the specified US-CCN-KEY
Applied to: Log Error Message - US-CCN-KEY Not Found
Action: The system logs the error condition
Logic Flow:
IF A cargo record could not be found for the specified US-CCN-KEY
AND The system logs the error condition
THEN:
• An error message 'THIS US-CCN-KEY WAS NOT FOUND: ' is written to the Merlin error report and the line count is incremented
R-GCX015E-cbl-00106 (+5)File: GCX015E.cblBusiness Rule: Retrieve Train Root Information
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when us train id is available from message processing. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A US Train ID is available from message processing
Applied to: Call Database to Get Train Record
Action: The system attempts to retrieve the train record from the train database
Logic Flow:
IF A US Train ID is available from message processing
AND The system attempts to retrieve the train record from the train database
THEN:
• The system should call the database access function with the US Train ID as the search key
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when database call has been made to retrieve a train record. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database call has been made to retrieve a train record
Applied to: Train Record Found?
Action: The database returns a response with a status code
Logic Flow:
IF A database call has been made to retrieve a train record
AND The database returns a response with a status code
THEN:
• If the status code is blank/spaces, the train record is found, otherwise the train record is not found
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when database call has been made to retrieve a train record. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A database call has been made to retrieve a train record
Applied to: Set Train Not Found Flag
Action: The database returns a non-blank status code indicating the record was not found
Logic Flow:
IF A database call has been made to retrieve a train record
AND The database returns a non-blank status code indicating the record was not found
THEN:
• The system should set the train not found flag to indicate unsuccessful train record retrieval
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when train record has been successfully found in the database.
Trigger Criteria:
Context: A train record has been successfully found in the database
Applied to: Set Train Found Flag
Action: The database status indicates successful retrieval
Logic Flow:
IF A train record has been successfully found in the database
AND The database status indicates successful retrieval
THEN:
• The system should set the train found flag to indicate successful train record retrieval
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when train record has been successfully found and the train found flag is set.
Trigger Criteria:
Context: A train record has been successfully found and the train found flag is set
Applied to: Store Train ID in Processing Keys
Action: The system needs to prepare for further train processing
Logic Flow:
IF A train record has been successfully found and the train found flag is set
AND The system needs to prepare for further train processing
THEN:
• The system should store the US Train ID in the MERLIN-KEYand the train ID in MERLIN-SUB-KEY for processing reference
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when train record was not found in the database and the train not found flag is set.
Trigger Criteria:
Context: A train record was not found in the database and the train not found flag is set
Applied to: Log Train ID Not Found Message
Action: The system needs to record the failure for audit purposes
Logic Flow:
IF A train record was not found in the database and the train not found flag is set
AND The system needs to record the failure for audit purposes
THEN:
• The system should log the message 'THIS US-TRAIN-ID WAS NOT FOUND: ' followed by the train ID that was searched
R-GCX015E-cbl-00112 (+4)File: GCX015E.cblBusiness Rule: Update Train Status
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when train record exists with deleted status and acknowledgment status is received.
Trigger Criteria:
Context: A train record exists with DELETED status and acknowledgment status is received
Applied to: DELETED Acknowledgment Received
Action: The system processes the train status update
Logic Flow:
IF A train record exists with DELETED status and acknowledgment status is received
AND The system processes the train status update
THEN:
• The train current status is set to 'DELETED', security information is cleared, and the train record is updated in the database
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when train record exists with delete-pending status and acknowledgment status is received.
Trigger Criteria:
Context: A train record exists with DELETE-PENDING status and acknowledgment status is received
Applied to:DELETE-PENDING Acknowledgment Received
Action: The system processes the train status update
Logic Flow:
IF A train record exists with DELETE-PENDING status and acknowledgment status is received
AND The system processes the train status update
THEN:
• The train current status is set to 'DELETED', security information is cleared, and the train record is updated in the database
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when train record exists that is not in deleted status and not in delete-pending status.
Trigger Criteria:
Context: A train record exists that is not in DELETED status and not in DELETE-PENDING status
Applied to: Other Not Deleted/Delete-Pending
Action: The system processes the train status update
Logic Flow:
IF A train record exists that is not in DELETED status and not in DELETE-PENDING status
AND The system processes the train status update
THEN:
• The train current status is set to the current response status and the train record is updated in the database
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when train record has been updated with new status.
Trigger Criteria:
Context: A train record has been updated with new status
Applied to: Check AEI Train Send Conditions
Action: The system evaluates AEI send requirements
Logic Flow:
IF A train record has been updated with new status
AND The system evaluates AEI send requirements
THEN:
• The system performs AEI train send check to determine if additional processing is needed
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when train record has acknowledgment status and is in arrived-pending state.
Trigger Criteria:
Context: A train record has acknowledgment status and is in arrived-pending state
Applied to: Process Train Arrival
Action: The system checks for train arrival processing requirements
Logic Flow:
IF A train record has acknowledgment status and is in arrived-pending state
AND The system checks for train arrival processing requirements
THEN:
• The system triggers the train arrival process
R-GCX015E-cbl-00117 (+6)File: GCX015E.cblBusiness Rule: Update Cargo Status
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record exists with acknowledgment status and saved status description is not spaces.
Trigger Criteria:
Context: A cargo record exists with acknowledgment status and saved status description is not spaces
Applied to: Restore Previous Cargo Status
Action: The system processes the cargo status update
Logic Flow:
IF A cargo record exists with acknowledgment status and saved status description is not spaces
AND The system processes the cargo status update
THEN:
• The saved cargo status is moved to current cargo status and saved status description is moved to current cargo short description
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record exists with acknowledgment status and saved status description is spaces.
Trigger Criteria:
Context: A cargo record exists with acknowledgment status and saved status description is spaces
Applied to: Set Status to Acknowledged
Action: The system processes the cargo status update
Logic Flow:
IF A cargo record exists with acknowledgment status and saved status description is spaces
AND The system processes the cargo status update
THEN:
• The cargo status is set to USCARGO-ACKand cargo short description is set to USCARGO-ACK
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists with error status and current cargo short description is uscargo-error or uscargo-ack or uscargo-ack-r.
Trigger Criteria:
Context: A cargo record exists with error status and current cargo short description is USCARGO-ERROR or USCARGO-ACK or USCARGO-ACK-R
Applied to: Current Status is Error/Ack?
Action: The system processes the cargo status update
Logic Flow:
IF A cargo record exists with error status and current cargo short description is USCARGO-ERROR or USCARGO-ACK or USCARGO-ACK-R
AND The system processes the cargo status update
THEN:
• The system continues processing without saving the current status
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with error status and current cargo short description is not uscargo-error and not uscargo-ack and not uscargo-ack-r.
Trigger Criteria:
Context: A cargo record exists with error status and current cargo short description is not USCARGO-ERROR and not USCARGO-ACK and not USCARGO-ACK-R
Applied to: Save Current Status for Future Restoration
Action: The system processes the cargo status update
Logic Flow:
IF A cargo record exists with error status and current cargo short description is not USCARGO-ERROR and not USCARGO-ACK and not USCARGO-ACK-R
AND The system processes the cargo status update
THEN:
• The current cargo status is saved to saved status field and current cargo short description is saved to saved status description field
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record exists with error status and cp cargo status is not cpcargo-deleted.
Trigger Criteria:
Context: A cargo record exists with error status and CP cargo status is not CPCARGO-DELETED
Applied to: Set Cargo Status to Error
Action: The system processes the cargo status update
Logic Flow:
IF A cargo record exists with error status and CP cargo status is not CPCARGO-DELETED
AND The system processes the cargo status update
THEN:
• The CP cargo status is set to CPCARGO-ERROR
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists with error status.
Trigger Criteria:
Context: A cargo record exists with error status
Applied to: Set US Cargo Status to Error
Action: The system processes the cargo status update
Logic Flow:
IF A cargo record exists with error status
AND The system processes the cargo status update
THEN:
• The US cargo status is set to USCARGO-ERRORand US cargo short description is set to USCARGO-ERROR
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo status changes have been determined.
Trigger Criteria:
Context: Cargo status changes have been determined
Applied to: Update Cargo Record in Database
Action: The system needs to persist the cargo status updates
Logic Flow:
IF Cargo status changes have been determined
AND The system needs to persist the cargo status updates
THEN:
• The cargo segment is updated in the database using GCCUSIO service with replace function for GCSUSRT segment
Business Justification: Establishes the required business protocol to be followed when train record exists in the system.
Trigger Criteria:
Context: A train record exists in the system
Applied to: Train Status = ACK?
Action: The system checks AEI send eligibility
Logic Flow:
IF A train record exists in the system
AND The system checks AEI send eligibility
THEN:
• The train must have ACK status to proceed with AEI processing
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when train has ack status.
Trigger Criteria:
Context: A train has ACK status
Applied to: AEI Send Flag = Yes?
Action: The system evaluates AEI send requirements
Logic Flow:
IF A train has ACK status
AND The system evaluates AEI send requirements
THEN:
• The AEI send flag must be set to Yes to continue processing
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when train has ack status and aei send flag is yes.
Trigger Criteria:
Context: A train has ACK status and AEI send flag is Yes
Applied to: Train Status = Enroute Not Reported?
Action: The system checks enroute reporting status
Logic Flow:
IF A train has ACK status and AEI send flag is Yes
AND The system checks enroute reporting status
THEN:
• The train status must be 'Enroute Not Reported' to qualify for AEI processing
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when train meets ack status, aei send flag, and enroute not reported criteria.
Trigger Criteria:
Context: A train meets ACK status, AEI send flag, and enroute not reported criteria
Applied to: Train ID ends with 'T'?
Action: The system validates train ID format
Logic Flow:
IF A train meets ACK status, AEI send flag, and enroute not reported criteria
AND The system validates train ID format
THEN:
• The train ID must end with character 'T' at position 23 to proceed with customs transmission
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when train passes all aei eligibility checks. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A train passes all AEI eligibility checks
Applied to: Set Customs Transaction Code to GCT1461E
Action: The system prepares customs transaction
Logic Flow:
IF A train passes all AEI eligibility checks
AND The system prepares customs transaction
THEN:
• Set transaction code to GCT1461E, security to high values, customs code to 'A', and copy train identification and routing details
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when system is processing train equipment for aei transmission.
Trigger Criteria:
Context: The system is processing train equipment for AEI transmission
Applied to: Equipment Type is Container?
Action: An equipment item has container indicator set to 'C'
Logic Flow:
IF The system is processing train equipment for AEI transmission
AND An equipment item has container indicator set to 'C'
THEN:
• Skip the container equipment and do not include it in the customs car data
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment is not a container type. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Equipment is not a container type
Applied to: Load Car Initial and Number
Action: The system loads car information
Logic Flow:
IF Equipment is not a container type
AND The system loads car information
THEN:
• Copy equipment initial and convert equipment number to 6-digit format for customs car data
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when car identification has been loaded.
Trigger Criteria:
Context: Car identification has been loaded
Applied to: Set Car Load/Empty Indicator
Action: The system sets load/empty indicator
Logic Flow:
IF Car identification has been loaded
AND The system sets load/empty indicator
THEN:
• If next equipment is container, set indicator to 'L', otherwise use the equipment's load/empty code
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when car load/empty indicator has been set.
Trigger Criteria:
Context: Car load/empty indicator has been set
Applied to: Set Car Kind Based on Equipment Type
Action: The system determines car kind
Logic Flow:
IF Car load/empty indicator has been set
AND The system determines car kind
THEN:
• If equipment type is 'LO' set kind to 'L', if 'ET' set to 'E', otherwise leave blank
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when all car information has been loaded and formatted. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All car information has been loaded and formatted
Applied to: Send Customs Transaction via CIMS
Action: The system sends customs transaction
Logic Flow:
IF All car information has been loaded and formatted
AND The system sends customs transaction
THEN:
• Call CIMS program to transmit the customs transaction data
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when customs transaction has been sent via cims. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Customs transaction has been sent via CIMS
Applied to: Send Transaction Message via WRITMSGL
Action: The system logs the transaction
Logic Flow:
IF Customs transaction has been sent via CIMS
AND The system logs the transaction
THEN:
• Call WRITMSGL program with message code 'S' to record the customs transaction
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when transaction message has been logged. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Transaction message has been logged
Applied to: Purge Transaction via CIMS
Action: The system performs cleanup
Logic Flow:
IF Transaction message has been logged
AND The system performs cleanup
THEN:
• Call CIMS program with PURG function to purge transaction resources
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when aei processing has been attempted or aei send flag is set.
Trigger Criteria:
Context: AEI processing has been attempted or AEI send flag is set
Applied to: Send AEI Status Message
Action: The system completes AEI processing
Logic Flow:
IF AEI processing has been attempted or AEI send flag is set
AND The system completes AEI processing
THEN:
• Send AEI status message notification
R-GCX015E-cbl-00137 (+8)File: GCX015E.cblBusiness Rule: Load Car Information for Customs
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when train equipment item is being processed for customs car loading.
Trigger Criteria:
Context: A train equipment item is being processed for customs car loading
Applied to: Is Equipment a Container?
Action: The equipment container indicator is 'C'
Logic Flow:
IF A train equipment item is being processed for customs car loading
AND The equipment container indicator is 'C'
THEN:
• The equipment should be skipped and not included in the customs car output table
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when train equipment item is not a container.
Trigger Criteria:
Context: A train equipment item is not a container
Applied to: Extract Car Initial from Train Equipment
Action: Processing the equipment for customs car loading
Logic Flow:
IF A train equipment item is not a container
AND Processing the equipment for customs car loading
THEN:
• The equipment initial should be moved to customs car initial and the equipment number should be moved to car number field
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when car number has been extracted from equipment data.
Trigger Criteria:
Context: A car number has been extracted from equipment data
Applied to: Format Car Number to 6 Digits
Action: Preparing the car information for customs output
Logic Flow:
IF A car number has been extracted from equipment data
AND Preparing the car information for customs output
THEN:
• The car number should be formatted as a 6-digit number in the customs car number field
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when car is being processed and there is a next equipment item in the sequence.
Trigger Criteria:
Context: A car is being processed and there is a next equipment item in the sequence
Applied to: Is Next Equipment Container?
Action: The next equipment item is a container (indicator 'C')
Logic Flow:
IF A car is being processed and there is a next equipment item in the sequence
AND The next equipment item is a container (indicator 'C')
THEN:
• The current car's load/empty indicator should be set to 'L', otherwise use the car's own load/empty indicator
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when equipment item has been identified as non-container.
Trigger Criteria:
Context: An equipment item has been identified as non-container
Applied to: Equipment Type = 'LO'?
Action: The equipment type is 'LO'
Logic Flow:
IF An equipment item has been identified as non-container
AND The equipment type is 'LO'
THEN:
• The car kind should be set to 'L' for locomotive
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment item is not a locomotive (type not 'lo').
Trigger Criteria:
Context: An equipment item is not a locomotive (type not 'LO')
Applied to: Equipment Type = 'ET'?
Action: The equipment type is 'ET'
Logic Flow:
IF An equipment item is not a locomotive (type not 'LO')
AND The equipment type is 'ET'
THEN:
• The car kind should be set to 'E' for end of train device
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment item is not a locomotive and not an end of train device.
Trigger Criteria:
Context: An equipment item is not a locomotive and not an end of train device
Applied to: Set Car Kind as Spaces
Action: The equipment type is neither 'LO' nor 'ET'
Logic Flow:
IF An equipment item is not a locomotive and not an end of train device
AND The equipment type is neither 'LO' nor 'ET'
THEN:
• The car kind should be set to spaces (no classification)
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when car's details have been fully processed including initial, number, load/empty indicator, and car kind.
Trigger Criteria:
Context: A car's details have been fully processed including initial, number, load/empty indicator, and car kind
Applied to: Add Car to Customs Output Table
Action: All car information is ready for customs reporting
Logic Flow:
IF A car's details have been fully processed including initial, number, load/empty indicator, and car kind
AND All car information is ready for customs reporting
THEN:
• The car counter should be incremented by 1 and the equipment sequence counter should be incremented by 1
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when car loading is in progress for a train.
Trigger Criteria:
Context: Car loading is in progress for a train
Applied to: More Equipment to Process?
Action: The current equipment counter is less than or equal to the total equipment quantity and the car counter is less than or equal to 500
Logic Flow:
IF Car loading is in progress for a train
AND The current equipment counter is less than or equal to the total equipment quantity and the car counter is less than or equal to 500
THEN:
• Processing should continue to the next equipment item, otherwise car loading should end
R-GCX015E-cbl-00146 (+8)File: GCX015E.cblBusiness Rule: Send AEI Status Message
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when train with security exchange data containing port information.
Trigger Criteria:
Context: A train with security exchange data containing port information
Applied to: Get AEI Merlin ID from Database
Action: The system needs to send AEI status messages
Logic Flow:
IF A train with security exchange data containing port information
AND The system needs to send AEI status messages
THEN:
• The system queries CUSEMAIL database using train port as key to retrieve email contacts
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when aei email contact lookup returns no entry found status.
Trigger Criteria:
Context: AEI email contact lookup returns no entry found status
Applied to: AEI Contact Found?
Action: The system attempts to retrieve email contacts from database
Logic Flow:
IF AEI email contact lookup returns no entry found status
AND The system attempts to retrieve email contacts from database
THEN:
• The system uses default Merlin ID for email recipient
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when database lookup for aei contacts fails or returns no entry.
Trigger Criteria:
Context: Database lookup for AEI contacts fails or returns no entry
Applied to: Use Default Merlin ID
Action: The system needs to determine email recipients
Logic Flow:
IF Database lookup for AEI contacts fails or returns no entry
AND The system needs to determine email recipients
THEN:
• The system assigns default Merlin ID as the email recipient
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when database lookup successfully returns aei email contacts.
Action: The system processes the retrieved contact information
Logic Flow:
IF Database lookup successfully returns AEI email contacts
AND The system processes the retrieved contact information
THEN:
• The system assigns up to 10 user IDs from database as email recipients until empty entry is found
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when train with customer train id and current status information.
Trigger Criteria:
Context: A train with customer train ID and current status information
Applied to: Format Train Status Message
Action: The system prepares AEI status email message
Logic Flow:
IF A train with customer train ID and current status information
AND The system prepares AEI status email message
THEN:
• The system formats email subject as 'TRAIN: [train_id] STATUS: [current_status]'
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when formatted email subject, recipients, and default email settings.
Trigger Criteria:
Context: Formatted email subject, recipients, and default email settings
Applied to: Send Merlin Email Message
Action: The system initiates email sending process
Logic Flow:
IF Formatted email subject, recipients, and default email settings
AND The system initiates email sending process
THEN:
• The system calls Merlin email service with specified parameters including 080 character width and inbox destination
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when email send operation completed with return status.
Trigger Criteria:
Context: Email send operation completed with return status
Applied to: Email Send Successful?
Action: The system checks email send result
Logic Flow:
IF Email send operation completed with return status
AND The system checks email send result
THEN:
• If email send failed, the system initiates resend process to default recipients
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when primary email send operation failed.
Trigger Criteria:
Context: Primary email send operation failed
Applied to: Resend to Default Recipients
Action: The system executes retry mechanism
Logic Flow:
IF Primary email send operation failed
AND The system executes retry mechanism
THEN:
• The system sends email to default recipients AEI9999 and OM01247 with same message content
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when both primary and retry email send operations failed.
Trigger Criteria:
Context: Both primary and retry email send operations failed
Applied to: Log Email Send Failure
Action: The system completes all retry attempts
Logic Flow:
IF Both primary and retry email send operations failed
AND The system completes all retry attempts
THEN:
• The system logs 'SEND TO FILE OF OM01247 FAILED' error message
R-GCX015E-cbl-00155 (+9)File: GCX015E.cblBusiness Rule: Process Train Arrival
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when train record exists in the system.
Trigger Criteria:
Context: A train record exists in the system
Applied to: Check Train Status Conditions
Action: The system checks train arrival processing eligibility
Logic Flow:
IF A train record exists in the system
AND The system checks train arrival processing eligibility
THEN:
• The train must be acknowledged AND have arrived-pending status to proceed with arrival processing
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when train arrival message is being prepared.
Trigger Criteria:
Context: A train arrival message is being prepared
Applied to: Set Action Code to 'TAR'
Action: The system sets up the transaction parameters
Logic Flow:
IF A train arrival message is being prepared
AND The system sets up the transaction parameters
THEN:
• The action code must be set to 'TAR' to identify this as a train arrival transaction
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when train arrival message is being prepared.
Trigger Criteria:
Context: A train arrival message is being prepared
Applied to: Set Train ID from US Custom Train ID
Action: The system assigns train identification
Logic Flow:
IF A train arrival message is being prepared
AND The system assigns train identification
THEN:
• The US Custom Train ID from the train record must be used as the train identifier in the arrival message
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when train arrival is being processed.
Trigger Criteria:
Context: A train arrival is being processed
Applied to: Get Current System Date/Time
Action: The system needs to record the arrival timestamp
Logic Flow:
IF A train arrival is being processed
AND The system needs to record the arrival timestamp
THEN:
• The current system date and time must be captured and formatted for the arrival event
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when system date and time have been captured.
Trigger Criteria:
Context: System date and time have been captured
Applied to: Format Event Date and Time
Action: The arrival message is being constructed
Logic Flow:
IF System date and time have been captured
AND The arrival message is being constructed
THEN:
• The date must be formatted as YYMMDD and time as HHMM for the event timestamp
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when train arrival transaction is being created.
Trigger Criteria:
Context: A train arrival transaction is being created
Applied to: Set Security Parameters
Action: Security parameters are being set
Logic Flow:
IF A train arrival transaction is being created
AND Security parameters are being set
THEN:
• The security byte must be set to HIGH-VALUEand the transaction type must be marked as US-TRAIN
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when all train arrival parameters have been set.
Trigger Criteria:
Context: All train arrival parameters have been set
Applied to: Create Train Arrival Transaction Message
Action: The system creates the transaction message
Logic Flow:
IF All train arrival parameters have been set
AND The system creates the transaction message
THEN:
• A complete GCT1121E message must be generated with action code, event date/time, train ID, and security parameters
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when train arrival message has been created.
Trigger Criteria:
Context: A train arrival message has been created
Applied to: Send Message to IMS Queue
Action: The message needs to be queued for processing
Logic Flow:
IF A train arrival message has been created
AND The message needs to be queued for processing
THEN:
• The message must be sent to the IMS queue using CIMS with CHNG operation andALT-PCB
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when train arrival message is queued in ims.
Trigger Criteria:
Context: A train arrival message is queued in IMS
Applied to: Write Train Arrival Message
Action: The message needs to be logged
Logic Flow:
IF A train arrival message is queued in IMS
AND The message needs to be logged
THEN:
• The message must be written using WRITMSGL with the message code, content, length, and module name
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when train arrival message has been written to the log.
Trigger Criteria:
Context: A train arrival message has been written to the log
Applied to: Purge IMS Message
Action: Message processing is complete
Logic Flow:
IF A train arrival message has been written to the log
AND Message processing is complete
THEN:
• The IMS message queue must be purged using CIMS with PURG operation
Business Justification: Defines the strict business conditions required to proceed when cargo shipment requires email warning notification.
Trigger Criteria:
Context: A cargo shipment requires email warning notification
Applied to: Retrieve Cargo Segment Data
Action: The system processes cargo segment data retrieval
Logic Flow:
IF A cargo shipment requires email warning notification
AND The system processes cargo segment data retrieval
THEN:
• The system searches through cargo secondary segments to find freight forwarder (N101 type) and consignee (N101 type) information, and identifies segment 07 data
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo segment data is being processed for email notifications.
Trigger Criteria:
Context: Cargo segment data is being processed for email notifications
Applied to: Freight Forwarder Found?
Action: The system examines segment type 03 records
Logic Flow:
IF Cargo segment data is being processed for email notifications
AND The system examines segment type 03 records
THEN:
• IfGCUS-N101 field indicates forwarder type, set freight forwarder found flag to true
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when cargo segment data contains consignee information.
Trigger Criteria:
Context: Cargo segment data contains consignee information
Applied to: Retrieve Cargo Segment Data
Action: The system processes segment type 03 records with N101 consignee type
Logic Flow:
IF Cargo segment data contains consignee information
AND The system processes segment type 03 records with N101 consignee type
THEN:
• The system captures the consignee name from GCUS-N102-NAME field and sets consignee found flag
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when freight forwarder name is available from cargo segments.
Trigger Criteria:
Context: A freight forwarder name is available from cargo segments
Applied to: Get Freight Forwarder Broker Short Name
Action: The system constructs a lookup key with 'FW=' prefix and freight forwarder name
Logic Flow:
IF A freight forwarder name is available from cargo segments
AND The system constructs a lookup key with 'FW=' prefix and freight forwarder name
THEN:
• The system retrieves broker short name from GCST2RT table, or initializes empty broker name segment if not found
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when freight forwarder broker lookup has been performed.
Trigger Criteria:
Context: Freight forwarder broker lookup has been performed
Applied to: Broker Short Name Available?
Action: The system evaluates the retrieved broker information
Logic Flow:
IF Freight forwarder broker lookup has been performed
AND The system evaluates the retrieved broker information
THEN:
• IfGCT2-BROKER-NAME-SHORT is not spaces, proceed to get detailed broker contact information
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when broker short name is available and location id exists.
Trigger Criteria:
Context: Broker short name is available and location ID exists
Applied to: Get Freight Forwarder Broker Contact Information
Action: The system constructs lookup keys using broker short name with either M1203 location ID or P401 location ID
Logic Flow:
IF Broker short name is available and location ID exists
AND The system constructs lookup keys using broker short name with either M1203 location ID or P401 location ID
THEN:
• The system retrieves broker segment (BK) and internet address segment (B1) from table, andif broker uses internet, sets email recipient to internet address
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo information is available for email warning.
Trigger Criteria:
Context: Cargo information is available for email warning
Applied to: Retrieve Shipment Root Data
Action: The system needs shipment details for email content
Logic Flow:
IF Cargo information is available for email warning
AND The system needs shipment details for email content
THEN:
• The system calls FWCWBIO to retrieve SHIPROOT segment using the waybill key from cargo data
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when email warning notification needs to be sent.
Trigger Criteria:
Context: Email warning notification needs to be sent
Applied to: Format Email Subject Line
Action: The system prepares the email subject
Logic Flow:
IF Email warning notification needs to be sent
AND The system prepares the email subject
THEN:
• The system sets the email subject to the predefined warning email subject format
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when shipment data is available for email warning.
Trigger Criteria:
Context: Shipment data is available for email warning
Applied to: Format Email Content with Shipment Details
Action: The system constructs email content
Logic Flow:
IF Shipment data is available for email warning
AND The system constructs email content
THEN:
• The system formats email with header lines, equipment details, waybill information, CCN data, load/empty indicator, content description, origin/destination stations, consignee info, CBP warning message, timestamp, and footer text
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo equipment information is available.
Trigger Criteria:
Context: Cargo equipment information is available
Applied to: Add Equipment Information
Action: The system formats email content
Logic Flow:
IF Cargo equipment information is available
AND The system formats email content
THEN:
• The system adds equipment ID number from GCUSRT-RT071-CAR-ID-NUM-INDEX to the email text
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when waybill information is available from cargo data.
Trigger Criteria:
Context: Waybill information is available from cargo data
Applied to: Add Waybill Information
Action: The system formats email content
Logic Flow:
IF Waybill information is available from cargo data
AND The system formats email content
THEN:
• The system concatenates road index, station index, and waybill index from GCUSRT-RT072 fields into waybill line data
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when ccn data is available from message processing.
Trigger Criteria:
Context: CCN data is available from message processing
Applied to: Add CCN Information
Action: The system formats email content
Logic Flow:
IF CCN data is available from message processing
AND The system formats email content
THEN:
• The system adds the CCN (Container Control Number) from WORK-M10-12-DATA to the email text
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when load/empty indicator is available from cargo data.
Trigger Criteria:
Context: Load/empty indicator is available from cargo data
Applied to: Add Load/Empty Indicator
Action: The system formats email content
Logic Flow:
IF Load/empty indicator is available from cargo data
AND The system formats email content
THEN:
• The system adds the load/empty code from GCUSRT-VID10-LOAD-EMPTY-CDE to the email text
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when content description is available from cargo data.
Trigger Criteria:
Context: Content description is available from cargo data
Applied to: Add Content Description
Action: The system formats email content
Logic Flow:
IF Content description is available from cargo data
AND The system formats email content
THEN:
• The system adds the long description from GCUS-N1002-LONG-DESC to the email text
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when origin station information is available from shipment data.
Trigger Criteria:
Context: Origin station information is available from shipment data
Applied to: Add Origin Station Information
Action: The system formats email content
Logic Flow:
IF Origin station information is available from shipment data
AND The system formats email content
THEN:
• The system concatenates origin station name and province/state code into origin station data for the email
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when destination station information is available from shipment data.
Trigger Criteria:
Context: Destination station information is available from shipment data
Applied to: Add Destination Station Information
Action: The system formats email content
Logic Flow:
IF Destination station information is available from shipment data
AND The system formats email content
THEN:
• The system concatenates destination station name and province/state code into destination station data for the email
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when consignee information was found in cargo segments.
Trigger Criteria:
Context: Consignee information was found in cargo segments
Applied to: Add Consignee Information
Action: The system formats email content
Logic Flow:
IF Consignee information was found in cargo segments
AND The system formats email content
THEN:
• The system adds the consignee name to the email text
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when k1 segment contains a cbp warning message.
Trigger Criteria:
Context: K1 segment contains a CBP warning message
Applied to: Add CBP Warning Message
Action: The system formats email content
Logic Flow:
IF K1 segment contains a CBP warning message
AND The system formats email content
THEN:
• The system adds the free-form message from K1-02-FREE-FORM-MESSAGE as the CBP warning message data
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when k3 segment contains date and time information.
Trigger Criteria:
Context: K3 segment contains date and time information
Applied to: Add Date and Time Information
Action: The system formats email content
Logic Flow:
IF K3 segment contains date and time information
AND The system formats email content
THEN:
• The system formats date from machine century, K3-01-DATE, and time from K3-01-TIME into a readable timestamp and adds it to the email
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when email content is being finalized.
Trigger Criteria:
Context: Email content is being finalized
Applied to: Add Footer Text
Action: The system completes email formatting
Logic Flow:
IF Email content is being finalized
AND The system completes email formatting
THEN:
• The system adds predefined footer text to the email content
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when broker contact information has been retrieved.
Trigger Criteria:
Context: Broker contact information has been retrieved
Applied to: Send to Freight Forwarder?
Action: The system determines email recipient
Logic Flow:
IF Broker contact information has been retrieved
AND The system determines email recipient
THEN:
• If broker uses internet (GCSTBRT-BK-USE-INTERNET = 'Y'), set email recipient to freight forwarder internet address, otherwise use default system address
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when freight forwarder uses internet communication and has valid internet address.
Trigger Criteria:
Context: Freight forwarder uses internet communication and has valid internet address
Applied to: Set Email Recipient to Freight Forwarder Internet Address
Action: The system sets email recipient
Logic Flow:
IF Freight forwarder uses internet communication and has valid internet address
AND The system sets email recipient
THEN:
• The system sets email destination to 'EXTMAIL' and includes freight forwarder internet address in email header, and sets freight forwarder email flag
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when freight forwarder does not use internet communication or internet address is not available.
Trigger Criteria:
Context: Freight forwarder does not use internet communication or internet address is not available
Applied to: Set Email Recipient to Default System Address
Action: The system sets email recipient
Logic Flow:
IF Freight forwarder does not use internet communication or internet address is not available
AND The system sets email recipient
THEN:
• The system sets email recipient to default system Merlin ID
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when email content is formatted and recipient is determined.
Trigger Criteria:
Context: Email content is formatted and recipient is determined
Applied to: Send Email Message
Action: The system sends the email warning
Logic Flow:
IF Email content is formatted and recipient is determined
AND The system sends the email warning
THEN:
• The system calls Merlin email service to send the message and sets do-not-send-warning flag to prevent duplicate sends
R-GCX015E-cbl-00189 (+9)File: GCX015E.cblBusiness Rule: Retrieve Freight Forwarder Information
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when us cargo ccn key is available for processing.
Trigger Criteria:
Context: A US Cargo CCN key is available for processing
Applied to: Initialize Search Parameters
Action: The system begins searching for freight forwarder information
Logic Flow:
IF A US Cargo CCN key is available for processing
AND The system begins searching for freight forwarder information
THEN:
• Search parameters are initialized with freight forwarder not found status, consignee not found status, and additional data segment not found status
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when valid us cargo ccn key exists.
Trigger Criteria:
Context: A valid US Cargo CCN key exists
Applied to: Get First US Cargo Secondary Record
Action: The system searches for the first secondary record with record type '00' and sequence '00' using greater than operator
Logic Flow:
IF A valid US Cargo CCN key exists
AND The system searches for the first secondary record with record type '00' and sequence '00' using greater than operator
THEN:
• The first available secondary record for the CCN is retrieved or no record found status is returned
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary record with type '03' is retrieved.
Trigger Criteria:
Context: A secondary record with type '03' is retrieved
Applied to: Check Record Type
Action: The N101 qualifier code is evaluated for forwarder identification
Logic Flow:
IF A secondary record with type '03' is retrieved
AND The N101 qualifier code is evaluated for forwarder identification
THEN:
• If the N101 qualifier indicates forwarder, the freight forwarder found status is set to true
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when secondary record with type '03' is retrieved.
Trigger Criteria:
Context: A secondary record with type '03' is retrieved
Applied to: Check Record Type
Action: The N101 qualifier code is evaluated for consignee identification
Logic Flow:
IF A secondary record with type '03' is retrieved
AND The N101 qualifier code is evaluated for consignee identification
THEN:
• If the N101 qualifier indicates consignee, the consignee name is extracted from N102 field and consignee found status is set to true
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when record type 03 with forwarder n101 qualifier is found.
Trigger Criteria:
Context: A record type 03 with forwarder N101 qualifier is found
Applied to: Extract Freight Forwarder Name
Action: The freight forwarder information is being extracted
Logic Flow:
IF A record type 03 with forwarder N101 qualifier is found
AND The freight forwarder information is being extracted
THEN:
• The N102 name field is captured and the freight forwarder found indicator is set
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when record type 03 with consignee n101 qualifier is found.
Trigger Criteria:
Context: A record type 03 with consignee N101 qualifier is found
Applied to: Extract Consignee Name
Action: The consignee information is being extracted
Logic Flow:
IF A record type 03 with consignee N101 qualifier is found
AND The consignee information is being extracted
THEN:
• The N102 name field is stored as consignee data and the consignee found indicator is set
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when secondary record is being processed.
Trigger Criteria:
Context: A secondary record is being processed
Applied to: Mark Additional Data Found
Action: The record type is '07'
Logic Flow:
IF A secondary record is being processed
AND The record type is '07'
THEN:
• The additional data segment found indicator is set to true
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when secondary record has been processed and more records may exist.
Trigger Criteria:
Context: A secondary record has been processed and more records may exist
Applied to: Get Next US Cargo Secondary Record
Action: The system continues searching using get next function
Logic Flow:
IF A secondary record has been processed and more records may exist
AND The system continues searching using get next function
THEN:
• The next secondary record for the same CCN is retrieved or end of records is indicated
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when secondary record is retrieved during the search process.
Trigger Criteria:
Context: A secondary record is retrieved during the search process
Applied to: More Records for Same CCN?
Action: The record's CCN key is compared with the original search CCN
Logic Flow:
IF A secondary record is retrieved during the search process
AND The record's CCN key is compared with the original search CCN
THEN:
• If the CCN keys match, continue processing; if they don't match, stop the search process
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when search process has completed for all secondary records of a ccn.
Trigger Criteria:
Context: The search process has completed for all secondary records of a CCN
Applied to: Both Freight Forwarder and Consignee Found?
Action: The system evaluates the search results
Logic Flow:
IF The search process has completed for all secondary records of a CCN
AND The system evaluates the search results
THEN:
• If both freight forwarder and consignee are found, orif freight forwarder is found and additional data segment 07 is found, orif consignee is found, the search is considered complete
R-GCX015E-cbl-00199 (+8)File: GCX015E.cblBusiness Rule: Get Freight Forwarder Contact Details
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when freight forwarder name exists in the cargo segment.
Trigger Criteria:
Context: A freight forwarder name exists in the cargo segment
Applied to: Build Freight Forwarder Key from Name
Action: The system needs to lookup freight forwarder contact details
Logic Flow:
IF A freight forwarder name exists in the cargo segment
AND The system needs to lookup freight forwarder contact details
THEN:
• The system builds a lookup key by concatenating 'FW=' prefix with the freight forwarder name
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when freight forwarder lookup key has been constructed.
Trigger Criteria:
Context: A freight forwarder lookup key has been constructed
Applied to: Retrieve Freight Forwarder Short Name from GCST2RT
Action: The system queries the GCST2RT table with the lookup key
Logic Flow:
IF A freight forwarder lookup key has been constructed
AND The system queries the GCST2RT table with the lookup key
THEN:
• The system retrieves the freight forwarder's short name if found, otherwise initializes empty broker information
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when freight forwarder lookup in gcst2rt table returns no results.
Trigger Criteria:
Context: The freight forwarder lookup in GCST2RT table returns no results
Applied to: Initialize Empty Broker Information
Action: The system cannot find a matching freight forwarder short name
Logic Flow:
IF The freight forwarder lookup in GCST2RT table returns no results
AND The system cannot find a matching freight forwarder short name
THEN:
• The system initializes the broker name segment to empty values
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when freight forwarder short name exists and location information is available.
Trigger Criteria:
Context: A freight forwarder short name exists and location information is available
Applied to: Build Broker Key using Short Name and Location
Action: The system needs to lookup broker contact information
Logic Flow:
IF A freight forwarder short name exists and location information is available
AND The system needs to lookup broker contact information
THEN:
• The system builds a broker key by concatenating the short name with the primary location ID if available, otherwise uses the alternate location ID
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when broker lookup key has been constructed with short name and location.
Trigger Criteria:
Context: A broker lookup key has been constructed with short name and location
Applied to: Retrieve Broker Contact Information from BK Table
Action: The system queries the BK table segment with the broker key
Logic Flow:
IF A broker lookup key has been constructed with short name and location
AND The system queries the BK table segment with the broker key
THEN:
• The system retrieves broker contact information if found, otherwise initializes empty broker contact data
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when broker contact lookup in bk table returns no results.
Trigger Criteria:
Context: The broker contact lookup in BK table returns no results
Applied to: Initialize Empty Broker Contact
Action: The system cannot find matching broker contact information
Logic Flow:
IF The broker contact lookup in BK table returns no results
AND The system cannot find matching broker contact information
THEN:
• The system initializes the BK segment to empty values and skips further processing
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when broker contact information exists in the bk segment.
Trigger Criteria:
Context: Broker contact information exists in the BK segment
Applied to: Retrieve Internet Address from B1 Table
Action: The system queries the B1 table for internet address information
Logic Flow:
IF Broker contact information exists in the BK segment
AND The system queries the B1 table for internet address information
THEN:
• The system retrieves internet address data if found, otherwise initializes empty internet address information
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when internet address lookup in b1 table returns no results.
Trigger Criteria:
Context: The internet address lookup in B1 table returns no results
Applied to: Initialize Empty Internet Address
Action: The system cannot find matching internet address information
Logic Flow:
IF The internet address lookup in B1 table returns no results
AND The system cannot find matching internet address information
THEN:
• The system initializes the B1 segment to empty values and skips email configuration
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when broker contact information indicates internet usage is enabled ('y') and valid internet address exists.
Trigger Criteria:
Context: Broker contact information indicates internet usage is enabled ('Y') and valid internet address exists
Applied to: Set Email Address for Freight Forwarder
Action: The system evaluates email delivery options for the freight forwarder
Logic Flow:
IF Broker contact information indicates internet usage is enabled ('Y') and valid internet address exists
AND The system evaluates email delivery options for the freight forwarder
THEN:
• The system sets the email text line with internet address, configures external mail delivery, and enables freight forwarder email flag
R-GCX015E-cbl-00208 (+5)File: GCX015E.cblBusiness Rule: Retrieve Shipment Root Data
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when request to retrieve shipment root data is initiated.
Trigger Criteria:
Context: A request to retrieve shipment root data is initiated
Applied to: Initialize Shipment Root Parameters
Action: The system begins the shipment root data retrieval process
Logic Flow:
IF A request to retrieve shipment root data is initiated
AND The system begins the shipment root data retrieval process
THEN:
• The shipment root work area is cleared and initialized to spaces
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when shipment root parameters are being configured.
Trigger Criteria:
Context: Shipment root parameters are being configured
Applied to: Set Segment Type to SHIPROOT
Action: The system sets up the database query parameters
Logic Flow:
IF Shipment root parameters are being configured
AND The system sets up the database query parameters
THEN:
• The segment type is set to 'SHIPROOT' to specify the data type being requested
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when database query parameters are being established.
Trigger Criteria:
Context: Database query parameters are being established
Applied to: Set Function Code to GU - Get Unique
Action: The system prepares to retrieve shipment root data
Logic Flow:
IF Database query parameters are being established
AND The system prepares to retrieve shipment root data
THEN:
• The function code is set to 'GU' to perform a get unique operation
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when database retrieval parameters are being configured.
Trigger Criteria:
Context: Database retrieval parameters are being configured
Applied to: Set Accept Status to GE - Get Equal
Action: The system establishes query criteria
Logic Flow:
IF Database retrieval parameters are being configured
AND The system establishes query criteria
THEN:
• The accept status is set to 'GE' to retrieve records with exact key match
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record with waybill information exists.
Trigger Criteria:
Context: A cargo record with waybill information exists
Applied to: Extract Waybill Key from Cargo Record
Action: The system needs to retrieve associated shipment root data
Logic Flow:
IF A cargo record with waybill information exists
AND The system needs to retrieve associated shipment root data
THEN:
• The waybill key from field GCUSRT-RT082-WAYBILL-KEY is extracted and used as the root key for database lookup
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when all shipment root retrieval parameters are configured with waybill key, segment type, function code, and accept status. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All shipment root retrieval parameters are configured with waybill key, segment type, function code, and accept status
Applied to: Call FWCWBIO to Retrieve Shipment Root
Action: The system executes the database retrieval operation
Logic Flow:
IF All shipment root retrieval parameters are configured with waybill key, segment type, function code, and accept status
AND The system executes the database retrieval operation
THEN:
• The FWCWBIO program is called with the configured parameters to retrieve shipment root data from the SHIPROOT database
R-GCX015E-cbl-00214 (+8)File: GCX015E.cblBusiness Rule: Log Customs Response Information
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when customs response needs to be logged.
Trigger Criteria:
Context: A customs response needs to be logged
Applied to: Prepare Log Information Structure
Action: The system prepares the log information structure
Logic Flow:
IF A customs response needs to be logged
AND The system prepares the log information structure
THEN:
• The message field is cleared, action code is cleared, and security byte is set to high value
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when customs response is being logged.
Trigger Criteria:
Context: A customs response is being logged
Applied to: Capture Transaction Code
Action: The system captures transaction context
Logic Flow:
IF A customs response is being logged
AND The system captures transaction context
THEN:
• The sending transaction code and ACF2 user ID are recorded in the log entry
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when customs response log entry is being created.
Trigger Criteria:
Context: A customs response log entry is being created
Applied to: Format Current Date
Action: The system formats the timestamp
Logic Flow:
IF A customs response log entry is being created
AND The system formats the timestamp
THEN:
• The date is formatted by concatenating machine century with K3-01-DATEand time is set from K3-01-TIME
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when customs response log entry is being created.
Trigger Criteria:
Context: A customs response log entry is being created
Applied to: Set Action Code to 'ZZZ'
Action: The system sets the action code
Logic Flow:
IF A customs response log entry is being created
AND The system sets the action code
THEN:
• The action code is set to 'ZZZ' to identify this as a customs response log entry
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when customs response is being logged for either train or cargo.
Trigger Criteria:
Context: A customs response is being logged for either train or cargo
Applied to: Set Train or Cargo Indicator
Action: The system sets the entity type indicator
Logic Flow:
IF A customs response is being logged for either train or cargo
AND The system sets the entity type indicator
THEN:
• If processing train data then train indicator is set, otherwise cargo indicator is set
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when customs response log entry needs a status message.
Trigger Criteria:
Context: A customs response log entry needs a status message
Applied to: Add Status Message
Action: The system adds the status message
Logic Flow:
IF A customs response log entry needs a status message
AND The system adds the status message
THEN:
• If entity is cargo then cargo log message is used, elseif entity is train then train log message is used, elseif status should not be updated then no-update log message is used
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when complete customs response log entry is prepared.
Trigger Criteria:
Context: A complete customs response log entry is prepared
Applied to: Send Log Entry to GCT1051E
Action: The system sends the log entry
Logic Flow:
IF A complete customs response log entry is prepared
AND The system sends the log entry
THEN:
• The log entry is transmitted to GCT1051E transaction via message queue for processing
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when multiple k1 messages exist for logging.
Trigger Criteria:
Context: Multiple K1 messages exist for logging
Applied to: Process Next K1 Message
Action: The system processes additional K1 messages
Logic Flow:
IF Multiple K1 messages exist for logging
AND The system processes additional K1 messages
THEN:
• For each K1 message that is not empty and counter is less than or equal to 999, a separate log entry is created and sent
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when non-empty k1 message needs to be logged.
Trigger Criteria:
Context: A non-empty K1 message needs to be logged
Applied to: Create Additional Log Entry
Action: The system creates an individual K1 log entry
Logic Flow:
IF A non-empty K1 message needs to be logged
AND The system creates an individual K1 log entry
THEN:
• The log entry contains the same transaction context with train/cargo identifier, action code 'ZZZ', and the specific K1 message content
R-GCX015E-cbl-00223 (+7)File: GCX015E.cblBusiness Rule: Update Manifest Type Timestamps
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when manifest processing request is initiated.
Trigger Criteria:
Context: A manifest processing request is initiated
Applied to: Retrieve T1 Table Entry
Action: The system needs to update manifest acknowledgment timestamps
Logic Flow:
IF A manifest processing request is initiated
AND The system needs to update manifest acknowledgment timestamps
THEN:
• The T1 table entry is retrieved using table ID 'T1' and empty sequence ID
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when request to retrieve t1 table entry has been made.
Trigger Criteria:
Context: A request to retrieve T1 table entry has been made
Applied to: T1 Table Entry Found?
Action: The table lookup operation completes
Logic Flow:
IF A request to retrieve T1 table entry has been made
AND The table lookup operation completes
THEN:
• If the T1 table entry is not found, the system terminates processing with error message 'T1 CHECK TABLE ENTRY NOT FOUND'
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when t1 table entry exists and timestamp update is required.
Trigger Criteria:
Context: T1 table entry exists and timestamp update is required
Applied to: Get Current Date and Time
Action: The system prepares to update acknowledgment timestamps
Logic Flow:
IF T1 table entry exists and timestamp update is required
AND The system prepares to update acknowledgment timestamps
THEN:
• Current machine date, century, and time are captured from the system
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when current date and time have been captured and manifest type code is available.
Trigger Criteria:
Context: Current date and time have been captured and manifest type code is available
Applied to: Manifest Type Code?
Action: The system evaluates the manifest type code from the message
Logic Flow:
IF Current date and time have been captured and manifest type code is available
AND The system evaluates the manifest type code from the message
THEN:
• The system routes to appropriate timestamp update based on manifest type: 'P' for 309 acknowledgment, 'H' for 353 acknowledgment, or 'S' for 358 acknowledgment
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when manifest type code is 'p' and current date/time are available.
Trigger Criteria:
Context: Manifest type code is 'P' and current date/time are available
Applied to: Update 309 Acknowledgment Timestamp Type P - Manifest
Action: The system processes the manifest acknowledgment
Logic Flow:
IF Manifest type code is 'P' and current date/time are available
AND The system processes the manifest acknowledgment
THEN:
• The 309 acknowledgment timestamp is updated with current machine date (YYMMDD format starting at position 3), century (positions 1-2), and time (HHMM format starting at position 9)
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when manifest type code is 'h' and current date/time are available.
Trigger Criteria:
Context: Manifest type code is 'H' and current date/time are available
Applied to: Update 353 Acknowledgment Timestamp Type H - Delete Manifest
Action: The system processes the delete manifest acknowledgment
Logic Flow:
IF Manifest type code is 'H' and current date/time are available
AND The system processes the delete manifest acknowledgment
THEN:
• The 353 acknowledgment timestamp is updated with current machine date (YYMMDD format starting at position 3), century (positions 1-2), and time (HHMM format starting at position 9)
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when manifest type code is 's' and current date/time are available.
Trigger Criteria:
Context: Manifest type code is 'S' and current date/time are available
Applied to: Update 358 Acknowledgment Timestamp Type S - Status Manifest
Action: The system processes the status manifest acknowledgment
Logic Flow:
IF Manifest type code is 'S' and current date/time are available
AND The system processes the status manifest acknowledgment
THEN:
• The 358 acknowledgment timestamp is updated with current machine date (YYMMDD format starting at position 3), century (positions 1-2), and time (HHMM format starting at position 9)
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when appropriate acknowledgment timestamp has been updated in the t1 table entry.
Trigger Criteria:
Context: The appropriate acknowledgment timestamp has been updated in the T1 table entry
Applied to: Save Updated T1 Table Entry
Action: The timestamp update is complete
Logic Flow:
IF The appropriate acknowledgment timestamp has been updated in the T1 table entry
AND The timestamp update is complete
THEN:
• The updated T1 table entry is saved back to the table using replace function
Business Justification: Defines the strict business conditions required to proceed when train record exists in the system.
Trigger Criteria:
Context: A train record exists in the system
Applied to: Check AEI Train Send Conditions
Action: The system evaluates AEI send eligibility
Logic Flow:
IF A train record exists in the system
AND The system evaluates AEI send eligibility
THEN:
• The train must be acknowledged, have AEI send flag set, be en-route but not reported, and have a train ID ending with 'T' to proceed with AEI processing
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when train is eligible for aei processing.
Trigger Criteria:
Context: A train is eligible for AEI processing
Applied to: Set Customs Transaction Code to GCT1461E
Action: The system prepares the customs transaction
Logic Flow:
IF A train is eligible for AEI processing
AND The system prepares the customs transaction
THEN:
• The customs transaction code must be set to 'GCT1461E'
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when customs transaction is being prepared.
Trigger Criteria:
Context: A customs transaction is being prepared
Applied to: Set Security to High Values
Action: The system sets security parameters
Logic Flow:
IF A customs transaction is being prepared
AND The system sets security parameters
THEN:
• The customs security must be set to high values
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when customs transaction is being prepared for a train.
Trigger Criteria:
Context: A customs transaction is being prepared for a train
Applied to: Set Customs Code to 'A'
Action: The system assigns the customs code
Logic Flow:
IF A customs transaction is being prepared for a train
AND The system assigns the customs code
THEN:
• The customs code must be set to 'A' for arrival processing
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when train record with a valid us customer train id exists.
Trigger Criteria:
Context: A train record with a valid US customer train ID exists
Applied to: Set Train ID from Train List
Action: The system prepares the customs transaction
Logic Flow:
IF A train record with a valid US customer train ID exists
AND The system prepares the customs transaction
THEN:
• The customs train ID must be set from the train list US customer train ID
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when train record contains station information.
Trigger Criteria:
Context: A train record contains station information
Applied to: Set Station Information
Action: The system prepares the customs transaction
Logic Flow:
IF A train record contains station information
AND The system prepares the customs transaction
THEN:
• Both the customs to-station and from-station must be set from the train's CP train from station
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when train record contains a consist number.
Trigger Criteria:
Context: A train record contains a consist number
Applied to: Set Consist Number
Action: The system prepares the customs transaction
Logic Flow:
IF A train record contains a consist number
AND The system prepares the customs transaction
THEN:
• The customs consist number must be set from the train's CP train consist number
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when train record contains estimated arrival information.
Trigger Criteria:
Context: A train record contains estimated arrival information
Applied to: Set Date and Time
Action: The system prepares the customs transaction
Logic Flow:
IF A train record contains estimated arrival information
AND The system prepares the customs transaction
THEN:
• The customs date must be set from the train's estimated date of arrival and the customs time must be set from the train's estimated time of arrival
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when system is preparing to load car information.
Trigger Criteria:
Context: The system is preparing to load car information
Applied to: Initialize Car Counter
Action: Car processing begins
Logic Flow:
IF The system is preparing to load car information
AND Car processing begins
THEN:
• The car counter must be initialized to 1 and the secondary counter must be initialized to 2
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when car in the train has a container indicator.
Trigger Criteria:
Context: A car in the train has a container indicator
Applied to: Skip Container Car
Action: The system processes car information for customs
Logic Flow:
IF A car in the train has a container indicator
AND The system processes car information for customs
THEN:
• Cars with container indicator 'C' must be skipped and not included in the customs transaction
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when non-container car exists in the train.
Trigger Criteria:
Context: A non-container car exists in the train
Applied to: Load Car Initial and Number
Action: The system loads car information
Logic Flow:
IF A non-container car exists in the train
AND The system loads car information
THEN:
• The car initial must be loaded from the equipment initial and the car number must be loaded from the equipment number converted to 6-digit format
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when car is being processed for customs transaction.
Trigger Criteria:
Context: A car is being processed for customs transaction
Applied to: Set Car Load/Empty Indicator
Action: The system determines the load/empty indicator
Logic Flow:
IF A car is being processed for customs transaction
AND The system determines the load/empty indicator
THEN:
• If the car position exceeds the total equipment quantity, use the car's load/empty code; otherwise, if the next car is a container, set indicator to 'L', else use the current car's load/empty code
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when car has an equipment type designation.
Trigger Criteria:
Context: A car has an equipment type designation
Applied to: Set Car Type Information
Action: The system sets car type information
Logic Flow:
IF A car has an equipment type designation
AND The system sets car type information
THEN:
• If equipment type is 'LO', set car kind to 'L'; if equipment type is 'ET', set car kind to 'E'; otherwise, set car kind to spaces
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when system is processing cars in a train.
Trigger Criteria:
Context: The system is processing cars in a train
Applied to: More Cars to Process?
Action: The system checks for more cars to process
Logic Flow:
IF The system is processing cars in a train
AND The system checks for more cars to process
THEN:
• Continue processing while the car counter is less than or equal to the equipment quantity and the secondary counter is less than or equal to 500
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when complete customs transaction has been prepared.
Trigger Criteria:
Context: A complete customs transaction has been prepared
Applied to: Send Transaction via CIMS
Action: The system submits the transaction
Logic Flow:
IF A complete customs transaction has been prepared
AND The system submits the transaction
THEN:
• The transaction must be sent via CIMS using the change function and alternate PCB
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when customs transaction has been submitted via cims.
Trigger Criteria:
Context: A customs transaction has been submitted via CIMS
Applied to: Write Message to Queue
Action: The system writes to the message queue
Logic Flow:
IF A customs transaction has been submitted via CIMS
AND The system writes to the message queue
THEN:
• The message must be written using WRITMSGL with the transaction message, length, and module name
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when customs transaction has been written to the message queue.
Trigger Criteria:
Context: A customs transaction has been written to the message queue
Applied to: Purge Transaction
Action: The system completes transaction processing
Logic Flow:
IF A customs transaction has been written to the message queue
AND The system completes transaction processing
THEN:
• The transaction must be purged using CIMS with the purge function and alternate PCB
Business Justification: Dictates the expected operational logic and validation steps when k1 message segment is being processed.
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Information
Action: The K1 message number equals '000'
Logic Flow:
IF A K1 message segment is being processed
AND The K1 message number equals '000'
THEN:
• The message severity is set to Information and the processing status is set to Acknowledged
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when k1 message segment is being processed.
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Fatal
Action: The K1 message number equals '009' OR '017' OR '038' OR '040' OR '291' OR '630'
Logic Flow:
IF A K1 message segment is being processed
AND The K1 message number equals '009' OR '017' OR '038' OR '040' OR '291' OR '630'
THEN:
• The message severity is set to Fatal and the processing status is set to Error
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when k1 message segment is being processed.
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Warning
Action: The K1 message number equals '631' OR '632' OR '633' OR '634' OR '695' OR '696' OR '697' OR '698' OR '699'
Logic Flow:
IF A K1 message segment is being processed
AND The K1 message number equals '631' OR '632' OR '633' OR '634' OR '695' OR '696' OR '697' OR '698' OR '699'
THEN:
• The message severity is set to Warning and the processing status is set to Acknowledged
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when k1 message segment is being processed.
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Unknown
Action: The K1 message number does not equal '000' AND does not equal any of the fatal error numbers ('009', '017', '038', '040', '291', '630') AND does not equal any of the warning numbers ('631', '632', '633', '634', '695', '696', '697', '698', '699')
Logic Flow:
IF A K1 message segment is being processed
AND The K1 message number does not equal '000' AND does not equal any of the fatal error numbers ('009', '017', '038', '040', '291', '630') AND does not equal any of the warning numbers ('631', '632', '633', '634', '695', '696', '697', '698', '699')
THEN:
• The message severity is set to Unknown and the processing status is set to Acknowledged
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when k1 message segment is being processed.
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Store Message for Logging
Action: The K1 free form message text field is not empty
Logic Flow:
IF A K1 message segment is being processed
AND The K1 free form message text field is not empty
THEN:
• The message text is stored in the logging array and the message counter is incremented
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when k1 message segment has been classified as warning severity.
Trigger Criteria:
Context: A K1 message segment has been classified as Warning severity
Applied to: Trigger Email Warning Process
Action: The K1 message number equals '695' OR '697' OR '699'
Logic Flow:
IF A K1 message segment has been classified as Warning severity
AND The K1 message number equals '695' OR '697' OR '699'
THEN:
• An email warning process is triggered to send notifications to freight forwarders and brokers
Business Justification: Ensures correct system behavior and process compliance when system needs to process customs messages from message queue.
Trigger Criteria:
Context: System needs to process customs messages from message queue
Applied to: Connect to MQ Manager
Action: Connection to MQ manager is attempted
Logic Flow:
IF System needs to process customs messages from message queue
AND Connection to MQ manager is attempted
THEN:
• Connection is established successfully or system terminates with connection error
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when mq manager connection is established.
Trigger Criteria:
Context: MQ manager connection is established
Applied to: Open Message Queue for Reading
Action: Message queue is opened for reading with input-as-queue-defined options
Logic Flow:
IF MQ manager connection is established
AND Message queue is opened for reading with input-as-queue-defined options
THEN:
• Queue is opened successfully for message retrieval or system handles queue unavailable condition
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when message queue is open for reading. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Message queue is open for reading
Applied to: Read Message from Queue
Action: System attempts to get message from queue
Logic Flow:
IF Message queue is open for reading
AND System attempts to get message from queue
THEN:
• Message is retrieved successfully, or no message available condition is handled, or system terminates on retrieval failure
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when message is successfully retrieved from queue.
Trigger Criteria:
Context: Message is successfully retrieved from queue
Applied to: Check Message Backout Count
Action: Message backout count is checked
Logic Flow:
IF Message is successfully retrieved from queue
AND Message backout count is checked
THEN:
• If backout count equals zero then message is marked as good for processing, otherwise message is marked to be skipped
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when message is retrieved and marked as good for processing.
Trigger Criteria:
Context: Message is retrieved and marked as good for processing
Applied to: Calculate Number of Message Entries
Action: System calculates maximum message entries based on message length
Logic Flow:
IF Message is retrieved and marked as good for processing
AND System calculates maximum message entries based on message length
THEN:
• If calculated entries is less than 1 then system terminates with message too short error, otherwise processing continues
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when message processing is complete or terminated.
Trigger Criteria:
Context: Message processing is complete or terminated
Applied to: Close Message Queue
Action: Queue close operation is performed
Logic Flow:
IF Message processing is complete or terminated
AND Queue close operation is performed
THEN:
• Message queue is closed successfully or system terminates with close failure error
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when message queue is closed.
Trigger Criteria:
Context: Message queue is closed
Applied to: Disconnect from MQ Manager
Action: Disconnection from MQ manager is performed
Logic Flow:
IF Message queue is closed
AND Disconnection from MQ manager is performed
THEN:
• MQ manager connection is terminated successfully or system terminates with disconnection failure error
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when system is attempting to retrieve messages from queue.
Trigger Criteria:
Context: System is attempting to retrieve messages from queue
Applied to: No More Messages
Action: No message available reason code 2033 is returned
Logic Flow:
IF System is attempting to retrieve messages from queue
AND No message available reason code 2033 is returned
THEN:
• Processing is marked as finished and system proceeds to cleanup
R-GCX015E-cbl-00262 (+4)File: GCX015E.cblBusiness Rule: Validate Customs Message Format
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when customs message has been retrieved from the message queue.
Trigger Criteria:
Context: A customs message has been retrieved from the message queue
Applied to: Check Message Length
Action: The system checks if the maximum message entries is less than 1
Logic Flow:
IF A customs message has been retrieved from the message queue
AND The system checks if the maximum message entries is less than 1
THEN:
• The system should generate a user abend with error message 'MESSAGE TOO SHORT' and terminate processing
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when customs message has been successfully retrieved with completion code ok.
Trigger Criteria:
Context: A customs message has been successfully retrieved with completion code OK
Applied to: Check Message Backout Count
Action: The message backout count is not equal to 0
Logic Flow:
IF A customs message has been successfully retrieved with completion code OK
AND The message backout count is not equal to 0
THEN:
• The system should mark the message as skip message and not process it further
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when customs message has been successfully retrieved with completion code ok.
Trigger Criteria:
Context: A customs message has been successfully retrieved with completion code OK
Applied to: Mark as Good Message - Valid Format
Action: The message backout count equals 0
Logic Flow:
IF A customs message has been successfully retrieved with completion code OK
AND The message backout count equals 0
THEN:
• The system should mark the message as good message and proceed with customs processing
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when system attempts to retrieve a message from the customs queue.
Trigger Criteria:
Context: The system attempts to retrieve a message from the customs queue
Applied to: Check if No Messages Available
Action: The completion code is FAILED and the reason code indicates no message available
Logic Flow:
IF The system attempts to retrieve a message from the customs queue
AND The completion code is FAILED and the reason code indicates no message available
THEN:
• The system should generate an MQ error message, set transaction code to 355, and abort processing with 'MQGET FAILED' error
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when system encounters an error while retrieving messages from the customs queue.
Trigger Criteria:
Context: The system encounters an error while retrieving messages from the customs queue
Applied to: Set End of Queue Flag
Action: The completion code is not OK and the reason is not 'no message available'
Logic Flow:
IF The system encounters an error while retrieving messages from the customs queue
AND The completion code is not OK and the reason is not 'no message available'
THEN:
• The system should set end of queue flag, generate MQ error message, set transaction code to 355, and abort processing with 'MQGET FAILED' error
Business Justification: Establishes the required business protocol to be followed when audit trail generation process is initiated.
Trigger Criteria:
Context: An audit trail generation process is initiated
Applied to: Prepare Log Information
Action: The system prepares log information
Logic Flow:
IF An audit trail generation process is initiated
AND The system prepares log information
THEN:
• The message field is cleared, action code is cleared, and security byte is set to high value
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when audit log information is being prepared.
Trigger Criteria:
Context: Audit log information is being prepared
Applied to: Set Transaction Details
Action: Transaction details are being set
Logic Flow:
IF Audit log information is being prepared
AND Transaction details are being set
THEN:
• The sending transaction is set to the current transaction code from CCCOM
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when audit log information is being prepared.
Trigger Criteria:
Context: Audit log information is being prepared
Applied to: Set User ID Information
Action: User ID information is being set
Logic Flow:
IF Audit log information is being prepared
AND User ID information is being set
THEN:
• The ACF2 user ID from CCCOM is recorded in the audit log
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when audit log information is being prepared and k3 segment data is available.
Trigger Criteria:
Context: Audit log information is being prepared and K3 segment data is available
Applied to: Set Date and Time Stamps
Action: Date and time stamps are being set
Logic Flow:
IF Audit log information is being prepared and K3 segment data is available
AND Date and time stamps are being set
THEN:
• The date is set by concatenating machine century with K3-01-DATEand time is set to K3-01-TIME
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when audit log information is being prepared and processing type has been determined. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Audit log information is being prepared and processing type has been determined
Applied to: Determine Message Type
Action: Message type is being determined for logging
Logic Flow:
IF Audit log information is being prepared and processing type has been determined
AND Message type is being determined for logging
THEN:
• IfWS-TRAIN flag is set, thenGCX105-US-TRAIN is set to true, otherwiseGCX105-US-CARGO is set to true
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when audit log information is being prepared and work-m10-12-data contains the identifier.
Trigger Criteria:
Context: Audit log information is being prepared and WORK-M10-12-DATA contains the identifier
Applied to: Set Transaction Details
Action: Transaction details are being set
Logic Flow:
IF Audit log information is being prepared and WORK-M10-12-DATA contains the identifier
AND Transaction details are being set
THEN:
• The train or US CCN identifier is set to WORK-M10-12-DATA value
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when main status message is being formatted for audit logging.
Trigger Criteria:
Context: A main status message is being formatted for audit logging
Applied to: Format Main Status Message
Action: Action code is being set
Logic Flow:
IF A main status message is being formatted for audit logging
AND Action code is being set
THEN:
• The action code is set to 'ZZZ'
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when main status message is being formatted and processing type is determined.
Trigger Criteria:
Context: A main status message is being formatted and processing type is determined
Applied to: Format Main Status Message
Action: Status message is being formatted
Logic Flow:
IF A main status message is being formatted and processing type is determined
AND Status message is being formatted
THEN:
• If processing cargo, thenUSCS-LOG-MESSAGE1 is used; if processing train, thenUSCS-LOG-MESSAGE2 is used; if should not update status, thenUSCS-LOG-MESSAGE3 is used
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when k1 error messages are being processed and hold-k1-message contains content.
Trigger Criteria:
Context: K1 error messages are being processed and HOLD-K1-MESSAGE contains content
Applied to: Format K1 Error Message
Action: K1 error message is being formatted
Logic Flow:
IF K1 error messages are being processed and HOLD-K1-MESSAGE contains content
AND K1 error message is being formatted
THEN:
• IfHOLD-K1-MESSAGE is not spaces, then the message content is moved to GCX105-MESSAGE for logging
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when audit log information has been formatted in gcx105-input.
Trigger Criteria:
Context: Audit log information has been formatted in GCX105-INPUT
Applied to: Send Log Message to GCT1051E
Action: Log message is being sent to transaction logger
Logic Flow:
IF Audit log information has been formatted in GCX105-INPUT
AND Log message is being sent to transaction logger
THEN:
• GCT1051E transaction logging service is invoked with the formatted message
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when multiple k1 error messages exist in hold-k1-message array.
Trigger Criteria:
Context: Multiple K1 error messages exist in HOLD-K1-MESSAGE array
Applied to: Log Multiple K1 Messages
Action: Multiple K1 messages are being logged
Logic Flow:
IF Multiple K1 error messages exist in HOLD-K1-MESSAGE array
AND Multiple K1 messages are being logged
THEN:
• System processes each K1-CNT from 1 incrementing by 1 until HOLD-K1-MESSAGE is spaces orK1-CNT exceeds 999
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when system abend condition has occurred and error message exists in cccom.
Trigger Criteria:
Context: A system abend condition has occurred and error message exists in CCCOM
Applied to: Format Main Status Message
Action: Abend audit log entry is being generated
Logic Flow:
IF A system abend condition has occurred and error message exists in CCCOM
AND Abend audit log entry is being generated
THEN:
• The message is set to the error message, train/cargo identifier is set to 'GCX015ER-ABEND', cargo type is set, action code is set to 'ZZZ', and current date/time information is captured
R-GCX015E-cbl-00279 (+5)File: GCX015E.cblBusiness Rule: Process M11 Segment for Unknown Data
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when m11 segment is present in the message and the current data type is marked as unknown.
Trigger Criteria:
Context: An M11 segment is present in the message and the current data type is marked as unknown
Applied to: M11 Segment Found
Action: The system processes the M11 segment
Logic Flow:
IF An M11 segment is present in the message and the current data type is marked as unknown
AND The system processes the M11 segment
THEN:
• The system should extract the M11 segment data and continue processing
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when m11 segment needs to be processed for cargo identification.
Trigger Criteria:
Context: An M11 segment needs to be processed for cargo identification
Applied to: Initialize Cargo Key Structure
Action: The system begins extracting cargo key information
Logic Flow:
IF An M11 segment needs to be processed for cargo identification
AND The system begins extracting cargo key information
THEN:
• The cargo key work area should be initialized to spaces
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when m11 segment contains cargo information.
Trigger Criteria:
Context: An M11 segment contains cargo information
Applied to: Extract SCAC Code from M11-12
Action: The system extracts the SCAC code
Logic Flow:
IF An M11 segment contains cargo information
AND The system extracts the SCAC code
THEN:
• The M11-12-SCAC value should be moved to the WORK-SCAC field
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when m11 segment contains cargo information.
Trigger Criteria:
Context: An M11 segment contains cargo information
Applied to: Extract Bill/Waybill Number from M11-01
Action: The system extracts the bill number
Logic Flow:
IF An M11 segment contains cargo information
AND The system extracts the bill number
THEN:
• The M11-01-BOL-WB-NUM value should be moved to the WORK-BILL-NUMBER field
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when scac code and bill number have been extracted from m11 segment.
Trigger Criteria:
Context: SCAC code and bill number have been extracted from M11 segment
Applied to: Build Complete Cargo Key
Action: The system builds the complete cargo key
Logic Flow:
IF SCAC code and bill number have been extracted from M11 segment
AND The system builds the complete cargo key
THEN:
• The WORK-CARGO-KEY should be moved to WORK-M10-12-DATA for further processing
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when m11 segment has been successfully processed and cargo key has been built. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: M11 segment has been successfully processed and cargo key has been built
Applied to: Set Processing Type to Cargo
Action: The system determines the processing type
Logic Flow:
IF M11 segment has been successfully processed and cargo key has been built
AND The system determines the processing type
THEN:
• The processing type should be set to cargo (WS-CARGO)
Business Justification: Governs the functional prerequisites and system routing when manifest processing request is initiated.
Trigger Criteria:
Context: A manifest processing request is initiated
Applied to: Get T1 Table Entry
Action: The system needs to update acknowledgment timestamps
Logic Flow:
IF A manifest processing request is initiated
AND The system needs to update acknowledgment timestamps
THEN:
• The T1 table entry must be retrieved from the configuration database
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when request to retrieve t1 table entry has been made.
Trigger Criteria:
Context: A request to retrieve T1 table entry has been made
Applied to: T1 Table Entry Found?
Action: The T1 table entry retrieval operation completes
Logic Flow:
IF A request to retrieve T1 table entry has been made
AND The T1 table entry retrieval operation completes
THEN:
• If the T1 table entry is not found, the system must terminate processing with an error message 'T1 CHECK TABLE ENTRY NOT FOUND'
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when valid t1 table entry exists and a manifest message is being processed.
Trigger Criteria:
Context: A valid T1 table entry exists and a manifest message is being processed
Applied to: Check Manifest Type Code
Action: The system needs to update acknowledgment timestamps
Logic Flow:
IF A valid T1 table entry exists and a manifest message is being processed
AND The system needs to update acknowledgment timestamps
THEN:
• The manifest type code from the message queue entry must be evaluated to determine the appropriate timestamp field
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when t1 table entry exists and a manifest message is being processed.
Trigger Criteria:
Context: A T1 table entry exists and a manifest message is being processed
Applied to: Update 309 Acknowledgment Timestamp
Action: The manifest type code equals 'P'
Logic Flow:
IF A T1 table entry exists and a manifest message is being processed
AND The manifest type code equals 'P'
THEN:
• The system must update the T1-309-ACK field with current machine date (CCYYMMDD format) and current machine time (HHMM format)
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when t1 table entry exists and a manifest message is being processed.
Trigger Criteria:
Context: A T1 table entry exists and a manifest message is being processed
Applied to: Update 353 Acknowledgment Timestamp
Action: The manifest type code equals 'H'
Logic Flow:
IF A T1 table entry exists and a manifest message is being processed
AND The manifest type code equals 'H'
THEN:
• The system must update the T1-353-ACK field with current machine date (CCYYMMDD format) and current machine time (HHMM format)
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when t1 table entry exists and a manifest message is being processed.
Trigger Criteria:
Context: A T1 table entry exists and a manifest message is being processed
Applied to: Update 358 Acknowledgment Timestamp
Action: The manifest type code equals 'S'
Logic Flow:
IF A T1 table entry exists and a manifest message is being processed
AND The manifest type code equals 'S'
THEN:
• The system must update the T1-358-ACK field with current machine date (CCYYMMDD format) and current machine time (HHMM format)
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when t1 table entry has been updated with acknowledgment timestamp.
Trigger Criteria:
Context: A T1 table entry has been updated with acknowledgment timestamp
Applied to: Save Updated T1 Table Entry
Action: The timestamp update is complete
Logic Flow:
IF A T1 table entry has been updated with acknowledgment timestamp
AND The timestamp update is complete
THEN:
• The updated T1 table entry must be saved back to the configuration database using replace function
R-GCX015E-cbl-00292 (+5)File: GCX015E.cblBusiness Rule: Handle Special Test Messages
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when message with m10 segment is being processed.
Trigger Criteria:
Context: A message with M10 segment is being processed
Applied to: Check M10 Reference Number
Action: The M10 table reference number equals 'TRAINCPRSTESTTRAIN0000000000' OR 'CARGOCPRS940000000000'
Logic Flow:
IF A message with M10 segment is being processed
AND The M10 table reference number equals 'TRAINCPRSTESTTRAIN0000000000' OR 'CARGOCPRS940000000000'
THEN:
• The message is identified as a special test message
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when special test message has been identified.
Trigger Criteria:
Context: A special test message has been identified
Applied to: Clear Message Array
Action: The system processes the test message
Logic Flow:
IF A special test message has been identified
AND The system processes the test message
THEN:
• The message array is cleared to spaces AND the end processing flag is set to true AND processing returns immediately
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when special test message is being processed and t1 table segment is retrieved.
Trigger Criteria:
Context: A special test message is being processed AND T1 table segment is retrieved
Applied to: Update 309 Acknowledgment Timestamp
Action: The manifest type code is 'P'
Logic Flow:
IF A special test message is being processed AND T1 table segment is retrieved
AND The manifest type code is 'P'
THEN:
• The T1-309-ACK field is updated with current machine date (century + date) and time
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when special test message is being processed and t1 table segment is retrieved.
Trigger Criteria:
Context: A special test message is being processed AND T1 table segment is retrieved
Applied to: Update 353 Acknowledgment Timestamp
Action: The manifest type code is 'H'
Logic Flow:
IF A special test message is being processed AND T1 table segment is retrieved
AND The manifest type code is 'H'
THEN:
• The T1-353-ACK field is updated with current machine date (century + date) and time
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when special test message is being processed and t1 table segment is retrieved.
Trigger Criteria:
Context: A special test message is being processed AND T1 table segment is retrieved
Applied to: Update 358 Acknowledgment Timestamp
Action: The manifest type code is 'S'
Logic Flow:
IF A special test message is being processed AND T1 table segment is retrieved
AND The manifest type code is 'S'
THEN:
• The T1-358-ACK field is updated with current machine date (century + date) and time
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when special test message requires t1 table updates.
Trigger Criteria:
Context: A special test message requires T1 table updates
Applied to: Update T1 Table Timestamps
Action: The system needs to access T1 table data
Logic Flow:
IF A special test message requires T1 table updates
AND The system needs to access T1 table data
THEN:
• T1 table segment is retrieved using table ID 'T1' with empty sequence ID AND if retrieval fails then system abends with error message 'T1 CHECK TABLE ENTRY NOT FOUND'
R-GCX015E-cbl-00298File: GCX015E.cblBusiness Rule: Process Line Release Numbers
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when message segment is being processed during customs transaction handling.
Trigger Criteria:
Context: A message segment is being processed during customs transaction handling
Applied to: Extract Line Release Number from Position 09
Action: The segment identifier equals 'N10'
Logic Flow:
IF A message segment is being processed during customs transaction handling
AND The segment identifier equals 'N10'
THEN:
• The system extracts the line release number from position 09 of the N10 segment and stores it in the hold area for subsequent customs processing
R-GCX015E-cbl-00299 (+4)File: GCX015E.cblBusiness Rule: Set Train Status Based on Customs Response
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when train record exists with current status of deleted and the processing type is train and the customs response indicates ack status.
Trigger Criteria:
Context: A train record exists with current status of DELETED and the processing type is TRAIN and the customs response indicates ACK status
Applied to: Set Status to 'DELETED'
Action: The train status update process is executed
Logic Flow:
IF A train record exists with current status of DELETED and the processing type is TRAIN and the customs response indicates ACK status
AND The train status update process is executed
THEN:
• The train status should be set to 'DELETED' and the train record should be updated with root-only replacement
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when train record exists with current status of delete-pending and the processing type is train and the customs response indicates ack status.
Trigger Criteria:
Context: A train record exists with current status of DELETE-PENDING and the processing type is TRAIN and the customs response indicates ACK status
Applied to: Set Status to 'DELETED'
Action: The train status update process is executed
Logic Flow:
IF A train record exists with current status of DELETE-PENDING and the processing type is TRAIN and the customs response indicates ACK status
AND The train status update process is executed
THEN:
• The train status should be changed from DELETE-PENDING to 'DELETED' and the train record should be updated with root-only replacement
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when train record exists with current status that is not deleted and not delete-pending and the processing type is train.
Trigger Criteria:
Context: A train record exists with current status that is not DELETED and not DELETE-PENDING and the processing type is TRAIN
Applied to: Set Status to Current Customs Status
Action: The train status update process is executed
Logic Flow:
IF A train record exists with current status that is not DELETED and not DELETE-PENDING and the processing type is TRAIN
AND The train status update process is executed
THEN:
• The train status should be updated to the current customs status value and the train record should be updated with root-only replacement
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when train record has been updated with status that is not deleted and not delete-pending.
Trigger Criteria:
Context: A train record has been updated with status that is not DELETED and not DELETE-PENDING
Applied to: Update Train Record
Action: The train record update is completed
Logic Flow:
IF A train record has been updated with status that is not DELETED and not DELETE-PENDING
AND The train record update is completed
THEN:
• The system should perform AEI train send check processing
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when train record has been updated and the train has ack status and the train is in arrived-pending state.
Trigger Criteria:
Context: A train record has been updated and the train has ACK status and the train is in ARRIVED-PENDING state
Applied to: Update Train Record
Action: The train record update is completed
Logic Flow:
IF A train record has been updated and the train has ACK status and the train is in ARRIVED-PENDING state
AND The train record update is completed
THEN:
• The system should trigger the train arrival process
R-GCX015E-cbl-00304 (+2)File: GCX015E.cblBusiness Rule: Restore Previous Cargo Status
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed with acknowledgment status.
Trigger Criteria:
Context: A cargo record is being processed with acknowledgment status
Applied to: Restore Previous Status from Save Fields
Action: The system checks for previously saved status information
Logic Flow:
IF A cargo record is being processed with acknowledgment status
AND The system checks for previously saved status information
THEN:
• If saved status description exists, restore the saved status and description to current fields, otherwise set cargo status to acknowledgment
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed with acknowledgment status and saved status description is empty.
Trigger Criteria:
Context: A cargo record is being processed with acknowledgment status and saved status description is empty
Applied to: Set Cargo Status to ACK
Action: The system processes the status update
Logic Flow:
IF A cargo record is being processed with acknowledgment status and saved status description is empty
AND The system processes the status update
THEN:
• Set both USCARGO status fields to acknowledgment status
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record has saved status and description information available.
Trigger Criteria:
Context: A cargo record has saved status and description information available
Applied to: Move Saved Status to Current Status
Action: The system processes status restoration
Logic Flow:
IF A cargo record has saved status and description information available
AND The system processes status restoration
THEN:
• Move saved status to current USCARGO status field and move saved description to current USCARGO description field
R-GCX015E-cbl-00307 (+2)File: GCX015E.cblBusiness Rule: Save Current Cargo Status
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with current status and description.
Trigger Criteria:
Context: A cargo record exists with current status and description
Applied to: Save Current Status to RT44-US-SAVE-STATUS
Action: An error status is being set AND the current status is not already ERROR, ACK, or ACK-R
Logic Flow:
IF A cargo record exists with current status and description
AND An error status is being set AND the current status is not already ERROR, ACK, or ACK-R
THEN:
• Save the current status to RT44-US-SAVE-STATUS field
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo record exists with current status description.
Trigger Criteria:
Context: A cargo record exists with current status description
Applied to: Save Current Description to RT45-US-SAVE-STAT-DESC
Action: An error status is being set AND the current status is not already ERROR, ACK, or ACK-R
Logic Flow:
IF A cargo record exists with current status description
AND An error status is being set AND the current status is not already ERROR, ACK, or ACK-R
THEN:
• Save the current status description to RT45-US-SAVE-STAT-DESC field
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record has current status of error, ack, or ack-r.
Trigger Criteria:
Context: A cargo record has current status of ERROR, ACK, or ACK-R
Applied to: Skip Save - Status Already Error/ACK
Action: An error status update is being processed
Logic Flow:
IF A cargo record has current status of ERROR, ACK, or ACK-R
AND An error status update is being processed
THEN:
• Skip saving the current status and description to preserve previously saved values
Business Justification: Dictates the expected operational logic and validation steps when email needs to be sent through the merlin system.
Trigger Criteria:
Context: An email needs to be sent through the Merlin system
Applied to: Set Default Merlin ID as From User
Action: The email sender is being configured
Logic Flow:
IF An email needs to be sent through the Merlin system
AND The email sender is being configured
THEN:
• The system sets the default Merlin ID as the from user code
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when aei email needs to be sent and train security information is available.
Trigger Criteria:
Context: An AEI email needs to be sent and train security information is available
Applied to: Set Email Recipients
Action: The system looks up email recipients in the AEI database using the train port information
Logic Flow:
IF An AEI email needs to be sent and train security information is available
AND The system looks up email recipients in the AEI database using the train port information
THEN:
• If the database lookup is successful, the system uses the retrieved user IDs as recipients, otherwise it uses the default Merlin ID as the recipient
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when system attempts to retrieve email recipients from the aei database.
Trigger Criteria:
Context: The system attempts to retrieve email recipients from the AEI database
Applied to: Set Email Recipients
Action: The database lookup fails with an error other than 'no entry found'
Logic Flow:
IF The system attempts to retrieve email recipients from the AEI database
AND The database lookup fails with an error other than 'no entry found'
THEN:
• The system triggers a database error notification process
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when train status email needs to be sent.
Trigger Criteria:
Context: A train status email needs to be sent
Applied to: Format Email Subject
Action: The email subject is being formatted
Logic Flow:
IF A train status email needs to be sent
AND The email subject is being formatted
THEN:
• The system creates a subject line containing 'TRAIN: [train_id] STATUS: [current_status]'
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when email is being prepared for sending.
Trigger Criteria:
Context: An email is being prepared for sending
Applied to: Format Email Content
Action: The system determines that warning emails should not be sent
Logic Flow:
IF An email is being prepared for sending
AND The system determines that warning emails should not be sent
THEN:
• The system clears the email text content to spaces
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when email is being prepared for sending through merlin. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: An email is being prepared for sending through Merlin
Applied to: Set Email Parameters
Action: Email parameters are being configured
Logic Flow:
IF An email is being prepared for sending through Merlin
AND Email parameters are being configured
THEN:
• The system sets the destination filename to inbox, item width to 080, and clears copy usercode, keywords, and sequence numbers
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when email parameters and content have been configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Email parameters and content have been configured
Applied to: Call EMCSEND3 to Send Email
Action: The system needs to send the email
Logic Flow:
IF Email parameters and content have been configured
AND The system needs to send the email
THEN:
• The system calls the EMCSEND3 service with all configured email parameters
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when email send operation has been attempted through merlin.
Trigger Criteria:
Context: An email send operation has been attempted through Merlin
Applied to: Email Send Successful?
Action: The system checks the email send result
Logic Flow:
IF An email send operation has been attempted through Merlin
AND The system checks the email send result
THEN:
• If no errors are returned, the email is considered successfully sent, otherwise it requires retry processing
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when primary email send operation has failed.
Trigger Criteria:
Context: The primary email send operation has failed
Applied to: Set Backup Recipients - AEI9999, OM01247
Action: The system prepares to resend the email
Logic Flow:
IF The primary email send operation has failed
AND The system prepares to resend the email
THEN:
• The system sets AEI9999 as the first backup recipient and OM01247 as the second backup recipient
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when primary email send has failed and backup recipients have been configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The primary email send has failed and backup recipients have been configured
Applied to: Call EMCSEND3 for Backup Send
Action: The system attempts backup email delivery
Logic Flow:
IF The primary email send has failed and backup recipients have been configured
AND The system attempts backup email delivery
THEN:
• The system calls EMCSEND3 again with the backup recipient configuration
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when both primary and backup email send attempts have failed.
Trigger Criteria:
Context: Both primary and backup email send attempts have failed
Applied to: Log Email Send Failure
Action: The system processes the complete delivery failure
Logic Flow:
IF Both primary and backup email send attempts have failed
AND The system processes the complete delivery failure
THEN:
• The system logs the error message 'SEND TO FILE OF OM01247 FAILED' and triggers error handling
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when email processing has completed either successfully or with failure.
Trigger Criteria:
Context: Email processing has completed either successfully or with failure
Applied to: Purge Message Queue
Action: The system performs cleanup operations
Logic Flow:
IF Email processing has completed either successfully or with failure
AND The system performs cleanup operations
THEN:
• The system purges the message queue and resets the accept status
R-GCX015E-cbl-00322 (+7)File: GCX015E.cblBusiness Rule: Process Train Arrival Events
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when train record exists with status indicators for acknowledgment and arrival pending.
Trigger Criteria:
Context: A train record exists with status indicators for acknowledgment and arrival pending
Applied to: Check Train Status Conditions
Action: The system checks if the train is both acknowledged AND has arrived-pending status
Logic Flow:
IF A train record exists with status indicators for acknowledgment and arrival pending
AND The system checks if the train is both acknowledged AND has arrived-pending status
THEN:
• The system should proceed with arrival processing only if both conditions are met, otherwise skip arrival processing
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when train arrival event is being processed.
Trigger Criteria:
Context: A train arrival event is being processed
Applied to: Set Action Code to 'TAR'
Action: The system prepares the arrival transaction message
Logic Flow:
IF A train arrival event is being processed
AND The system prepares the arrival transaction message
THEN:
• The action code should be set to 'TAR' to indicate train arrival
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when train arrival event is being processed.
Trigger Criteria:
Context: A train arrival event is being processed
Applied to: Mark as US Train Type
Action: The system sets the train type indicator
Logic Flow:
IF A train arrival event is being processed
AND The system sets the train type indicator
THEN:
• The train should be marked as US train type
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when train arrival event is being recorded.
Trigger Criteria:
Context: A train arrival event is being recorded
Applied to: Set Event Date from Machine Date
Action: The system sets the event date
Logic Flow:
IF A train arrival event is being recorded
AND The system sets the event date
THEN:
• The event date should be populated with the current machine date including century
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when train arrival event is being recorded.
Trigger Criteria:
Context: A train arrival event is being recorded
Applied to: Set Event Time from Machine Time
Action: The system sets the event time
Logic Flow:
IF A train arrival event is being recorded
AND The system sets the event time
THEN:
• The event time should be populated with the first 4 digits of the current machine time
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when train arrival event is being processed for a specific train.
Trigger Criteria:
Context: A train arrival event is being processed for a specific train
Applied to: Set Train ID from US Customer Train ID
Action: The system populates the train identifier in the arrival message
Logic Flow:
IF A train arrival event is being processed for a specific train
AND The system populates the train identifier in the arrival message
THEN:
• The train ID should be set to the US customer train ID from the train record
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when train arrival event message is being prepared.
Trigger Criteria:
Context: A train arrival event message is being prepared
Applied to: Set Security Byte to High Value
Action: The system sets the security classification
Logic Flow:
IF A train arrival event message is being prepared
AND The system sets the security classification
THEN:
• The security byte should be set to high value to ensure proper security handling
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when complete train arrival message has been prepared with all required fields.
Trigger Criteria:
Context: A complete train arrival message has been prepared with all required fields
Applied to: Write Train Arrival Message to Queue
Action: The system submits the message for processing
Logic Flow:
IF A complete train arrival message has been prepared with all required fields
AND The system submits the message for processing
THEN:
• The message should be written to the message queue using the GCT1121E message format
R-GCX015E-cbl-00330 (+11)File: GCX015E.cblBusiness Rule: Retrieve Broker Contact Information
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo shipment record exists with freight forwarder information in gcus-n102-name field.
Trigger Criteria:
Context: A cargo shipment record exists with freight forwarder information in GCUS-N102-NAME field
Applied to: Get Freight Forwarder Name from Cargo Data
Action: The system needs to retrieve broker contact information for the freight forwarder
Logic Flow:
IF A cargo shipment record exists with freight forwarder information in GCUS-N102-NAME field
AND The system needs to retrieve broker contact information for the freight forwarder
THEN:
• The freight forwarder name is extracted from GCUS-N102-NAMEand used to build the broker lookup key
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when freight forwarder name is available from the cargo data.
Trigger Criteria:
Context: A freight forwarder name is available from the cargo data
Applied to: Build Broker Key with FW= Prefix
Action: The system builds a broker lookup key for database retrieval
Logic Flow:
IF A freight forwarder name is available from the cargo data
AND The system builds a broker lookup key for database retrieval
THEN:
• The key is constructed by concatenating 'FW=' prefix with the freight forwarder name and stored in GCWUSIO-GCST2RT-KEY
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when broker lookup key has been constructed with fw= prefix and freight forwarder name.
Trigger Criteria:
Context: A broker lookup key has been constructed with FW= prefix and freight forwarder name
Applied to: Retrieve Broker Short Name from GCST2RT
Action: The system queries the GCST2RT broker master table
Logic Flow:
IF A broker lookup key has been constructed with FW= prefix and freight forwarder name
AND The system queries the GCST2RT broker master table
THEN:
• The broker short name is retrieved and stored in GCT2-BROKER-NAME-SHORT field
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when broker lookup has been performed on the gcst2rt table.
Trigger Criteria:
Context: A broker lookup has been performed on the GCST2RT table
Applied to: Broker Short Name Found?
Action: The database query returns a status code indicating the broker was not found
Logic Flow:
IF A broker lookup has been performed on the GCST2RT table
AND The database query returns a status code indicating the broker was not found
THEN:
• The broker name segment is initialized to empty values and processing continues
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when valid broker short name exists and location information is available from cargo data.
Trigger Criteria:
Context: A valid broker short name exists and location information is available from cargo data
Applied to: Build Broker Info Key with Short Name and Location
Action: The system needs to retrieve detailed broker contact information
Logic Flow:
IF A valid broker short name exists and location information is available from cargo data
AND The system needs to retrieve detailed broker contact information
THEN:
• A lookup key is built by concatenating broker short name with either M1203-LOCATION-ID1orP401-LOCATION-IDand stored in GCSTBRT-KEY-SEQID
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when broker detail lookup key has been constructed with short name and location.
Trigger Criteria:
Context: A broker detail lookup key has been constructed with short name and location
Applied to: Retrieve Broker Details from BK Table
Action: The system queries the BK table with table ID 'BK'
Logic Flow:
IF A broker detail lookup key has been constructed with short name and location
AND The system queries the BK table with table ID 'BK'
THEN:
• The broker contact details are retrieved and stored in GCSTBRT-BK-SEGMENT
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when broker details lookup has been performed on the bk table.
Trigger Criteria:
Context: A broker details lookup has been performed on the BK table
Applied to: Broker Details Found?
Action: The database query returns a non-zero status code indicating broker details were not found
Logic Flow:
IF A broker details lookup has been performed on the BK table
AND The database query returns a non-zero status code indicating broker details were not found
THEN:
• The broker details segment is initialized to empty values and processing terminates
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when valid broker contact details exist in gcstbrt-bk-segment.
Trigger Criteria:
Context: Valid broker contact details exist in GCSTBRT-BK-SEGMENT
Applied to: Retrieve Internet Address from B1 Table
Action: The system queries the B1 table with table ID 'B1' using the same lookup key
Logic Flow:
IF Valid broker contact details exist in GCSTBRT-BK-SEGMENT
AND The system queries the B1 table with table ID 'B1' using the same lookup key
THEN:
• The internet address information is retrieved and stored in GCSTBRT-B1-SEGMENT
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when internet address lookup has been performed on the b1 table.
Trigger Criteria:
Context: An internet address lookup has been performed on the B1 table
Applied to: Internet Address Found?
Action: The database query returns a non-zero status code indicating internet address was not found
Logic Flow:
IF An internet address lookup has been performed on the B1 table
AND The database query returns a non-zero status code indicating internet address was not found
THEN:
• The internet address segment is initialized to empty values and processing terminates
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when valid broker details exist with internet communication preference setting.
Trigger Criteria:
Context: Valid broker details exist with internet communication preference setting
Applied to: Use Internet Communication?
Action: The system checks the GCSTBRT-BK-USE-INTERNET field
Logic Flow:
IF Valid broker details exist with internet communication preference setting
AND The system checks the GCSTBRT-BK-USE-INTERNET field
THEN:
• If the value equals 'Y', internet communication is enabled; otherwise, standard communication methods are used
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when broker has internet communication enabled (gcstbrt-bk-use-internet = 'y') and valid internet address exists.
Trigger Criteria:
Context: Broker has internet communication enabled (GCSTBRT-BK-USE-INTERNET = 'Y') and valid internet address exists
Applied to: Set Email Address for External Mail
Action: The system configures email notification settings
Logic Flow:
IF Broker has internet communication enabled (GCSTBRT-BK-USE-INTERNET = 'Y') and valid internet address exists
AND The system configures email notification settings
THEN:
• The email text line is populated with 'INTERNET: ' prefix followed by the broker's internet address from GCSTBRT-B1-INTERNET-ADDRESS, and email destination is set to 'EXTMAIL'
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when internet communication has been successfully configured for the broker. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Internet communication has been successfully configured for the broker
Applied to: Set Freight Forwarder Email Flag
Action: The system finalizes email notification setup
Logic Flow:
IF Internet communication has been successfully configured for the broker
AND The system finalizes email notification setup
THEN:
• The WS-EMAIL-TO-FREIGHT-FRWDR flag is set to TRUE to indicate freight forwarder email notifications are enabled
R-GCX015E-cbl-00342 (+12)File: GCX015E.cblBusiness Rule: Format Email Content for Warnings
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record exists with secondary segments containing party information.
Trigger Criteria:
Context: A cargo record exists with secondary segments containing party information
Applied to: Get Freight Forwarder Data
Action: The system processes secondary segments with record type '03' for freight forwarder (N101 code) and consignee information
Logic Flow:
IF A cargo record exists with secondary segments containing party information
AND The system processes secondary segments with record type '03' for freight forwarder (N101 code) and consignee information
THEN:
• The system identifies freight forwarder when N101 code indicates forwarder role and captures consignee name when N101 code indicates consignee role
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when freight forwarder name has been identified from cargo segments.
Trigger Criteria:
Context: A freight forwarder name has been identified from cargo segments
Applied to: Get Broker Short Name
Action: The system searches the broker name table using 'FW=' prefix concatenated with the freight forwarder name
Logic Flow:
IF A freight forwarder name has been identified from cargo segments
AND The system searches the broker name table using 'FW=' prefix concatenated with the freight forwarder name
THEN:
• The system retrieves the corresponding broker short name if found, otherwise initializes empty broker name segment
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when broker short name exists and broker contact information is available.
Trigger Criteria:
Context: A broker short name exists and broker contact information is available
Applied to: Get Broker Contact Information
Action: The system checks the broker's internet usage preference flag
Logic Flow:
IF A broker short name exists and broker contact information is available
AND The system checks the broker's internet usage preference flag
THEN:
• If broker uses internet (flag = 'Y'), system sets email destination to 'EXTMAIL', formats internet address in email text, and marks for freight forwarder email delivery, otherwise uses default contact method
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when cbp warning message needs to be sent via email.
Trigger Criteria:
Context: A CBP warning message needs to be sent via email
Applied to: Format Email Subject Line
Action: The system formats the email subject line
Logic Flow:
IF A CBP warning message needs to be sent via email
AND The system formats the email subject line
THEN:
• The system uses the predefined email subject format for CBP warnings
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo equipment information is available from the cargo record.
Trigger Criteria:
Context: Cargo equipment information is available from the cargo record
Applied to: Format Equipment Information Line
Action: The system formats equipment information for email content
Logic Flow:
IF Cargo equipment information is available from the cargo record
AND The system formats equipment information for email content
THEN:
• The system includes the car identification number in the formatted equipment line
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill information exists in the cargo record.
Trigger Criteria:
Context: Waybill information exists in the cargo record
Applied to: Format Waybill Information Line
Action: The system formats waybill information for email content
Logic Flow:
IF Waybill information exists in the cargo record
AND The system formats waybill information for email content
THEN:
• The system concatenates road index, station index, and waybill index into a formatted waybill line
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment load/empty status is available in the cargo record.
Trigger Criteria:
Context: Equipment load/empty status is available in the cargo record
Applied to: Format Load/Empty Indicator Line
Action: The system formats load/empty indicator for email content
Logic Flow:
IF Equipment load/empty status is available in the cargo record
AND The system formats load/empty indicator for email content
THEN:
• The system includes the load/empty code in the formatted indicator line
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo content description is available in the system.
Trigger Criteria:
Context: Cargo content description is available in the system
Applied to: Format Content Description Line
Action: The system formats content description for email content
Logic Flow:
IF Cargo content description is available in the system
AND The system formats content description for email content
THEN:
• The system includes the long description of the cargo content in the formatted content line
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when k3 segment contains date and time information.
Trigger Criteria:
Context: K3 segment contains date and time information
Applied to: Format Date and Time Information
Action: The system formats date and time for email display
Logic Flow:
IF K3 segment contains date and time information
AND The system formats date and time for email display
THEN:
• The system combines machine century with K3 date to create full year, extracts month and day from K3 date, and extracts hour and minute from K3 time
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when origin station information is available from shipment data.
Trigger Criteria:
Context: Origin station information is available from shipment data
Applied to: Format Origin Station Information
Action: The system formats origin station information for email content
Logic Flow:
IF Origin station information is available from shipment data
AND The system formats origin station information for email content
THEN:
• The system concatenates origin station name with province/state code separated by comma and space
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when destination station information is available from shipment data.
Trigger Criteria:
Context: Destination station information is available from shipment data
Applied to: Format Destination Station Information
Action: The system formats destination station information for email content
Logic Flow:
IF Destination station information is available from shipment data
AND The system formats destination station information for email content
THEN:
• The system concatenates destination station name with province/state code separated by comma and space
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when k1 segment contains a cbp warning message.
Trigger Criteria:
Context: A K1 segment contains a CBP warning message
Applied to: Format CBP Warning Message
Action: The system formats the CBP warning message for email content
Logic Flow:
IF A K1 segment contains a CBP warning message
AND The system formats the CBP warning message for email content
THEN:
• The system includes the free-form message text from the K1 segment in the formatted warning message line
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when date and time components have been extracted from k3 segment.
Trigger Criteria:
Context: Date and time components have been extracted from K3 segment
Applied to: Format Occurrence Date/Time
Action: The system formats the occurrence date and time for email content
Logic Flow:
IF Date and time components have been extracted from K3 segment
AND The system formats the occurrence date and time for email content
THEN:
• The system concatenates formatted date with formatted time separated by space to create occurrence timestamp
R-GCX015E-cbl-00355 (+6)File: GCX015E.cblBusiness Rule: Connect to Message Queue
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when system needs to process customs messages from the message queue. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system needs to process customs messages from the message queue
Applied to: Call MQCONNC to Connect to Message Queue Manager
Action: A connection request is made to the message queue manager
Logic Flow:
IF The system needs to process customs messages from the message queue
AND A connection request is made to the message queue manager
THEN:
• The system should establish a successful connection to enable message processing
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when connection attempt has been made to the message queue manager.
Trigger Criteria:
Context: A connection attempt has been made to the message queue manager
Applied to: Connection Successful?
Action: The connection completion code is evaluated
Logic Flow:
IF A connection attempt has been made to the message queue manager
AND The connection completion code is evaluated
THEN:
• The system should determine if the connection was successful or failed
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when message queue connection attempt has failed.
Trigger Criteria:
Context: The message queue connection attempt has failed
Applied to: Get Error Reason Code
Action: The connection completion code indicates failure
Logic Flow:
IF The message queue connection attempt has failed
AND The connection completion code indicates failure
THEN:
• The system should capture the specific reason code for the connection failure
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when message queue connection failure has occurred with a specific reason code.
Trigger Criteria:
Context: A message queue connection failure has occurred with a specific reason code
Applied to: Format Error Message with Reason Code
Action: An error message needs to be formatted
Logic Flow:
IF A message queue connection failure has occurred with a specific reason code
AND An error message needs to be formatted
THEN:
• The system should create a formatted error message that includes the reason code and descriptive text
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when message queue connection error has occurred.
Trigger Criteria:
Context: A message queue connection error has occurred
Applied to: Set Transaction Set to '355'
Action: Error information is being prepared for logging
Logic Flow:
IF A message queue connection error has occurred
AND Error information is being prepared for logging
THEN:
• The system should set the transaction set identifier to '355'
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when message queue connection error has occurred.
Trigger Criteria:
Context: A message queue connection error has occurred
Applied to: Set Error Text to 'MQCONN FAILED'
Action: Error description is being set
Logic Flow:
IF A message queue connection error has occurred
AND Error description is being set
THEN:
• The system should set the program error text to 'MQCONN FAILED'
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when message queue connection has failed and error information has been prepared.
Trigger Criteria:
Context: Message queue connection has failed and error information has been prepared
Applied to: Abort Processing with Error Message
Action: The system determines that processing cannot continue
Logic Flow:
IF Message queue connection has failed and error information has been prepared
AND The system determines that processing cannot continue
THEN:
• The system should abort processing and report the connection error
R-GCX015E-cbl-00362 (+8)File: GCX015E.cblBusiness Rule: Open Message Queue
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when system needs to access customs transaction messages from a message queue.
Trigger Criteria:
Context: The system needs to access customs transaction messages from a message queue
Applied to: Set Queue Object Type
Action: The queue configuration process begins
Logic Flow:
IF The system needs to access customs transaction messages from a message queue
AND The queue configuration process begins
THEN:
• The queue object type should be set to standard queue type for message retrieval
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when system has a configured queue name for customs messages in mqtmc-qname.
Trigger Criteria:
Context: The system has a configured queue name for customs messages in MQTMC-QNAME
Applied to: Set Queue Name from MQTMC-QNAME
Action: The queue opening process requires queue identification
Logic Flow:
IF The system has a configured queue name for customs messages in MQTMC-QNAME
AND The queue opening process requires queue identification
THEN:
• The queue name should be set from the MQTMC-QNAME configuration value
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when system needs to read customs transaction messages from the queue. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system needs to read customs transaction messages from the queue
Applied to: Set Input Options for Queue
Action: Queue access options are being configured
Logic Flow:
IF The system needs to read customs transaction messages from the queue
AND Queue access options are being configured
THEN:
• The queue options should be set to input-as-queue-defined to enable message reading
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when queue type, name, and access options are configured. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The queue type, name, and access options are configured
Applied to: Call MQOPEN to Open Queue
Action: The system attempts to open the message queue connection
Logic Flow:
IF The queue type, name, and access options are configured
AND The system attempts to open the message queue connection
THEN:
• The MQOPEN service should be invoked with the connection handle, queue descriptor, options, and response parameters
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when system attempts to open a customs message queue.
Trigger Criteria:
Context: The system attempts to open a customs message queue
Applied to: Queue Not Found Error?
Action: The queue open operation fails with reason code 2085 indicating queue not found
Logic Flow:
IF The system attempts to open a customs message queue
AND The queue open operation fails with reason code 2085 indicating queue not found
THEN:
• The system should return to main processing without generating an error
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when system has attempted to open the customs message queue.
Trigger Criteria:
Context: The system has attempted to open the customs message queue
Applied to: Queue Open Successful?
Action: The queue open operation completes
Logic Flow:
IF The system has attempted to open the customs message queue
AND The queue open operation completes
THEN:
• If the completion code equals MQCC-OK, the queue is successfully opened, otherwise it has failed
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when customs message queue open operation has failed with an error other than queue not found. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The customs message queue open operation has failed with an error other than queue not found
Applied to: Generate MQ Error Message
Action: Error information needs to be generated
Logic Flow:
IF The customs message queue open operation has failed with an error other than queue not found
AND Error information needs to be generated
THEN:
• The system should call GCCMQERR service to convert the reason code to descriptive error text and format it with the reason code
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when customs message queue error has occurred and error message has been generated.
Trigger Criteria:
Context: A customs message queue error has occurred and error message has been generated
Applied to: Set Error Details
Action: Error context needs to be established
Logic Flow:
IF A customs message queue error has occurred and error message has been generated
AND Error context needs to be established
THEN:
• The transaction set should be set to '355', program error text should be set to 'MQOPEN FAILED', and the complete error message should be prepared
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when critical customs message queue error has occurred and error details have been set.
Trigger Criteria:
Context: A critical customs message queue error has occurred and error details have been set
Applied to: Abort Processing
Action: The system cannot continue normal processing
Logic Flow:
IF A critical customs message queue error has occurred and error details have been set
AND The system cannot continue normal processing
THEN:
• The system should invoke the Z900-ABEND procedure to terminate processing
R-GCX015E-cbl-00371 (+9)File: GCX015E.cblBusiness Rule: Read Messages from Queue
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when system is connected to the message queue. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: The system is connected to the message queue
Applied to: Call MQGET to Retrieve Message
Action: A message retrieval request is made
Logic Flow:
IF The system is connected to the message queue
AND A message retrieval request is made
THEN:
• The system calls MQGET to retrieve the next available message from the queue
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when message retrieval attempt has been made.
Trigger Criteria:
Context: A message retrieval attempt has been made
Applied to: Message Successfully Retrieved
Action: The message queue completion code equals MQCC-OK
Logic Flow:
IF A message retrieval attempt has been made
AND The message queue completion code equals MQCC-OK
THEN:
• The message is considered successfully retrieved for processing
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when message retrieval attempt has been made.
Trigger Criteria:
Context: A message retrieval attempt has been made
Applied to: Set End of Queue Flag
Action: The completion code is MQCC-FAILED and the reason code is MQRC-NO-MSG-AVAILABLE
Logic Flow:
IF A message retrieval attempt has been made
AND The completion code is MQCC-FAILED and the reason code is MQRC-NO-MSG-AVAILABLE
THEN:
• The system sets the end of message queue flag to true
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when message has been successfully retrieved from the queue.
Trigger Criteria:
Context: A message has been successfully retrieved from the queue
Applied to: Message Too Short Check
Action: The calculated maximum message entries is less than 1
Logic Flow:
IF A message has been successfully retrieved from the queue
AND The calculated maximum message entries is less than 1
THEN:
• The system generates a user abend 355 error for message too short
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when message has been successfully retrieved from the queue.
Trigger Criteria:
Context: A message has been successfully retrieved from the queue
Applied to: Message Backout Count Check
Action: The message backout count equals 0
Logic Flow:
IF A message has been successfully retrieved from the queue
AND The message backout count equals 0
THEN:
• The message is marked as good for processing, otherwise it is marked to be skipped
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when message has been retrieved with valid data length.
Trigger Criteria:
Context: A message has been retrieved with valid data length
Applied to: Calculate Number of Message Entries
Action: The system processes the message structure
Logic Flow:
IF A message has been retrieved with valid data length
AND The system processes the message structure
THEN:
• The maximum message entries is calculated as (data length minus header length minus unused length) divided by single entry length
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when message has been retrieved with completion code mqcc-ok and backout count of 0.
Trigger Criteria:
Context: A message has been retrieved with completion code MQCC-OK and backout count of 0
Applied to: Set Good Message Found Flag
Action: The message passes all initial validations
Logic Flow:
IF A message has been retrieved with completion code MQCC-OK and backout count of 0
AND The message passes all initial validations
THEN:
• The system sets the good message found flag to true
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when message has been retrieved with completion code mqcc-ok.
Trigger Criteria:
Context: A message has been retrieved with completion code MQCC-OK
Applied to: Set Skip Message Flag
Action: The message backout count is not equal to 0
Logic Flow:
IF A message has been retrieved with completion code MQCC-OK
AND The message backout count is not equal to 0
THEN:
• The system sets the skip message flag to true
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when message retrieval attempt has failed.
Trigger Criteria:
Context: A message retrieval attempt has failed
Applied to: Generate MQ Error Message
Action: The completion code indicates an error other than no messages available
Logic Flow:
IF A message retrieval attempt has failed
AND The completion code indicates an error other than no messages available
THEN:
• The system generates an MQ error message with reason code and description, sets transaction code to 355, and prepares for abend
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when critical error has occurred during message processing.
Trigger Criteria:
Context: A critical error has occurred during message processing
Applied to: Set Error Status and Abend
Action: Either the message is too short or a message queue error has occurred
Logic Flow:
IF A critical error has occurred during message processing
AND Either the message is too short or a message queue error has occurred
THEN:
• The system performs an abend to terminate processing
R-GCX015E-cbl-00381 (+3)File: GCX015E.cblBusiness Rule: Check Manifest Type Code
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when manifest record is being processed.
Trigger Criteria:
Context: A manifest record is being processed
Applied to: Set SHOULD-UPDATE-STATUS Flag
Action: The manifest type code is P (Preliminary), Y (Yes/Confirmed), or S (Special)
Logic Flow:
IF A manifest record is being processed
AND The manifest type code is P (Preliminary), Y (Yes/Confirmed), or S (Special)
THEN:
• The system sets the SHOULD-UPDATE-STATUS flag to true
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when manifest record is being processed.
Trigger Criteria:
Context: A manifest record is being processed
Applied to: Set SHOULD-NOT-UPDATE-STATUS Flag
Action: The manifest type code is not P, Y, S, or H
Logic Flow:
IF A manifest record is being processed
AND The manifest type code is not P, Y, S, or H
THEN:
• The system sets the SHOULD-NOT-UPDATE-STATUS flag to true
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when train manifest record is being processed.
Trigger Criteria:
Context: A train manifest record is being processed
Applied to: Set SHOULD-DELETE-STATUS Flag and Set SHOULD-UPDATE-STATUS Flag
Action: The manifest type code is H (Hold) and the processing type is TRAIN
Logic Flow:
IF A train manifest record is being processed
AND The manifest type code is H (Hold) and the processing type is TRAIN
THEN:
• The system sets both SHOULD-DELETE-STATUS flag andSHOULD-UPDATE-STATUS flag to true
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when cargo manifest record is being processed.
Trigger Criteria:
Context: A cargo manifest record is being processed
Applied to: Set SHOULD-NOT-UPDATE-STATUS Flag
Action: The manifest type code is H (Hold) and the processing type is CARGO
Logic Flow:
IF A cargo manifest record is being processed
AND The manifest type code is H (Hold) and the processing type is CARGO
THEN:
• The system sets the SHOULD-NOT-UPDATE-STATUS flag to true
Business Justification: Establishes the required business protocol to be followed when k1 message segment is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Information
Action: The K1-02-MSG-NUMBER equals '000'
Logic Flow:
IF A K1 message segment is being processed
AND The K1-02-MSG-NUMBER equals '000'
THEN:
• The message severity is set to Information (MSG-SEV-I) and the processing status is set to acknowledged (WS-ACK-STATUS)
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when k1 message segment is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Fatal
Action: The K1-02-MSG-NUMBER equals '009' OR '017' OR '038' OR '040' OR '291' OR '630'
Logic Flow:
IF A K1 message segment is being processed
AND The K1-02-MSG-NUMBER equals '009' OR '017' OR '038' OR '040' OR '291' OR '630'
THEN:
• The message severity is set to Fatal (MSG-SEV-F) and the processing status is set to error (WS-ERROR-STATUS)
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when k1 message segment is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Warning
Action: The K1-02-MSG-NUMBER equals '631' OR '632' OR '633' OR '634' OR '695' OR '696' OR '697' OR '698' OR '699'
Logic Flow:
IF A K1 message segment is being processed
AND The K1-02-MSG-NUMBER equals '631' OR '632' OR '633' OR '634' OR '695' OR '696' OR '697' OR '698' OR '699'
THEN:
• The message severity is set to Warning (MSG-SEV-W) and the processing status is set to acknowledged (WS-ACK-STATUS)
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when k1 message segment is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Unknown
Action: The K1-02-MSG-NUMBER does not equal '000' AND does not equal any of '009','017','038','040','291','630' AND does not equal any of '631','632','633','634','695','696','697','698','699'
Logic Flow:
IF A K1 message segment is being processed
AND The K1-02-MSG-NUMBER does not equal '000' AND does not equal any of '009','017','038','040','291','630' AND does not equal any of '631','632','633','634','695','696','697','698','699'
THEN:
• The message severity is set to Unknown (MSG-SEV-U) and the processing status is set to acknowledged (WS-ACK-STATUS)
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when k1 message segment is being processed.
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Store Message for Logging
Action: The K1-02-FREE-FORM-MESSAGE is not equal to spaces
Logic Flow:
IF A K1 message segment is being processed
AND The K1-02-FREE-FORM-MESSAGE is not equal to spaces
THEN:
• The free-form message is moved to MRLN-LINES for display, the line count is incremented, the message is formatted as WORK-LOG-MESSAGEand stored in HOLD-K1-MESSAGE array, and the K1-CNT counter is incremented
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when k1 message has been classified as warning severity.
Trigger Criteria:
Context: A K1 message has been classified as warning severity
Applied to: Trigger Email Warning Process
Action: The K1-02-MSG-NUMBER equals '695' OR '697' OR '699'
Logic Flow:
IF A K1 message has been classified as warning severity
AND The K1-02-MSG-NUMBER equals '695' OR '697' OR '699'
THEN:
• The email warning process is triggered by performing C100-SEND-EMAIL-WARNING
R-GCX015E-cbl-00391 (+8)File: GCX015E.cblBusiness Rule: Process Warning Messages for Email Notification
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when k1 message segment is being processed.
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Process K1 Warning Message
Action: The K1 message number is 695, 697, or 699
Logic Flow:
IF A K1 message segment is being processed
AND The K1 message number is 695, 697, or 699
THEN:
• The system should initiate email warning notification process
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when warning message requires email notification and shipment data exists.
Trigger Criteria:
Context: A warning message requires email notification and shipment data exists
Applied to: Retrieve Freight Forwarder Information
Action: The system processes secondary segments with record type 03 and entity qualifier N101 indicates forwarder
Logic Flow:
IF A warning message requires email notification and shipment data exists
AND The system processes secondary segments with record type 03 and entity qualifier N101 indicates forwarder
THEN:
• The freight forwarder information should be retrieved and marked as found
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when shipment secondary segments are being processed.
Trigger Criteria:
Context: Shipment secondary segments are being processed
Applied to: Retrieve Freight Forwarder Information
Action: A record type 03 segment has entity qualifier N101 indicating consignee
Logic Flow:
IF Shipment secondary segments are being processed
AND A record type 03 segment has entity qualifier N101 indicating consignee
THEN:
• The consignee name should be extracted from N102 field and marked as found
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when freight forwarder information has been found in shipment data.
Trigger Criteria:
Context: Freight forwarder information has been found in shipment data
Applied to: Get Freight Forwarder Contact Details
Action: The system queries broker name segment using freight forwarder name prefixed with 'FW='
Logic Flow:
IF Freight forwarder information has been found in shipment data
AND The system queries broker name segment using freight forwarder name prefixed with 'FW='
THEN:
• The broker short name should be retrieved from the broker name segment if found
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when broker short name is available and location id exists.
Trigger Criteria:
Context: Broker short name is available and location ID exists
Applied to: Retrieve Broker Contact Information
Action: The system queries broker segment (BK) and internet segment (B1) using broker short name and location ID
Logic Flow:
IF Broker short name is available and location ID exists
AND The system queries broker segment (BK) and internet segment (B1) using broker short name and location ID
THEN:
• If broker uses internet communication, the internet address should be retrieved and email delivery should be enabled to freight forwarder
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when warning email notification is being prepared.
Trigger Criteria:
Context: Warning email notification is being prepared
Applied to: Retrieve Shipment Root Data
Action: The system calls shipment root retrieval using the waybill key from cargo data
Logic Flow:
IF Warning email notification is being prepared
AND The system calls shipment root retrieval using the waybill key from cargo data
THEN:
• Shipment root data should be retrieved for inclusion in email content
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when warning message 695, 697, or 699 requires email notification and shipment data is available.
Trigger Criteria:
Context: Warning message 695, 697, or 699 requires email notification and shipment data is available
Applied to: Format Email Content for Warnings
Action: The system formats email content with equipment details, waybill information, CCN data, load/empty indicator, content description, origin/destination stations, consignee information, CBP warning message, and occurrence timestamp
Logic Flow:
IF Warning message 695, 697, or 699 requires email notification and shipment data is available
AND The system formats email content with equipment details, waybill information, CCN data, load/empty indicator, content description, origin/destination stations, consignee information, CBP warning message, and occurrence timestamp
THEN:
• A complete formatted email should be prepared with all shipment details and warning information
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when email content is formatted and recipient information is available.
Trigger Criteria:
Context: Email content is formatted and recipient information is available
Applied to: Send Merlin Email Messages
Action: The system calls Merlin email service with formatted content and recipient details
Logic Flow:
IF Email content is formatted and recipient information is available
AND The system calls Merlin email service with formatted content and recipient details
THEN:
• The warning email should be sent to freight forwarder if internet address is available, otherwise to default recipient
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when warning email has been processed through merlin messaging system.
Trigger Criteria:
Context: Warning email has been processed through Merlin messaging system
Applied to: Set Do Not Send Warning Flag
Action: The email sending process completes regardless of success or failure
Logic Flow:
IF Warning email has been processed through Merlin messaging system
AND The email sending process completes regardless of success or failure
THEN:
• The do-not-send-warning flag should be set to prevent duplicate email attempts
R-GCX015E-cbl-00400 (+6)File: GCX015E.cblBusiness Rule: Evaluate Train Status for Acknowledgment Type
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when k3 segment is being processed for us customs response.
Trigger Criteria:
Context: A K3 segment is being processed for US Customs response
Applied to: Total Reject Count = 0? & Set Error Status - Has Rejects
Action: The total reject count in the K3 segment is greater than zero
Logic Flow:
IF A K3 segment is being processed for US Customs response
AND The total reject count in the K3 segment is greater than zero
THEN:
• Set error status indicating the transaction has rejections
• Set error status to indicate transaction rejections
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when k3 segment is being processed with zero reject counts.
Trigger Criteria:
Context: A K3 segment is being processed with zero reject counts
Applied to: Total Accept Count > 0?
Action: The total accept count in the K3 segment is zero
Logic Flow:
IF A K3 segment is being processed with zero reject counts
AND The total accept count in the K3 segment is zero
THEN:
• Log zero counts message and set acknowledgment status
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when k3 segment is being processed with zero reject counts.
Trigger Criteria:
Context: A K3 segment is being processed with zero reject counts
Applied to: Set Error Status - Zero Counts
Action: The total accept count is also zero
Logic Flow:
IF A K3 segment is being processed with zero reject counts
AND The total accept count is also zero
THEN:
• Log 'USCS K3 RECORD HAS ZERO COUNTS' message and set acknowledgment status
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when k3 segment has zero rejects and positive accept counts for a train.
Trigger Criteria:
Context: A K3 segment has zero rejects and positive accept counts for a train
Applied to: Current Train Status?
Action: The train status is Pre-Arrived
Logic Flow:
IF A K3 segment has zero rejects and positive accept counts for a train
AND The train status is Pre-Arrived
THEN:
• Set pre-arrival acknowledgment status
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when k3 segment has zero rejects and positive accept counts for a train.
Trigger Criteria:
Context: A K3 segment has zero rejects and positive accept counts for a train
Applied to: Current Train Status?
Action: The train status is Review Complete
Logic Flow:
IF A K3 segment has zero rejects and positive accept counts for a train
AND The train status is Review Complete
THEN:
• Set review completed acknowledgment status
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when k3 segment has zero rejects and positive accept counts for a train.
Trigger Criteria:
Context: A K3 segment has zero rejects and positive accept counts for a train
Applied to: Current Train Status?
Action: The train status is neither Pre-Arrived nor Review Complete
Logic Flow:
IF A K3 segment has zero rejects and positive accept counts for a train
AND The train status is neither Pre-Arrived nor Review Complete
THEN:
• Set standard acknowledgment status
R-GCX015E-cbl-00407 (+2)File: GCX015E.cblBusiness Rule: Determine Train Status Update Logic
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when train record exists with current status as deleted and acknowledgment status is received.
Trigger Criteria:
Context: A train record exists with current status as DELETED and acknowledgment status is received
Applied to: Set Train Status to 'DELETED'
Action: The system processes the train status update logic
Logic Flow:
IF A train record exists with current status as DELETED and acknowledgment status is received
AND The system processes the train status update logic
THEN:
• The train current status should be set to 'DELETED', security context should be cleared, and the train record should be updated with root-only replacement
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when train record exists with current status as delete-pending and acknowledgment status is received.
Trigger Criteria:
Context: A train record exists with current status as DELETE-PENDING and acknowledgment status is received
Applied to: Set Train Status to 'DELETED'
Action: The system processes the train status update logic
Logic Flow:
IF A train record exists with current status as DELETE-PENDING and acknowledgment status is received
AND The system processes the train status update logic
THEN:
• The train current status should be set to 'DELETED', security context should be cleared, and the train record should be updated with root-only replacement
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when train record exists with status that is neither deleted nor delete-pending. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A train record exists with status that is neither DELETED nor DELETE-PENDING
Applied to: Set Train Status to Current WS-STATUS
Action: The system processes the train status update logic
Logic Flow:
IF A train record exists with status that is neither DELETED nor DELETE-PENDING
AND The system processes the train status update logic
THEN:
• The train current status should be set to the current working status, the train record should be updated with root-only replacement, AEI train send check should be performed, andif the train is acknowledged and has arrived-pending status, the train arrival process should be triggered
R-GCX015E-cbl-00410 (+5)File: GCX015E.cblBusiness Rule: Handle Cargo Status Restoration Logic
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo shipment has acknowledgment status and previous status description save field is not empty.
Trigger Criteria:
Context: A cargo shipment has acknowledgment status AND previous status description save field is not empty
Applied to: Restore Previous Cargo Status from Save Fields
Action: The cargo status update process is executed
Logic Flow:
IF A cargo shipment has acknowledgment status AND previous status description save field is not empty
AND The cargo status update process is executed
THEN:
• The cargo status is restored from the saved status field AND the cargo description is restored from the saved description field
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when cargo shipment has acknowledgment status and previous status description save field is empty.
Trigger Criteria:
Context: A cargo shipment has acknowledgment status AND previous status description save field is empty
Applied to: Set Cargo Status to Acknowledged
Action: The cargo status update process is executed
Logic Flow:
IF A cargo shipment has acknowledgment status AND previous status description save field is empty
AND The cargo status update process is executed
THEN:
• The cargo status is set to acknowledged AND the cargo description is set to acknowledged
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo shipment has error status and current cargo status is not error and current cargo status is not acknowledgment and current cargo status is not acknowledgment-revised.
Trigger Criteria:
Context: A cargo shipment has error status AND current cargo status is not error AND current cargo status is not acknowledgment AND current cargo status is not acknowledgment-revised
Applied to: Save Current Status to Save Fields
Action: The cargo status update process is executed
Logic Flow:
IF A cargo shipment has error status AND current cargo status is not error AND current cargo status is not acknowledgment AND current cargo status is not acknowledgment-revised
AND The cargo status update process is executed
THEN:
• The current cargo status is saved to the save status field AND the current cargo description is saved to the save description field
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo shipment has error status and (current cargo status is error or current cargo status is acknowledgment or current cargo status is acknowledgment-revised).
Trigger Criteria:
Context: A cargo shipment has error status AND (current cargo status is error OR current cargo status is acknowledgment OR current cargo status is acknowledgment-revised)
Applied to: Skip Saving Current Status
Action: The cargo status update process is executed
Logic Flow:
IF A cargo shipment has error status AND (current cargo status is error OR current cargo status is acknowledgment OR current cargo status is acknowledgment-revised)
AND The cargo status update process is executed
THEN:
• No changes are made to the save status field AND no changes are made to the save description field
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo shipment has error status and cargo is not marked as deleted.
Trigger Criteria:
Context: A cargo shipment has error status AND cargo is not marked as deleted
Applied to: Set Cargo Status to Error
Action: The cargo status update process is executed
Logic Flow:
IF A cargo shipment has error status AND cargo is not marked as deleted
AND The cargo status update process is executed
THEN:
• The CP cargo status is set to error AND the US cargo status is set to error AND the US cargo description is set to error
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo status fields have been updated with new values.
Trigger Criteria:
Context: Cargo status fields have been updated with new values
Applied to: Update Cargo Record in Database
Action: The cargo database update is executed
Logic Flow:
IF Cargo status fields have been updated with new values
AND The cargo database update is executed
THEN:
• The cargo segment is updated in the database with the new status information
Business Justification: Ensures correct system behavior and process compliance when train record is being processed for aei send validation.
Trigger Criteria:
Context: A train record is being processed for AEI send validation
Applied to: Train Status = ACK?
Action: The system checks the train status
Logic Flow:
IF A train record is being processed for AEI send validation
AND The system checks the train status
THEN:
• AEI processing should only continue if the train status is ACK, otherwise skip AEI processing
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when train record with ack status is being validated for aei processing.
Trigger Criteria:
Context: A train record with ACK status is being validated for AEI processing
Applied to: AEI Send Flag = True?
Action: The system checks the AEI send flag
Logic Flow:
IF A train record with ACK status is being validated for AEI processing
AND The system checks the AEI send flag
THEN:
• AEI processing should only continue if the AEI send flag is true, otherwise skip AEI processing
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when train record with ack status and aei send flag enabled is being validated.
Trigger Criteria:
Context: A train record with ACK status and AEI send flag enabled is being validated
Applied to: Enroute Not Reported?
Action: The system checks the enroute reporting status
Logic Flow:
IF A train record with ACK status and AEI send flag enabled is being validated
AND The system checks the enroute reporting status
THEN:
• AEI processing should only continue if enroute status is not reported, otherwise skip AEI processing
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when train record that has passed ack status, aei send flag, and enroute status validations.
Trigger Criteria:
Context: A train record that has passed ACK status, AEI send flag, and enroute status validations
Applied to: Train ID Format Valid? Position 23 = 'T'
Action: The system checks the train ID format at position 23
Logic Flow:
IF A train record that has passed ACK status, AEI send flag, and enroute status validations
AND The system checks the train ID format at position 23
THEN:
• AEI processing should only continue if position 23 of the train ID contains 'T', otherwise skip AEI processing
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when train record is being evaluated for aei processing eligibility.
Trigger Criteria:
Context: A train record is being evaluated for AEI processing eligibility
Applied to: Set AEI Processing Conditions Met
Action: All conditions are met: train status is ACK AND AEI send flag is true AND enroute is not reported AND train ID position 23 equals 'T'
Logic Flow:
IF A train record is being evaluated for AEI processing eligibility
AND All conditions are met: train status is ACK AND AEI send flag is true AND enroute is not reported AND train ID position 23 equals 'T'
THEN:
• The system should set AEI processing conditions as met and proceed with customs transaction generation
Business Justification: Dictates the expected operational logic and validation steps when cbp warning message needs to be sent via email.
Trigger Criteria:
Context: A CBP warning message needs to be sent via email
Applied to: Set Email Subject Line
Action: The system prepares the email notification
Logic Flow:
IF A CBP warning message needs to be sent via email
AND The system prepares the email notification
THEN:
• The email subject line is set to the predefined warning subject format
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when email warning is being constructed.
Trigger Criteria:
Context: An email warning is being constructed
Applied to: Format Email Header Lines
Action: The system builds the email content structure
Logic Flow:
IF An email warning is being constructed
AND The system builds the email content structure
THEN:
• Three header lines are formatted and positioned in the email body at lines 2, 3, and 5
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record with equipment information exists.
Trigger Criteria:
Context: A cargo record with equipment information exists
Applied to: Extract Equipment Information
Action: The system builds email warning content
Logic Flow:
IF A cargo record with equipment information exists
AND The system builds email warning content
THEN:
• The equipment identification number is extracted from the cargo record field RT071-CAR-ID-NUM-INDEX
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when equipment identification information has been extracted.
Trigger Criteria:
Context: Equipment identification information has been extracted
Applied to: Format Equipment Line Data
Action: The system formats the email content
Logic Flow:
IF Equipment identification information has been extracted
AND The system formats the email content
THEN:
• The equipment data is formatted into equipment line variables and placed at email text line 7
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record contains waybill reference data.
Trigger Criteria:
Context: A cargo record contains waybill reference data
Applied to: Extract Waybill Information
Action: The system builds email warning content
Logic Flow:
IF A cargo record contains waybill reference data
AND The system builds email warning content
THEN:
• Road index, station index, and waybill index are concatenated from RT072 fields into waybill line data
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when waybill information has been extracted and concatenated.
Trigger Criteria:
Context: Waybill information has been extracted and concatenated
Applied to: Format Waybill Line Data
Action: The system formats the email content
Logic Flow:
IF Waybill information has been extracted and concatenated
AND The system formats the email content
THEN:
• The waybill line variables are placed at email text line 8
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when m10-12 work data contains ccn information.
Trigger Criteria:
Context: The M10-12 work data contains CCN information
Applied to: Format CCN Key Information
Action: The system builds email warning content
Logic Flow:
IF The M10-12 work data contains CCN information
AND The system builds email warning content
THEN:
• The CCN line variables are formatted and placed at email text line 9
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo record contains equipment load/empty status.
Trigger Criteria:
Context: A cargo record contains equipment load/empty status
Applied to: Extract Load/Empty Indicator
Action: The system builds email warning content
Logic Flow:
IF A cargo record contains equipment load/empty status
AND The system builds email warning content
THEN:
• The load/empty code is extracted from VID10-LOAD-EMPTY-CDE field
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when load/empty indicator has been extracted.
Trigger Criteria:
Context: Load/empty indicator has been extracted
Applied to: Format Load/Empty Line
Action: The system formats the email content
Logic Flow:
IF Load/empty indicator has been extracted
AND The system formats the email content
THEN:
• The load/empty indicator variables are placed at email text line 10
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record contains content description information.
Trigger Criteria:
Context: A cargo record contains content description information
Applied to: Extract Content Description
Action: The system builds email warning content
Logic Flow:
IF A cargo record contains content description information
AND The system builds email warning content
THEN:
• The long description is extracted from GCUS-N1002-LONG-DESC field
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when content description has been extracted.
Trigger Criteria:
Context: Content description has been extracted
Applied to: Format Content Line
Action: The system formats the email content
Logic Flow:
IF Content description has been extracted
AND The system formats the email content
THEN:
• The content variables are placed at email text line 11
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when k3 segment contains date and time information.
Trigger Criteria:
Context: K3 segment contains date and time information
Applied to: Format Date and Time
Action: The system builds email warning content
Logic Flow:
IF K3 segment contains date and time information
AND The system builds email warning content
THEN:
• Machine century is combined with K3-01-DATE to form year, month and day are extracted, and hour and minute are extracted from K3-01-TIME
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when shipment record contains origin station information.
Trigger Criteria:
Context: Shipment record contains origin station information
Applied to: Extract Origin Station Info
Action: The system builds email warning content
Logic Flow:
IF Shipment record contains origin station information
AND The system builds email warning content
THEN:
• Origin station name and province/state code are concatenated with comma separator into origin station data
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when origin station information has been extracted and formatted.
Trigger Criteria:
Context: Origin station information has been extracted and formatted
Applied to: Format Origin Station Line
Action: The system formats the email content
Logic Flow:
IF Origin station information has been extracted and formatted
AND The system formats the email content
THEN:
• The origin station variables are placed at email text line 12
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when shipment record contains destination station information.
Trigger Criteria:
Context: Shipment record contains destination station information
Applied to: Extract Destination Station Info
Action: The system builds email warning content
Logic Flow:
IF Shipment record contains destination station information
AND The system builds email warning content
THEN:
• Destination station name and province/state code are concatenated with comma separator into destination station data
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when destination station information has been extracted and formatted.
Trigger Criteria:
Context: Destination station information has been extracted and formatted
Applied to: Format Destination Station Line
Action: The system formats the email content
Logic Flow:
IF Destination station information has been extracted and formatted
AND The system formats the email content
THEN:
• The destination station variables are placed at email text line 13
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when consignee information has been previously extracted and stored.
Trigger Criteria:
Context: Consignee information has been previously extracted and stored
Applied to: Format Consignee Information
Action: The system formats the email content
Logic Flow:
IF Consignee information has been previously extracted and stored
AND The system formats the email content
THEN:
• The consignee variables are placed at email text line 14
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when k1 segment contains a free form warning message.
Trigger Criteria:
Context: K1 segment contains a free form warning message
Applied to: Extract CBP Warning Message
Action: The system builds email warning content
Logic Flow:
IF K1 segment contains a free form warning message
AND The system builds email warning content
THEN:
• The free form message is extracted from K1-02-FREE-FORM-MESSAGE field into CBP warning message data
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when cbp warning message has been extracted.
Trigger Criteria:
Context: CBP warning message has been extracted
Applied to: Format Warning Message Line
Action: The system formats the email content
Logic Flow:
IF CBP warning message has been extracted
AND The system formats the email content
THEN:
• The CBP warning message variables are placed at email text line 16
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when date and time components have been formatted.
Trigger Criteria:
Context: Date and time components have been formatted
Applied to: Format Occurrence Date/Time
Action: The system builds email warning content
Logic Flow:
IF Date and time components have been formatted
AND The system builds email warning content
THEN:
• Date formatter and time formatter are concatenated with space separator into occurrence data and placed at email text line 17
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when email warning content is being finalized.
Trigger Criteria:
Context: Email warning content is being finalized
Applied to: Add Footer Text
Action: The system completes the email structure
Logic Flow:
IF Email warning content is being finalized
AND The system completes the email structure
THEN:
• Footer text is placed at email text line 20
R-GCX015E-cbl-00442 (+5)File: GCX015E.cblBusiness Rule: Map Message Numbers to Severity Categories
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when k1 message segment is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Message Number = '000'?
Action: The K1-02-MSG-NUMBER equals '000'
Logic Flow:
IF A K1 message segment is being processed
AND The K1-02-MSG-NUMBER equals '000'
THEN:
• Set message severity to Information (MSG-SEV-I) and set processing status to acknowledged (WS-ACK-STATUS)
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when k1 message segment is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Message Number in Fatal Category? 009, 017, 038, 040, 291, 630
Action: The K1-02-MSG-NUMBER equals '009' OR '017' OR '038' OR '040' OR '291' OR '630'
Logic Flow:
IF A K1 message segment is being processed
AND The K1-02-MSG-NUMBER equals '009' OR '017' OR '038' OR '040' OR '291' OR '630'
THEN:
• Set message severity to Fatal (MSG-SEV-F) and set processing status to error (WS-ERROR-STATUS)
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when k1 message segment is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Message Number in Warning Category? 631, 632, 633, 634, 695, 696, 697, 698, 699
Action: The K1-02-MSG-NUMBER equals '631' OR '632' OR '633' OR '634' OR '695' OR '696' OR '697' OR '698' OR '699'
Logic Flow:
IF A K1 message segment is being processed
AND The K1-02-MSG-NUMBER equals '631' OR '632' OR '633' OR '634' OR '695' OR '696' OR '697' OR '698' OR '699'
THEN:
• Set message severity to Warning (MSG-SEV-W) and set processing status to acknowledged (WS-ACK-STATUS)
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when k1 message segment is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Unknown Set Status: Acknowledged
Action: The K1-02-MSG-NUMBER does not equal '000' AND does not match any fatal error numbers (009, 017, 038, 040, 291, 630) AND does not match any warning numbers (631, 632, 633, 634, 695, 696, 697, 698, 699)
Logic Flow:
IF A K1 message segment is being processed
AND The K1-02-MSG-NUMBER does not equal '000' AND does not match any fatal error numbers (009, 017, 038, 040, 291, 630) AND does not match any warning numbers (631, 632, 633, 634, 695, 696, 697, 698, 699)
THEN:
• Set message severity to Unknown (MSG-SEV-U) and set processing status to acknowledged (WS-ACK-STATUS)
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when k1 message segment is being processed.
Trigger Criteria:
Context: A K1 message segment is being processed
Applied to: Store Message for Logging
Action: The K1-02-FREE-FORM-MESSAGE is not spaces
Logic Flow:
IF A K1 message segment is being processed
AND The K1-02-FREE-FORM-MESSAGE is not spaces
THEN:
• Move the K1-02-FREE-FORM-MESSAGE to display lines (MRLN-LINES) and store formatted message in hold array (HOLD-K1-MESSAGE) for logging
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when k1 message segment has been classified as warning severity.
Trigger Criteria:
Context: A K1 message segment has been classified as warning severity
Applied to: Warning Message 695, 697, or 699?
Action: The K1-02-MSG-NUMBER equals '695' OR '697' OR '699'
Logic Flow:
IF A K1 message segment has been classified as warning severity
AND The K1-02-MSG-NUMBER equals '695' OR '697' OR '699'
THEN:
• Trigger email warning process to freight forwarder (C100-SEND-EMAIL-WARNING)
R-GCX015E-cbl-00448 (+7)File: GCX015E.cblBusiness Rule: Identify Test Message Patterns
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when message with m10 segment is being processed.
Trigger Criteria:
Context: A message with M10 segment is being processed
Applied to: Check M10 Reference Number
Action: The M10 reference number matches 'TRAINCPRSTESTTRAIN0000000000' OR 'CARGOCPRS940000000000' patterns
Logic Flow:
IF A message with M10 segment is being processed
AND The M10 reference number matches 'TRAINCPRSTESTTRAIN0000000000' OR 'CARGOCPRS940000000000' patterns
THEN:
• The system triggers special test processing workflow
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when test message pattern has been detected.
Trigger Criteria:
Context: A test message pattern has been detected
Applied to: Retrieve T1 Table Configuration
Action: The system needs to update acknowledgment timestamps
Logic Flow:
IF A test message pattern has been detected
AND The system needs to update acknowledgment timestamps
THEN:
• The system retrieves T1 table configuration using table ID 'T1' and empty sequence ID
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when system is attempting to retrieve t1 table configuration.
Trigger Criteria:
Context: The system is attempting to retrieve T1 table configuration
Applied to: Handle Table Not Found Error
Action: The T1 table entry is not found (return flag is not '0')
Logic Flow:
IF The system is attempting to retrieve T1 table configuration
AND The T1 table entry is not found (return flag is not '0')
THEN:
• The system generates error message 'T1 CHECK TABLE ENTRY NOT FOUND' and terminates processing
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when test message is being processed and t1 table configuration is available.
Trigger Criteria:
Context: A test message is being processed and T1 table configuration is available
Applied to: Update 309 Acknowledgment Timestamp Manifest Type = P
Action: The manifest type in the message is 'P'
Logic Flow:
IF A test message is being processed and T1 table configuration is available
AND The manifest type in the message is 'P'
THEN:
• The system updates T1-309-ACK field with current machine date (century + date) and time (first 4 digits)
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when test message is being processed and t1 table configuration is available.
Trigger Criteria:
Context: A test message is being processed and T1 table configuration is available
Applied to: Update 353 Acknowledgment Timestamp Manifest Type = H
Action: The manifest type in the message is 'H'
Logic Flow:
IF A test message is being processed and T1 table configuration is available
AND The manifest type in the message is 'H'
THEN:
• The system updates T1-353-ACK field with current machine date (century + date) and time (first 4 digits)
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when test message is being processed and t1 table configuration is available.
Trigger Criteria:
Context: A test message is being processed and T1 table configuration is available
Applied to: Update 358 Acknowledgment Timestamp Manifest Type = S
Action: The manifest type in the message is 'S'
Logic Flow:
IF A test message is being processed and T1 table configuration is available
AND The manifest type in the message is 'S'
THEN:
• The system updates T1-358-ACK field with current machine date (century + date) and time (first 4 digits)
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when t1 table acknowledgment timestamps have been updated.
Trigger Criteria:
Context: T1 table acknowledgment timestamps have been updated
Applied to: Save Updated T1 Table
Action: The timestamp update is complete
Logic Flow:
IF T1 table acknowledgment timestamps have been updated
AND The timestamp update is complete
THEN:
• The system saves the updated T1 table segment using REPL function code
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when test message acknowledgment processing is complete.
Trigger Criteria:
Context: Test message acknowledgment processing is complete
Applied to: Clear Message Array
Action: T1 table has been updated and saved
Logic Flow:
IF Test message acknowledgment processing is complete
AND T1 table has been updated and saved
THEN:
• The system clears the message array to spaces, sets end processing flag to true, and exits the special processing
R-GCX015E-cbl-00456 (+6)File: GCX015E.cblBusiness Rule: Update Manifest Timestamps by Type
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when manifest message is being processed and the t1 table entry exists.
Trigger Criteria:
Context: A manifest message is being processed and the T1 table entry exists
Applied to: Update different timestamp fields (309, 353, 358) in T1 table based on manifest type code (P, H, S)
Action: The manifest type code is P (Manifest), H (Delete Manifest), or S (Status Manifest)
Logic Flow:
IF A manifest message is being processed and the T1 table entry exists
AND The manifest type code is P (Manifest), H (Delete Manifest), or S (Status Manifest)
THEN:
• The system updates the corresponding acknowledgment timestamp field (309-ACK for P, 353-ACK for H, 358-ACK for S) with current date and time
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when manifest processing request is initiated.
Trigger Criteria:
Context: A manifest processing request is initiated
Applied to: Retrieve T1 Table Entry
Action: The system needs to update acknowledgment timestamps
Logic Flow:
IF A manifest processing request is initiated
AND The system needs to update acknowledgment timestamps
THEN:
• The system retrieves the T1 table entry using table ID 'T1' and empty sequence ID
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when request to update manifest acknowledgment timestamps.
Trigger Criteria:
Context: A request to update manifest acknowledgment timestamps
Applied to: T1 Entry Found?
Action: The T1 table entry retrieval is attempted
Logic Flow:
IF A request to update manifest acknowledgment timestamps
AND The T1 table entry retrieval is attempted
THEN:
• If the T1 table entry is not found, the system generates an error message 'T1 CHECK TABLE ENTRY NOT FOUND' and terminates processing
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when manifest message with type code 'p' is being processed and t1 table entry exists.
Trigger Criteria:
Context: A manifest message with type code 'P' is being processed and T1 table entry exists
Applied to: Update 309-ACK Timestamp Type P - Manifest
Action: The manifest type code is 'P'
Logic Flow:
IF A manifest message with type code 'P' is being processed and T1 table entry exists
AND The manifest type code is 'P'
THEN:
• The system updates the T1-309-ACK field with current machine date (century + date) and time (first 4 digits)
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when manifest message with type code 'h' is being processed and t1 table entry exists.
Trigger Criteria:
Context: A manifest message with type code 'H' is being processed and T1 table entry exists
Applied to: Update 353-ACK Timestamp Type H - Delete Manifest
Action: The manifest type code is 'H'
Logic Flow:
IF A manifest message with type code 'H' is being processed and T1 table entry exists
AND The manifest type code is 'H'
THEN:
• The system updates the T1-353-ACK field with current machine date (century + date) and time (first 4 digits)
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when manifest message with type code 's' is being processed and t1 table entry exists.
Trigger Criteria:
Context: A manifest message with type code 'S' is being processed and T1 table entry exists
Applied to: Update 358-ACK Timestamp Type S - Status Manifest
Action: The manifest type code is 'S'
Logic Flow:
IF A manifest message with type code 'S' is being processed and T1 table entry exists
AND The manifest type code is 'S'
THEN:
• The system updates the T1-358-ACK field with current machine date (century + date) and time (first 4 digits)
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when t1 table entry has been updated with new acknowledgment timestamp.
Trigger Criteria:
Context: The T1 table entry has been updated with new acknowledgment timestamp
Applied to: Save Updated T1 Entry
Action: The timestamp update is complete
Logic Flow:
IF The T1 table entry has been updated with new acknowledgment timestamp
AND The timestamp update is complete
THEN:
• The system saves the updated T1 segment back to the table using REPL function code
R-GCX015E-cbl-00463 (+17)File: GCX015E.cblBusiness Rule: 20:Retrieve Freight Forwarder Information
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo shipment processing request is initiated.
Trigger Criteria:
Context: A cargo shipment processing request is initiated
Applied to: Initialize Search Parameters
Action: The system begins freight forwarder information retrieval
Logic Flow:
IF A cargo shipment processing request is initiated
AND The system begins freight forwarder information retrieval
THEN:
• Search flags are reset to not found state and segment type indicators are cleared
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when valid us-ccn exists from the cargo root record.
Trigger Criteria:
Context: A valid US-CCN exists from the cargo root record
Applied to: Set US-CCN Key for Search
Action: Initiating freight forwarder data retrieval
Logic Flow:
IF A valid US-CCN exists from the cargo root record
AND Initiating freight forwarder data retrieval
THEN:
• The US-CCN key is set for GCSA2RT segment search with record type '03' and sequence '0'
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when us-ccn key is properly set for gcsa2rt segment search.
Trigger Criteria:
Context:US-CCN key is properly set for GCSA2RT segment search
Applied to: Get First GCSA2RT Segment
Action: Database retrieval is executed with 'GU' function and greater than operator
Logic Flow:
IFUS-CCN key is properly set for GCSA2RT segment search
AND Database retrieval is executed with 'GU' function and greater than operator
THEN:
• First matching GCSA2RT segment is retrieved or no record found status is returned
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when database retrieval operation has completed.
Trigger Criteria:
Context: Database retrieval operation has completed
Applied to: Segment Found?
Action: Checking the database return status
Logic Flow:
IF Database retrieval operation has completed
AND Checking the database return status
THEN:
• Return status indicates successful retrieval (spaces) or failure (non-spaces), and processing continues or terminates accordingly
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when gcsa2rt segment has been successfully retrieved.
Trigger Criteria:
Context: A GCSA2RT segment has been successfully retrieved
Applied to: Record Type = '03'?
Action: Examining the record type field in the segment key
Logic Flow:
IF A GCSA2RT segment has been successfully retrieved
AND Examining the record type field in the segment key
THEN:
• Record type equals '03' indicates party information record, otherwise continue to check for type '07'
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when type 03 gcsa2rt segment record is available.
Trigger Criteria:
Context: A type 03 GCSA2RT segment record is available
Applied to: Process Type 03 Record
Action: Processing the segment data
Logic Flow:
IF A type 03 GCSA2RT segment record is available
AND Processing the segment data
THEN:
• Segment data is moved to GCSUSS03 structure for party information analysis
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when type 03 party information record is being processed.
Trigger Criteria:
Context: A type 03 party information record is being processed
Applied to: Is Freight Forwarder? & Is Consignee?
Action: Checking the N101 qualifier code in the party record
Logic Flow:
IF A type 03 party information record is being processed
AND Checking the N101 qualifier code in the party record
THEN:
• N101 qualifier indicates freight forwarder role and freight forwarder found flag is set to true
• N101 qualifier indicates consignee role and consignee processing is initiated
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when party record with freight forwarder n101 qualifier is identified.
Trigger Criteria:
Context: A party record with freight forwarder N101 qualifier is identified
Applied to: Mark Freight Forwarder Found
Action: Processing the freight forwarder party information
Logic Flow:
IF A party record with freight forwarder N101 qualifier is identified
AND Processing the freight forwarder party information
THEN:
• Freight forwarder found flag is set to true to track successful identification
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when party record with consignee n101 qualifier is identified.
Trigger Criteria:
Context: A party record with consignee N101 qualifier is identified
Applied to: Extract Consignee Name
Action: Processing the consignee party information
Logic Flow:
IF A party record with consignee N101 qualifier is identified
AND Processing the consignee party information
THEN:
• N102 name field is extracted and stored as consignee data
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when consignee name has been successfully extracted from party record.
Trigger Criteria:
Context: Consignee name has been successfully extracted from party record
Applied to: Mark Consignee Found
Action: Completing consignee information processing
Logic Flow:
IF Consignee name has been successfully extracted from party record
AND Completing consignee information processing
THEN:
• Consignee found flag is set to true to track successful identification
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when gcsa2rt segment has been successfully retrieved and is not type 03.
Trigger Criteria:
Context: A GCSA2RT segment has been successfully retrieved and is not type 03
Applied to: Record Type = '07'?
Action: Examining the record type field in the segment key
Logic Flow:
IF A GCSA2RT segment has been successfully retrieved and is not type 03
AND Examining the record type field in the segment key
THEN:
• Record type equals '07' indicates additional shipment information record
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when type 07 gcsa2rt segment record is available.
Trigger Criteria:
Context: A type 07 GCSA2RT segment record is available
Applied to: Process Type 07 Record
Action: Processing the segment data
Logic Flow:
IF A type 07 GCSA2RT segment record is available
AND Processing the segment data
THEN:
• Segment data is moved to GCSUSS07 structure for shipment information analysis
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when type 07 segment record has been successfully processed.
Trigger Criteria:
Context: A type 07 segment record has been successfully processed
Applied to: Mark Segment 07 Found
Action: Completing type 07 segment processing
Logic Flow:
IF A type 07 segment record has been successfully processed
AND Completing type 07 segment processing
THEN:
• Segment 07 found flag is set to true to track successful identification
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when current gcsa2rt segment has been processed.
Trigger Criteria:
Context: Current GCSA2RT segment has been processed
Applied to: Get Next GCSA2RT Segment
Action: Database retrieval is executed with 'GN' function for next segment
Logic Flow:
IF Current GCSA2RT segment has been processed
AND Database retrieval is executed with 'GN' function for next segment
THEN:
• Next sequential GCSA2RT segment is retrieved or end of data status is returned
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when next segment retrieval operation has completed.
Trigger Criteria:
Context: Next segment retrieval operation has completed
Applied to: More Segments Available?
Action: Checking the database return status
Logic Flow:
IF Next segment retrieval operation has completed
AND Checking the database return status
THEN:
• Return status indicates more segments available (spaces) or end of data (GE or GB), and processing continues or terminates accordingly
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when new gcsa2rt segment has been retrieved.
Trigger Criteria:
Context: A new GCSA2RT segment has been retrieved
Applied to: Same US-CCN Key?
Action: Comparing the segment's US-CCN key with the original search key
Logic Flow:
IF A new GCSA2RT segment has been retrieved
AND Comparing the segment's US-CCN key with the original search key
THEN:
• US-CCN keys match indicating same shipment, or keys differ indicating end of related segments
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when segment processing is continuing with valid us-ccn key.
Trigger Criteria:
Context: Segment processing is continuing with valid US-CCN key
Applied to: All Required Data Found?
Action: Evaluating collected data completeness
Logic Flow:
IF Segment processing is continuing with valid US-CCN key
AND Evaluating collected data completeness
THEN:
• Freight forwarder found AND segment 07 found AND consignee found indicates complete data collection
Business Justification: Dictates the expected operational logic and validation steps when system needs to search for freight forwarder broker information.
Trigger Criteria:
Context: The system needs to search for freight forwarder broker information
Applied to: Initialize GCWUSIO Parameters
Action: The freight forwarder broker search process is initiated
Logic Flow:
IF The system needs to search for freight forwarder broker information
AND The freight forwarder broker search process is initiated
THEN:
• The system clears all search parameters and sets up the broker registry table access
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when freight forwarder name is available from the cargo shipment data.
Trigger Criteria:
Context: A freight forwarder name is available from the cargo shipment data
Applied to: Build Search Key with Freight Forwarder Name
Action: The system needs to search for the associated broker information
Logic Flow:
IF A freight forwarder name is available from the cargo shipment data
AND The system needs to search for the associated broker information
THEN:
• The system creates a search key by concatenating 'FW=' with the freight forwarder name
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when search key has been constructed with the freight forwarder name.
Trigger Criteria:
Context: A search key has been constructed with the freight forwarder name
Applied to: Search GCST2RT Table for Broker Record
Action: The system performs a lookup in the broker registry table
Logic Flow:
IF A search key has been constructed with the freight forwarder name
AND The system performs a lookup in the broker registry table
THEN:
• The system executes a search operation against the GCST2RT table using the freight forwarder key
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when broker record exists in the registry table for the given freight forwarder.
Trigger Criteria:
Context: A broker record exists in the registry table for the given freight forwarder
Applied to: Retrieve Broker Short Name from GCT2 Segment
Action: The search operation successfully locates the broker record
Logic Flow:
IF A broker record exists in the registry table for the given freight forwarder
AND The search operation successfully locates the broker record
THEN:
• The system retains the broker short name and related information from the found record
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when no broker record exists in the registry table for the given freight forwarder.
Trigger Criteria:
Context: No broker record exists in the registry table for the given freight forwarder
Applied to: Initialize Empty Broker Name Segment
Action: The search operation fails to locate a matching broker record
Logic Flow:
IF No broker record exists in the registry table for the given freight forwarder
AND The search operation fails to locate a matching broker record
THEN:
• The system initializes the broker name segment with empty values
R-GCX015E-cbl-00486 (+4)File: GCX015E.cblBusiness Rule: 39:Retrieve Broker Contact Information
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo shipment requires broker contact information retrieval.
Trigger Criteria:
Context: A cargo shipment requires broker contact information retrieval
Applied to: Determine Location ID to Use
Action: The system needs to determine the location ID for broker lookup
Logic Flow:
IF A cargo shipment requires broker contact information retrieval
AND The system needs to determine the location ID for broker lookup
THEN:
• If M1203 location ID is available and not spaces, use M1203 location ID, otherwise use P401 location ID
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when broker short name and location id are available.
Trigger Criteria:
Context: Broker short name and location ID are available
Applied to: Build Broker Key with Short Name + Location ID
Action: The system builds the broker contact lookup key
Logic Flow:
IF Broker short name and location ID are available
AND The system builds the broker contact lookup key
THEN:
• Concatenate broker short name with the selected location ID to form the lookup key
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when broker lookup key has been constructed.
Trigger Criteria:
Context: A broker lookup key has been constructed
Applied to: Retrieve BK Table Segment
Action: The system attempts to retrieve broker basic information from BK table
Logic Flow:
IF A broker lookup key has been constructed
AND The system attempts to retrieve broker basic information from BK table
THEN:
• If BK segment is not found or retrieval fails, initialize empty BK segment, otherwise use retrieved BK segment data
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when broker basic information retrieval has been attempted.
Trigger Criteria:
Context: Broker basic information retrieval has been attempted
Applied to: Retrieve B1 Table Segment
Action: The system attempts to retrieve broker contact details from B1 table
Logic Flow:
IF Broker basic information retrieval has been attempted
AND The system attempts to retrieve broker contact details from B1 table
THEN:
• If B1 segment is not found or retrieval fails, initialize empty B1 segment, otherwise use retrieved B1 segment data
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when broker contact information has been retrieved from bk and b1 tables.
Trigger Criteria:
Context: Broker contact information has been retrieved from BK and B1 tables
Applied to: Check Internet Usage Flag
Action: The system checks the internet usage preference
Logic Flow:
IF Broker contact information has been retrieved from BK and B1 tables
AND The system checks the internet usage preference
THEN:
• If BK use internet flag equals 'Y', set up internet email address from B1 segment and mark email to freight forwarder flag as true
R-GCX015E-cbl-00491 (+5)File: GCX015E.cblBusiness Rule: 22:Retrieve Shipment Root Data
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when request to retrieve shipment root data is initiated.
Trigger Criteria:
Context: A request to retrieve shipment root data is initiated
Applied to: Initialize FWWWBIO Parameters
Action: The system prepares to access the freight waybill system
Logic Flow:
IF A request to retrieve shipment root data is initiated
AND The system prepares to access the freight waybill system
THEN:
• The FWWWBIO parameters are cleared and initialized to spaces
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when freight waybill system parameters are initialized.
Trigger Criteria:
Context: The freight waybill system parameters are initialized
Applied to: Set Segment Type to 'SHIPROOT'
Action: The system needs to specify what type of data to retrieve
Logic Flow:
IF The freight waybill system parameters are initialized
AND The system needs to specify what type of data to retrieve
THEN:
• The segment type is set to 'SHIPROOT' to indicate shipment root data retrieval
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when segment type is set to shiproot.
Trigger Criteria:
Context: The segment type is set to SHIPROOT
Applied to: Set Function Code to 'GU' - Get Unique
Action: The system needs to specify the database operation type
Logic Flow:
IF The segment type is set to SHIPROOT
AND The system needs to specify the database operation type
THEN:
• The function code is set to 'GU' to perform a get unique operation
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when function code is set to 'gu' for get unique operation.
Trigger Criteria:
Context: The function code is set to 'GU' for get unique operation
Applied to: Set Accept Status to 'GE'
Action: The system needs to specify acceptable return status codes
Logic Flow:
IF The function code is set to 'GU' for get unique operation
AND The system needs to specify acceptable return status codes
THEN:
• The accept status is set to 'GE' to allow successful retrieval operations
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when cargo record exists with waybill information.
Trigger Criteria:
Context: A cargo record exists with waybill information
Applied to: Extract Waybill Key from Cargo Record
Action: The system needs to identify the specific shipment to retrieve
Logic Flow:
IF A cargo record exists with waybill information
AND The system needs to identify the specific shipment to retrieve
THEN:
• The waybill key is extracted from the cargo record field RT082-WAYBILL-KEYand assigned to the root key parameter
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when all parameters are configured with segment type 'shiproot', function 'gu', accept status 'ge', and waybill key. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: All parameters are configured with segment type 'SHIPROOT', function 'GU', accept status 'GE', and waybill key
Applied to: Call FWCWBIO to Retrieve Shipment Root
Action: The system executes the freight waybill data retrieval
Logic Flow:
IF All parameters are configured with segment type 'SHIPROOT', function 'GU', accept status 'GE', and waybill key
AND The system executes the freight waybill data retrieval
THEN:
• The FWCWBIO program is called with the configured parameters to retrieve the shipment root data
R-GCX015E-cbl-00497 (+5)File: GCX015E.cblBusiness Rule: 36:Save Current Cargo Status
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo transaction is being processed with a current status.
Trigger Criteria:
Context: A cargo transaction is being processed with a current status
Applied to: Check Cargo Processing Status
Action: The system receives an acknowledgment status response
Logic Flow:
IF A cargo transaction is being processed with a current status
AND The system receives an acknowledgment status response
THEN:
• The system should either set cargo to acknowledged status or restore previous status from save fields
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo processing has acknowledgment status and save status description fields are empty.
Trigger Criteria:
Context: Cargo processing has acknowledgment status AND save status description fields are empty
Applied to: Set Cargo to Acknowledged Status
Action: The system processes the cargo status update
Logic Flow:
IF Cargo processing has acknowledgment status AND save status description fields are empty
AND The system processes the cargo status update
THEN:
• The system should set both cargo status indicators to acknowledged state
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when cargo processing has acknowledgment status and save status description fields contain data.
Trigger Criteria:
Context: Cargo processing has acknowledgment status AND save status description fields contain data
Applied to: Restore Previous Status from Save Fields
Action: The system processes the cargo status update
Logic Flow:
IF Cargo processing has acknowledgment status AND save status description fields contain data
AND The system processes the cargo status update
THEN:
• The system should restore the saved status to current status field AND restore the saved description to current description field
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo processing does not have acknowledgment status.
Trigger Criteria:
Context: Cargo processing does not have acknowledgment status
Applied to: Current Status is Error/Ack?
Action: The current cargo status is error OR acknowledgment OR acknowledgment-revised
Logic Flow:
IF Cargo processing does not have acknowledgment status
AND The current cargo status is error OR acknowledgment OR acknowledgment-revised
THEN:
• The system should continue without saving current status information
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo processing does not have acknowledgment status.
Trigger Criteria:
Context: Cargo processing does not have acknowledgment status
Applied to: Set Cargo to Error Status
Action: The system processes cargo status update for error condition AND cargo is not marked as deleted
Logic Flow:
IF Cargo processing does not have acknowledgment status
AND The system processes cargo status update for error condition AND cargo is not marked as deleted
THEN:
• The system should set Canadian cargo status to error AND set US cargo status to error AND set US cargo description to error
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when cargo processing does not have acknowledgment status and current status is not error, acknowledgment, or acknowledgment-revised.
Trigger Criteria:
Context: Cargo processing does not have acknowledgment status AND current status is not error, acknowledgment, or acknowledgment-revised
Applied to: Save Current Status to Save Fields
Action: The system prepares to update cargo status to error
Logic Flow:
IF Cargo processing does not have acknowledgment status AND current status is not error, acknowledgment, or acknowledgment-revised
AND The system prepares to update cargo status to error
THEN:
• The system should move current cargo status to save status field AND move current cargo description to save description field
R-GCX015E-cbl-00503 (+3)File: GCX015E.cblBusiness Rule: 35:Restore Previous Cargo Status
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed with acknowledgment status.
Trigger Criteria:
Context: A cargo record is being processed with acknowledgment status
Applied to: Is Acknowledgment Status?
Action: The system checks for previously saved status information
Logic Flow:
IF A cargo record is being processed with acknowledgment status
AND The system checks for previously saved status information
THEN:
• If no saved status exists, set status to acknowledgment; if saved status exists, restore the saved status and description
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo record is being processed with acknowledgment status and no previously saved status information exists.
Trigger Criteria:
Context: A cargo record is being processed with acknowledgment status and no previously saved status information exists
Applied to: Set Status to ACK
Action: The save status description field is empty
Logic Flow:
IF A cargo record is being processed with acknowledgment status and no previously saved status information exists
AND The save status description field is empty
THEN:
• Set both RT11 and RT21 cargo status fields to acknowledgment status
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when cargo record is being processed with acknowledgment status and previously saved status information exists.
Trigger Criteria:
Context: A cargo record is being processed with acknowledgment status and previously saved status information exists
Applied to: Restore Status from Save Field
Action: The save status description field contains data
Logic Flow:
IF A cargo record is being processed with acknowledgment status and previously saved status information exists
AND The save status description field contains data
THEN:
• Restore the cargo status from RT44 save field to RT11 status field and restore the status description from RT45 save field to RT21 description field
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when cargo status has been determined (either default acknowledgment or restored from saved fields).
Trigger Criteria:
Context: Cargo status has been determined (either default acknowledgment or restored from saved fields)
Applied to: Update Cargo Record
Action: The cargo status processing is complete
Logic Flow:
IF Cargo status has been determined (either default acknowledgment or restored from saved fields)
AND The cargo status processing is complete
THEN:
• Update the cargo segment record in the database with the new status information
R-GCX015E-cbl-00507 (+9)File: GCX015E.cblBusiness Rule: 16:Load Car Information for Customs
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when equipment information is being processed for customs reporting.
Trigger Criteria:
Context: Equipment information is being processed for customs reporting
Applied to: Is Equipment a Container?
Action: The equipment container indicator is 'C'
Logic Flow:
IF Equipment information is being processed for customs reporting
AND The equipment container indicator is 'C'
THEN:
• Skip the equipment and do not include it in customs car information
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when non-container equipment is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Non-container equipment is being processed
Applied to: Extract Equipment Initial
Action: Equipment initial information is available
Logic Flow:
IF Non-container equipment is being processed
AND Equipment initial information is available
THEN:
• Copy the equipment initial to the customs car initial field
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when non-container equipment is being processed.
Trigger Criteria:
Context: Non-container equipment is being processed
Applied to: Extract Equipment Number
Action: Equipment number information is available
Logic Flow:
IF Non-container equipment is being processed
AND Equipment number information is available
THEN:
• Extract the equipment number for further processing
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when equipment number has been extracted.
Trigger Criteria:
Context: Equipment number has been extracted
Applied to: Convert to 6-Digit Car Number
Action: The equipment number needs to be formatted for customs
Logic Flow:
IF Equipment number has been extracted
AND The equipment number needs to be formatted for customs
THEN:
• Convert the equipment number to 6-digit car number format
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when current equipment is being processed and there is a next equipment in the sequence.
Trigger Criteria:
Context: Current equipment is being processed and there is a next equipment in the sequence
Applied to: Set Load/Empty Indicator to 'L'
Action: The next equipment's container indicator is 'C'
Logic Flow:
IF Current equipment is being processed and there is a next equipment in the sequence
AND The next equipment's container indicator is 'C'
THEN:
• Set the current equipment's load/empty indicator to 'L'
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when current equipment is being processed. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Current equipment is being processed
Applied to: Copy Load/Empty from Equipment
Action: The next equipment is not a container or there is no next equipment
Logic Flow:
IF Current equipment is being processed
AND The next equipment is not a container or there is no next equipment
THEN:
• Copy the load/empty indicator from the current equipment data
Rule Belongs to : GCX015E.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: Set Car Kind to 'L' - Locomotive
Action: The equipment type is 'LO'
Logic Flow:
IF Equipment type information is available
AND The equipment type is 'LO'
THEN:
• Set the car kind to 'L' indicating locomotive
Rule Belongs to : GCX015E.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: Set Car Kind to Spaces
Action: The equipment type is neither 'LO' nor 'ET'
Logic Flow:
IF Equipment type information is available
AND The equipment type is neither 'LO' nor 'ET'
THEN:
• Set the car kind to spaces indicating standard railcar
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when equipment type information is available and it is not 'lo'.
Trigger Criteria:
Context: Equipment type information is available and it is not 'LO'
Applied to: Set Car Kind to 'E' - Engine
Action: The equipment type is 'ET'
Logic Flow:
IF Equipment type information is available and it is not 'LO'
AND The equipment type is 'ET'
THEN:
• Set the car kind to 'E' indicating engine
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when car information has been processed and classified.
Trigger Criteria:
Context: Car information has been processed and classified
Applied to: Store Car Information in Customs Table
Action: All car details are ready for customs reporting
Logic Flow:
IF Car information has been processed and classified
AND All car details are ready for customs reporting
THEN:
• Store the car initial, number, load/empty indicator, and car kind in the customs table
R-GCX015E-cbl-00517 (+10)File: GCX015E.cblBusiness Rule: Format Date and Time Information
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when system has access to machine century information.
Trigger Criteria:
Context: The system has access to machine century information
Applied to: Extract Century from CC-MACHINE-CENTURY
IF A K3 segment contains time information in K3-01-TIME field
AND Processing email warning message formatting
THEN:
• The hour component from positions 1-2 of K3-01-TIME is extracted and stored in the time hour field
• The minutes component from positions 3-4 of K3-01-TIME is extracted and stored in the time minutes field
Rule Belongs to : GCX015E.cbl
Business Justification: Ensures correct system behavior and process compliance when century component and 2-digit year component are available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Century component and 2-digit year component are available
Applied to: Combine Century and Year into WS-DATE-YEAR
IF Century component and 2-digit year component are available
AND Processing email warning message formatting
THEN:
• The century and year are combined to form a complete 4-digit year in WS-DATE-YEAR field
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when year, month, and day components are extracted and available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Year, month, and day components are extracted and available
Applied to: Format Complete Date using WS-DATE-FORMATER
IF Year, month, and day components are extracted and available
AND Processing email warning message formatting
THEN:
• The date components are formatted into a complete readable date string using WS-DATE-FORMATER
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when hour and minutes components are extracted and available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Hour and minutes components are extracted and available
Applied to: Format Complete Time using WS-TIME-FORMATER
IF Hour and minutes components are extracted and available
AND Processing email warning message formatting
THEN:
• The time components are formatted into a complete readable time string using WS-TIME-FORMATER
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when formatted date string and formatted time string are available. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Formatted date string and formatted time string are available
Applied to: Combine Date and Time into WS-OCCURED-ON-DATA
IF Formatted date string and formatted time string are available
AND Processing email warning message formatting
THEN:
• The formatted date and time are combined with a space delimiter into WS-OCCURED-ON-DATA field
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when complete formatted date-time occurrence information is available in ws-occured-on-data. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Complete formatted date-time occurrence information is available in WS-OCCURED-ON-DATA
Applied to: Move Formatted DateTime to Email Line for Display
IF Complete formatted date-time occurrence information is available in WS-OCCURED-ON-DATA
AND Processing email warning message formatting
THEN:
• The formatted occurrence timestamp is moved to WS-OCCURED-ON-VARSand assigned to email text line 17 for display
R-GCX015E-cbl-00528 (+5)File: GCX015E.cblBusiness Rule: Extract Station Information
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when cargo shipment record exists with waybill key information.
Trigger Criteria:
Context: A cargo shipment record exists with waybill key information
Applied to: Get Origin Station Name from SHIPROOT
Action: The system needs to extract origin station information for email notification
Logic Flow:
IF A cargo shipment record exists with waybill key information
AND The system needs to extract origin station information for email notification
THEN:
• The origin station name should be retrieved from SHIPROOT database using the waybill key
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when cargo shipment record exists with waybill key information.
Trigger Criteria:
Context: A cargo shipment record exists with waybill key information
Applied to: Get Origin Province/State Code from SHIPROOT
Action: The system needs to extract origin location details for email notification
Logic Flow:
IF A cargo shipment record exists with waybill key information
AND The system needs to extract origin location details for email notification
THEN:
• The origin province or state code should be retrieved from SHIPROOT database using the waybill key
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when cargo shipment record exists with waybill key information.
Trigger Criteria:
Context: A cargo shipment record exists with waybill key information
Applied to: Get Destination Station Name from SHIPROOT
Action: The system needs to extract destination station information for email notification
Logic Flow:
IF A cargo shipment record exists with waybill key information
AND The system needs to extract destination station information for email notification
THEN:
• The destination station name should be retrieved from SHIPROOT database using the waybill key
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when cargo shipment record exists with waybill key information.
Trigger Criteria:
Context: A cargo shipment record exists with waybill key information
Applied to: Get Destination Province/State Code from SHIPROOT
Action: The system needs to extract destination location details for email notification
Logic Flow:
IF A cargo shipment record exists with waybill key information
AND The system needs to extract destination location details for email notification
THEN:
• The destination province or state code should be retrieved from SHIPROOT database using the waybill key
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when origin station name and province/state code are available from shiproot database.
Trigger Criteria:
Context: Origin station name and province/state code are available from SHIPROOT database
Applied to: Format Origin Station String
Action: The system needs to create a formatted origin location string for email notification
Logic Flow:
IF Origin station name and province/state code are available from SHIPROOT database
AND The system needs to create a formatted origin location string for email notification
THEN:
• The origin station name and province/state code should be concatenated with comma separator into a readable format
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when destination station name and province/state code are available from shiproot database.
Trigger Criteria:
Context: Destination station name and province/state code are available from SHIPROOT database
Applied to: Format Destination Station String
Action: The system needs to create a formatted destination location string for email notification
Logic Flow:
IF Destination station name and province/state code are available from SHIPROOT database
AND The system needs to create a formatted destination location string for email notification
THEN:
• The destination station name and province/state code should be concatenated with comma separator into a readable format
Business Justification: Establishes the required business protocol to be followed when manifest processing request is initiated.
Trigger Criteria:
Context: A manifest processing request is initiated
Applied to: Retrieve T1 Table Segment
Action: The system needs to access T1 table configuration data
Logic Flow:
IF A manifest processing request is initiated
AND The system needs to access T1 table configuration data
THEN:
• The system retrieves the T1 table segment using table ID 'T1' with empty sequence ID
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when request to update manifest acknowledgment timestamps.
Trigger Criteria:
Context: A request to update manifest acknowledgment timestamps
Applied to: T1 Table Found?
Action: The T1 table retrieval operation is completed
Logic Flow:
IF A request to update manifest acknowledgment timestamps
AND The T1 table retrieval operation is completed
THEN:
• If T1 table is not found, log error 'T1 CHECK TABLE ENTRY NOT FOUND' and terminate processing, otherwise proceed with timestamp updates
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when manifest with type code 'p' (preliminary) is being processed.
Trigger Criteria:
Context: A manifest with type code 'P' (Preliminary) is being processed
Applied to: Update 309-ACK Timestamp with Current Date/Time
Action: The system updates acknowledgment timestamps
Logic Flow:
IF A manifest with type code 'P' (Preliminary) is being processed
AND The system updates acknowledgment timestamps
THEN:
• Set T1-309-ACK field with current machine century (positions 1-2), current machine date (positions 3-8), and current machine time first 4 digits (positions 9-12)
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when manifest with type code 'h' (hold) is being processed.
Trigger Criteria:
Context: A manifest with type code 'H' (Hold) is being processed
Applied to: Update 353-ACK Timestamp with Current Date/Time
Action: The system updates acknowledgment timestamps
Logic Flow:
IF A manifest with type code 'H' (Hold) is being processed
AND The system updates acknowledgment timestamps
THEN:
• Set T1-353-ACK field with current machine century (positions 1-2), current machine date (positions 3-8), and current machine time first 4 digits (positions 9-12)
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when manifest with type code 's' (supplemental) is being processed.
Trigger Criteria:
Context: A manifest with type code 'S' (Supplemental) is being processed
Applied to: Update 358-ACK Timestamp with Current Date/Time
Action: The system updates acknowledgment timestamps
Logic Flow:
IF A manifest with type code 'S' (Supplemental) is being processed
AND The system updates acknowledgment timestamps
THEN:
• Set T1-358-ACK field with current machine century (positions 1-2), current machine date (positions 3-8), and current machine time first 4 digits (positions 9-12)
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when manifest message is being processed for timestamp updates.
Trigger Criteria:
Context: A manifest message is being processed for timestamp updates
Applied to: Check Manifest Type Code
Action: The system checks the manifest type code from MQS-TABLE-MANI-TYPE
Logic Flow:
IF A manifest message is being processed for timestamp updates
AND The system checks the manifest type code from MQS-TABLE-MANI-TYPE
THEN:
• Route to appropriate timestamp update based on manifest type: 'P' for 309-ACK, 'H' for 353-ACK, 'S' for 358-ACK, or no update for other types
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when t1 table segment has been updated with new acknowledgment timestamp.
Trigger Criteria:
Context: T1 table segment has been updated with new acknowledgment timestamp
Applied to: Write Updated T1 Segment
Action: The timestamp update process is completed
Logic Flow:
IF T1 table segment has been updated with new acknowledgment timestamp
AND The timestamp update process is completed
THEN:
• Write the modified T1 segment back to table storage using REPL function code
R-GCX015E-cbl-00541 (+3)File: GCX015E.cblBusiness Rule: Process Type 03 Record
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when gcsa2rt segment exists with record type '03'. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: A GCSA2RT segment exists with record type '03'
Applied to: Read GCSA2RT Segment with Record Type '03'
Action: The system processes the segment
Logic Flow:
IF A GCSA2RT segment exists with record type '03'
AND The system processes the segment
THEN:
• The segment data is moved to GCSUSS03 structure for further analysis
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when type 03 record with n101 qualifier code indicating freight forwarder.
Trigger Criteria:
Context: A Type 03 record with N101 qualifier code indicating freight forwarder
Applied to: Check N101 Qualifier Code
Action: The N101 qualifier is evaluated as freight forwarder type
Logic Flow:
IF A Type 03 record with N101 qualifier code indicating freight forwarder
AND The N101 qualifier is evaluated as freight forwarder type
THEN:
• The freight forwarder found flag is set to true and the freight forwarder name is extracted
Rule Belongs to : GCX015E.cbl
Business Justification: Defines the strict business conditions required to proceed when type 03 record with n101 qualifier code indicating consignee.
Trigger Criteria:
Context: A Type 03 record with N101 qualifier code indicating consignee
Applied to: Extract Consignee Name
Action: The N101 qualifier is evaluated as consignee type
Logic Flow:
IF A Type 03 record with N101 qualifier code indicating consignee
AND The N101 qualifier is evaluated as consignee type
THEN:
• The consignee name is extracted and the consignee found flag is set to true
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when type 03 record identified as freight forwarder or consignee.
Trigger Criteria:
Context: A Type 03 record identified as freight forwarder or consignee
Applied to: Extract Freight Forwarder Name
Action: The entity type is confirmed
Logic Flow:
IF A Type 03 record identified as freight forwarder or consignee
AND The entity type is confirmed
THEN:
• The entity name is extracted from the N102 name field and stored in appropriate business data fields
R-GCX015E-cbl-00545 (+2)File: GCX015E.cblBusiness Rule: Determine Location ID to Use
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when freight forwarder broker requires location-specific information lookup and both m1203 location id and p401 location id are available in the system.
Trigger Criteria:
Context: A freight forwarder broker requires location-specific information lookup and both M1203 Location ID and P401 Location ID are available in the system
Applied to: Use M1203 Location ID
Action: The system needs to select a location identifier for broker table lookup and M1203 Location ID contains actual data (not spaces)
Logic Flow:
IF A freight forwarder broker requires location-specific information lookup and both M1203 Location ID and P401 Location ID are available in the system
AND The system needs to select a location identifier for broker table lookup and M1203 Location ID contains actual data (not spaces)
THEN:
• The system shall use M1203 Location ID as the primary location identifier for the broker information lookup
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when freight forwarder broker requires location-specific information lookup and m1203 location id is not available (contains spaces).
Trigger Criteria:
Context: A freight forwarder broker requires location-specific information lookup and M1203 Location ID is not available (contains spaces)
Applied to: Use P401 Location ID as Default
Action: The system needs to select a location identifier for broker table lookup and M1203 Location ID is empty or contains only spaces
Logic Flow:
IF A freight forwarder broker requires location-specific information lookup and M1203 Location ID is not available (contains spaces)
AND The system needs to select a location identifier for broker table lookup and M1203 Location ID is empty or contains only spaces
THEN:
• The system shall use P401 Location ID as the default location identifier for the broker information lookup
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when broker short name has been retrieved and a location identifier has been selected (either m1203 or p401).
Trigger Criteria:
Context: A broker short name has been retrieved and a location identifier has been selected (either M1203 or P401)
Applied to: Create Broker Key for Table Lookup
Action: The system needs to create a lookup key for accessing broker information in the table
Logic Flow:
IF A broker short name has been retrieved and a location identifier has been selected (either M1203 or P401)
AND The system needs to create a lookup key for accessing broker information in the table
THEN:
• The system shall concatenate the broker short name with the selected location identifier to form the complete broker key for table lookup operations
R-GCX015E-cbl-00548 (+1)File: GCX015E.cblBusiness Rule: Format Origin Station String
Rule Belongs to : GCX015E.cbl
Business Justification: Governs the functional prerequisites and system routing when origin station name exists in orig-stn-nm and province/state code exists in orig-prov-state-cde.
Trigger Criteria:
Context: Origin station name exists in ORIG-STN-NM and province/state code exists in ORIG-PROV-STATE-CDE
Applied to: Combine Station Name and Province/State with Comma Delimiter
Action: The system formats origin station information for email display
Logic Flow:
IF Origin station name exists in ORIG-STN-NM and province/state code exists in ORIG-PROV-STATE-CDE
AND The system formats origin station information for email display
THEN:
• The system combines the origin station name and province/state code with a comma and space delimiter and stores the formatted string in the origin station data field
Rule Belongs to : GCX015E.cbl
Business Justification: Establishes the required business protocol to be followed when origin station information has been formatted and stored in ws-origin-stn-vars. ⚠️ COBOL Technical Logic
Trigger Criteria:
Context: Origin station information has been formatted and stored in WS-ORIGIN-STN-VARS
Applied to: Move Formatted Origin Station to Email Text Line
Action: The system prepares email content for cargo warning notifications
Logic Flow:
IF Origin station information has been formatted and stored in WS-ORIGIN-STN-VARS
AND The system prepares email content for cargo warning notifications
THEN:
• The system assigns the formatted origin station information to email text line 12
R-GCX015E-cbl-00550File: GCX015E.cblBusiness Rule: Format Destination Station String
Rule Belongs to : GCX015E.cbl
Business Justification: Dictates the expected operational logic and validation steps when cargo shipment has destination station name and province/state code available.
Trigger Criteria:
Context: A cargo shipment has destination station name and province/state code available
Applied to: Combine Station Name and Province/State with Comma Delimiter
Action: The system prepares an email warning notification
Logic Flow:
IF A cargo shipment has destination station name and province/state code available
AND The system prepares an email warning notification
THEN:
• The destination station string should be formatted by combining the destination station name, a comma delimiter, and the province/state code, then stored in the email text line