🔍
BIG Pega COE Team

EDI Logic Deep-Dive Specification

Category: Canada Cargo/Train Manifest response - EDI350

Complete extracted index of all Electronic Data Interchange (EDI), S309, and segment parsing behaviors across the legacy architecture.

🎯 EDI Scope Detected: Extracted 984 specific EDI behaviors out of 2427 total legacy rules in Canada Cargo/Train Manifest response - EDI350.

Module: CCISCOM 1 EDI Rules Found

R-CCISCOM-cbl-00009 9:CCCOM Initialization
Process Rules
Business View: Assuming cccom version mismatch detected requiring full initialization during the '9:CCCOM Initialization' routine, when first time iscom to cccom conversion is performed, the system executes logic to ensure that transfer cc-common-area from iscom to cccom directly without intermediate default value assignment.
Given
CCCOM version mismatch detected requiring full initialization
When
First time ISCOM to CCCOM conversion is performed
Then
Transfer CC-COMMON-AREA from ISCOM to CCCOM directly without intermediate default value assignment

Module: GCCIH 13 EDI Rules Found

R-GCCIH-cbl-00001 1:Initialize Program Control
Process Rules
Business View: Assuming a message processing operation is initiated during the '1:Initialize Program Control' routine, when the system begins message processing, the system executes logic to ensure that the current program name is saved and the module name becomes the active program identifier.
Given
A message processing operation is initiated
When
The system begins message processing
Then
The current program name is saved and the module name becomes the active program identifier
R-GCCIH-cbl-00003 3:Format CCN Status Message
Definitional Rules
Business View: Assuming ih notification data is prepared with security controls during the '3:Format CCN Status Message' routine, when the ccn status message is being formatted, the system executes logic to ensure that the 91-byte input data is moved to positions 2-91 of the message structure and the formatted input is copied to the message area.
Given
IH notification data is prepared with security controls
When
The CCN status message is being formatted
Then
The 91-byte input data is moved to positions 2-91 of the message structure and the formatted input is copied to the message area
R-GCCIH-cbl-00004 3:Format CCN Status Message
Process Rules
Business View: Assuming a ccn status message is formatted and ready for processing during the '3:Format CCN Status Message' routine, when the message is prepared for transmission, the system executes logic to ensure that the accept status is set to spaces to indicate a cleared/ready state.
Given
A CCN status message is formatted and ready for processing
When
The message is prepared for transmission
Then
The accept status is set to spaces to indicate a cleared/ready state
R-GCCIH-cbl-00005 4:Send Initial IMS Message
Action Rules
Business View: Assuming a formatted ccn status message with cleared accept status during the '4:Send Initial IMS Message' routine, when the message is sent for initial processing, the system executes logic to ensure that the cims service is invoked with change operation parameters to process the message.
Given
A formatted CCN status message with cleared accept status
When
The message is sent for initial processing
Then
The CIMS service is invoked with change operation parameters to process the message
R-GCCIH-cbl-00006 5:Write Message Log
Action Rules
Business View: Assuming a message has been processed through initial ims processing during the '5:Write Message Log' routine, when the message logging is performed, the system executes logic to ensure that the writmsgl service is invoked with message code, content, length, and module name for complete audit logging.
Given
A message has been processed through initial IMS processing
When
The message logging is performed
Then
The WRITMSGL service is invoked with message code, content, length, and module name for complete audit logging
R-GCCIH-cbl-00007 6:Purge IMS Message
Action Rules
Business View: Assuming a message has been processed and logged successfully during the '6:Purge IMS Message' routine, when the cleanup operation is performed, the system executes logic to ensure that the cims service is invoked with purge operation to remove the processed message from the system.
Given
A message has been processed and logged successfully
When
The cleanup operation is performed
Then
The CIMS service is invoked with purge operation to remove the processed message from the system
R-GCCIH-cbl-00015 Move CCN Data to Input Structure Position 2-92
Policy Rules
Business View: Assuming a ccn status message is being prepared during the 'Move CCN Data to Input Structure Position 2-92' routine, when security initialization is performed, the system executes logic to ensure that the security byte is set to high-values indicating maximum security level.
Given
A CCN status message is being prepared
When
Security initialization is performed
Then
The security byte is set to HIGH-VALUES indicating maximum security level
R-GCCIH-cbl-00016 Transfer Formatted Input to IH Message Structure
Process Rules
Business View: Assuming gcx153-input structure contains properly formatted ccn data with security byte during the 'Transfer Formatted Input to IH Message Structure' routine, when message structure transfer is initiated, the system executes logic to ensure that the complete formatted input is transferred to gct1531e-msg for ih processing.
Given
GCX153-INPUT structure contains properly formatted CCN data with security byte
When
Message structure transfer is initiated
Then
The complete formatted input is transferred to GCT1531E-MSG for IH processing
R-GCCIH-cbl-00017 Execute CIMS Call with CHNG Function
Action Rules
Business View: Assuming message input data has been prepared in gcx153-input structure and accept status is cleared during the 'Execute CIMS Call with CHNG Function' routine, when system calls cims program with chng function using cccom, alt-pcb, and gct1531e parameters, the system executes logic to ensure that ims message processing is initiated for the prepared message.
Given
Message input data has been prepared in GCX153-INPUT structure and accept status is cleared
When
System calls CIMS program with CHNG function using CCCOM, ALT-PCB, and GCT1531E parameters
Then
IMS message processing is initiated for the prepared message
R-GCCIH-cbl-00018 Prepare Log Parameters
Process Rules
Business View: Assuming a ccn status notification message needs to be logged during the 'Prepare Log Parameters' routine, when the system prepares logging parameters, the system executes logic to ensure that the message code, message content, message length, and module name are made available for the logging operation.
Given
A CCN status notification message needs to be logged
When
The system prepares logging parameters
Then
The message code, message content, message length, and module name are made available for the logging operation
R-GCCIH-cbl-00019 Call WRITMSGL Program
Action Rules
Business View: Assuming all logging parameters are prepared for the ccn status message during the 'Call WRITMSGL Program' routine, when the system calls the writmsgl program with message code, message content, message length, and module name, the system executes logic to ensure that the writmsgl program is invoked to log the ccn status notification message.
Given
All logging parameters are prepared for the CCN status message
When
The system calls the WRITMSGL program with message code, message content, message length, and module name
Then
The WRITMSGL program is invoked to log the CCN status notification message
R-GCCIH-cbl-00020 Execute PURG Function
Action Rules
Business View: Assuming message processing has been completed and logged during the 'Execute PURG Function' routine, when system initiates message cleanup process, the system executes logic to ensure that cims program is called with purg function to purge the message.
Given
Message processing has been completed and logged
When
System initiates message cleanup process
Then
CIMS program is called with PURG function to purge the message
R-GCCIH-cbl-00021 Complete Message Processing
Process Rules
Business View: Assuming message has been processed and purge function has been executed during the 'Complete Message Processing' routine, when all message operations are completed, the system executes logic to ensure that system returns control to the calling program to complete the process.
Given
Message has been processed and purge function has been executed
When
All message operations are completed
Then
System returns control to the calling program to complete the process

Module: GCCTBIO 67 EDI Rules Found

R-GCCTBIO-cbl-00006 8:Initialize Root Segment SSA
Process Rules
Business View: Assuming a validated operation targets the root segment gcstbrt during the '8:Initialize Root Segment SSA' routine, when the ssa flag indicates qualified search is required, the system executes logic to ensure that the system sets the root segment key value for targeted access.
Given
A validated operation targets the root segment GCSTBRT
When
The SSA flag indicates qualified search is required
Then
The system sets the root segment key value for targeted access
R-GCCTBIO-cbl-00007 9:Initialize Dependent Segment SSA
Process Rules
Business View: <EXCLUSION CRITERIA> If a validated operation targets the dependent segment gcstbdp with qualified ssa, and the unqualified ssa flag is not set occurs during the '9:Initialize Dependent Segment SSA' routine, then the system must guarantee that the system sets both root segment key value and dependent segment key value for hierarchical access.
EXCLUDING
A validated operation targets the dependent segment GCSTBDP with qualified SSA
When
The unqualified SSA flag is not set
Then
The system sets both root segment key value and dependent segment key value for hierarchical access
R-GCCTBIO-cbl-00008 10:Handle Dependent Segment Unqualified Access
Process Rules
Business View: Assuming a validated operation targets the dependent segment gcstbdp during the '10:Handle Dependent Segment Unqualified Access' routine, when either the unqualified ssa flag is set or the ssa flag indicates unqualified search, the system executes logic to ensure that the system sets only the root segment key value and configures unqualified ssa for broader search scope.
Given
A validated operation targets the dependent segment GCSTBDP
When
Either the unqualified SSA flag is set or the SSA flag indicates unqualified search
Then
The system sets only the root segment key value and configures unqualified SSA for broader search scope
R-GCCTBIO-cbl-00009 9:Initialize Dependent Segment SSA
Validation Rules
Business View: Assuming a validated operation specifies a segment name during the '9:Initialize Dependent Segment SSA' routine, when the segment name is neither gcstbrt (root) nor gcstbdp (dependent), the system executes logic to ensure that the system marks the operation as not valid and prevents database access.
Given
A validated operation specifies a segment name
When
The segment name is neither GCSTBRT (root) nor GCSTBDP (dependent)
Then
The system marks the operation as not valid and prevents database access
R-GCCTBIO-cbl-00010 11:Route Root Segment Access
Decision Rules
Business View: Assuming a validated operation targets the root segment with initialized ssa during the '11:Route Root Segment Access' routine, when the operation is ready for database access, the system executes logic to ensure that the system routes to primary pcb if second pcb flag is not set, otherwise routes to secondary pcb.
Given
A validated operation targets the root segment with initialized SSA
When
The operation is ready for database access
Then
The system routes to primary PCB if second PCB flag is not set, otherwise routes to secondary PCB
R-GCCTBIO-cbl-00011 14:Route Dependent Segment Access
Decision Rules
Business View: Assuming a validated operation targets the dependent segment with initialized ssa during the '14:Route Dependent Segment Access' routine, when the operation is ready for database access, the system executes logic to ensure that the system routes to primary pcb if second pcb flag is not set, otherwise routes to secondary pcb.
Given
A validated operation targets the dependent segment with initialized SSA
When
The operation is ready for database access
Then
The system routes to primary PCB if second PCB flag is not set, otherwise routes to secondary PCB
R-GCCTBIO-cbl-00012 12:Execute Root Segment Database Call with Primary PCB
Action Rules
Business View: Assuming a root segment operation is routed to primary pcb during the '12:Execute Root Segment Database Call with Primary PCB' routine, when the ssa configuration determines the call parameters, the system executes logic to ensure that the system calls cims with appropriate ssa parameters: qualified ssa for targeted access, unqualified ssa for broader access, or no ssa for direct operations.
Given
A root segment operation is routed to primary PCB
When
The SSA configuration determines the call parameters
Then
The system calls CIMS with appropriate SSA parameters: qualified SSA for targeted access, unqualified SSA for broader access, or no SSA for direct operations
R-GCCTBIO-cbl-00013 13:Execute Root Segment Database Call with Secondary PCB
Action Rules
Business View: Assuming a root segment operation is routed to secondary pcb during the '13:Execute Root Segment Database Call with Secondary PCB' routine, when the ssa configuration determines the call parameters, the system executes logic to ensure that the system calls cims with secondary pcb and appropriate ssa parameters: qualified ssa for targeted access, unqualified ssa for broader access, or no ssa for direct operations.
Given
A root segment operation is routed to secondary PCB
When
The SSA configuration determines the call parameters
Then
The system calls CIMS with secondary PCB and appropriate SSA parameters: qualified SSA for targeted access, unqualified SSA for broader access, or no SSA for direct operations
R-GCCTBIO-cbl-00014 15:Execute Dependent Segment Database Call with Primary PCB
Action Rules
Business View: Assuming a dependent segment operation is routed to primary pcb during the '15:Execute Dependent Segment Database Call with Primary PCB' routine, when the ssa configuration determines the call parameters, the system executes logic to ensure that the system calls cims with hierarchical ssa parameters: both root and dependent qualified ssas for targeted access, root qualified and dependent unqualified ssas for mixed access, or no ssa for direct operations.
Given
A dependent segment operation is routed to primary PCB
When
The SSA configuration determines the call parameters
Then
The system calls CIMS with hierarchical SSA parameters: both root and dependent qualified SSAs for targeted access, root qualified and dependent unqualified SSAs for mixed access, or no SSA for direct operations
R-GCCTBIO-cbl-00015 16:Execute Dependent Segment Database Call with Secondary PCB
Action Rules
Business View: Assuming a dependent segment operation is routed to secondary pcb during the '16:Execute Dependent Segment Database Call with Secondary PCB' routine, when the ssa configuration determines the call parameters, the system executes logic to ensure that the system calls cims with secondary pcb and hierarchical ssa parameters: both root and dependent qualified ssas for targeted access, root qualified and dependent unqualified ssas for mixed access, or no ssa for direct operations.
Given
A dependent segment operation is routed to secondary PCB
When
The SSA configuration determines the call parameters
Then
The system calls CIMS with secondary PCB and hierarchical SSA parameters: both root and dependent qualified SSAs for targeted access, root qualified and dependent unqualified SSAs for mixed access, or no SSA for direct operations
R-GCCTBIO-cbl-00087 Configure Unqualified SSA for Insert
Decision Rules
Business View: Assuming the function code is isrt and accept status is configured for insert during the 'Configure Unqualified SSA for Insert' routine, when the system configures the segment search argument, the system executes logic to ensure that the ssa flag should be set to unqualified ssa type for insert processing.
Given
The function code is ISRT and accept status is configured for insert
When
The system configures the segment search argument
Then
The SSA flag should be set to unqualified SSA type for insert processing
R-GCCTBIO-cbl-00033 Check if Segment is Root Segment
Decision Rules
Business View: Assuming a segment name is provided for processing during the 'Check if Segment is Root Segment' routine, when the system evaluates the segment name against the root segment identifier, the system executes logic to ensure that the system determines if the segment is a root segment type and routes accordingly.
Given
A segment name is provided for processing
When
The system evaluates the segment name against the root segment identifier
Then
The system determines if the segment is a root segment type and routes accordingly
R-GCCTBIO-cbl-00034 SSA Type = QUALIFIED-SSA?
Decision Rules
Business View: Assuming a root segment has been identified for processing during the 'SSA Type = QUALIFIED-SSA?' routine, when the system checks the ssa flag type for qualified search requirements, the system executes logic to ensure that the system determines whether to use qualified or unqualified ssa for the root segment access.
Given
A root segment has been identified for processing
When
The system checks the SSA flag type for qualified search requirements
Then
The system determines whether to use qualified or unqualified SSA for the root segment access
R-GCCTBIO-cbl-00035 Set Root Segment Key Value
Action Rules
Business View: Assuming a root segment requires qualified ssa processing during the 'Set Root Segment Key Value' routine, when the ssa flag indicates qualified search is needed, the system executes logic to ensure that the system assigns the root segment key value to enable precise segment access.
Given
A root segment requires qualified SSA processing
When
The SSA flag indicates qualified search is needed
Then
The system assigns the root segment key value to enable precise segment access
R-GCCTBIO-cbl-00036 Skip Key Setup
Process Rules
Business View: Assuming a root segment is being processed with unqualified ssa requirements during the 'Skip Key Setup' routine, when the ssa flag indicates unqualified search is acceptable, the system executes logic to ensure that the system skips the key value assignment and continues processing without specific key setup.
Given
A root segment is being processed with unqualified SSA requirements
When
The SSA flag indicates unqualified search is acceptable
Then
The system skips the key value assignment and continues processing without specific key setup
R-GCCTBIO-cbl-00037 Set Root Segment Key Value Set Dependent Segment Key Value
Process Rules
Business View: <EXCLUSION CRITERIA> If the segment name is a dependent segment (gcstbdp-key-name) and the ssa flag is set to qualified ssa and the unqualified ssa flag is not set (equals space), and the system initializes the ssa structure for dependent segment access occurs during the 'Set Root Segment Key Value Set Dependent Segment Key Value' routine, then the system must guarantee that the system sets the root segment key value from gcstbrt-key and sets the dependent segment key value from gcstbdp-key.
EXCLUDING
The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is set to qualified SSA and the unqualified SSA flag is not set (equals space)
When
The system initializes the SSA structure for dependent segment access
Then
The system sets the root segment key value from GCSTBRT-KEY and sets the dependent segment key value from GCSTBDP-KEY
R-GCCTBIO-cbl-00038 Set Root Segment Key Value Change SSA Type to Unqualified
Decision Rules
Business View: Assuming the segment name is a dependent segment (gcstbdp-key-name) and the ssa flag is set to qualified ssa and the unqualified ssa flag is set (not equal to space) during the 'Set Root Segment Key Value Change SSA Type to Unqualified' routine, when the system initializes the ssa structure for dependent segment access, the system executes logic to ensure that the system sets the root segment key value from gcstbrt-key and changes the ssa flag to unqualified ssa.
Given
The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is set to qualified SSA and the unqualified SSA flag is set (not equal to space)
When
The system initializes the SSA structure for dependent segment access
Then
The system sets the root segment key value from GCSTBRT-KEY and changes the SSA flag to unqualified SSA
R-GCCTBIO-cbl-00039 Set Root Segment Key Value Change SSA Type to Unqualified
Process Rules
Business View: <EXCLUSION CRITERIA> If the segment name is a dependent segment (gcstbdp-key-name) and the ssa flag is not set to qualified ssa, and the system initializes the ssa structure for dependent segment access occurs during the 'Set Root Segment Key Value Change SSA Type to Unqualified' routine, then the system must guarantee that the system sets the root segment key value from gcstbrt-key and ensures the ssa flag is set to unqualified ssa.
EXCLUDING
The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is not set to qualified SSA
When
The system initializes the SSA structure for dependent segment access
Then
The system sets the root segment key value from GCSTBRT-KEY and ensures the SSA flag is set to unqualified SSA
R-GCCTBIO-cbl-00091 Set Root Segment Key Value
Decision Rules
Business View: <EXCLUSION CRITERIA> If the segment name is a dependent segment (gcstbdp-key-name) and the ssa flag is qualified and the unqualified ssa flag is not set (space), and the system initializes the ssa configuration occurs during the 'Set Root Segment Key Value' routine, then the system must guarantee that the system sets both the root segment key value from gcstbrt-key and the dependent segment key value from gcstbdp-key.
EXCLUDING
The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is qualified and the unqualified SSA flag is not set (space)
When
The system initializes the SSA configuration
Then
The system sets both the root segment key value from GCSTBRT-KEY and the dependent segment key value from GCSTBDP-KEY
R-GCCTBIO-cbl-00092 Use Alternative SSA Configuration
Decision Rules
Business View: Assuming the segment name is a dependent segment (gcstbdp-key-name) and the ssa flag is qualified and the unqualified ssa flag is set (not space) during the 'Use Alternative SSA Configuration' routine, when the system initializes the ssa configuration, the system executes logic to ensure that the system sets only the root segment key value from gcstbrt-key and changes the ssa flag to unqualified.
Given
The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is qualified and the unqualified SSA flag is set (not space)
When
The system initializes the SSA configuration
Then
The system sets only the root segment key value from GCSTBRT-KEY and changes the SSA flag to unqualified
R-GCCTBIO-cbl-00093 Use Alternative SSA Configuration
Decision Rules
Business View: <EXCLUSION CRITERIA> If the segment name is a dependent segment (gcstbdp-key-name) and the ssa flag is not qualified, and the system initializes the ssa configuration occurs during the 'Use Alternative SSA Configuration' routine, then the system must guarantee that the system sets the root segment key value from gcstbrt-key and ensures the ssa flag is set to unqualified.
EXCLUDING
The segment name is a dependent segment (GCSTBDP-KEY-NAME) and the SSA flag is not qualified
When
The system initializes the SSA configuration
Then
The system sets the root segment key value from GCSTBRT-KEY and ensures the SSA flag is set to unqualified
R-GCCTBIO-cbl-00094 Set Root Key Value
Decision Rules
Business View: <EXCLUSION CRITERIA> If segment name is gcstbdp dependent segment and ssa type is qualified and unqualified ssa flag is not set (space), and ssa initialization is performed occurs during the 'Set Root Key Value' routine, then the system must guarantee that root key value is set from gcstbrt-key and dependent key value is set from gcstbdp-key.
EXCLUDING
Segment name is GCSTBDP dependent segment AND SSA type is qualified AND unqualified SSA flag is not set (space)
When
SSA initialization is performed
Then
Root key value is set from GCSTBRT-KEY AND dependent key value is set from GCSTBDP-KEY
R-GCCTBIO-cbl-00095 Set Root Key Value Only
Decision Rules
Business View: Assuming segment name is gcstbdp dependent segment and ssa type is qualified and unqualified ssa flag is set during the 'Set Root Key Value Only' routine, when ssa initialization is performed, the system executes logic to ensure that root key value is set from gcstbrt-key and ssa type is changed to unqualified.
Given
Segment name is GCSTBDP dependent segment AND SSA type is qualified AND unqualified SSA flag is set
When
SSA initialization is performed
Then
Root key value is set from GCSTBRT-KEY AND SSA type is changed to unqualified
R-GCCTBIO-cbl-00096 Set Root Key Value
Decision Rules
Business View: Assuming segment name is gcstbdp dependent segment and ssa type is unqualified during the 'Set Root Key Value' routine, when ssa initialization is performed, the system executes logic to ensure that root key value is set from gcstbrt-key and ssa type is set to unqualified.
Given
Segment name is GCSTBDP dependent segment AND SSA type is unqualified
When
SSA initialization is performed
Then
Root key value is set from GCSTBRT-KEY AND SSA type is set to unqualified
R-GCCTBIO-cbl-00040 Is Segment GCSTBDP?
Validation Rules
Business View: Assuming a segment name is provided for processing during the 'Is Segment GCSTBDP?' routine, when the system checks the segment type, the system executes logic to ensure that the system identifies whether it is a dependent segment (gcstbdp-key-name) or not.
Given
A segment name is provided for processing
When
The system checks the segment type
Then
The system identifies whether it is a dependent segment (GCSTBDP-KEY-NAME) or not
R-GCCTBIO-cbl-00041 Is SSA Type Qualified?
Decision Rules
Business View: Assuming a dependent segment is being processed during the 'Is SSA Type Qualified?' routine, when the system evaluates the ssa flag type, the system executes logic to ensure that the system determines if the ssa type is qualified or not.
Given
A dependent segment is being processed
When
The system evaluates the SSA flag type
Then
The system determines if the SSA type is qualified or not
R-GCCTBIO-cbl-00042 Is Unqualified Flag Set?
Decision Rules
Business View: Assuming a dependent segment with qualified ssa type is being processed during the 'Is Unqualified Flag Set?' routine, when the system checks the unqualified ssa flag status, the system executes logic to ensure that the system determines if the unqualified flag is set (not space) or not set (space).
Given
A dependent segment with qualified SSA type is being processed
When
The system checks the unqualified SSA flag status
Then
The system determines if the unqualified flag is set (not space) or not set (space)
R-GCCTBIO-cbl-00043 Set Root Key Value, Set Dependent Key Value, Keep Qualified SSA Type
Process Rules
Business View: <EXCLUSION CRITERIA> If a dependent segment with qualified ssa type and unqualified flag not set, and the system configures the ssa parameters occurs during the 'Set Root Key Value, Set Dependent Key Value, Keep Qualified SSA Type' routine, then the system must guarantee that the system sets both root key value and dependent key value while maintaining qualified ssa type.
EXCLUDING
A dependent segment with qualified SSA type and unqualified flag not set
When
The system configures the SSA parameters
Then
The system sets both root key value and dependent key value while maintaining qualified SSA type
R-GCCTBIO-cbl-00044 Set Root Key Value Only, Change to Unqualified SSA Type
Process Rules
Business View: Assuming a dependent segment with qualified ssa type and unqualified flag set during the 'Set Root Key Value Only, Change to Unqualified SSA Type' routine, when the system configures the ssa parameters, the system executes logic to ensure that the system sets only the root key value and changes the ssa type to unqualified.
Given
A dependent segment with qualified SSA type and unqualified flag set
When
The system configures the SSA parameters
Then
The system sets only the root key value and changes the SSA type to unqualified
R-GCCTBIO-cbl-00045 Is SSA Type Unqualified?
Decision Rules
Business View: <EXCLUSION CRITERIA> If a dependent segment is being processed and ssa type is not qualified, and the system evaluates the ssa flag type occurs during the 'Is SSA Type Unqualified?' routine, then the system must guarantee that the system determines if the ssa type is unqualified.
EXCLUDING
A dependent segment is being processed and SSA type is not qualified
When
The system evaluates the SSA flag type
Then
The system determines if the SSA type is unqualified
R-GCCTBIO-cbl-00046 Set Root Key Value, Force Unqualified SSA Type
Process Rules
Business View: Assuming a dependent segment with unqualified ssa type during the 'Set Root Key Value, Force Unqualified SSA Type' routine, when the system configures the ssa parameters, the system executes logic to ensure that the system sets the root key value and forces the ssa type to unqualified.
Given
A dependent segment with unqualified SSA type
When
The system configures the SSA parameters
Then
The system sets the root key value and forces the SSA type to unqualified
R-GCCTBIO-cbl-00047 Invalid Segment - Set Error Flag
Validation Rules
Business View: <EXCLUSION CRITERIA> If a segment name that is not a recognized segment type, and the system processes the segment occurs during the 'Invalid Segment - Set Error Flag' routine, then the system must guarantee that the system sets the return flag to indicate an invalid segment error.
EXCLUDING
A segment name that is not a recognized segment type
When
The system processes the segment
Then
The system sets the return flag to indicate an invalid segment error
R-GCCTBIO-cbl-00048 Route to Primary PCB
Action Rules
Business View: Assuming a root segment access request is being processed during the 'Route to Primary PCB' routine, when the second pcb flag is spaces (not set), the system executes logic to ensure that the system routes the request to primary pcb processing (b310-access-root-pcb1).
Given
A root segment access request is being processed
When
The second PCB flag is spaces (not set)
Then
The system routes the request to primary PCB processing (B310-ACCESS-ROOT-PCB1)
R-GCCTBIO-cbl-00049 Route to Secondary PCB
Action Rules
Business View: <EXCLUSION CRITERIA> If a root segment access request is being processed, and the second pcb flag is not spaces (is set) occurs during the 'Route to Secondary PCB' routine, then the system must guarantee that the system routes the request to secondary pcb processing (b320-access-root-pcb2).
EXCLUDING
A root segment access request is being processed
When
The second PCB flag is not spaces (is set)
Then
The system routes the request to secondary PCB processing (B320-ACCESS-ROOT-PCB2)
R-GCCTBIO-cbl-00050 Execute Database Call with Qualified SSA
Action Rules
Business View: Assuming the system is processing a root segment access request and the ssa flag indicates qualified ssa is required during the 'Execute Database Call with Qualified SSA' routine, when the database call is executed for root segment using primary pcb, the system executes logic to ensure that the system calls the database interface with qualified root segment search arguments to retrieve specific records.
Given
The system is processing a root segment access request and the SSA flag indicates qualified SSA is required
When
The database call is executed for root segment using primary PCB
Then
The system calls the database interface with qualified root segment search arguments to retrieve specific records
R-GCCTBIO-cbl-00051 Execute Database Call with Unqualified SSA
Action Rules
Business View: Assuming the system is processing a root segment access request and the ssa flag indicates unqualified ssa is required during the 'Execute Database Call with Unqualified SSA' routine, when the database call is executed for root segment using primary pcb, the system executes logic to ensure that the system calls the database interface with unqualified root segment search arguments to retrieve records without specific criteria.
Given
The system is processing a root segment access request and the SSA flag indicates unqualified SSA is required
When
The database call is executed for root segment using primary PCB
Then
The system calls the database interface with unqualified root segment search arguments to retrieve records without specific criteria
R-GCCTBIO-cbl-00052 Execute Database Call without SSA
Action Rules
Business View: Assuming the system is processing a root segment access request and no ssa is required for the operation during the 'Execute Database Call without SSA' routine, when the database call is executed for root segment using primary pcb, the system executes logic to ensure that the system calls the database interface without any segment search arguments.
Given
The system is processing a root segment access request and no SSA is required for the operation
When
The database call is executed for root segment using primary PCB
Then
The system calls the database interface without any segment search arguments
R-GCCTBIO-cbl-00053 SSA Type Check
Decision Rules
Business View: Assuming the system is preparing to execute a database call for root segment access using primary pcb during the 'SSA Type Check' routine, when the ssa type needs to be determined for the database operation, the system executes logic to ensure that the system checks the ws-ssa-flag to determine whether to use qualified ssa, unqualified ssa, or no ssa for the database call.
Given
The system is preparing to execute a database call for root segment access using primary PCB
When
The SSA type needs to be determined for the database operation
Then
The system checks the WS-SSA-FLAG to determine whether to use qualified SSA, unqualified SSA, or no SSA for the database call
R-GCCTBIO-cbl-00054 Execute Database Call with Qualified SSA
Action Rules
Business View: Assuming the ssa type is qualified ssa and secondary pcb is selected for root segment access during the 'Execute Database Call with Qualified SSA' routine, when a database operation is requested on the root segment, the system executes logic to ensure that execute database call using secondary pcb with qualified root segment search arguments.
Given
The SSA type is qualified SSA and secondary PCB is selected for root segment access
When
A database operation is requested on the root segment
Then
Execute database call using secondary PCB with qualified root segment search arguments
R-GCCTBIO-cbl-00055 Execute Database Call with Unqualified SSA
Action Rules
Business View: Assuming the ssa type is unqualified ssa and secondary pcb is selected for root segment access during the 'Execute Database Call with Unqualified SSA' routine, when a database operation is requested on the root segment, the system executes logic to ensure that execute database call using secondary pcb with unqualified root segment search arguments.
Given
The SSA type is unqualified SSA and secondary PCB is selected for root segment access
When
A database operation is requested on the root segment
Then
Execute database call using secondary PCB with unqualified root segment search arguments
R-GCCTBIO-cbl-00056 Execute Database Call with No SSA
Action Rules
Business View: Assuming no ssa is required and secondary pcb is selected for root segment access during the 'Execute Database Call with No SSA' routine, when a database operation is requested on the root segment, the system executes logic to ensure that execute database call using secondary pcb without any search arguments.
Given
No SSA is required and secondary PCB is selected for root segment access
When
A database operation is requested on the root segment
Then
Execute database call using secondary PCB without any search arguments
R-GCCTBIO-cbl-00100 Execute Database Call with Qualified SSA
Action Rules
Business View: Assuming the ssa flag is set to qualified ssa and the system is configured to use the secondary pcb during the 'Execute Database Call with Qualified SSA' routine, when a database operation is requested for dependent segment access, the system executes logic to ensure that the system calls the database interface with the secondary pcb, user function code, segment data, and both qualified root and dependent ssa parameters.
Given
The SSA flag is set to qualified SSA and the system is configured to use the secondary PCB
When
A database operation is requested for dependent segment access
Then
The system calls the database interface with the secondary PCB, user function code, segment data, and both qualified root and dependent SSA parameters
R-GCCTBIO-cbl-00101 Execute Database Call with Unqualified SSA
Action Rules
Business View: Assuming the ssa flag is set to unqualified ssa and the system is configured to use the secondary pcb during the 'Execute Database Call with Unqualified SSA' routine, when a database operation is requested for dependent segment access, the system executes logic to ensure that the system calls the database interface with the secondary pcb, user function code, segment data, qualified root ssa, and unqualified dependent ssa parameters.
Given
The SSA flag is set to unqualified SSA and the system is configured to use the secondary PCB
When
A database operation is requested for dependent segment access
Then
The system calls the database interface with the secondary PCB, user function code, segment data, qualified root SSA, and unqualified dependent SSA parameters
R-GCCTBIO-cbl-00102 Execute Database Call with No SSA
Action Rules
Business View: Assuming the ssa flag indicates no ssa is required and the system is configured to use the secondary pcb during the 'Execute Database Call with No SSA' routine, when a database operation is requested for dependent segment access, the system executes logic to ensure that the system calls the database interface with only the secondary pcb, user function code, and segment data parameters.
Given
The SSA flag indicates no SSA is required and the system is configured to use the secondary PCB
When
A database operation is requested for dependent segment access
Then
The system calls the database interface with only the secondary PCB, user function code, and segment data parameters
R-GCCTBIO-cbl-00057 Check PCB Selection Flag
Decision Rules
Business View: Assuming a dependent segment access operation is requested during the 'Check PCB Selection Flag' routine, when the system checks the second pcb flag status, the system executes logic to ensure that if the second pcb flag is spaces (not set), route to primary pcb processing, otherwise route to secondary pcb processing.
Given
A dependent segment access operation is requested
When
The system checks the second PCB flag status
Then
If the second PCB flag is spaces (not set), route to primary PCB processing, otherwise route to secondary PCB processing
R-GCCTBIO-cbl-00058 Route to Primary PCB
Action Rules
Business View: Assuming a dependent segment access operation is requested and the second pcb flag is spaces during the 'Route to Primary PCB' routine, when the system routes the operation, the system executes logic to ensure that the operation is directed to the primary pcb dependent segment processing routine.
Given
A dependent segment access operation is requested and the second PCB flag is spaces
When
The system routes the operation
Then
The operation is directed to the primary PCB dependent segment processing routine
R-GCCTBIO-cbl-00059 Route to Secondary PCB
Action Rules
Business View: <EXCLUSION CRITERIA> If a dependent segment access operation is requested and the second pcb flag is not spaces, and the system routes the operation occurs during the 'Route to Secondary PCB' routine, then the system must guarantee that the operation is directed to the secondary pcb dependent segment processing routine.
EXCLUDING
A dependent segment access operation is requested and the second PCB flag is not spaces
When
The system routes the operation
Then
The operation is directed to the secondary PCB dependent segment processing routine
R-GCCTBIO-cbl-00060 Execute Dependent Segment Operation via Primary PCB
Action Rules
Business View: Assuming a dependent segment operation is routed to primary pcb and the ssa flag indicates qualified ssa during the 'Execute Dependent Segment Operation via Primary PCB' routine, when the system executes the database operation, the system executes logic to ensure that call the database interface with primary pcb, function code, segment data, qualified root ssa, and qualified dependent ssa.
Given
A dependent segment operation is routed to primary PCB and the SSA flag indicates qualified SSA
When
The system executes the database operation
Then
Call the database interface with primary PCB, function code, segment data, qualified root SSA, and qualified dependent SSA
R-GCCTBIO-cbl-00061 Execute Dependent Segment Operation via Primary PCB
Action Rules
Business View: Assuming a dependent segment operation is routed to primary pcb and the ssa flag indicates unqualified ssa during the 'Execute Dependent Segment Operation via Primary PCB' routine, when the system executes the database operation, the system executes logic to ensure that call the database interface with primary pcb, function code, segment data, qualified root ssa, and unqualified dependent ssa.
Given
A dependent segment operation is routed to primary PCB and the SSA flag indicates unqualified SSA
When
The system executes the database operation
Then
Call the database interface with primary PCB, function code, segment data, qualified root SSA, and unqualified dependent SSA
R-GCCTBIO-cbl-00062 Execute Dependent Segment Operation via Primary PCB
Action Rules
Business View: Assuming a dependent segment operation is routed to primary pcb and the ssa flag indicates no ssa during the 'Execute Dependent Segment Operation via Primary PCB' routine, when the system executes the database operation, the system executes logic to ensure that call the database interface with primary pcb, function code, and segment data only.
Given
A dependent segment operation is routed to primary PCB and the SSA flag indicates no SSA
When
The system executes the database operation
Then
Call the database interface with primary PCB, function code, and segment data only
R-GCCTBIO-cbl-00063 Execute Dependent Segment Operation via Secondary PCB
Action Rules
Business View: Assuming a dependent segment operation is routed to secondary pcb and the ssa flag indicates qualified ssa during the 'Execute Dependent Segment Operation via Secondary PCB' routine, when the system executes the database operation, the system executes logic to ensure that call the database interface with secondary pcb, function code, segment data, qualified root ssa, and qualified dependent ssa.
Given
A dependent segment operation is routed to secondary PCB and the SSA flag indicates qualified SSA
When
The system executes the database operation
Then
Call the database interface with secondary PCB, function code, segment data, qualified root SSA, and qualified dependent SSA
R-GCCTBIO-cbl-00064 Execute Dependent Segment Operation via Secondary PCB
Action Rules
Business View: Assuming a dependent segment operation is routed to secondary pcb and the ssa flag indicates unqualified ssa during the 'Execute Dependent Segment Operation via Secondary PCB' routine, when the system executes the database operation, the system executes logic to ensure that call the database interface with secondary pcb, function code, segment data, qualified root ssa, and unqualified dependent ssa.
Given
A dependent segment operation is routed to secondary PCB and the SSA flag indicates unqualified SSA
When
The system executes the database operation
Then
Call the database interface with secondary PCB, function code, segment data, qualified root SSA, and unqualified dependent SSA
R-GCCTBIO-cbl-00065 Execute Dependent Segment Operation via Secondary PCB
Action Rules
Business View: Assuming a dependent segment operation is routed to secondary pcb and the ssa flag indicates no ssa during the 'Execute Dependent Segment Operation via Secondary PCB' routine, when the system executes the database operation, the system executes logic to ensure that call the database interface with secondary pcb, function code, and segment data only.
Given
A dependent segment operation is routed to secondary PCB and the SSA flag indicates no SSA
When
The system executes the database operation
Then
Call the database interface with secondary PCB, function code, and segment data only
R-GCCTBIO-cbl-00066 Check Operation Status
Decision Rules
Business View: Assuming a dependent segment database operation has been executed during the 'Check Operation Status' routine, when the system checks the operation status code, the system executes logic to ensure that if the status code is spaces, set return flag to successful, otherwise set return flag to unsuccessful.
Given
A dependent segment database operation has been executed
When
The system checks the operation status code
Then
If the status code is spaces, set return flag to successful, otherwise set return flag to unsuccessful
R-GCCTBIO-cbl-00067 Execute Database Call with Qualified SSA - Root Segment SSA - Dependent Segment SSA
Action Rules
Business View: Assuming a dependent segment database operation is requested using primary pcb and the ssa flag is set to qualified ssa during the 'Execute Database Call with Qualified SSA - Root Segment SSA - Dependent Segment SSA' routine, when the database call is executed, the system executes logic to ensure that the system calls the database interface with the function code, primary pcb, segment data, root segment qualified ssa, and dependent segment qualified ssa.
Given
A dependent segment database operation is requested using primary PCB and the SSA flag is set to qualified SSA
When
The database call is executed
Then
The system calls the database interface with the function code, primary PCB, segment data, root segment qualified SSA, and dependent segment qualified SSA
R-GCCTBIO-cbl-00068 Execute Database Call with Unqualified SSA - Root Segment SSA - Unqualified Dependent SSA
Action Rules
Business View: Assuming a dependent segment database operation is requested using primary pcb and the ssa flag is set to unqualified ssa during the 'Execute Database Call with Unqualified SSA - Root Segment SSA - Unqualified Dependent SSA' routine, when the database call is executed, the system executes logic to ensure that the system calls the database interface with the function code, primary pcb, segment data, root segment qualified ssa, and dependent segment unqualified ssa.
Given
A dependent segment database operation is requested using primary PCB and the SSA flag is set to unqualified SSA
When
The database call is executed
Then
The system calls the database interface with the function code, primary PCB, segment data, root segment qualified SSA, and dependent segment unqualified SSA
R-GCCTBIO-cbl-00069 Execute Database Call with No SSA - No SSA Parameters
Action Rules
Business View: Assuming a dependent segment database operation is requested using primary pcb and the ssa flag is set to no ssa during the 'Execute Database Call with No SSA - No SSA Parameters' routine, when the database call is executed, the system executes logic to ensure that the system calls the database interface with only the function code, primary pcb, and segment data without any ssa parameters.
Given
A dependent segment database operation is requested using primary PCB and the SSA flag is set to no SSA
When
The database call is executed
Then
The system calls the database interface with only the function code, primary PCB, and segment data without any SSA parameters
R-GCCTBIO-cbl-00070 SSA Type?
Decision Rules
Business View: Assuming a dependent segment database operation is being processed with primary pcb during the 'SSA Type?' routine, when the system checks the ssa flag value, the system executes logic to ensure that the system routes to qualified ssa call if flag equals qualified ssa, routes to unqualified ssa call if flag equals unqualified ssa, or routes to no ssa call for any other value.
Given
A dependent segment database operation is being processed with primary PCB
When
The system checks the SSA flag value
Then
The system routes to qualified SSA call if flag equals qualified SSA, routes to unqualified SSA call if flag equals unqualified SSA, or routes to no SSA call for any other value
R-GCCTBIO-cbl-00103 Execute Database Call with Qualified SSA
Action Rules
Business View: Assuming a dependent segment access request is being processed using primary pcb and the ssa flag is set to qualified ssa during the 'Execute Database Call with Qualified SSA' routine, when the system determines the ssa type for database call execution, the system executes logic to ensure that the system calls the database interface with both root segment qualified ssa and dependent segment qualified ssa parameters.
Given
A dependent segment access request is being processed using primary PCB and the SSA flag is set to qualified SSA
When
The system determines the SSA type for database call execution
Then
The system calls the database interface with both root segment qualified SSA and dependent segment qualified SSA parameters
R-GCCTBIO-cbl-00104 Execute Database Call with Unqualified SSA
Action Rules
Business View: Assuming a dependent segment access request is being processed using primary pcb and the ssa flag is set to unqualified ssa during the 'Execute Database Call with Unqualified SSA' routine, when the system determines the ssa type for database call execution, the system executes logic to ensure that the system calls the database interface with root segment qualified ssa and dependent segment unqualified ssa parameters.
Given
A dependent segment access request is being processed using primary PCB and the SSA flag is set to unqualified SSA
When
The system determines the SSA type for database call execution
Then
The system calls the database interface with root segment qualified SSA and dependent segment unqualified SSA parameters
R-GCCTBIO-cbl-00105 Execute Database Call with No SSA
Action Rules
Business View: Assuming a dependent segment access request is being processed using primary pcb and the ssa flag is set to no ssa during the 'Execute Database Call with No SSA' routine, when the system determines the ssa type for database call execution, the system executes logic to ensure that the system calls the database interface without any ssa parameters, using only basic operation parameters.
Given
A dependent segment access request is being processed using primary PCB and the SSA flag is set to no SSA
When
The system determines the SSA type for database call execution
Then
The system calls the database interface without any SSA parameters, using only basic operation parameters
R-GCCTBIO-cbl-00071 Execute Database Call with Qualified SSA
Action Rules
Business View: Assuming the system is processing a dependent segment access request and the ssa flag is set to qualified ssa and the second pcb flag is set during the 'Execute Database Call with Qualified SSA' routine, when the database call is executed for dependent segment access, the system executes logic to ensure that the system calls the database interface with secondary pcb, function code, segment data, root segment ssa, and dependent segment ssa.
Given
The system is processing a dependent segment access request AND the SSA flag is set to qualified SSA AND the second PCB flag is set
When
The database call is executed for dependent segment access
Then
The system calls the database interface with secondary PCB, function code, segment data, root segment SSA, and dependent segment SSA
R-GCCTBIO-cbl-00072 Execute Database Call with Unqualified SSA
Action Rules
Business View: Assuming the system is processing a dependent segment access request and the ssa flag is set to unqualified ssa and the second pcb flag is set during the 'Execute Database Call with Unqualified SSA' routine, when the database call is executed for dependent segment access, the system executes logic to ensure that the system calls the database interface with secondary pcb, function code, segment data, root segment ssa, and dependent segment unqualified ssa.
Given
The system is processing a dependent segment access request AND the SSA flag is set to unqualified SSA AND the second PCB flag is set
When
The database call is executed for dependent segment access
Then
The system calls the database interface with secondary PCB, function code, segment data, root segment SSA, and dependent segment unqualified SSA
R-GCCTBIO-cbl-00073 Execute Database Call with No SSA
Action Rules
Business View: Assuming the system is processing a dependent segment access request and the ssa flag is set to no ssa and the second pcb flag is set during the 'Execute Database Call with No SSA' routine, when the database call is executed for dependent segment access, the system executes logic to ensure that the system calls the database interface with secondary pcb, function code, and segment data only.
Given
The system is processing a dependent segment access request AND the SSA flag is set to no SSA AND the second PCB flag is set
When
The database call is executed for dependent segment access
Then
The system calls the database interface with secondary PCB, function code, and segment data only
R-GCCTBIO-cbl-00106 Execute Database Call with Qualified SSA
Action Rules
Business View: Assuming ssa type is qualified ssa and secondary pcb is being used for dependent segment access during the 'Execute Database Call with Qualified SSA' routine, when database call is executed for dependent segment operation, the system executes logic to ensure that system calls cims with user function code, secondary pcb, segment data, root qualified ssa, and dependent qualified ssa.
Given
SSA type is qualified SSA and secondary PCB is being used for dependent segment access
When
database call is executed for dependent segment operation
Then
system calls CIMS with user function code, secondary PCB, segment data, root qualified SSA, and dependent qualified SSA
R-GCCTBIO-cbl-00107 Execute Database Call with Unqualified SSA
Action Rules
Business View: Assuming ssa type is unqualified ssa and secondary pcb is being used for dependent segment access during the 'Execute Database Call with Unqualified SSA' routine, when database call is executed for dependent segment operation, the system executes logic to ensure that system calls cims with user function code, secondary pcb, segment data, root qualified ssa, and dependent unqualified ssa.
Given
SSA type is unqualified SSA and secondary PCB is being used for dependent segment access
When
database call is executed for dependent segment operation
Then
system calls CIMS with user function code, secondary PCB, segment data, root qualified SSA, and dependent unqualified SSA
R-GCCTBIO-cbl-00108 Execute Database Call with No SSA
Action Rules
Business View: Assuming ssa type requires no ssa parameters and secondary pcb is being used for dependent segment access during the 'Execute Database Call with No SSA' routine, when database call is executed for dependent segment operation, the system executes logic to ensure that system calls cims with user function code, secondary pcb, and segment data only.
Given
SSA type requires no SSA parameters and secondary PCB is being used for dependent segment access
When
database call is executed for dependent segment operation
Then
system calls CIMS with user function code, secondary PCB, and segment data only

Module: GCCUSIO 136 EDI Rules Found

R-GCCUSIO-cbl-00001 1:Parameter Validation
Validation Rules
Business View: <EXCLUSION CRITERIA> If a cargo processing request is received with a segment name, and the segment name is not one of gcsusrt, gcsa2rt, gcsa8rt, or gcst2rt occurs during the '1:Parameter Validation' routine, then the system must guarantee that the system rejects the request with error code 0012 and message 'segment name invalid'.
EXCLUDING
A cargo processing request is received with a segment name
When
The segment name is not one of GCSUSRT, GCSA2RT, GCSA8RT, or GCST2RT
Then
The system rejects the request with error code 0012 and message 'SEGMENT NAME INVALID'
R-GCCUSIO-cbl-00002 1:Parameter Validation
Validation Rules
Business View: <EXCLUSION CRITERIA> If a cargo processing request is received with a function code, and the function code is not gu, gn, isrt, repl, or dlet occurs during the '1:Parameter Validation' routine, then the system must guarantee that the system rejects the request with error code 0012 and message 'function code invalid'.
EXCLUDING
A cargo processing request is received with a function code
When
The function code is not GU, GN, ISRT, REPL, or DLET
Then
The system rejects the request with error code 0012 and message 'FUNCTION CODE INVALID'
R-GCCUSIO-cbl-00003 1:Parameter Validation
Policy Rules
Business View: <EXCLUSION CRITERIA> If a request targets gcst2rt segment, and the function code is not gu (get unique) occurs during the '1:Parameter Validation' routine, then the system must guarantee that the system rejects the request with error code 0012 and message 'invalid function code'.
EXCLUDING
A request targets GCST2RT segment
When
The function code is not GU (Get Unique)
Then
The system rejects the request with error code 0012 and message 'INVALID FUNCTION CODE'
R-GCCUSIO-cbl-00005 Segment Type?
Process Rules
Business View: Assuming a validated cargo processing request during the 'Segment Type?' routine, when the segment type is gcsusrt, gcsa2rt, gcsa8rt, or gcst2rt, the system executes logic to ensure that the system routes to primary, secondary, message, or table processing respectively.
Given
A validated cargo processing request
When
The segment type is GCSUSRT, GCSA2RT, GCSA8RT, or GCST2RT
Then
The system routes to primary, secondary, message, or table processing respectively
R-GCCUSIO-cbl-00016 8:Secondary Index Processing
Process Rules
Business View: Assuming a cargo search request with secondary index specified during the '8:Secondary Index Processing' routine, when the index type is car-id, waybill, car-wb, bond, manifest, dest, lead-ccn, held-dest, held-border, err-orig, err-border, or err-dest, the system executes logic to ensure that the system routes to the appropriate index processing for that search type.
Given
A cargo search request with secondary index specified
When
The index type is CAR-ID, WAYBILL, CAR-WB, BOND, MANIFEST, DEST, LEAD-CCN, HELD-DEST, HELD-BORDER, ERR-ORIG, ERR-BORDER, or ERR-DEST
Then
The system routes to the appropriate index processing for that search type
R-GCCUSIO-cbl-00021 11:Secondary Database Processing
Validation Rules
Business View: Assuming a secondary segment retrieval operation is requested during the '11:Secondary Database Processing' routine, when the function is gu or gn and the secondary key is empty or spaces, the system executes logic to ensure that the system returns error code 0012 with message 'secn-key equal spaces'.
Given
A secondary segment retrieval operation is requested
When
The function is GU or GN and the secondary key is empty or spaces
Then
The system returns error code 0012 with message 'SECN-KEY EQUAL SPACES'
R-GCCUSIO-cbl-00022 12:GCSA8RT Message Processing
Validation Rules
Business View: Assuming a gcsa8rt message segment retrieval operation is requested during the '12:GCSA8RT Message Processing' routine, when the function is gu or gn and the gcsa8rt key is empty or spaces, the system executes logic to ensure that the system returns error code 0012 with message 'gcsa8rt-key equal spaces'.
Given
A GCSA8RT message segment retrieval operation is requested
When
The function is GU or GN and the GCSA8RT key is empty or spaces
Then
The system returns error code 0012 with message 'GCSA8RT-KEY EQUAL SPACES'
R-GCCUSIO-cbl-00023 12:GCSA8RT Message Processing
Decision Rules
Business View: Assuming a gcsa8rt message segment insert operation is requested during the '12:GCSA8RT Message Processing' routine, when a record with the same key already exists, perform replace operation; if no existing record, perform insert operation, the system executes logic to ensure that the system executes the appropriate database operation and restructures the message data format.
Given
A GCSA8RT message segment insert operation is requested
When
A record with the same key already exists, perform replace operation; if no existing record, perform insert operation
Then
The system executes the appropriate database operation and restructures the message data format
R-GCCUSIO-cbl-00024 16:Reference Number Processing
Process Rules
Business View: Assuming a cargo notification requires shipment reference information during the '16:Reference Number Processing' routine, when n9 reference segments exist for the cargo with qualifier 'cn', the system executes logic to ensure that the system extracts the reference number as shipment id for the notification.
Given
A cargo notification requires shipment reference information
When
N9 reference segments exist for the cargo with qualifier 'CN'
Then
The system extracts the reference number as shipment ID for the notification
R-GCCUSIO-cbl-00025 19:Station Code Processing
Action Rules
Business View: Assuming a cargo operation requires station or border information during the '19:Station Code Processing' routine, when the system needs to resolve location codes to station numbers, the system executes logic to ensure that the system retrieves station information from gcstbrt table segments using location id.
Given
A cargo operation requires station or border information
When
The system needs to resolve location codes to station numbers
Then
The system retrieves station information from GCSTBRT table segments using location ID
R-GCCUSIO-cbl-00029 Is Segment Name Valid?
Validation Rules
Business View: <EXCLUSION CRITERIA> If a segment name is provided for processing, and the segment name is not gcsusrt and not gcsa2rt and not gcsa8rt and not gcst2rt occurs during the 'Is Segment Name Valid?' routine, then the system must guarantee that the parameter should be marked as invalid with error code '0012' and message 'segment name invalid'.
EXCLUDING
A segment name is provided for processing
When
The segment name is not GCSUSRT and not GCSA2RT and not GCSA8RT and not GCST2RT
Then
The parameter should be marked as invalid with error code '0012' and message 'SEGMENT NAME INVALID'
R-GCCUSIO-cbl-00030 Is Function Code Valid?
Validation Rules
Business View: <EXCLUSION CRITERIA> If a function code is provided for processing, and the function code is not equal to 'gu ' and not equal to 'gn ' and not equal to 'isrt' and not equal to 'repl' and not equal to 'dlet' occurs during the 'Is Function Code Valid?' routine, then the system must guarantee that the parameter should be marked as invalid with error code '0012' and message 'function code invalid'.
EXCLUDING
A function code is provided for processing
When
The function code is not equal to 'GU ' and not equal to 'GN ' and not equal to 'ISRT' and not equal to 'REPL' and not equal to 'DLET'
Then
The parameter should be marked as invalid with error code '0012' and message 'FUNCTION CODE INVALID'
R-GCCUSIO-cbl-00031 Special Validation: GCST2RT with Non-GU Function?
Validation Rules
Business View: <EXCLUSION CRITERIA> If the segment name is gcst2rt, and the function code is not 'gu ' occurs during the 'Special Validation: GCST2RT with Non-GU Function?' routine, then the system must guarantee that the parameter should be marked as invalid with error code '0012' and message 'invalid function code'.
EXCLUDING
The segment name is GCST2RT
When
The function code is not 'GU '
Then
The parameter should be marked as invalid with error code '0012' and message 'INVALID FUNCTION CODE'
R-GCCUSIO-cbl-00041 Set Manifest Index
Process Rules
Business View: Assuming a cargo record has a ccn key during the 'Set Manifest Index' routine, when manifest index is being populated, the system executes logic to ensure that the system assigns the ccn key value to the manifest index field.
Given
A cargo record has a CCN key
When
Manifest index is being populated
Then
The system assigns the CCN key value to the manifest index field
R-GCCUSIO-cbl-00235 Set Manifest Index
Process Rules
Business View: Assuming a cargo record is being processed for index population during the 'Set Manifest Index' routine, when the manifest index field needs to be populated, the system executes logic to ensure that the system should copy the ccn key to the manifest index field (gcusrt-rt075-manif-index).
Given
A cargo record is being processed for index population
When
The manifest index field needs to be populated
Then
The system should copy the CCN key to the manifest index field (GCUSRT-RT075-MANIF-INDEX)
R-GCCUSIO-cbl-00495 Extract Road Number from RT082
Process Rules
Business View: <EXCLUSION CRITERIA> If a cargo record is not deleted and contains transportation routing information, and the system processes waybill index fields occurs during the 'Extract Road Number from RT082' routine, then the system must guarantee that the road number is extracted from the rt082 transportation segment.
EXCLUDING
A cargo record is not deleted and contains transportation routing information
When
The system processes waybill index fields
Then
The road number is extracted from the RT082 transportation segment
R-GCCUSIO-cbl-00497 Extract Station Number from RT082
Process Rules
Business View: <EXCLUSION CRITERIA> If a cargo record is not deleted and contains transportation routing information, and the system processes waybill index fields occurs during the 'Extract Station Number from RT082' routine, then the system must guarantee that the station number is extracted from the rt082 transportation segment.
EXCLUDING
A cargo record is not deleted and contains transportation routing information
When
The system processes waybill index fields
Then
The station number is extracted from the RT082 transportation segment
R-GCCUSIO-cbl-00499 Extract Waybill Number from RT082
Process Rules
Business View: <EXCLUSION CRITERIA> If a cargo record is not deleted and contains transportation routing information, and the system processes waybill index fields occurs during the 'Extract Waybill Number from RT082' routine, then the system must guarantee that the waybill number is extracted from the rt082 transportation segment.
EXCLUDING
A cargo record is not deleted and contains transportation routing information
When
The system processes waybill index fields
Then
The waybill number is extracted from the RT082 transportation segment
R-GCCUSIO-cbl-00501 Extract Waybill Date from RT082
Process Rules
Business View: <EXCLUSION CRITERIA> If a cargo record is not deleted and contains transportation routing information, and the system processes waybill index fields occurs during the 'Extract Waybill Date from RT082' routine, then the system must guarantee that the waybill date is extracted from the rt082 transportation segment.
EXCLUDING
A cargo record is not deleted and contains transportation routing information
When
The system processes waybill index fields
Then
The waybill date is extracted from the RT082 transportation segment
R-GCCUSIO-cbl-00062 Set Manifest Index
Process Rules
Business View: Assuming a cargo record is being updated with index fields during the 'Set Manifest Index' routine, when index field population is in progress, the system executes logic to ensure that the system copies the us ccn key to the rt075 manifest index field.
Given
A cargo record is being updated with index fields
When
Index field population is in progress
Then
The system copies the US CCN key to the RT075 manifest index field
R-GCCUSIO-cbl-00238 Is Cargo Deleted?
Decision Rules
Business View: Assuming a cargo record is being processed for index field updates during the 'Is Cargo Deleted?' routine, when the cargo status indicates it has been deleted (88-gcusrt-rt10-cpcargo-deleted is true), the system executes logic to ensure that the system should skip all index field population and exit the process immediately.
Given
A cargo record is being processed for index field updates
When
The cargo status indicates it has been deleted (88-GCUSRT-RT10-CPCARGO-DELETED is true)
Then
The system should skip all index field population and exit the process immediately
R-GCCUSIO-cbl-00244 Set Manifest Index with CCN Key
Process Rules
Business View: Assuming a cargo record with a valid ccn key is being processed during the 'Set Manifest Index with CCN Key' routine, when manifest index field needs to be populated, the system executes logic to ensure that the system should move the ccn key value to the manifest index field (rt075).
Given
A cargo record with a valid CCN key is being processed
When
Manifest index field needs to be populated
Then
The system should move the CCN key value to the manifest index field (RT075)
R-GCCUSIO-cbl-00088 Lead CCN Index Search
Decision Rules
Business View: <EXCLUSION CRITERIA> If a secondary index search request is received, and the index type is lead-ccn and lead manifest ccn is not empty occurs during the 'Lead CCN Index Search' routine, then the system must guarantee that use qualified ssa with lead ccn value, otherwise use unqualified ssa.
EXCLUDING
A secondary index search request is received
When
The index type is LEAD-CCN and lead manifest CCN is not empty
Then
Use qualified SSA with lead CCN value, otherwise use unqualified SSA
R-GCCUSIO-cbl-00100 Set Manifest Index
Process Rules
Business View: Assuming a cargo record is being processed for index updates during the 'Set Manifest Index' routine, when all other index fields have been populated, the system executes logic to ensure that the system should copy the us ccn key to the manifest index field (rt075-manif-index).
Given
A cargo record is being processed for index updates
When
All other index fields have been populated
Then
The system should copy the US CCN key to the manifest index field (RT075-MANIF-INDEX)
R-GCCUSIO-cbl-00246 Is Cargo Record Deleted?
Decision Rules
Business View: Assuming a cargo record is being processed for car id index population during the 'Is Cargo Record Deleted?' routine, when the cargo record has deletion status flag set to true (88-gcusrt-rt10-cpcargo-deleted), the system executes logic to ensure that the system skips all car id index field population and exits the process immediately.
Given
A cargo record is being processed for car ID index population
When
The cargo record has deletion status flag set to true (88-GCUSRT-RT10-CPCARGO-DELETED)
Then
The system skips all car ID index field population and exits the process immediately
R-GCCUSIO-cbl-00255 Is Cargo Deleted?
Decision Rules
Business View: Assuming a cargo record is being processed for bond index population during the 'Is Cargo Deleted?' routine, when the cargo status indicates it has been deleted (88-gcusrt-rt10-cpcargo-deleted is true), the system executes logic to ensure that the bond index population process should be skipped and control should exit immediately.
Given
A cargo record is being processed for bond index population
When
The cargo status indicates it has been deleted (88-GCUSRT-RT10-CPCARGO-DELETED is true)
Then
The bond index population process should be skipped and control should exit immediately
R-GCCUSIO-cbl-00113 Set Status Description to 'IMMEDIATE EXPORT'
Definitional Rules
Business View: Assuming a cargo record exists with cp cargo status code indicating immediate export status during the 'Set Status Description to 'IMMEDIATE EXPORT'' routine, when the system processes cargo status description setting, the system executes logic to ensure that the cargo status description field is set to 'imed-exp'.
Given
A cargo record exists with CP cargo status code indicating IMMEDIATE EXPORT status
When
The system processes cargo status description setting
Then
The cargo status description field is set to 'IMED-EXP'
R-GCCUSIO-cbl-00120 Lead CCN Exists?
Decision Rules
Business View: Assuming a cargo search request with lead ccn index type is received during the 'Lead CCN Exists?' routine, when the system checks if the lead manifest ccn field contains data, the system executes logic to ensure that if the lead manifest ccn field is not empty, the system uses qualified search with the ccn value, otherwise it uses unqualified search with empty key value.
Given
A cargo search request with lead CCN index type is received
When
The system checks if the lead manifest CCN field contains data
Then
If the lead manifest CCN field is not empty, the system uses qualified search with the CCN value, otherwise it uses unqualified search with empty key value
R-GCCUSIO-cbl-00628 Set PCB Control Block
Process Rules
Business View: Assuming a database operation is being prepared for a specific segment type during the 'Set PCB Control Block' routine, when the system sets up the database call parameters, the system executes logic to ensure that the appropriate pcb is assigned to the working storage pcb field based on the target segment.
Given
A database operation is being prepared for a specific segment type
When
The system sets up the database call parameters
Then
The appropriate PCB is assigned to the working storage PCB field based on the target segment
R-GCCUSIO-cbl-00632 Return Retrieved Data
Process Rules
Business View: Assuming a database retrieval operation completed successfully during the 'Return Retrieved Data' routine, when data is returned from the database, the system executes logic to ensure that the retrieved segment data is available in the gcwusio-io-area for further processing.
Given
A database retrieval operation completed successfully
When
Data is returned from the database
Then
The retrieved segment data is available in the GCWUSIO-IO-AREA for further processing
R-GCCUSIO-cbl-00294 Log Index Inconsistency Error
Policy Rules
Business View: <EXCLUSION CRITERIA> If an error status record exists in gcsb1rt but the associated cargo record does not exist in gcsusrt, and the system detects this data inconsistency condition occurs during the 'Log Index Inconsistency Error' routine, then the system must guarantee that the system logs error message 'gcsb1rt exist without gcsusrt' and calls error handling routine.
EXCLUDING
An error status record exists in GCSB1RT but the associated cargo record does not exist in GCSUSRT
When
The system detects this data inconsistency condition
Then
The system logs error message 'GCSB1RT EXIST WITHOUT GCSUSRT' and calls error handling routine
R-GCCUSIO-cbl-00304 Log Index Inconsistency Error
Validation Rules
Business View: <EXCLUSION CRITERIA> If a gcsb1rt index record exists but the corresponding primary cargo record is not found (status code is not spaces), and the system detects this index inconsistency occurs during the 'Log Index Inconsistency Error' routine, then the system must guarantee that the system sets error message to 'gcsb1rt exist without gcsusrt' and calls cerr error handling program.
EXCLUDING
A GCSB1RT index record exists but the corresponding primary cargo record is not found (status code is not spaces)
When
The system detects this index inconsistency
Then
The system sets error message to 'GCSB1RT EXIST WITHOUT GCSUSRT' and calls CERR error handling program
R-GCCUSIO-cbl-00316 Extract Border Station Number from MC Segment
Process Rules
Business View: Assuming a successful mc table lookup with retrieved table segment data during the 'Extract Border Station Number from MC Segment' routine, when the system processes the mc segment information, the system executes logic to ensure that the border station number is extracted from the mc segment structure.
Given
A successful MC table lookup with retrieved table segment data
When
The system processes the MC segment information
Then
The border station number is extracted from the MC segment structure
R-GCCUSIO-cbl-00322 Extract Border Station Number from MC Table
Process Rules
Business View: Assuming mc table lookup has returned successfully with table segment data during the 'Extract Border Station Number from MC Table' routine, when the system processes the returned mc table segment, the system executes logic to ensure that the border station number is extracted from the mc segment station number field.
Given
MC table lookup has returned successfully with table segment data
When
The system processes the returned MC table segment
Then
The border station number is extracted from the MC segment station number field
R-GCCUSIO-cbl-00333 Get Station Information from MC Table
Action Rules
Business View: Assuming a cargo record requiring border hold processing with a location id during the 'Get Station Information from MC Table' routine, when the system performs mc table lookup using the location id as sequence id, the system executes logic to ensure that the system retrieves the corresponding station segment information from the mc table.
Given
A cargo record requiring border hold processing with a location ID
When
The system performs MC table lookup using the location ID as sequence ID
Then
The system retrieves the corresponding station segment information from the MC table
R-GCCUSIO-cbl-00334 Set Border Station Number
Process Rules
Business View: Assuming a successful mc table lookup that returns station information with return flag '0' during the 'Set Border Station Number' routine, when the station segment contains valid station number information, the system executes logic to ensure that the system sets the station number as held border key and the ccn key as held border cargo key.
Given
A successful MC table lookup that returns station information with return flag '0'
When
The station segment contains valid station number information
Then
The system sets the station number as held border key and the CCN key as held border cargo key
R-GCCUSIO-cbl-00342 Extract Station Number from MC Table
Process Rules
Business View: Assuming successful mc table lookup with valid table segment data during the 'Extract Station Number from MC Table' routine, when station information is available in the mc table segment, the system executes logic to ensure that the mc station number is extracted and prepared for border hold index key population.
Given
Successful MC table lookup with valid table segment data
When
Station information is available in the MC table segment
Then
The MC station number is extracted and prepared for border hold index key population
R-GCCUSIO-cbl-00153 New Data Empty?
Decision Rules
Business View: Assuming a secondary cargo data segment (gcsa2rt) replace operation is requested during the 'New Data Empty?' routine, when the system retrieves the existing record and evaluates the new cargo data content, the system executes logic to ensure that if the new data contains only spaces, low-values, or underscores, the system should delete the existing record; otherwise it should insert or replace the record based on whether it exists.
Given
A secondary cargo data segment (GCSA2RT) replace operation is requested
When
The system retrieves the existing record and evaluates the new cargo data content
Then
If the new data contains only spaces, low-values, or underscores, the system should delete the existing record; otherwise it should insert or replace the record based on whether it exists
R-GCCUSIO-cbl-00154 Insert Data Valid?
Validation Rules
Business View: Assuming a secondary cargo data segment (gcsa2rt) insert operation is requested during the 'Insert Data Valid?' routine, when the system evaluates the cargo data content for insertion, the system executes logic to ensure that the system should only proceed with insertion if the data is not all spaces, not all low-values, and not all underscores.
Given
A secondary cargo data segment (GCSA2RT) insert operation is requested
When
The system evaluates the cargo data content for insertion
Then
The system should only proceed with insertion if the data is not all spaces, not all low-values, and not all underscores
R-GCCUSIO-cbl-00155 Delete Secondary Record
Process Rules
Business View: Assuming a secondary cargo data segment (gcsa2rt) delete operation is requested during the 'Delete Secondary Record' routine, when the system attempts to retrieve the existing record using ghu function, the system executes logic to ensure that if the record exists (status code is not 'ge'), the system should proceed with deletion; if not found, the operation should continue without error.
Given
A secondary cargo data segment (GCSA2RT) delete operation is requested
When
The system attempts to retrieve the existing record using GHU function
Then
If the record exists (status code is not 'GE'), the system should proceed with deletion; if not found, the operation should continue without error
R-GCCUSIO-cbl-00348 Build Secondary SSA with Key
Process Rules
Business View: <EXCLUSION CRITERIA> If a secondary cargo record needs to be retrieved, and the secondary record key is available and not empty occurs during the 'Build Secondary SSA with Key' routine, then the system must guarantee that the system builds a qualified ssa (segment search argument) using the key value for precise record location.
EXCLUDING
A secondary cargo record needs to be retrieved
When
The secondary record key is available and not empty
Then
The system builds a qualified SSA (Segment Search Argument) using the key value for precise record location
R-GCCUSIO-cbl-00525 Is Function GU or GN?
Validation Rules
Business View: Assuming a request to build secondary ssa parameters for database access during the 'Is Function GU or GN?' routine, when the function code is gu (get unique) or gn (get next) and the secondary key (gcsuss00-key) is empty spaces, the system executes logic to ensure that set error code '0012' and error message 'secn-key equal spaces' to indicate invalid parameters.
Given
A request to build secondary SSA parameters for database access
When
The function code is GU (Get Unique) or GN (Get Next) AND the secondary key (GCSUSS00-KEY) is empty spaces
Then
Set error code '0012' and error message 'SECN-KEY EQUAL SPACES' to indicate invalid parameters
R-GCCUSIO-cbl-00526 Map Secondary Key to Search Value
Process Rules
Business View: Assuming a valid secondary key is provided for database access during the 'Map Secondary Key to Search Value' routine, when building ssa parameters for secondary segment access, the system executes logic to ensure that map the secondary key (gcsuss00-key) to the database search value (gca2-key-value).
Given
A valid secondary key is provided for database access
When
Building SSA parameters for secondary segment access
Then
Map the secondary key (GCSUSS00-KEY) to the database search value (GCA2-KEY-VALUE)
R-GCCUSIO-cbl-00640 Set Qualified SSA with CCN Key
Decision Rules
Business View: Assuming a primary cargo segment (gcsusrt) operation is being processed and the ccn key field contains a valid value (not spaces) during the 'Set Qualified SSA with CCN Key' routine, when the system builds ssa parameters for database access, the system executes logic to ensure that the system creates a qualified ssa using the ccn key value for targeted record retrieval.
Given
A primary cargo segment (GCSUSRT) operation is being processed AND the CCN key field contains a valid value (not spaces)
When
The system builds SSA parameters for database access
Then
The system creates a qualified SSA using the CCN key value for targeted record retrieval
R-GCCUSIO-cbl-00641 Set Unqualified SSA
Decision Rules
Business View: Assuming a primary cargo segment (gcsusrt) operation is being processed and the ccn key field is empty or contains only spaces during the 'Set Unqualified SSA' routine, when the system builds ssa parameters for database access, the system executes logic to ensure that the system creates an unqualified ssa for broader record access without key constraints.
Given
A primary cargo segment (GCSUSRT) operation is being processed AND the CCN key field is empty or contains only spaces
When
The system builds SSA parameters for database access
Then
The system creates an unqualified SSA for broader record access without key constraints
R-GCCUSIO-cbl-00642 Set Qualified SSA with Secondary Key
Decision Rules
Business View: Assuming a secondary cargo segment (gcsa2rt) operation is being processed and the secondary key field contains a valid value (not spaces) during the 'Set Qualified SSA with Secondary Key' routine, when the system builds ssa parameters for database access, the system executes logic to ensure that the system creates a qualified ssa using the secondary key value for targeted record retrieval.
Given
A secondary cargo segment (GCSA2RT) operation is being processed AND the secondary key field contains a valid value (not spaces)
When
The system builds SSA parameters for database access
Then
The system creates a qualified SSA using the secondary key value for targeted record retrieval
R-GCCUSIO-cbl-00643 Return Error - Key Required
Validation Rules
Business View: Assuming a secondary cargo segment (gcsa2rt) retrieval operation (gu or gn) is being processed and the secondary key field is empty or contains only spaces during the 'Return Error - Key Required' routine, when the system attempts to build ssa parameters for database access, the system executes logic to ensure that the system returns error code '0012' with message 'secn-key equal spaces'.
Given
A secondary cargo segment (GCSA2RT) retrieval operation (GU or GN) is being processed AND the secondary key field is empty or contains only spaces
When
The system attempts to build SSA parameters for database access
Then
The system returns error code '0012' with message 'SECN-KEY EQUAL SPACES'
R-GCCUSIO-cbl-00644 Set Qualified SSA with Message Key
Decision Rules
Business View: Assuming a message segment (gcsa8rt) operation is being processed and the message key field contains a valid value (not spaces) during the 'Set Qualified SSA with Message Key' routine, when the system builds ssa parameters for database access, the system executes logic to ensure that the system creates a qualified ssa using the message key value for targeted record retrieval.
Given
A message segment (GCSA8RT) operation is being processed AND the message key field contains a valid value (not spaces)
When
The system builds SSA parameters for database access
Then
The system creates a qualified SSA using the message key value for targeted record retrieval
R-GCCUSIO-cbl-00645 Return Error - Key Required
Validation Rules
Business View: Assuming a message segment (gcsa8rt) retrieval operation (gu or gn) is being processed and the message key field is empty or contains only spaces during the 'Return Error - Key Required' routine, when the system attempts to build ssa parameters for database access, the system executes logic to ensure that the system returns error code '0012' with message 'gcsa8rt-key equal spaces'.
Given
A message segment (GCSA8RT) retrieval operation (GU or GN) is being processed AND the message key field is empty or contains only spaces
When
The system attempts to build SSA parameters for database access
Then
The system returns error code '0012' with message 'GCSA8RT-KEY EQUAL SPACES'
R-GCCUSIO-cbl-00646 Set Qualified SSA with Table Key
Process Rules
Business View: Assuming a table segment (gcst2rt) operation is being processed during the 'Set Qualified SSA with Table Key' routine, when the system builds ssa parameters for database access, the system executes logic to ensure that the system assigns the table key value and creates a qualified ssa for targeted table record retrieval.
Given
A table segment (GCST2RT) operation is being processed
When
The system builds SSA parameters for database access
Then
The system assigns the table key value and creates a qualified SSA for targeted table record retrieval
R-GCCUSIO-cbl-00774 Message Key Available?
Validation Rules
Business View: Assuming a request to process gcsa8rt segment with get unique or get next function code during the 'Message Key Available?' routine, when the system checks if the gcsa8rt key field is empty (contains only spaces), the system executes logic to ensure that if the key is empty, set error code '0012' and error message 'gcsa8rt-key equal spaces', otherwise allow processing to continue.
Given
A request to process GCSA8RT segment with Get Unique or Get Next function code
When
The system checks if the GCSA8RT key field is empty (contains only spaces)
Then
If the key is empty, set error code '0012' and error message 'GCSA8RT-KEY EQUAL SPACES', otherwise allow processing to continue
R-GCCUSIO-cbl-00647 Secondary Index Key Provided?
Decision Rules
Business View: Assuming a request to retrieve secondary cargo data (gcsa2rt segment) with retrieval function codes (gu or gn) during the 'Secondary Index Key Provided?' routine, when the system checks if a secondary index key (gcwusio-index-secn-key) is provided in the request, the system executes logic to ensure that if secondary index key is provided, route to secondary index search processing, otherwise route to primary key search processing.
Given
A request to retrieve secondary cargo data (GCSA2RT segment) with retrieval function codes (GU or GN)
When
The system checks if a secondary index key (GCWUSIO-INDEX-SECN-KEY) is provided in the request
Then
If secondary index key is provided, route to secondary index search processing, otherwise route to primary key search processing
R-GCCUSIO-cbl-00649 Build Primary Secondary SSA
Validation Rules
Business View: Assuming no secondary index key is provided for secondary cargo data retrieval and function code is gu or gn during the 'Build Primary Secondary SSA' routine, when the system needs to build ssa for primary key search on secondary data, the system executes logic to ensure that if the secondary key (gcsuss00-key) is spaces, set error '0012' with message 'secn-key equal spaces', otherwise set gcsuss00-key to gca2-key-value, use qualified ssa (gca2-ssa-qual), and set pcb to gca2-pcb.
Given
No secondary index key is provided for secondary cargo data retrieval and function code is GU or GN
When
The system needs to build SSA for primary key search on secondary data
Then
If the secondary key (GCSUSS00-KEY) is spaces, set error '0012' with message 'SECN-KEY EQUAL SPACES', otherwise set GCSUSS00-KEY to GCA2-KEY-VALUE, use qualified SSA (GCA2-SSA-QUAL), and set PCB to GCA2-PCB
R-GCCUSIO-cbl-00159 Message Key Valid?
Validation Rules
Business View: Assuming a gcsa8rt message processing request with function code gu or gn during the 'Message Key Valid?' routine, when the gcsa8rt key field is empty or contains only spaces, the system executes logic to ensure that return error code '0012' with message 'gcsa8rt-key equal spaces'.
Given
A GCSA8RT message processing request with function code GU or GN
When
The GCSA8RT key field is empty or contains only spaces
Then
Return error code '0012' with message 'GCSA8RT-KEY EQUAL SPACES'
R-GCCUSIO-cbl-00160 Check if Message Exists
Process Rules
Business View: Assuming a gcsa8rt message delete request during the 'Check if Message Exists' routine, when the delete function is initiated, the system executes logic to ensure that first perform a ghu (get hold unique) operation to check if the message exists.
Given
A GCSA8RT message delete request
When
The delete function is initiated
Then
First perform a GHU (Get Hold Unique) operation to check if the message exists
R-GCCUSIO-cbl-00161 Message Found?
Decision Rules
Business View: Assuming a gcsa8rt message delete request has been processed during the 'Message Found?' routine, when the message exists in the system (status code is spaces), the system executes logic to ensure that proceed with the delete operation using dlet function code.
Given
A GCSA8RT message delete request has been processed
When
The message exists in the system (status code is spaces)
Then
Proceed with the delete operation using DLET function code
R-GCCUSIO-cbl-00162 Check if Message Exists
Process Rules
Business View: Assuming a gcsa8rt message insert request during the 'Check if Message Exists' routine, when the insert function is initiated, the system executes logic to ensure that first perform a ghu operation to check if the message already exists.
Given
A GCSA8RT message insert request
When
The insert function is initiated
Then
First perform a GHU operation to check if the message already exists
R-GCCUSIO-cbl-00163 Message Found?
Decision Rules
Business View: Assuming a gcsa8rt message insert request has checked for existing message during the 'Message Found?' routine, when the message already exists in the system (status code is spaces), the system executes logic to ensure that use repl function code to replace the existing message, otherwise use isrt function code to insert new message.
Given
A GCSA8RT message insert request has checked for existing message
When
The message already exists in the system (status code is spaces)
Then
Use REPL function code to replace the existing message, otherwise use ISRT function code to insert new message
R-GCCUSIO-cbl-00164 Format Message Data
Process Rules
Business View: Assuming a gcsa8rt message insert or replace operation during the 'Format Message Data' routine, when the message data needs to be stored, the system executes logic to ensure that combine the gcsa8rt key with the saved io area data to create the complete message segment.
Given
A GCSA8RT message insert or replace operation
When
The message data needs to be stored
Then
Combine the GCSA8RT key with the saved IO area data to create the complete message segment
R-GCCUSIO-cbl-00165 Retrieve Message Segment
Process Rules
Business View: Assuming a gcsa8rt message retrieval request with function code gu during the 'Retrieve Message Segment' routine, when the retrieval operation is initiated, the system executes logic to ensure that build qualified ssa with the message key and perform the database call.
Given
A GCSA8RT message retrieval request with function code GU
When
The retrieval operation is initiated
Then
Build qualified SSA with the message key and perform the database call
R-GCCUSIO-cbl-00166 Separate Key from Data
Process Rules
Business View: Assuming a gcsa8rt message has been successfully retrieved during the 'Separate Key from Data' routine, when the message data needs to be returned to the caller, the system executes logic to ensure that extract the data portion from the complete message segment and move it to the io area, excluding the key portion.
Given
A GCSA8RT message has been successfully retrieved
When
The message data needs to be returned to the caller
Then
Extract the data portion from the complete message segment and move it to the IO area, excluding the key portion
R-GCCUSIO-cbl-00365 Structure Message for Insert/Replace
Process Rules
Business View: Assuming a message insert operation is requested with message data containing key and content information during the 'Structure Message for Insert/Replace' routine, when the system processes the insert operation for gcsa8rt segment, the system executes logic to ensure that the system extracts the message key from the input, extracts the data content, combines the key and data into a properly structured message segment, and prepares it for database storage.
Given
A message insert operation is requested with message data containing key and content information
When
The system processes the insert operation for GCSA8RT segment
Then
The system extracts the message key from the input, extracts the data content, combines the key and data into a properly structured message segment, and prepares it for database storage
R-GCCUSIO-cbl-00366 Extract Data Content from Segment
Process Rules
Business View: Assuming a message retrieval operation is requested for gcsa8rt segment during the 'Extract Data Content from Segment' routine, when the system successfully retrieves the message segment from storage, the system executes logic to ensure that the system extracts the data content from the retrieved segment structure and formats it for return to the calling program.
Given
A message retrieval operation is requested for GCSA8RT segment
When
The system successfully retrieves the message segment from storage
Then
The system extracts the data content from the retrieved segment structure and formats it for return to the calling program
R-GCCUSIO-cbl-00367 Extract Message Key
Validation Rules
Business View: Assuming a message retrieval operation (gu or gn) is requested for gcsa8rt segment during the 'Extract Message Key' routine, when the message key is empty or contains only spaces, the system executes logic to ensure that the system sets error number '0012' and error message 'gcsa8rt-key equal spaces' to indicate invalid key for retrieval.
Given
A message retrieval operation (GU or GN) is requested for GCSA8RT segment
When
The message key is empty or contains only spaces
Then
The system sets error number '0012' and error message 'GCSA8RT-KEY EQUAL SPACES' to indicate invalid key for retrieval
R-GCCUSIO-cbl-00368 Message Operation Type?
Decision Rules
Business View: Assuming a message operation request is received for gcsa8rt segment during the 'Message Operation Type?' routine, when the system evaluates the function code, the system executes logic to ensure that the system routes to delete processing for 'dlet', insert processing for 'isrt', or retrieval processing for 'gu' function codes.
Given
A message operation request is received for GCSA8RT segment
When
The system evaluates the function code
Then
The system routes to delete processing for 'DLET', insert processing for 'ISRT', or retrieval processing for 'GU' function codes
R-GCCUSIO-cbl-00369 Structure Message for Insert/Replace
Decision Rules
Business View: Assuming an insert operation is requested for a message segment during the 'Structure Message for Insert/Replace' routine, when the system attempts to retrieve the existing message using ghu function, the system executes logic to ensure that if the message exists, the system performs a replace operation; if the message does not exist, the system performs an insert operation.
Given
An insert operation is requested for a message segment
When
The system attempts to retrieve the existing message using GHU function
Then
If the message exists, the system performs a replace operation; if the message does not exist, the system performs an insert operation
R-GCCUSIO-cbl-00535 Save Original IO Area
Process Rules
Business View: Assuming a message segment insert or replace operation is being performed during the 'Save Original IO Area' routine, when the operation type is isrt or repl, the system executes logic to ensure that the original io area content must be saved to working storage before any modifications.
Given
A message segment insert or replace operation is being performed
When
The operation type is ISRT or REPL
Then
The original IO area content must be saved to working storage before any modifications
R-GCCUSIO-cbl-00536 Extract Message Key from Input
Process Rules
Business View: Assuming a message segment operation requires key extraction during the 'Extract Message Key from Input' routine, when the operation is insert or replace, the system executes logic to ensure that the message key must be extracted from the gcwusio input area to the working storage key field.
Given
A message segment operation requires key extraction
When
The operation is insert or replace
Then
The message key must be extracted from the GCWUSIO input area to the working storage key field
R-GCCUSIO-cbl-00537 Extract Message Data from Input
Process Rules
Business View: Assuming a message segment requires data extraction during the 'Extract Message Data from Input' routine, when processing insert or replace operations, the system executes logic to ensure that the message data content must be extracted from the saved io area to working storage data field.
Given
A message segment requires data extraction
When
Processing insert or replace operations
Then
The message data content must be extracted from the saved IO area to working storage data field
R-GCCUSIO-cbl-00538 Move Key to Working Storage Key Field
Process Rules
Business View: Assuming message key has been extracted from input during the 'Move Key to Working Storage Key Field' routine, when structuring a message segment, the system executes logic to ensure that the key must be moved to the appropriate working storage key field.
Given
Message key has been extracted from input
When
Structuring a message segment
Then
The key must be moved to the appropriate working storage key field
R-GCCUSIO-cbl-00539 Move Data to Working Storage Data Field
Process Rules
Business View: Assuming message data has been extracted from input during the 'Move Data to Working Storage Data Field' routine, when structuring a message segment, the system executes logic to ensure that the data must be moved to the appropriate working storage data field.
Given
Message data has been extracted from input
When
Structuring a message segment
Then
The data must be moved to the appropriate working storage data field
R-GCCUSIO-cbl-00540 Combine Key and Data into Segment Format
Process Rules
Business View: Assuming message key and data are in working storage fields during the 'Combine Key and Data into Segment Format' routine, when creating a structured segment for database operations, the system executes logic to ensure that the key and data must be combined into the complete segment structure in working storage.
Given
Message key and data are in working storage fields
When
Creating a structured segment for database operations
Then
The key and data must be combined into the complete segment structure in working storage
R-GCCUSIO-cbl-00541 Move Structured Segment to IO Area
Process Rules
Business View: Assuming a complete segment structure exists in working storage during the 'Move Structured Segment to IO Area' routine, when preparing for database insert or replace operation, the system executes logic to ensure that the structured segment must be moved to the gcwusio io area.
Given
A complete segment structure exists in working storage
When
Preparing for database insert or replace operation
Then
The structured segment must be moved to the GCWUSIO IO area
R-GCCUSIO-cbl-00542 Validate Key Not Spaces
Validation Rules
Business View: Assuming a message segment retrieval operation is requested during the 'Validate Key Not Spaces' routine, when the function code is gu or gn and the message key is spaces, the system executes logic to ensure that an error must be set indicating the key cannot be spaces.
Given
A message segment retrieval operation is requested
When
The function code is GU or GN and the message key is spaces
Then
An error must be set indicating the key cannot be spaces
R-GCCUSIO-cbl-00543 Set Error - Key Cannot be Spaces
Validation Rules
Business View: Assuming a retrieval operation has an empty message key during the 'Set Error - Key Cannot be Spaces' routine, when key validation fails for gu or gn operations, the system executes logic to ensure that error number '0012' and message 'gcsa8rt-key equal spaces' must be set.
Given
A retrieval operation has an empty message key
When
Key validation fails for GU or GN operations
Then
Error number '0012' and message 'GCSA8RT-KEY EQUAL SPACES' must be set
R-GCCUSIO-cbl-00544 Retrieve Message Segment
Action Rules
Business View: Assuming a valid message key exists for retrieval during the 'Retrieve Message Segment' routine, when processing gu operations with valid key, the system executes logic to ensure that the message segment must be retrieved using the qualified ssa and appropriate pcb.
Given
A valid message key exists for retrieval
When
Processing GU operations with valid key
Then
The message segment must be retrieved using the qualified SSA and appropriate PCB
R-GCCUSIO-cbl-00545 Extract Segment into Working Storage
Process Rules
Business View: Assuming a message segment has been successfully retrieved during the 'Extract Segment into Working Storage' routine, when processing the retrieved segment data, the system executes logic to ensure that the complete segment must be moved to working storage for data extraction.
Given
A message segment has been successfully retrieved
When
Processing the retrieved segment data
Then
The complete segment must be moved to working storage for data extraction
R-GCCUSIO-cbl-00546 Move Data Portion to IO Area
Process Rules
Business View: Assuming message segment data has been extracted to working storage during the 'Move Data Portion to IO Area' routine, when preparing retrieval operation response, the system executes logic to ensure that only the data portion must be moved back to the gcwusio io area.
Given
Message segment data has been extracted to working storage
When
Preparing retrieval operation response
Then
Only the data portion must be moved back to the GCWUSIO IO area
R-GCCUSIO-cbl-00650 Delete Operation Completed
Process Rules
Business View: Assuming a gcsa8rt segment delete operation is requested with function code 'dlet' during the 'Delete Operation Completed' routine, when the system processes the delete request, the system executes logic to ensure that the system retrieves the existing record first using 'ghu' function and if the record exists, deletes it using 'dlet' function with unqualified ssa.
Given
A GCSA8RT segment delete operation is requested with function code 'DLET'
When
The system processes the delete request
Then
The system retrieves the existing record first using 'GHU' function and if the record exists, deletes it using 'DLET' function with unqualified SSA
R-GCCUSIO-cbl-00651 Insert/Replace Operation Completed
Decision Rules
Business View: Assuming a gcsa8rt segment insert operation is requested with function code 'isrt' during the 'Insert/Replace Operation Completed' routine, when the system processes the insert request, the system executes logic to ensure that the system first attempts to retrieve existing record with 'ghu' function, and if record exists performs 'repl' operation, otherwise performs 'isrt' operation with the formatted segment data.
Given
A GCSA8RT segment insert operation is requested with function code 'ISRT'
When
The system processes the insert request
Then
The system first attempts to retrieve existing record with 'GHU' function, and if record exists performs 'REPL' operation, otherwise performs 'ISRT' operation with the formatted segment data
R-GCCUSIO-cbl-00652 Insert/Replace Operation Completed
Process Rules
Business View: Assuming a gcsa8rt insert or replace operation is being processed during the 'Insert/Replace Operation Completed' routine, when the system prepares the segment data for database operation, the system executes logic to ensure that the system moves the gcsa8rt key to the segment key field and moves the saved io area data to the segment data field, then moves the complete formatted segment to the io area.
Given
A GCSA8RT insert or replace operation is being processed
When
The system prepares the segment data for database operation
Then
The system moves the GCSA8RT key to the segment key field and moves the saved IO area data to the segment data field, then moves the complete formatted segment to the IO area
R-GCCUSIO-cbl-00653 Message Data Formatted for Return
Process Rules
Business View: Assuming a gcsa8rt segment retrieve operation is requested with function code 'gu' during the 'Message Data Formatted for Return' routine, when the system successfully retrieves the record, the system executes logic to ensure that the system moves the complete io area to a work segment, extracts only the data portion from the work segment, and moves the extracted data back to the io area for return.
Given
A GCSA8RT segment retrieve operation is requested with function code 'GU'
When
The system successfully retrieves the record
Then
The system moves the complete IO area to a work segment, extracts only the data portion from the work segment, and moves the extracted data back to the IO area for return
R-GCCUSIO-cbl-00654 Retrieve Operation Completed
Validation Rules
Business View: Assuming a gcsa8rt retrieve operation with function code 'gu' or 'gn' is requested during the 'Retrieve Operation Completed' routine, when the system validates the input parameters, the system executes logic to ensure that if the gcsa8rt key equals spaces, the system sets error number '0012' and error message 'gcsa8rt-key equal spaces', otherwise builds qualified ssa with the key value.
Given
A GCSA8RT retrieve operation with function code 'GU' or 'GN' is requested
When
The system validates the input parameters
Then
If the GCSA8RT key equals spaces, the system sets error number '0012' and error message 'GCSA8RT-KEY EQUAL SPACES', otherwise builds qualified SSA with the key value
R-GCCUSIO-cbl-00170 Call Table Lookup Service
Action Rules
Business View: Assuming table parameters are initialized with mc table id and station key during the 'Call Table Lookup Service' routine, when the system needs to retrieve station information, the system executes logic to ensure that the gcctbio table lookup service is called with the prepared parameters to access table segments.
Given
Table parameters are initialized with MC table ID and station key
When
The system needs to retrieve station information
Then
The GCCTBIO table lookup service is called with the prepared parameters to access table segments
R-GCCUSIO-cbl-00172 Extract Station Number
Process Rules
Business View: Assuming a station record is found in the mc table during the 'Extract Station Number' routine, when the system needs to extract station information, the system executes logic to ensure that the table segment data is moved to mc segment structure and the mc station number is extracted for use.
Given
A station record is found in the MC table
When
The system needs to extract station information
Then
The table segment data is moved to MC segment structure and the MC station number is extracted for use
R-GCCUSIO-cbl-00180 Set Border Station Code via MC Table Lookup
Action Rules
Business View: Assuming error index fields are being populated for a cargo record during the 'Set Border Station Code via MC Table Lookup' routine, when the mc table lookup is performed using cargo location id name, the system executes logic to ensure that if mc table lookup returns success flag '0', set the mc station number from table segment to error border index field and set cargo ccn key to error border cargo field.
Given
Error index fields are being populated for a cargo record
When
The MC table lookup is performed using cargo location ID name
Then
If MC table lookup returns success flag '0', set the MC station number from table segment to error border index field AND set cargo CCN key to error border cargo field
R-GCCUSIO-cbl-00182 Set Border Hold Index via MC Table Lookup
Process Rules
Business View: Assuming a cargo record has hold status conditions during the 'Set Border Hold Index via MC Table Lookup' routine, when the cargo has us cargo hold status or us cargo hold pcs status or us cargo pre-hold pcs status or us cargo hold border status or us cargo pre-hold border status or us cargo hold fda status, the system executes logic to ensure that perform mc table lookup using cargo location id name and if lookup returns success flag '0', set mc station number from table segment to held border index field and set cargo ccn key to held border cargo field.
Given
A cargo record has hold status conditions
When
The cargo has US cargo hold status OR US cargo hold PCS status OR US cargo pre-hold PCS status OR US cargo hold border status OR US cargo pre-hold border status OR US cargo hold FDA status
Then
Perform MC table lookup using cargo location ID name AND if lookup returns success flag '0', set MC station number from table segment to held border index field AND set cargo CCN key to held border cargo field
R-GCCUSIO-cbl-00383 Extract Border Station Number from Table
Process Rules
Business View: Assuming the mc table lookup returns successful results with return flag '0' during the 'Extract Border Station Number from Table' routine, when the system processes the table lookup results, the system executes logic to ensure that the border station number is extracted from the mc segment station number field for error index population.
Given
The MC table lookup returns successful results with return flag '0'
When
The system processes the table lookup results
Then
The border station number is extracted from the MC segment station number field for error index population
R-GCCUSIO-cbl-00553 Extract Border Station Number from MC Segment
Process Rules
Business View: Assuming border station lookup was successful with return flag '0' during the 'Extract Border Station Number from MC Segment' routine, when the system processes the retrieved mc table segment, the system executes logic to ensure that the border station number is extracted from the mc segment and made available for error index population.
Given
Border station lookup was successful with return flag '0'
When
The system processes the retrieved MC table segment
Then
The border station number is extracted from the MC segment and made available for error index population
R-GCCUSIO-cbl-00657 Set Generic Table Parameters - Function Code: 'GU' - Clear Return Flags
Process Rules
Business View: Assuming any table lookup operation is required regardless of table type during the 'Set Generic Table Parameters - Function Code: 'GU' - Clear Return Flags' routine, when the system initiates a table lookup through z1900-get-table-segment, the system executes logic to ensure that the system sets function code to 'gu' (get unique), clears all return flags and secondary pcb flags, and prepares standard calling parameters for the gcctbio service.
Given
Any table lookup operation is required regardless of table type
When
The system initiates a table lookup through Z1900-GET-TABLE-SEGMENT
Then
The system sets function code to 'GU' (Get Unique), clears all return flags and secondary PCB flags, and prepares standard calling parameters for the GCCTBIO service
R-GCCUSIO-cbl-00658 Extract Station Information - Station Number - Border Station Data
Process Rules
Business View: Assuming a table lookup operation has been performed and gcctbio returns success flag '0' during the 'Extract Station Information - Station Number - Border Station Data' routine, when the system processes the returned table segment data, the system executes logic to ensure that the system extracts the relevant business data from ws-table-segment into the appropriate fields such as station numbers for mc tables or notification settings for ih tables.
Given
A table lookup operation has been performed and GCCTBIO returns success flag '0'
When
The system processes the returned table segment data
Then
The system extracts the relevant business data from WS-TABLE-SEGMENT into the appropriate fields such as station numbers for MC tables or notification settings for IH tables
R-GCCUSIO-cbl-00189 Retrieve Iron Highway Station Configuration
Action Rules
Business View: Assuming a cargo record requires iron highway notification processing during the 'Retrieve Iron Highway Station Configuration' routine, when the system needs to check iron highway configuration, the system executes logic to ensure that retrieve table segment 'ih' using the waybill station number as the sequence id.
Given
A cargo record requires Iron Highway notification processing
When
The system needs to check Iron Highway configuration
Then
Retrieve table segment 'IH' using the waybill station number as the sequence ID
R-GCCUSIO-cbl-00191 Extract N9 Reference Numbers
Process Rules
Business View: Assuming iron highway station configuration is found and notification should proceed during the 'Extract N9 Reference Numbers' routine, when the system processes n9 reference number segments for the cargo, the system executes logic to ensure that search through up to 20 n9 reference number qualifiers and extract the reference number where qualifier equals 'cn' as the shipment id.
Given
Iron Highway station configuration is found and notification should proceed
When
The system processes N9 reference number segments for the cargo
Then
Search through up to 20 N9 reference number qualifiers and extract the reference number where qualifier equals 'CN' as the shipment ID
R-GCCUSIO-cbl-00196 Send Notification to Iron Highway System
Action Rules
Business View: Assuming iron highway notification status has been determined and message prepared during the 'Send Notification to Iron Highway System' routine, when all required notification data is available including car id, waybill number, ccn, and status, the system executes logic to ensure that send notification to iron highway system using record type 'uc' with car identification, waybill number, cargo control number, shipment id, and determined status.
Given
Iron Highway notification status has been determined and message prepared
When
All required notification data is available including car ID, waybill number, CCN, and status
Then
Send notification to Iron Highway system using record type 'UC' with car identification, waybill number, cargo control number, shipment ID, and determined status
R-GCCUSIO-cbl-00396 Call Table Lookup Service
Action Rules
Business View: Assuming table lookup parameters are configured with table id 'ih' and station code during the 'Call Table Lookup Service' routine, when the system calls the table lookup service, the system executes logic to ensure that the gcctbio service is invoked with the configured parameters to retrieve table segment data.
Given
Table lookup parameters are configured with table ID 'IH' and station code
When
The system calls the table lookup service
Then
The GCCTBIO service is invoked with the configured parameters to retrieve table segment data
R-GCCUSIO-cbl-00398 Retrieve IH Station Settings
Process Rules
Business View: Assuming ih configuration table lookup was successful during the 'Retrieve IH Station Settings' routine, when the system processes the retrieved table segment, the system executes logic to ensure that ih station settings are extracted and made available for notification processing.
Given
IH configuration table lookup was successful
When
The system processes the retrieved table segment
Then
IH station settings are extracted and made available for notification processing
R-GCCUSIO-cbl-00561 Call Table Lookup Service
Action Rules
Business View: Assuming all iron highway table lookup parameters have been prepared including function code, table id, and station search key during the 'Call Table Lookup Service' routine, when the system needs to retrieve iron highway configuration data, the system executes logic to ensure that the table lookup service should be called with the prepared parameters to retrieve the configuration segment.
Given
All Iron Highway table lookup parameters have been prepared including function code, table ID, and station search key
When
The system needs to retrieve Iron Highway configuration data
Then
The table lookup service should be called with the prepared parameters to retrieve the configuration segment
R-GCCUSIO-cbl-00667 Extract Station Information
Process Rules
Business View: Assuming a table lookup operation returned successfully with return flag '0' during the 'Extract Station Information' routine, when the system processes the retrieved table data, the system executes logic to ensure that station information is extracted from the table segment for use in subsequent processing.
Given
A table lookup operation returned successfully with return flag '0'
When
The system processes the retrieved table data
Then
Station information is extracted from the table segment for use in subsequent processing
R-GCCUSIO-cbl-00668 Move Table Segment to Working Storage
Process Rules
Business View: Assuming table data has been successfully retrieved and station information extracted during the 'Move Table Segment to Working Storage' routine, when the system prepares to process the station data, the system executes logic to ensure that the table segment is moved to the mc segment working storage area for further processing.
Given
Table data has been successfully retrieved and station information extracted
When
The system prepares to process the station data
Then
The table segment is moved to the MC segment working storage area for further processing
R-GCCUSIO-cbl-00669 Extract Station Number
Process Rules
Business View: Assuming mc table segment data is available in working storage during the 'Extract Station Number' routine, when the system needs the station number for cargo processing, the system executes logic to ensure that the station number is extracted from the mc table segment data structure.
Given
MC table segment data is available in working storage
When
The system needs the station number for cargo processing
Then
The station number is extracted from the MC table segment data structure
R-GCCUSIO-cbl-00782 Extract Station Number from MC Segment
Process Rules
Business View: Assuming station information was successfully found in mc table during the 'Extract Station Number from MC Segment' routine, when the system processes the retrieved station data, the system executes logic to ensure that the station number is extracted from the mc segment for use in border location processing.
Given
Station information was successfully found in MC table
When
The system processes the retrieved station data
Then
The station number is extracted from the MC segment for use in border location processing
R-GCCUSIO-cbl-00564 Retrieve N9 Reference Data
Action Rules
Business View: Assuming a complete secondary key has been built with ccn, record type '02', and sequence '0001' during the 'Retrieve N9 Reference Data' routine, when the system executes a database call to retrieve n9 reference data, the system executes logic to ensure that the system retrieves the n9 reference data from the gcsa2rt secondary cargo segment.
Given
A complete secondary key has been built with CCN, record type '02', and sequence '0001'
When
The system executes a database call to retrieve N9 reference data
Then
The system retrieves the N9 reference data from the GCSA2RT secondary cargo segment
R-GCCUSIO-cbl-00671 Set Record Type to '02'
Definitional Rules
Business View: Assuming the system is preparing to retrieve n9 reference data from secondary cargo records during the 'Set Record Type to '02'' routine, when building the access key for secondary cargo data, the system executes logic to ensure that the system sets the record type to '02' to identify n9 reference data segments.
Given
The system is preparing to retrieve N9 reference data from secondary cargo records
When
Building the access key for secondary cargo data
Then
The system sets the record type to '02' to identify N9 reference data segments
R-GCCUSIO-cbl-00672 Set Sequence Number to '0001'
Process Rules
Business View: Assuming the system has identified the record type as '02' for n9 reference data during the 'Set Sequence Number to '0001'' routine, when accessing n9 reference segments in secondary cargo data, the system executes logic to ensure that the system sets the sequence number to '0001' to retrieve the first n9 segment.
Given
The system has identified the record type as '02' for N9 reference data
When
Accessing N9 reference segments in secondary cargo data
Then
The system sets the sequence number to '0001' to retrieve the first N9 segment
R-GCCUSIO-cbl-00675 Initialize N9 Counter to Zero
Process Rules
Business View: Assuming n9 reference data record has been successfully retrieved during the 'Initialize N9 Counter to Zero' routine, when the system begins processing n9 reference segments, the system executes logic to ensure that the system initializes the n9 counter to zero to start processing from the first segment.
Given
N9 reference data record has been successfully retrieved
When
The system begins processing N9 reference segments
Then
The system initializes the N9 counter to zero to start processing from the first segment
R-GCCUSIO-cbl-00676 Loop Through 20 N9 Reference Segments
Process Rules
Business View: Assuming n9 reference data is available and the counter is initialized during the 'Loop Through 20 N9 Reference Segments' routine, when processing n9 reference segments for shipment identification, the system executes logic to ensure that the system loops through exactly 20 n9 reference segments to examine each one.
Given
N9 reference data is available and the counter is initialized
When
Processing N9 reference segments for shipment identification
Then
The system loops through exactly 20 N9 reference segments to examine each one
R-GCCUSIO-cbl-00677 Reference Qualifier = 'CN'?
Decision Rules
Business View: Assuming the system is processing an n9 reference segment during the 'Reference Qualifier = 'CN'?' routine, when examining the reference number qualifier in the current segment, the system executes logic to ensure that the system checks if the qualifier equals 'cn' to identify shipment id data.
Given
The system is processing an N9 reference segment
When
Examining the reference number qualifier in the current segment
Then
The system checks if the qualifier equals 'CN' to identify shipment ID data
R-GCCUSIO-cbl-00678 Extract Shipment ID from Reference Number
Process Rules
Business View: Assuming an n9 reference segment has qualifier 'cn' indicating shipment id data during the 'Extract Shipment ID from Reference Number' routine, when processing the reference number field of the segment, the system executes logic to ensure that the system extracts the reference number value as the shipment id.
Given
An N9 reference segment has qualifier 'CN' indicating shipment ID data
When
Processing the reference number field of the segment
Then
The system extracts the reference number value as the shipment ID
R-GCCUSIO-cbl-00679 Store Shipment ID for Iron Highway
Process Rules
Business View: Assuming a shipment id has been extracted from an n9 reference segment with qualifier 'cn' during the 'Store Shipment ID for Iron Highway' routine, when preparing data for iron highway notification, the system executes logic to ensure that the system stores the shipment id in the iron highway notification data structure.
Given
A shipment ID has been extracted from an N9 reference segment with qualifier 'CN'
When
Preparing data for Iron Highway notification
Then
The system stores the shipment ID in the Iron Highway notification data structure
R-GCCUSIO-cbl-00783 Build Secondary Key with CCN + Record Type '02' + Sequence '0001'
Process Rules
Business View: Assuming a cargo control number (ccn) exists in the primary cargo record during the 'Build Secondary Key with CCN + Record Type '02' + Sequence '0001'' routine, when the system needs to retrieve n9 reference segments from secondary cargo data, the system executes logic to ensure that the system builds a composite key using the ccn, record type '02', and sequence '0001'.
Given
A cargo control number (CCN) exists in the primary cargo record
When
The system needs to retrieve N9 reference segments from secondary cargo data
Then
The system builds a composite key using the CCN, record type '02', and sequence '0001'
R-GCCUSIO-cbl-00784 Retrieve First N9 Segment from GCSA2RT
Action Rules
Business View: Assuming a composite key has been built for n9 reference segment lookup during the 'Retrieve First N9 Segment from GCSA2RT' routine, when the system executes a database retrieval operation against secondary cargo data, the system executes logic to ensure that the system retrieves the first n9 reference segment if it exists.
Given
A composite key has been built for N9 reference segment lookup
When
The system executes a database retrieval operation against secondary cargo data
Then
The system retrieves the first N9 reference segment if it exists
R-GCCUSIO-cbl-00785 N9 Segment Found?
Decision Rules
Business View: Assuming a database retrieval operation has been executed for n9 reference segments during the 'N9 Segment Found?' routine, when the system checks the operation result status, the system executes logic to ensure that if segments are found, continue with n9 processing, otherwise skip n9 processing entirely.
Given
A database retrieval operation has been executed for N9 reference segments
When
The system checks the operation result status
Then
If segments are found, continue with N9 processing, otherwise skip N9 processing entirely
R-GCCUSIO-cbl-00786 Initialize N9 Counter to Zero
Process Rules
Business View: Assuming n9 reference segments have been successfully retrieved during the 'Initialize N9 Counter to Zero' routine, when the system begins processing individual n9 reference entries, the system executes logic to ensure that the system initializes a counter to zero to track the current n9 entry position.
Given
N9 reference segments have been successfully retrieved
When
The system begins processing individual N9 reference entries
Then
The system initializes a counter to zero to track the current N9 entry position
R-GCCUSIO-cbl-00686 Extract N9 Reference Numbers
Action Rules
Business View: Assuming iron highway station configuration is found for the cargo during the 'Extract N9 Reference Numbers' routine, when processing n9 reference data for the cargo ccn key, the system executes logic to ensure that extract shipment id from n9 reference qualifier 'cn' and store in iron highway message.
Given
Iron Highway station configuration is found for the cargo
When
Processing N9 reference data for the cargo CCN key
Then
Extract shipment ID from N9 reference qualifier 'CN' and store in Iron Highway message
R-GCCUSIO-cbl-00691 Prepare Iron Highway Message
Process Rules
Business View: Assuming a cargo record has been determined to require iron highway notification with valid status during the 'Prepare Iron Highway Message' routine, when preparing the iron highway notification message, the system executes logic to ensure that set record type to 'uc' and set car id from saved car number and set waybill from saved waybill number and set ccn from cargo ccn key.
Given
A cargo record has been determined to require Iron Highway notification with valid status
When
Preparing the Iron Highway notification message
Then
Set record type to 'UC' AND set car ID from saved car number AND set waybill from saved waybill number AND set CCN from cargo CCN key
R-GCCUSIO-cbl-00692 Call Iron Highway Interface GCCIH
Action Rules
Business View: Assuming iron highway notification message is prepared with all required cargo information during the 'Call Iron Highway Interface GCCIH' routine, when sending the notification to iron highway system, the system executes logic to ensure that call external program 'gccih' with common control block and iron highway message structure.
Given
Iron Highway notification message is prepared with all required cargo information
When
Sending the notification to Iron Highway system
Then
Call external program 'GCCIH' with common control block and Iron Highway message structure
R-GCCUSIO-cbl-00419 Exit - No Message Needed
Decision Rules
Business View: Assuming a cargo record is being processed for iron highway notification during the 'Exit - No Message Needed' routine, when both us cargo status description is empty and cp cargo status description is empty, the system executes logic to ensure that the system exits the notification process without sending a message.
Given
A cargo record is being processed for Iron Highway notification
When
Both US cargo status description is empty AND CP cargo status description is empty
Then
The system exits the notification process without sending a message
R-GCCUSIO-cbl-00421 Exit - No Change
Decision Rules
Business View: <EXCLUSION CRITERIA> If a cargo record is being processed for iron highway notification and the status is not deleted or release, and the saved ih status equals the current us cargo status description occurs during the 'Exit - No Change' routine, then the system must guarantee that the system exits the notification process without sending a message.
EXCLUDING
A cargo record is being processed for Iron Highway notification AND the status is not DELETED or RELEASE
When
The saved IH status equals the current US cargo status description
Then
The system exits the notification process without sending a message
R-GCCUSIO-cbl-00422 Exit - Release Status
Decision Rules
Business View: Assuming a cargo record is being processed for iron highway notification during the 'Exit - Release Status' routine, when the us cargo status description equals 'release', the system executes logic to ensure that the system exits the notification process without sending a message.
Given
A cargo record is being processed for Iron Highway notification
When
The US cargo status description equals 'RELEASE'
Then
The system exits the notification process without sending a message
R-GCCUSIO-cbl-00424 Exit - Station Not Configured
Validation Rules
Business View: <EXCLUSION CRITERIA> If the system has looked up the iron highway station configuration table, and the table lookup returns a non-zero return flag indicating the station is not found occurs during the 'Exit - Station Not Configured' routine, then the system must guarantee that the system exits the notification process without sending a message.
EXCLUDING
The system has looked up the Iron Highway station configuration table
When
The table lookup returns a non-zero return flag indicating the station is not found
Then
The system exits the notification process without sending a message
R-GCCUSIO-cbl-00426 Set Message Status to 'DELETED'
Decision Rules
Business View: Assuming a cargo record is being prepared for iron highway notification during the 'Set Message Status to 'DELETED'' routine, when the cp cargo status description equals 'deleted', the system executes logic to ensure that the system sets the iron highway message status to 'deleted' and the saved ih status to 'deleted'.
Given
A cargo record is being prepared for Iron Highway notification
When
The CP cargo status description equals 'DELETED'
Then
The system sets the Iron Highway message status to 'DELETED' and the saved IH status to 'DELETED'
R-GCCUSIO-cbl-00427 Set Message Status to 'RELEASE'
Decision Rules
Business View: <EXCLUSION CRITERIA> If a cargo record is being prepared for iron highway notification and the status is not deleted, and the cp cargo status description equals 'release' occurs during the 'Set Message Status to 'RELEASE'' routine, then the system must guarantee that the system sets the iron highway message status to 'release' and the saved ih status to 'release'.
EXCLUDING
A cargo record is being prepared for Iron Highway notification AND the status is not DELETED
When
The CP cargo status description equals 'RELEASE'
Then
The system sets the Iron Highway message status to 'RELEASE' and the saved IH status to 'RELEASE'
R-GCCUSIO-cbl-00428 Set Message Status to 'SENT'
Decision Rules
Business View: <EXCLUSION CRITERIA> If a cargo record is being prepared for iron highway notification and the status is not deleted or release, and the us cargo status description is empty and the cp cargo status description equals 'sent ' occurs during the 'Set Message Status to 'SENT'' routine, then the system must guarantee that the system sets the iron highway message status to 'sent'.
EXCLUDING
A cargo record is being prepared for Iron Highway notification AND the status is not DELETED or RELEASE
When
The US cargo status description is empty AND the CP cargo status description equals 'SENT '
Then
The system sets the Iron Highway message status to 'SENT'
R-GCCUSIO-cbl-00429 Set Message Status from US Cargo Description
Decision Rules
Business View: <EXCLUSION CRITERIA> If a cargo record is being prepared for iron highway notification and the status is not deleted or release, and the us cargo status description is not empty or the cp cargo status description is not 'sent ' occurs during the 'Set Message Status from US Cargo Description' routine, then the system must guarantee that the system sets the iron highway message status to the us cargo status description and updates the saved ih status to the us cargo status.
EXCLUDING
A cargo record is being prepared for Iron Highway notification AND the status is not DELETED or RELEASE
When
The US cargo status description is not empty OR the CP cargo status description is not 'SENT '
Then
The system sets the Iron Highway message status to the US cargo status description and updates the saved IH status to the US cargo status
R-GCCUSIO-cbl-00430 Set Message Record Type to 'UC'
Process Rules
Business View: Assuming a cargo record has been validated and status determined for iron highway notification during the 'Set Message Record Type to 'UC'' routine, when the system prepares the notification message content, the system executes logic to ensure that the system sets record type to 'uc', car id from saved car number, waybill from saved waybill number, and ccn from cargo key.
Given
A cargo record has been validated and status determined for Iron Highway notification
When
The system prepares the notification message content
Then
The system sets record type to 'UC', car ID from saved car number, waybill from saved waybill number, and CCN from cargo key
R-GCCUSIO-cbl-00431 Call Iron Highway Interface
Action Rules
Business View: Assuming the iron highway notification message has been formatted with all required information during the 'Call Iron Highway Interface' routine, when the system is ready to send the notification, the system executes logic to ensure that the system calls the gccih program with the common control block and iron highway message structure.
Given
The Iron Highway notification message has been formatted with all required information
When
The system is ready to send the notification
Then
The system calls the GCCIH program with the common control block and Iron Highway message structure
R-GCCUSIO-cbl-00198 Retrieve Secondary Cargo Data GCSUSS02 Segment
Action Rules
Business View: Assuming a secondary data key has been constructed with cargo control number, record type '02', and sequence '0001' during the 'Retrieve Secondary Cargo Data GCSUSS02 Segment' routine, when the system executes a retrieval operation for secondary cargo data, the system executes logic to ensure that the system calls the database interface to retrieve the gcsuss02 segment using the qualified key.
Given
A secondary data key has been constructed with cargo control number, record type '02', and sequence '0001'
When
The system executes a retrieval operation for secondary cargo data
Then
The system calls the database interface to retrieve the GCSUSS02 segment using the qualified key
R-GCCUSIO-cbl-00213 Set Border Station from Table
Decision Rules
Business View: Assuming an mc table lookup has been performed and returned successfully with return flag '0' during the 'Set Border Station from Table' routine, when the system processes the table lookup results for border station determination, the system executes logic to ensure that the station number is extracted from the mc table segment and assigned to the error border index field with error code 'e'.
Given
An MC table lookup has been performed and returned successfully with return flag '0'
When
The system processes the table lookup results for border station determination
Then
The station number is extracted from the MC table segment and assigned to the error border index field with error code 'E'
R-GCCUSIO-cbl-00216 Populate Hold Index Fields
Process Rules
Business View: Assuming a cargo record has hold conditions including uscargo-hold, uscargo-holdpcs, uscargo-pr-hpcs, uscargo-hold-b, uscargo-pr-h-bo, or uscargo-holdfda during the 'Populate Hold Index Fields' routine, when the system processes hold field population for border-related holds, the system executes logic to ensure that the system performs mc table lookup using the cargo's location id, and if successful (return flag '0'), extracts the station number from the mc table segment and assigns it to the held border index field, and assigns the cargo ccn key to the held border cargo index field.
Given
A cargo record has hold conditions including USCARGO-HOLD, USCARGO-HOLDPCS, USCARGO-PR-HPCS, USCARGO-HOLD-B, USCARGO-PR-H-BO, or USCARGO-HOLDFDA
When
The system processes hold field population for border-related holds
Then
The system performs MC table lookup using the cargo's location ID, and if successful (return flag '0'), extracts the station number from the MC table segment and assigns it to the held border index field, and assigns the cargo CCN key to the held border cargo index field
R-GCCUSIO-cbl-00443 Extract Border Station Number from MC Segment
Process Rules
Business View: Assuming mc table lookup was successful and returned a valid table segment during the 'Extract Border Station Number from MC Segment' routine, when the system processes the retrieved mc table data, the system executes logic to ensure that the border station number is extracted from the mc segment and made available for cargo status processing.
Given
MC table lookup was successful and returned a valid table segment
When
The system processes the retrieved MC table data
Then
The border station number is extracted from the MC segment and made available for cargo status processing
R-GCCUSIO-cbl-00816 Extract Border Station Number from Table
Process Rules
Business View: Assuming the mc table lookup returns a successful result with station information during the 'Extract Border Station Number from Table' routine, when the system processes the table lookup response, the system executes logic to ensure that the border station number is extracted from the mc-station-num field in the table segment and assigned to the error border key.
Given
The MC table lookup returns a successful result with station information
When
The system processes the table lookup response
Then
The border station number is extracted from the MC-STATION-NUM field in the table segment and assigned to the error border key
R-GCCUSIO-cbl-00824 Use Border Station Number
Decision Rules
Business View: Assuming the mc table lookup has been performed for border station information during the 'Use Border Station Number' routine, when the table lookup returns successfully with return flag '0', the system executes logic to ensure that the system uses the retrieved station number from the table segment to set the border hold index.
Given
The MC table lookup has been performed for border station information
When
The table lookup returns successfully with return flag '0'
Then
The system uses the retrieved station number from the table segment to set the border hold index
R-GCCUSIO-cbl-00466 Retrieve Station Information for Border
Action Rules
Business View: Assuming a cargo record requiring border hold index processing during the 'Retrieve Station Information for Border' routine, when the system needs to set border hold index, the system executes logic to ensure that the system calls table lookup function to retrieve mc table segment using cargo location id and extracts station number for border hold index.
Given
A cargo record requiring border hold index processing
When
The system needs to set border hold index
Then
The system calls table lookup function to retrieve MC table segment using cargo location ID and extracts station number for border hold index
R-GCCUSIO-cbl-00474 Get Border Station from MC Table
Action Rules
Business View: Assuming cargo has error status and error index record needs border station information during the 'Get Border Station from MC Table' routine, when the system looks up mc table using cargo location id, the system executes logic to ensure that if table lookup is successful, the border station number is retrieved from the table segment.
Given
Cargo has error status and error index record needs border station information
When
The system looks up MC table using cargo location ID
Then
If table lookup is successful, the border station number is retrieved from the table segment
R-GCCUSIO-cbl-00746 Use Border Station Number from MC Table
Action Rules
Business View: Assuming a cargo record requires border hold index fields and has a location id during the 'Use Border Station Number from MC Table' routine, when the system needs to determine the border station number, the system executes logic to ensure that the system calls table lookup service to retrieve mc table segment using the cargo location id and extracts the station number if lookup is successful.
Given
A cargo record requires border hold index fields and has a location ID
When
The system needs to determine the border station number
Then
The system calls table lookup service to retrieve MC table segment using the cargo location ID and extracts the station number if lookup is successful
R-GCCUSIO-cbl-00833 Set Border Hold Index
Decision Rules
Business View: Assuming a cargo record exists with hold status conditions and mc table lookup is successful during the 'Set Border Hold Index' routine, when the cargo status is uscargo-hold or uscargo-holdpcs or uscargo-pr-hpcs or uscargo-hold-b or uscargo-pr-h-bo or uscargo-holdfda and table lookup returns success flag '0', the system executes logic to ensure that set the mc station number from table segment to held border key and set the cargo ccn key to held border cargo key.
Given
A cargo record exists with hold status conditions AND MC table lookup is successful
When
The cargo status is USCARGO-HOLD OR USCARGO-HOLDPCS OR USCARGO-PR-HPCS OR USCARGO-HOLD-B OR USCARGO-PR-H-BO OR USCARGO-HOLDFDA AND table lookup returns success flag '0'
Then
Set the MC station number from table segment to held border key AND set the cargo CCN key to held border cargo key

Module: CERR 5 EDI Rules Found

R-CERR-cbl-00005 7:Error Notification - Display Blocking Error Message
Process Rules
Business View: Assuming error processing has been completed (either cerrprod or cerrtest was called, or dump-only mode bypassed processing) during the '7:Error Notification - Display Blocking Error Message' routine, when the program reaches the error notification stage, the system executes logic to ensure that the system displays blocking error message '# cims: blocking error.' to the system error output.
Given
Error processing has been completed (either CERRPROD or CERRTEST was called, or dump-only mode bypassed processing)
When
The program reaches the error notification stage
Then
The system displays blocking error message '# CIMS: BLOCKING ERROR.' to the system error output
R-CERR-cbl-00012 Skip Error Handler Routing - Proceed Directly to Error Notification
Decision Rules
Business View: Assuming the common communication area has been initialized via dcccom program during the 'Skip Error Handler Routing - Proceed Directly to Error Notification' routine, when the dump-only indicator (ws-dump-only) is set to true, the system executes logic to ensure that the system skips the environment detection logic and does not invoke either cerrprod (production error handler) or cerrtest (test error handler), proceeding directly to program termination.
Given
The common communication area has been initialized via DCCCOM program
When
The dump-only indicator (WS-DUMP-ONLY) is set to True
Then
The system skips the environment detection logic and does not invoke either CERRPROD (production error handler) or CERRTEST (test error handler), proceeding directly to program termination
R-CERR-cbl-00034 Display Main Message: CIMS BLOCKING ERROR
Process Rules
Business View: Assuming the error notification header has been displayed during the 'Display Main Message: CIMS BLOCKING ERROR' routine, when the main error message display is executed, the system executes logic to ensure that the system displays the message '# cims: blocking error.' to the system error output (syserr).
Given
The error notification header has been displayed
When
The main error message display is executed
Then
The system displays the message '# CIMS: BLOCKING ERROR.' to the system error output (SYSERR)
R-CERR-cbl-00035 Display Footer Line: Hash Border
Process Rules
Business View: Assuming the main blocking error message has been displayed during the 'Display Footer Line: Hash Border' routine, when the error notification footer display is executed, the system executes logic to ensure that the system displays a hash border footer line '###########################################' to the system error output (syserr).
Given
The main blocking error message has been displayed
When
The error notification footer display is executed
Then
The system displays a hash border footer line '###########################################' to the system error output (SYSERR)
R-CERR-cbl-00036 Error Notification Complete
Process Rules
Business View: Assuming a blocking error requires notification during the 'Error Notification Complete' routine, when the complete error notification sequence is executed, the system executes logic to ensure that the system displays the complete formatted error message consisting of header border, main error message 'cims: blocking error', and footer border, all directed to system error output (syserr) for immediate operator visibility.
Given
A blocking error requires notification
When
The complete error notification sequence is executed
Then
The system displays the complete formatted error message consisting of header border, main error message 'CIMS: BLOCKING ERROR', and footer border, all directed to system error output (SYSERR) for immediate operator visibility

Module: CIMS 28 EDI Rules Found

R-CIMS-cbl-00012 3:PCB Address Resolution
Process Rules
Business View: <EXCLUSION CRITERIA> If the address area is not null and the pcb address is valid and the communication area version matches and the segment level is not '98' or '99' or force reset is true, and address area validation occurs occurs during the '3:PCB Address Resolution' routine, then the system must guarantee that the first 8 bytes of the address area are cleared to spaces.
EXCLUDING
The address area is not null AND the PCB address is valid AND the communication area version matches AND the segment level is not '98' or '99' OR force reset is true
When
Address area validation occurs
Then
The first 8 bytes of the address area are cleared to spaces
R-CIMS-cbl-00013 PCB Address Provided?
Validation Rules
Business View: Assuming the address area is null during the 'PCB Address Provided?' routine, when address area validation occurs, the system executes logic to ensure that the address area is set to the default csi address area, pcb name is set to zero, pcb number is set to zero, an error message 'zero pcb address error' is set in the communication area, and the error handler is invoked.
Given
The address area is null
When
Address area validation occurs
Then
The address area is set to the default CSI address area, PCB name is set to zero, PCB number is set to zero, an error message 'Zero PCB Address Error' is set in the communication area, and the error handler is invoked
R-CIMS-cbl-00016 13:Error Handling for Missing PCB Address
Validation Rules
Business View: Assuming the pcb address is null after completing the table search during the '13:Error Handling for Missing PCB Address' routine, when pcb address validation occurs, the system executes logic to ensure that the pcb name and number are captured, an error message 'zero pcb address error' is set in the communication area, and the error handler is invoked.
Given
The PCB address is null after completing the table search
When
PCB address validation occurs
Then
The PCB name and number are captured, an error message 'Zero PCB Address Error' is set in the communication area, and the error handler is invoked
R-CIMS-cbl-00018 6:IMS Database Call Execution
Action Rules
Business View: Assuming the pcb address is valid and all parameters are prepared during the '6:IMS Database Call Execution' routine, when database call is executed, the system executes logic to ensure that the database interface is invoked with the function code, pcb copy, io area, and up to 6 segment search arguments (ssa1 through ssa6).
Given
The PCB address is valid and all parameters are prepared
When
Database call is executed
Then
The database interface is invoked with the function code, PCB copy, IO area, and up to 6 segment search arguments (SSA1 through SSA6)
R-CIMS-cbl-00023 9:PCB Status Information Update
Process Rules
Business View: Assuming a database call has been executed during the '9:PCB Status Information Update' routine, when status information update occurs, the system executes logic to ensure that the pcb copy is stored in the communication area's pcb copy field, and if the segment level is not '98' or '99', the feedback key length is stored in the communication area's length feedback key field.
Given
A database call has been executed
When
Status information update occurs
Then
The PCB copy is stored in the communication area's PCB copy field, and if the segment level is not '98' or '99', the feedback key length is stored in the communication area's length feedback key field
R-CIMS-cbl-00028 12:Error Handling for Invalid Status
Validation Rules
Business View: <EXCLUSION CRITERIA> If the status code does not match any acceptable status code in the table, and status code validation completes occurs during the '12:Error Handling for Invalid Status' routine, then the system must guarantee that an error message is formatted as '[status code]: ims rc code not in acceptable list' and stored in the communication area's error message field, and the error handler is invoked.
EXCLUDING
The status code does not match any acceptable status code in the table
When
Status code validation completes
Then
An error message is formatted as '[Status Code]: IMS RC CODE NOT IN ACCEPTABLE LIST' and stored in the communication area's error message field, and the error handler is invoked
R-CIMS-cbl-00056 5 or More Arguments?
Decision Rules
Business View: Assuming an ims database operation is being prepared with io area already captured during the '5 or More Arguments?' routine, when the argument count is 5 or more, the system executes logic to ensure that the first segment search argument (ssa1) is captured from the fifth argument position and stored in the last ssa1 field of the communication area.
Given
An IMS database operation is being prepared with IO Area already captured
When
The argument count is 5 or more
Then
The first Segment Search Argument (SSA1) is captured from the fifth argument position and stored in the Last SSA1 field of the communication area
R-CIMS-cbl-00057 6 or More Arguments?
Decision Rules
Business View: Assuming an ims database operation is being prepared with ssa1 already captured during the '6 or More Arguments?' routine, when the argument count is 6 or more, the system executes logic to ensure that the second segment search argument (ssa2) is captured from the sixth argument position and stored in the last ssa2 field of the communication area.
Given
An IMS database operation is being prepared with SSA1 already captured
When
The argument count is 6 or more
Then
The second Segment Search Argument (SSA2) is captured from the sixth argument position and stored in the Last SSA2 field of the communication area
R-CIMS-cbl-00058 7 or More Arguments?
Decision Rules
Business View: Assuming an ims database operation is being prepared with ssa2 already captured during the '7 or More Arguments?' routine, when the argument count is 7 or more, the system executes logic to ensure that the third segment search argument (ssa3) is captured from the seventh argument position and stored in the last ssa3 field of the communication area.
Given
An IMS database operation is being prepared with SSA2 already captured
When
The argument count is 7 or more
Then
The third Segment Search Argument (SSA3) is captured from the seventh argument position and stored in the Last SSA3 field of the communication area
R-CIMS-cbl-00059 8 or More Arguments?
Decision Rules
Business View: Assuming an ims database operation is being prepared with ssa3 already captured during the '8 or More Arguments?' routine, when the argument count is 8 or more, the system executes logic to ensure that the fourth segment search argument (ssa4) is captured from the eighth argument position and stored in the last ssa4 field of the communication area.
Given
An IMS database operation is being prepared with SSA3 already captured
When
The argument count is 8 or more
Then
The fourth Segment Search Argument (SSA4) is captured from the eighth argument position and stored in the Last SSA4 field of the communication area
R-CIMS-cbl-00060 9 or More Arguments?
Decision Rules
Business View: Assuming an ims database operation is being prepared with ssa4 already captured during the '9 or More Arguments?' routine, when the argument count is 9 or more, the system executes logic to ensure that the fifth segment search argument (ssa5) is captured from the ninth argument position and stored in the last ssa5 field of the communication area.
Given
An IMS database operation is being prepared with SSA4 already captured
When
The argument count is 9 or more
Then
The fifth Segment Search Argument (SSA5) is captured from the ninth argument position and stored in the Last SSA5 field of the communication area
R-CIMS-cbl-00061 10 or More Arguments?
Decision Rules
Business View: Assuming an ims database operation is being prepared with ssa5 already captured during the '10 or More Arguments?' routine, when the argument count is 10 or more, the system executes logic to ensure that the sixth segment search argument (ssa6) is captured from the tenth argument position and stored in the last ssa6 field of the communication area.
Given
An IMS database operation is being prepared with SSA5 already captured
When
The argument count is 10 or more
Then
The sixth Segment Search Argument (SSA6) is captured from the tenth argument position and stored in the Last SSA6 field of the communication area
R-CIMS-cbl-00068 Generate Missing PCB Error Message
Validation Rules
Business View: Assuming the system has completed searching through the pcb table or no pcb name was provided during the 'Generate Missing PCB Error Message' routine, when the pcb address remains null after the search process, the system executes logic to ensure that the system generates an error message containing the pcb name and pcb number, stores it in the communication area error message field, and invokes the error handler program 'cerr'.
Given
The system has completed searching through the PCB table or no PCB name was provided
When
The PCB address remains NULL after the search process
Then
The system generates an error message containing the PCB name and PCB number, stores it in the communication area error message field, and invokes the error handler program 'CERR'
R-CIMS-cbl-00071 Search Index <= 249?
Process Rules
Business View: Assuming the system is iterating through the pcb table during the 'Search Index <= 249?' routine, when a database name entry at position i contains spaces, the system executes logic to ensure that the search loop terminates immediately regardless of the current index value.
Given
The system is iterating through the PCB table
When
A database name entry at position I contains spaces
Then
The search loop terminates immediately regardless of the current index value
R-CIMS-cbl-00162 Call CBLTDLI Interface
Action Rules
Business View: Assuming a valid pcb address has been resolved and set, a function code is specified, an io area is available for data exchange, and zero to six ssa parameters are provided for segment qualification during the 'Call CBLTDLI Interface' routine, when the system invokes the cbltdli interface with the function code, pcb reference, io area, and all provided ssa parameters (ssa1 through ssa6), the system executes logic to ensure that the ims database operation is executed and control returns with the operation result reflected in the pcb status code and any retrieved or updated data in the io area.
Given
A valid PCB address has been resolved and set, a function code is specified, an IO area is available for data exchange, and zero to six SSA parameters are provided for segment qualification
When
The system invokes the CBLTDLI interface with the function code, PCB reference, IO area, and all provided SSA parameters (SSA1 through SSA6)
Then
The IMS database operation is executed and control returns with the operation result reflected in the PCB status code and any retrieved or updated data in the IO area
R-CIMS-cbl-00115 Copy Key Feedback Length to Common Area
Validation Rules
Business View: <EXCLUSION CRITERIA> If the pcb has been copied to the common area and contains a segment level indicator, and the segment level is not equal to '98' and the segment level is not equal to '99' occurs during the 'Copy Key Feedback Length to Common Area' routine, then the system must guarantee that the key feedback length from the pcb is copied to the common area's key length field for use in subsequent key-based operations.
EXCLUDING
The PCB has been copied to the common area and contains a segment level indicator
When
The segment level is not equal to '98' AND the segment level is not equal to '99'
Then
The key feedback length from the PCB is copied to the common area's key length field for use in subsequent key-based operations
R-CIMS-cbl-00116 Copy Key Feedback Length to Common Area
Decision Rules
Business View: Assuming the pcb has been copied to the common area and contains a segment level indicator during the 'Copy Key Feedback Length to Common Area' routine, when the segment level is equal to '98' or the segment level is equal to '99', the system executes logic to ensure that the key feedback length is not copied to the common area and processing continues without storing key length information.
Given
The PCB has been copied to the common area and contains a segment level indicator
When
The segment level is equal to '98' OR the segment level is equal to '99'
Then
The key feedback length is not copied to the common area and processing continues without storing key length information
R-CIMS-cbl-00123 Status Code is Invalid
Decision Rules
Business View: Assuming the system has completed checking all 12 acceptable status codes in cc-acc-status-tab of cccom and the counter i has exceeded 12 during the 'Status Code is Invalid' routine, when no match was found between cc-status-code of cccom and any entry in cc-acc-status-tab of cccom, the system executes logic to ensure that the system constructs an error message by concatenating cc-status-code of cccom with the text ': ims rc code not in acceptable list' and stores it in cc-error-message of cccom, then calls the error handler program 'cerr' using cccom and executes goback.
Given
The system has completed checking all 12 acceptable status codes in CC-ACC-STATUS-TAB of CCCOM and the counter I has exceeded 12
When
No match was found between CC-STATUS-CODE of CCCOM and any entry in CC-ACC-STATUS-TAB of CCCOM
Then
The system constructs an error message by concatenating CC-STATUS-CODE of CCCOM with the text ': IMS RC CODE NOT IN ACCEPTABLE LIST' and stores it in CC-ERROR-MESSAGE of CCCOM, then calls the error handler program 'CERR' using CCCOM and executes GOBACK
R-CIMS-cbl-00125 Build Error Message with Status Code
Validation Rules
Business View: <EXCLUSION CRITERIA> If the ims status code cc-status-code of cccom is not in the acceptable status list, and the system needs to report the error condition occurs during the 'Build Error Message with Status Code' routine, then the system must guarantee that the system uses string operation to concatenate cc-status-code of cccom with the literal text ': ims rc code not in acceptable list' delimited by size and stores the result into cc-error-message of cccom.
EXCLUDING
The IMS status code CC-STATUS-CODE of CCCOM is not in the acceptable status list
When
The system needs to report the error condition
Then
The system uses STRING operation to concatenate CC-STATUS-CODE of CCCOM with the literal text ': IMS RC CODE NOT IN ACCEPTABLE LIST' delimited by SIZE and stores the result into CC-ERROR-MESSAGE of CCCOM
R-CIMS-cbl-00126 Call Error Handler
Action Rules
Business View: Assuming an invalid ims status code has been detected and the error message has been constructed in cc-error-message of cccom during the 'Call Error Handler' routine, when the system needs to handle the error condition, the system executes logic to ensure that the system calls the error handler program 'cerr' using cccom as the parameter to process the error.
Given
An invalid IMS status code has been detected and the error message has been constructed in CC-ERROR-MESSAGE of CCCOM
When
The system needs to handle the error condition
Then
The system calls the error handler program 'CERR' using CCCOM as the parameter to process the error
R-CIMS-cbl-00169 Status Code is Invalid
Validation Rules
Business View: Assuming an ims database operation has completed with a status code in cc-status-code of cccom, and the status code has been compared against all 12 entries in the acceptable status table cc-acc-status-tab of cccom without finding a match during the 'Status Code is Invalid' routine, when the counter i exceeds 12 indicating all acceptable status codes have been checked without a match, the system executes logic to ensure that the system constructs an error message by concatenating the status code with the text ': ims rc code not in acceptable list' and stores it in cc-error-message of cccom, then invokes the error handler program cerr with cccom as parameter, and returns control to the caller.
Given
An IMS database operation has completed with a status code in CC-STATUS-CODE OF CCCOM, and the status code has been compared against all 12 entries in the acceptable status table CC-ACC-STATUS-TAB OF CCCOM without finding a match
When
The counter I exceeds 12 indicating all acceptable status codes have been checked without a match
Then
The system constructs an error message by concatenating the status code with the text ': IMS RC CODE NOT IN ACCEPTABLE LIST' and stores it in CC-ERROR-MESSAGE OF CCCOM, then invokes the error handler program CERR with CCCOM as parameter, and returns control to the caller
R-CIMS-cbl-00129 Build Error Message
Validation Rules
Business View: <EXCLUSION CRITERIA> If an ims database operation has completed and returned a status code in cc-status-code of cccom, and the status code is not found in the acceptable status table (cc-acc-status-tab) after checking all 12 entries occurs during the 'Build Error Message' routine, then the system must guarantee that the system builds an error message by concatenating the status code with the text ': ims rc code not in acceptable list' and stores the complete message in cc-error-message of cccom.
EXCLUDING
An IMS database operation has completed and returned a status code in CC-STATUS-CODE of CCCOM
When
The status code is not found in the acceptable status table (CC-ACC-STATUS-TAB) after checking all 12 entries
Then
The system builds an error message by concatenating the status code with the text ': IMS RC CODE NOT IN ACCEPTABLE LIST' and stores the complete message in CC-ERROR-MESSAGE of CCCOM
R-CIMS-cbl-00130 Call Error Handler Program 'CERR'
Action Rules
Business View: Assuming an error message has been constructed in cc-error-message of cccom indicating an unacceptable ims status code during the 'Call Error Handler Program 'CERR'' routine, when the status code validation fails after checking all acceptable status codes, the system executes logic to ensure that the system calls the error handler program 'cerr' passing cccom as parameter to process the error condition.
Given
An error message has been constructed in CC-ERROR-MESSAGE of CCCOM indicating an unacceptable IMS status code
When
The status code validation fails after checking all acceptable status codes
Then
The system calls the error handler program 'CERR' passing CCCOM as parameter to process the error condition
R-CIMS-cbl-00133 Move PCB Name to Error Message
Process Rules
Business View: Assuming a pcb address resolution attempt has failed and the pcb address is null during the 'Move PCB Name to Error Message' routine, when the system needs to report the error condition, the system executes logic to ensure that the pcb mnemonic name is moved to the error message pcb name field.
Given
A PCB address resolution attempt has failed and the PCB address is null
When
The system needs to report the error condition
Then
The PCB mnemonic name is moved to the error message PCB name field
R-CIMS-cbl-00134 Move PCB Number to Error Message
Process Rules
Business View: Assuming a pcb address resolution has failed and the pcb name has been captured during the 'Move PCB Number to Error Message' routine, when the system continues building the error message, the system executes logic to ensure that the pcb number is moved to the error message pcb number field.
Given
A PCB address resolution has failed and the PCB name has been captured
When
The system continues building the error message
Then
The PCB number is moved to the error message PCB number field
R-CIMS-cbl-00135 Construct Error Message: 'ZERO PCB ADDR ERROR MESSAGE'
Validation Rules
Business View: Assuming the pcb name and pcb number have been captured for error reporting during the 'Construct Error Message: 'ZERO PCB ADDR ERROR MESSAGE'' routine, when the system needs to format the complete error message, the system executes logic to ensure that the standardized 'zero-pcb-addr-error-message' is constructed containing the pcb name and number.
Given
The PCB name and PCB number have been captured for error reporting
When
The system needs to format the complete error message
Then
The standardized 'ZERO-PCB-ADDR-ERROR-MESSAGE' is constructed containing the PCB name and number
R-CIMS-cbl-00136 Move Error Message to Common Area Error Field
Process Rules
Business View: Assuming a complete error message has been constructed for the zero pcb address condition during the 'Move Error Message to Common Area Error Field' routine, when the system prepares to invoke error handling, the system executes logic to ensure that the error message is moved to the cc-error-message field of the cccom common area.
Given
A complete error message has been constructed for the zero PCB address condition
When
The system prepares to invoke error handling
Then
The error message is moved to the CC-ERROR-MESSAGE field of the CCCOM common area
R-CIMS-cbl-00137 Call Error Handler Program 'CERR' with Common Area
Action Rules
Business View: Assuming the pcb address is null after resolution attempts and the error message has been stored in the common area during the 'Call Error Handler Program 'CERR' with Common Area' routine, when the system needs to handle the unrecoverable error condition, the system executes logic to ensure that the error handler program 'cerr' is called with the cccom common area containing the error details.
Given
The PCB address is null after resolution attempts and the error message has been stored in the common area
When
The system needs to handle the unrecoverable error condition
Then
The error handler program 'CERR' is called with the CCCOM common area containing the error details

Module: WRITMSGL 7 EDI Rules Found

R-WRITMSGL-cbl-00001 1: Message Writing Initialization
Action Rules
Business View: Assuming the message coordination program has started execution during the '1: Message Writing Initialization' routine, when the system begins message processing workflow, the system executes logic to ensure that the system invokes the writmsg module to initialize message writing operations.
Given
The message coordination program has started execution
When
The system begins message processing workflow
Then
The system invokes the WRITMSG module to initialize message writing operations
R-WRITMSGL-cbl-00002 2: Extended Message Writing
Action Rules
Business View: Assuming the basic message writing initialization has completed successfully and six message parameters (p1, p2, p3, p4, p5, p6) are available during the '2: Extended Message Writing' routine, when the system proceeds to extended message processing, the system executes logic to ensure that the system invokes the writmsgx module with all six parameters (p1, p2, p3, p4, p5, p6) to perform extended message writing operations.
Given
The basic message writing initialization has completed successfully AND six message parameters (P1, P2, P3, P4, P5, P6) are available
When
The system proceeds to extended message processing
Then
The system invokes the WRITMSGX module with all six parameters (P1, P2, P3, P4, P5, P6) to perform extended message writing operations
R-WRITMSGL-cbl-00003 End Program
Process Rules
Business View: Assuming both message writing operations (basic and extended) have completed execution during the 'End Program' routine, when all message processing steps are finished, the system executes logic to ensure that the system terminates the program and returns control to the calling program.
Given
Both message writing operations (basic and extended) have completed execution
When
All message processing steps are finished
Then
The system terminates the program and returns control to the calling program
R-WRITMSGL-cbl-00004 Call WRITMSG Program
Action Rules
Business View: Assuming the message writing coordinator program has started execution during the 'Call WRITMSG Program' routine, when the system begins the message processing workflow, the system executes logic to ensure that the writmsg program is called to initialize message writing functionality without any parameters.
Given
The message writing coordinator program has started execution
When
The system begins the message processing workflow
Then
The WRITMSG program is called to initialize message writing functionality without any parameters
R-WRITMSGL-cbl-00005 Initialize Message Writing Functionality
Action Rules
Business View: Assuming the writmsg program has completed initialization and six message parameters (p1, p2, p3, p4, p5, p6) are available during the 'Initialize Message Writing Functionality' routine, when the system proceeds to extended message processing, the system executes logic to ensure that the writmsgx program is called with all six parameters (p1, p2, p3, p4, p5, p6) to process the extended message operation.
Given
The WRITMSG program has completed initialization AND six message parameters (P1, P2, P3, P4, P5, P6) are available
When
The system proceeds to extended message processing
Then
The WRITMSGX program is called with all six parameters (P1, P2, P3, P4, P5, P6) to process the extended message operation
R-WRITMSGL-cbl-00006 End: Message Writing Initialization
Process Rules
Business View: Assuming the writmsg program has completed initialization and the writmsgx program has completed extended message processing during the 'End: Message Writing Initialization' routine, when all message writing operations are finished, the system executes logic to ensure that the system returns control to the calling program.
Given
The WRITMSG program has completed initialization AND the WRITMSGX program has completed extended message processing
When
All message writing operations are finished
Then
The system returns control to the calling program
R-WRITMSGL-cbl-00007 Call WRITMSGX Program with 6 Parameters
Action Rules
Business View: Assuming the basic message writing operation has completed successfully and six business parameters (p1, p2, p3, p4, p5, p6) are available during the 'Call WRITMSGX Program with 6 Parameters' routine, when the extended message writing process is initiated, the system executes logic to ensure that the system calls the writmsgx program with all six parameters (p1, p2, p3, p4, p5, p6) to generate the extended message output.
Given
The basic message writing operation has completed successfully and six business parameters (P1, P2, P3, P4, P5, P6) are available
When
The extended message writing process is initiated
Then
The system calls the WRITMSGX program with all six parameters (P1, P2, P3, P4, P5, P6) to generate the extended message output

Module: GCCMQERR 10 EDI Rules Found

R-GCCMQERR-cbl-00001 Error Code Lookup
Process Rules
Business View: Assuming an input error number is provided and an error table exists with error numbers and corresponding text messages during the 'Error Code Lookup' routine, when the system performs a sequential search through the error table starting from index 1 and incrementing by 1, the system executes logic to ensure that the search continues until either the input error number matches an error number in the table or an empty entry (spaces) is encountered indicating end of table.
Given
An input error number is provided and an error table exists with error numbers and corresponding text messages
When
The system performs a sequential search through the error table starting from index 1 and incrementing by 1
Then
The search continues until either the input error number matches an error number in the table OR an empty entry (spaces) is encountered indicating end of table
R-GCCMQERR-cbl-00002 Error Message Retrieval
Decision Rules
Business View: Assuming the error table search has completed and the input error number was found in the table during the 'Error Message Retrieval' routine, when the error number at the current index position matches the input error number, the system executes logic to ensure that the system moves the corresponding error text from the table to the output message text field.
Given
The error table search has completed and the input error number was found in the table
When
The error number at the current index position matches the input error number
Then
The system moves the corresponding error text from the table to the output message text field
R-GCCMQERR-cbl-00003 Unknown Error Handling
Decision Rules
Business View: <EXCLUSION CRITERIA> If the error table search has completed and the input error number was not found in the table, and the error number at the current index position does not match the input error number occurs during the 'Unknown Error Handling' routine, then the system must guarantee that the system moves the input error number to the unknown number field and moves the unknown message to the output message text field.
EXCLUDING
The error table search has completed and the input error number was not found in the table
When
The error number at the current index position does not match the input error number
Then
The system moves the input error number to the unknown number field AND moves the unknown message to the output message text field
R-GCCMQERR-cbl-00004 Initialize Search Index to 1
Process Rules
Business View: Assuming an error number needs to be looked up in the error message table during the 'Initialize Search Index to 1' routine, when the error lookup process begins, the system executes logic to ensure that the search index is set to position 1 to start searching from the beginning of the error table.
Given
An error number needs to be looked up in the error message table
When
The error lookup process begins
Then
The search index is set to position 1 to start searching from the beginning of the error table
R-GCCMQERR-cbl-00005 Does Error Number Match Input?
Validation Rules
Business View: Assuming the system is examining an error number at the current table position during the 'Does Error Number Match Input?' routine, when the error number at the current index is compared with the input error number, the system executes logic to ensure that if the error numbers match exactly, the search is successful and the corresponding error message is identified.
Given
The system is examining an error number at the current table position
When
The error number at the current index is compared with the input error number
Then
If the error numbers match exactly, the search is successful and the corresponding error message is identified
R-GCCMQERR-cbl-00008 Search Complete - Match Found
Decision Rules
Business View: Assuming a matching error number has been found in the error table during the 'Search Complete - Match Found' routine, when the search process completes successfully, the system executes logic to ensure that the corresponding error message text is moved to the output message field.
Given
A matching error number has been found in the error table
When
The search process completes successfully
Then
The corresponding error message text is moved to the output message field
R-GCCMQERR-cbl-00009 Search Complete - End of Table Reached
Decision Rules
Business View: Assuming the end of the error table has been reached without finding a matching error number during the 'Search Complete - End of Table Reached' routine, when the search process completes without success, the system executes logic to ensure that the input error number is stored in the unknown number field and a default unknown error message is moved to the output message field.
Given
The end of the error table has been reached without finding a matching error number
When
The search process completes without success
Then
The input error number is stored in the unknown number field and a default unknown error message is moved to the output message field
R-GCCMQERR-cbl-00010 Retrieve Error Message Text from Table
Action Rules
Business View: Assuming an error code has been found in the error message table at a specific index position during the 'Retrieve Error Message Text from Table' routine, when the error code at the current index position equals the input error number, the system executes logic to ensure that the corresponding error message text at that same index position is moved to the output message field.
Given
An error code has been found in the error message table at a specific index position
When
The error code at the current index position equals the input error number
Then
The corresponding error message text at that same index position is moved to the output message field
R-GCCMQERR-cbl-00011 Move Input Error Number to Unknown Number Field
Decision Rules
Business View: <EXCLUSION CRITERIA> If an error code has been searched in the error message table and error-number (error-index) does not equal input-error-number, and the system determines the error code is not found in the table occurs during the 'Move Input Error Number to Unknown Number Field' routine, then the system must guarantee that the input error number is moved to the unknown number field for inclusion in the default message.
EXCLUDING
An error code has been searched in the error message table and ERROR-NUMBER (ERROR-INDEX) does not equal INPUT-ERROR-NUMBER
When
The system determines the error code is not found in the table
Then
The input error number is moved to the unknown number field for inclusion in the default message
R-GCCMQERR-cbl-00012 Move Unknown Message Template to Output
Action Rules
Business View: <EXCLUSION CRITERIA> If an error code is not found in the error message table and the unknown number field has been populated, and the system needs to provide an error message for an unrecognized error code occurs during the 'Move Unknown Message Template to Output' routine, then the system must guarantee that the unknown message template is moved to the output message text field.
EXCLUDING
An error code is not found in the error message table and the unknown number field has been populated
When
The system needs to provide an error message for an unrecognized error code
Then
The unknown message template is moved to the output message text field

Module: GCX126R 717 EDI Rules Found

R-GCX126-cbl-00001 1:Initialize Program Configuration
Process Rules
Business View: Assuming the program gcx126 starts execution during the '1:Initialize Program Configuration' routine, when initialization is performed, the system executes logic to ensure that set log index to 1, clear remark index, clear log array, clear previous crn, set all segment flags to not found, set cargo not found flag, initialize line counters, set from usercode to 'om01247', set accept status to 'ge', initialize all segment structures (m10, p4, v9, k1, x4, n7), retrieve admin table with table id 'ad' and sequence id 'adminid', if admin segment found then set merlin recipient to admin dc merlin 1 value, format machine date and time from system values, initialize date conversion parameters, convert machine date to julian format, read message queue, connect to mq manager, and open mq queue.
Given
The program GCX126 starts execution
When
Initialization is performed
Then
Set log index to 1, clear remark index, clear log array, clear previous CRN, set all segment flags to not found, set cargo not found flag, initialize line counters, set from usercode to 'OM01247', set accept status to 'GE', initialize all segment structures (M10, P4, V9, K1, X4, N7), retrieve admin table with table ID 'AD' and sequence ID 'ADMINID', if admin segment found then set Merlin recipient to admin DC Merlin 1 value, format machine date and time from system values, initialize date conversion parameters, convert machine date to Julian format, read message queue, connect to MQ manager, and open MQ queue
R-GCX126-cbl-00002 2:Read EDI 350 Message from Queue
Process Rules
Business View: Assuming mq connection is established and queue is open during the '2:Read EDI 350 Message from Queue' routine, when mqget operation is performed, the system executes logic to ensure that read message into mqs-message buffer, calculate maximum mqs entries as (data length minus header length) divided by entry length rounded, if calculated entries exceed maximum constant then set to maximum constant value.
Given
MQ connection is established and queue is open
When
MQGET operation is performed
Then
Read message into MQS-MESSAGE buffer, calculate maximum MQS entries as (data length minus header length) divided by entry length rounded, if calculated entries exceed maximum constant then set to maximum constant value
R-GCX126-cbl-00003 Message Available? and Message Valid?
Validation Rules
Business View: Assuming an edi 350 message has been retrieved from the queue during the 'Message Available? and Message Valid?' routine, when message status is evaluated, the system executes logic to ensure that if completion code is not ok and reason code is 2033 then set message not available flag, else if completion code is ok and backout count is not zero then set skip message flag, else if completion code is ok and maximum mqs entries is less than 1 then abort with error 'user abend 350 message too short', else if completion code is ok and backout count is zero then set good message found flag, else set end of queue flag.
Given
An EDI 350 message has been retrieved from the queue
When
Message status is evaluated
Then
If completion code is not OK and reason code is 2033 then set message not available flag, else if completion code is OK and backout count is not zero then set skip message flag, else if completion code is OK and maximum MQS entries is less than 1 then abort with error 'USER ABEND 350 MESSAGE TOO SHORT', else if completion code is OK and backout count is zero then set good message found flag, else set end of queue flag
R-GCX126-cbl-00004 3:Determine Message Type
Decision Rules
Business View: Assuming a valid edi 350 message has been loaded during the '3:Determine Message Type' routine, when message header is examined, the system executes logic to ensure that if mqs cross-way header positions 1 through 10 equal '+++3505040' then set conveyance 350 flag to true, else set cargo 350 flag to true.
Given
A valid EDI 350 message has been loaded
When
Message header is examined
Then
If MQS cross-way header positions 1 through 10 equal '+++3505040' then set conveyance 350 flag to true, else set cargo 350 flag to true
R-GCX126-cbl-00005 4:Parse EDI Segments and Segment Type?
Process Rules
Business View: Assuming message has been validated and type determined during the '4:Parse EDI Segments and Segment Type?' routine, when each message line is processed, the system executes logic to ensure that if table id is 'st' then set header found and first x4 flags, else if table id is 'm10' then perform m10 segment processing, else if table id is 'p4' then perform p4 segment processing, else if table id is 'v9' then perform v9 segment processing, else if table id is 'vid' then continue, else if table id is 'k1' then perform k1 segment processing, else if table id is 'x4' then initialize k1 comments and perform x4 segment processing, else if table id is 'n7' then perform n7 segment processing, else if table id is 'se' then set trailer found and end found flags and perform rest of message processing.
Given
Message has been validated and type determined
When
Each message line is processed
Then
If table ID is 'ST' then set header found and first X4 flags, else if table ID is 'M10' then perform M10 segment processing, else if table ID is 'P4' then perform P4 segment processing, else if table ID is 'V9' then perform V9 segment processing, else if table ID is 'VID' then continue, else if table ID is 'K1' then perform K1 segment processing, else if table ID is 'X4' then initialize K1 comments and perform X4 segment processing, else if table ID is 'N7' then perform N7 segment processing, else if table ID is 'SE' then set trailer found and end found flags and perform rest of message processing
R-GCX126-cbl-00006 5:Process M10 Notice Segment
Process Rules
Business View: Assuming message line contains m10 segment identifier during the '5:Process M10 Notice Segment' routine, when m10 segment is processed, the system executes logic to ensure that set m10 segment found flag to true, initialize m10 segment structure, and move table entry to m10 segment structure.
Given
Message line contains M10 segment identifier
When
M10 segment is processed
Then
Set M10 segment found flag to true, initialize M10 segment structure, and move table entry to M10 segment structure
R-GCX126-cbl-00007 6:Process P4 Port Segment
Process Rules
Business View: Assuming message line contains p4 segment identifier during the '6:Process P4 Port Segment' routine, when p4 segment is processed, the system executes logic to ensure that set p4 segment found flag to true, initialize p4 segment structure, and move table entry to p4 segment structure.
Given
Message line contains P4 segment identifier
When
P4 segment is processed
Then
Set P4 segment found flag to true, initialize P4 segment structure, and move table entry to P4 segment structure
R-GCX126-cbl-00008 7:Process V9 Notice Reason Segment
Process Rules
Business View: Assuming message line contains v9 segment identifier during the '7:Process V9 Notice Reason Segment' routine, when v9 segment is processed, the system executes logic to ensure that set v9 segment found flag to true, initialize v9 segment structure, and move table entry to v9 segment structure.
Given
Message line contains V9 segment identifier
When
V9 segment is processed
Then
Set V9 segment found flag to true, initialize V9 segment structure, and move table entry to V9 segment structure
R-GCX126-cbl-00009 8:Process K1 Remarks Segment
Process Rules
Business View: Assuming message line contains k1 segment identifier during the '8:Process K1 Remarks Segment' routine, when k1 segment is processed, the system executes logic to ensure that set k1 segment found flag to true, initialize k1 segment structure, move table entry to k1 segment structure, add 1 to k1 remark index, if k1 remark index exceeds maximum (50) then set index to maximum value, else move k1 segment to k1 remark array at current index position.
Given
Message line contains K1 segment identifier
When
K1 segment is processed
Then
Set K1 segment found flag to true, initialize K1 segment structure, move table entry to K1 segment structure, add 1 to K1 remark index, if K1 remark index exceeds maximum (50) then set index to maximum value, else move K1 segment to K1 remark array at current index position
R-GCX126-cbl-00010 9:Process N7 Equipment Segment
Process Rules
Business View: Assuming message line contains n7 segment identifier during the '9:Process N7 Equipment Segment' routine, when n7 segment is processed, the system executes logic to ensure that set n7 segment found flag to true, initialize n7 segment structure, move table entry to n7 segment structure, if n7 equipment number is not spaces then move equipment number to log data at current log index with type 'edi 350 eqp#:' and add 1 to log index.
Given
Message line contains N7 segment identifier
When
N7 segment is processed
Then
Set N7 segment found flag to true, initialize N7 segment structure, move table entry to N7 segment structure, if N7 equipment number is not spaces then move equipment number to log data at current log index with type 'EDI 350 EQP#:' and add 1 to log index
R-GCX126-cbl-00011 10:Process Conveyance 350 Train Arrival and Train Found?
Decision Rules
Business View: Assuming x4 segment is being processed and entry type code is '992' and conveyance 350 flag is true during the '10:Process Conveyance 350 Train Arrival and Train Found?' routine, when x4 segment processing is performed, the system executes logic to ensure that if x4 release document id positions 1 through 25 equal previous crn then continue, else move x4 release document id positions 1 through 25 to b4 key value and previous crn, perform train lookup by crn, if train not found (status code not spaces) then prepare unknown train error message with crn, set line count to 4, set message type to unknown, and perform email send preparation, else if train found then move log information, format date and time from machine values, set action code to 'zzz', move crn to train or us ccn field, set cargo type to ca train, set message to '350 ack - arrival ack at border', and spawn log entry.
Given
X4 segment is being processed and entry type code is '992' and conveyance 350 flag is true
When
X4 segment processing is performed
Then
If X4 release document ID positions 1 through 25 equal previous CRN then continue, else move X4 release document ID positions 1 through 25 to B4 key value and previous CRN, perform train lookup by CRN, if train not found (status code not spaces) then prepare unknown train error message with CRN, set line count to 4, set message type to unknown, and perform email send preparation, else if train found then move log information, format date and time from machine values, set action code to 'ZZZ', move CRN to train or US CCN field, set cargo type to CA train, set message to '350 ACK - ARRIVAL ACK AT BORDER', and spawn log entry
R-GCX126-cbl-00012 11:Update Cargo Border Arrival Status
Process Rules
Business View: Assuming train has been validated and x4 cbsa release reference id positions 1 through 25 are moved to cargo key value during the '11:Update Cargo Border Arrival Status' routine, when cargo border update is performed, the system executes logic to ensure that perform cargo lookup by ccn, if cargo is found then set message to '350 ack - arrival ack at border', move cargo ccn key to current ccn key, perform log cargo info message, set cargo border arrival acknowledgment flag to true, clear status code, set accept status to spaces, and replace cargo record.
Given
Train has been validated and X4 CBSA release reference ID positions 1 through 25 are moved to cargo key value
When
Cargo border update is performed
Then
Perform cargo lookup by CCN, if cargo is found then set message to '350 ACK - ARRIVAL ACK AT BORDER', move cargo CCN key to current CCN key, perform log cargo info message, set cargo border arrival acknowledgment flag to true, clear status code, set accept status to spaces, and replace cargo record
R-GCX126-cbl-00013 12:Process Master Manifest Border Arrival
Process Rules
Business View: Assuming cargo has been updated with border arrival and cargo is master manifest type during the '12:Process Master Manifest Border Arrival' routine, when master manifest processing is performed, the system executes logic to ensure that move cargo ccn key to b0 ccn key, clear follower manifest array, set follower not end of database flag, set index to 1, perform until follower end of database or index exceeds 100: set accept status to 'gegb', call database with get next function for cargo using b0 qualifier, if status code is spaces and master manifest ccn equals x4 cbsa release reference id positions 1 through 25 then if cargo is follower manifest then move cargo ccn key to follower manifest array at index position and add 1 to index, else set follower end of database flag, subtract 1 from index, if index is less than or equal to zero then exit, else perform varying index from 1 by 1 until follower manifest at index is spaces or low values or index exceeds limit: move follower manifest ccn to cargo key value, perform cargo lookup, if cargo found then perform cargo border update.
Given
Cargo has been updated with border arrival and cargo is master manifest type
When
Master manifest processing is performed
Then
Move cargo CCN key to B0 CCN key, clear follower manifest array, set follower not end of database flag, set index to 1, perform until follower end of database or index exceeds 100: set accept status to 'GEGB', call database with get next function for cargo using B0 qualifier, if status code is spaces and master manifest CCN equals X4 CBSA release reference ID positions 1 through 25 then if cargo is follower manifest then move cargo CCN key to follower manifest array at index position and add 1 to index, else set follower end of database flag, subtract 1 from index, if index is less than or equal to zero then exit, else perform varying index from 1 by 1 until follower manifest at index is spaces or low values or index exceeds limit: move follower manifest CCN to cargo key value, perform cargo lookup, if cargo found then perform cargo border update
R-GCX126-cbl-00014 13:Send Train Not Found Error
Action Rules
Business View: <EXCLUSION CRITERIA> If train lookup by crn has failed (status code is not spaces), and error notification is prepared occurs during the '13:Send Train Not Found Error' routine, then the system must guarantee that clear detail line 1, concatenate 'unknown train entry in edi 350 ' with x4 release document id positions 1 through 25 into detail line 1, move 'this crn was not found.' to detail line 3, set line count to 4, set message type to unknown, and perform email send preparation.
EXCLUDING
Train lookup by CRN has failed (status code is not spaces)
When
Error notification is prepared
Then
Clear detail line 1, concatenate 'UNKNOWN TRAIN ENTRY IN EDI 350 ' with X4 release document ID positions 1 through 25 into detail line 1, move 'THIS CRN WAS NOT FOUND.' to detail line 3, set line count to 4, set message type to unknown, and perform email send preparation
R-GCX126-cbl-00015 14:Log K1 Remarks
Process Rules
Business View: Assuming se trailer segment has been processed and k1 segment found flag is true during the '14:Log K1 Remarks' routine, when rest of message processing is performed, the system executes logic to ensure that perform varying index from 1 by 1 until index exceeds k1 remark index: if k1 remark for x4 at index is not spaces then initialize k1 segment, move k1 remark for x4 at index to k1 segment, clear info message, concatenate 'edi 350 k1: ' with k1 free form message 1 into info message, perform log cargo info message, if k1 free form message 2 is not spaces then clear info message, concatenate 'edi 350 k1: ' with k1 free form message 2 into info message, and perform log cargo info message.
Given
SE trailer segment has been processed and K1 segment found flag is true
When
Rest of message processing is performed
Then
Perform varying index from 1 by 1 until index exceeds K1 remark index: if K1 remark for X4 at index is not spaces then initialize K1 segment, move K1 remark for X4 at index to K1 segment, clear info message, concatenate 'EDI 350 K1: ' with K1 free form message 1 into info message, perform log cargo info message, if K1 free form message 2 is not spaces then clear info message, concatenate 'EDI 350 K1: ' with K1 free form message 2 into info message, and perform log cargo info message
R-GCX126-cbl-00016 15:Log N7 Equipment Information
Process Rules
Business View: Assuming se trailer segment has been processed and n7 segment found flag is true during the '15:Log N7 Equipment Information' routine, when rest of message processing is performed, the system executes logic to ensure that perform varying log index from 1 by 1 until log line at index is spaces or log index exceeds 50: clear info message, move log line at index to info message, and perform log cargo info message.
Given
SE trailer segment has been processed and N7 segment found flag is true
When
Rest of message processing is performed
Then
Perform varying log index from 1 by 1 until log line at index is spaces or log index exceeds 50: clear info message, move log line at index to info message, and perform log cargo info message
R-GCX126-cbl-00017 16:Lookup Cargo by CCN
Process Rules
Business View: Assuming m10 segment has been processed and contains ccn in positions 1 through 25 during the '16:Lookup Cargo by CCN' routine, when cargo lookup is performed, the system executes logic to ensure that move m10 ccn positions 1 through 25 to cargo key value, set accept status to 'ge', call database with get hold unique function for cargo using cargo qualifier, perform cargo switch setting, if cargo found then set accept status to 'ge' and call database with get hold unique function for cargo secondary using a2 qualifier, if status code is 'ge' then clear cargo secondary segment.
Given
M10 segment has been processed and contains CCN in positions 1 through 25
When
Cargo lookup is performed
Then
Move M10 CCN positions 1 through 25 to cargo key value, set accept status to 'GE', call database with get hold unique function for cargo using cargo qualifier, perform cargo switch setting, if cargo found then set accept status to 'GE' and call database with get hold unique function for cargo secondary using A2 qualifier, if status code is 'GE' then clear cargo secondary segment
R-GCX126-cbl-00018 17:Handle Unknown Cargo Release
Action Rules
Business View: <EXCLUSION CRITERIA> If cargo lookup has failed (cargo not found) and v9 notice reason indicates released, and unknown cargo processing is performed occurs during the '17:Handle Unknown Cargo Release' routine, then the system must guarantee that clear detail line 1, concatenate 'unknown edi 350 release from cbsa ' with m10 ccn positions 1 through 25 into detail line 1, move 'this ccn was not found.' to detail line 3, concatenate 'release number: ' with x4 cbsa release reference id positions 1 through 15, ' done by port ' with p4 port code positions 1 through 4 into detail line 4, set line count to 5, set message type to unknown, and perform email send preparation.
EXCLUDING
Cargo lookup has failed (cargo not found) and V9 notice reason indicates released
When
Unknown cargo processing is performed
Then
Clear detail line 1, concatenate 'UNKNOWN EDI 350 RELEASE FROM CBSA ' with M10 CCN positions 1 through 25 into detail line 1, move 'THIS CCN WAS NOT FOUND.' to detail line 3, concatenate 'RELEASE NUMBER: ' with X4 CBSA release reference ID positions 1 through 15, ' DONE BY PORT ' with P4 port code positions 1 through 4 into detail line 4, set line count to 5, set message type to unknown, and perform email send preparation
R-GCX126-cbl-00019 18:Handle Unknown Cargo Deconsolidation
Action Rules
Business View: <EXCLUSION CRITERIA> If cargo lookup has failed (cargo not found) and v9 notice reason indicates deconsolidation, and unknown cargo processing is performed occurs during the '18:Handle Unknown Cargo Deconsolidation' routine, then the system must guarantee that clear detail line 1, concatenate 'unknown edi 350 dcon notice ' with m10 ccn positions 1 through 25 into detail line 1, move 'this ccn was not found.' to detail line 3, concatenate 'house bill close number' with x4 cbsa release reference id positions 1 through 25, ' done by port ' with p4 port code positions 1 through 4 into detail line 4, set line count to 5, set message type to unknown, and perform email send preparation.
EXCLUDING
Cargo lookup has failed (cargo not found) and V9 notice reason indicates deconsolidation
When
Unknown cargo processing is performed
Then
Clear detail line 1, concatenate 'UNKNOWN EDI 350 DCON NOTICE ' with M10 CCN positions 1 through 25 into detail line 1, move 'THIS CCN WAS NOT FOUND.' to detail line 3, concatenate 'HOUSE BILL CLOSE NUMBER' with X4 CBSA release reference ID positions 1 through 25, ' DONE BY PORT ' with P4 port code positions 1 through 4 into detail line 4, set line count to 5, set message type to unknown, and perform email send preparation
R-GCX126-cbl-00020 19:Handle Unknown Cargo Entry
Action Rules
Business View: <EXCLUSION CRITERIA> If cargo lookup has failed (cargo not found) and v9 notice reason is not released or deconsolidation, and unknown cargo processing is performed occurs during the '19:Handle Unknown Cargo Entry' routine, then the system must guarantee that clear detail line 1, concatenate 'unknown edi 350 entry from cbsa ' with m10 ccn positions 1 through 25 into detail line 1, move 'this ccn was not found.' to detail line 3, concatenate 'notice doc type: ' with m10 notice document type code, ' with reason code ' with v9 notice reason code positions 1 through 4 into detail line 4, set line count to 5, set message type to unknown, and perform email send preparation.
EXCLUDING
Cargo lookup has failed (cargo not found) and V9 notice reason is not released or deconsolidation
When
Unknown cargo processing is performed
Then
Clear detail line 1, concatenate 'UNKNOWN EDI 350 ENTRY FROM CBSA ' with M10 CCN positions 1 through 25 into detail line 1, move 'THIS CCN WAS NOT FOUND.' to detail line 3, concatenate 'NOTICE DOC TYPE: ' with M10 notice document type code, ' WITH REASON CODE ' with V9 notice reason code positions 1 through 4 into detail line 4, set line count to 5, set message type to unknown, and perform email send preparation
R-GCX126-cbl-00021 20:Process Document Not Matched
Process Rules
Business View: <EXCLUSION CRITERIA> If cargo has been found and v9 notice reason indicates not matched, and cargo processing is performed occurs during the '20:Process Document Not Matched' routine, then the system must guarantee that clear info message, move 'edi 350: doc not matched ' to info message, and perform log cargo info message.
EXCLUDING
Cargo has been found and V9 notice reason indicates not matched
When
Cargo processing is performed
Then
Clear info message, move 'EDI 350: DOC NOT MATCHED ' to info message, and perform log cargo info message
R-GCX126-cbl-00022 21:Process Cargo Complete
Process Rules
Business View: Assuming cargo has been found and v9 notice reason indicates cargo complete during the '21:Process Cargo Complete' routine, when cargo processing is performed, the system executes logic to ensure that clear info message, move 'edi 350: cargo complete message ' to info message, and perform log cargo info message.
Given
Cargo has been found and V9 notice reason indicates cargo complete
When
Cargo processing is performed
Then
Clear info message, move 'EDI 350: CARGO COMPLETE MESSAGE ' to info message, and perform log cargo info message
R-GCX126-cbl-00023 22:Process Document Package Complete
Process Rules
Business View: Assuming cargo has been found and v9 notice reason indicates document package complete during the '22:Process Document Package Complete' routine, when cargo processing is performed, the system executes logic to ensure that if x4 cbsa release reference id positions 1 through 15 not equal cargo broker entry positions 1 through 15 or x4 cbsa release reference id positions 1 through 14 not equal cargo customs transaction number positions 1 through 14, and x4 cbsa release reference id is not spaces, then move x4 cbsa release reference id positions 1 through 15 to cargo broker entry, move x4 cbsa release reference id positions 1 through 14 to cargo customs transaction number, move machine date to cargo broker date, move machine time positions 1 through 4 to cargo broker time, clear info message, concatenate 'edi 350: doc pkg complete : ' with x4 cbsa release reference id positions 1 through 15 into info message, perform log cargo info message, and perform cargo replace.
Given
Cargo has been found and V9 notice reason indicates document package complete
When
Cargo processing is performed
Then
If X4 CBSA release reference ID positions 1 through 15 not equal cargo broker entry positions 1 through 15 or X4 CBSA release reference ID positions 1 through 14 not equal cargo customs transaction number positions 1 through 14, and X4 CBSA release reference ID is not spaces, then move X4 CBSA release reference ID positions 1 through 15 to cargo broker entry, move X4 CBSA release reference ID positions 1 through 14 to cargo customs transaction number, move machine date to cargo broker date, move machine time positions 1 through 4 to cargo broker time, clear info message, concatenate 'EDI 350: DOC PKG COMPLETE : ' with X4 CBSA release reference ID positions 1 through 15 into info message, perform log cargo info message, and perform cargo replace
R-GCX126-cbl-00024 23:Process Document Not On File
Process Rules
Business View: <EXCLUSION CRITERIA> If cargo has been found and v9 notice reason indicates document not on file, and cargo processing is performed occurs during the '23:Process Document Not On File' routine, then the system must guarantee that clear info message, if x4 release document type code position 1 equals 'r' then concatenate 'edi 350: doc not on file for release ' with x4 cbsa release reference id positions 1 through 15 into info message and perform log cargo info message, else concatenate 'edi 350:doc not on file h-bill close ' with x4 cbsa release reference id positions 1 through 25 into info message and perform log cargo info message.
EXCLUDING
Cargo has been found and V9 notice reason indicates document not on file
When
Cargo processing is performed
Then
Clear info message, if X4 release document type code position 1 equals 'R' then concatenate 'EDI 350: DOC NOT ON FILE FOR RELEASE ' with X4 CBSA release reference ID positions 1 through 15 into info message and perform log cargo info message, else concatenate 'EDI 350:DOC NOT ON FILE H-BILL CLOSE ' with X4 CBSA release reference ID positions 1 through 25 into info message and perform log cargo info message
R-GCX126-cbl-00025 24:Process Cargo Reported
Process Rules
Business View: Assuming cargo has been found and v9 notice reason indicates reported during the '24:Process Cargo Reported' routine, when cargo processing is performed, the system executes logic to ensure that clear info message, concatenate 'edi 350: cargo reported ' into info message, and perform log cargo info message.
Given
Cargo has been found and V9 notice reason indicates reported
When
Cargo processing is performed
Then
Clear info message, concatenate 'EDI 350: CARGO REPORTED ' into info message, and perform log cargo info message
R-GCX126-cbl-00026 25:Process Cargo Arrived
Process Rules
Business View: Assuming cargo has been found and v9 notice reason indicates arrived during the '25:Process Cargo Arrived' routine, when cargo processing is performed, the system executes logic to ensure that clear info message, concatenate 'edi 350: cargo arrived at port ' with p4 port code positions 1 through 4 into info message, and perform log cargo info message.
Given
Cargo has been found and V9 notice reason indicates arrived
When
Cargo processing is performed
Then
Clear info message, concatenate 'EDI 350: CARGO ARRIVED AT PORT ' with P4 port code positions 1 through 4 into info message, and perform log cargo info message
R-GCX126-cbl-00027 26:Process Cargo Release
Process Rules
Business View: Assuming cargo has been found and v9 notice reason indicates released during the '26:Process Cargo Release' routine, when cargo processing is performed, the system executes logic to ensure that perform set release information, clear info message, concatenate 'edi 350: release : ' with x4 cbsa release reference id positions 1 through 15, ' at port ' with p4 port code positions 1 through 4 into info message, concatenate x4 cbsa release reference id positions 1 through 15, '/' with p4 port code positions 1 through 4 into cargo release reason, perform log cargo info message, perform process us manifest, move cargo release date to hold date, move cargo release time to hold time, perform cargo replace, if cargo is master manifest then save cargo segment, move cargo ccn key to b0 ccn key, set follower not end of database flag, perform process multi follower manifests, restore cargo segment, move cargo waybill key to save waybill index, and move cargo equipment car to current car id key.
Given
Cargo has been found and V9 notice reason indicates released
When
Cargo processing is performed
Then
Perform set release information, clear info message, concatenate 'EDI 350: RELEASE : ' with X4 CBSA release reference ID positions 1 through 15, ' AT PORT ' with P4 port code positions 1 through 4 into info message, concatenate X4 CBSA release reference ID positions 1 through 15, '/' with P4 port code positions 1 through 4 into cargo release reason, perform log cargo info message, perform process US manifest, move cargo release date to hold date, move cargo release time to hold time, perform cargo replace, if cargo is master manifest then save cargo segment, move cargo CCN key to B0 CCN key, set follower not end of database flag, perform process multi follower manifests, restore cargo segment, move cargo waybill key to save waybill index, and move cargo equipment car to current car ID key
R-GCX126-cbl-00028 27:Process Authorized to Deliver
Decision Rules
Business View: Assuming cargo has been found and v9 notice reason indicates authorized to deliver during the '27:Process Authorized to Deliver' routine, when cargo processing is performed, the system executes logic to ensure that if cargo csa indicator is on then move 'edi 350: accepted - csa' to info message, perform log cargo info message, set cargo status to csa delivery, set cargo csa authorization to deliver received flag to true, and perform cargo replace, else move 'edi 350: not accepted - non-csa' to info message and perform log cargo info message, then perform process us manifest.
Given
Cargo has been found and V9 notice reason indicates authorized to deliver
When
Cargo processing is performed
Then
If cargo CSA indicator is on then move 'EDI 350: ACCEPTED - CSA' to info message, perform log cargo info message, set cargo status to CSA delivery, set cargo CSA authorization to deliver received flag to true, and perform cargo replace, else move 'EDI 350: NOT ACCEPTED - NON-CSA' to info message and perform log cargo info message, then perform process US manifest
R-GCX126-cbl-00029 28:Process Cargo Hold
Process Rules
Business View: Assuming cargo has been found and v9 notice reason indicates held during the '28:Process Cargo Hold' routine, when cargo processing is performed, the system executes logic to ensure that clear info message, move 'edi 350: goods held for examination' to info message, perform log cargo info message, set cargo status to hold, perform cargo replace, if cargo ccn key positions 1 through 4 equal '6105' then perform merlin prepare hold notification.
Given
Cargo has been found and V9 notice reason indicates held
When
Cargo processing is performed
Then
Clear info message, move 'EDI 350: GOODS HELD FOR EXAMINATION' to info message, perform log cargo info message, set cargo status to hold, perform cargo replace, if cargo CCN key positions 1 through 4 equal '6105' then perform Merlin prepare hold notification
R-GCX126-cbl-00030 29:Process Deconsolidation Release
Process Rules
Business View: Assuming cargo has been found and v9 notice reason indicates deconsolidation during the '29:Process Deconsolidation Release' routine, when cargo processing is performed, the system executes logic to ensure that perform set release information, clear info message, concatenate 'edi 350: release via decon at port ' with p4 port code positions 1 through 4 into info message, concatenate 'deconsolidation at ' with p4 port code positions 1 through 4 into cargo release reason, perform log cargo info message, perform process us manifest, move cargo release date to hold date, move cargo release time to hold time, perform cargo replace, if cargo is master manifest then save cargo segment, move cargo ccn key to b0 ccn key, set follower not end of database flag, perform process multi follower manifests, restore cargo segment, move cargo waybill key to save waybill index, and move cargo equipment car to current car id key.
Given
Cargo has been found and V9 notice reason indicates deconsolidation
When
Cargo processing is performed
Then
Perform set release information, clear info message, concatenate 'EDI 350: RELEASE VIA DECON AT PORT ' with P4 port code positions 1 through 4 into info message, concatenate 'DECONSOLIDATION AT ' with P4 port code positions 1 through 4 into cargo release reason, perform log cargo info message, perform process US manifest, move cargo release date to hold date, move cargo release time to hold time, perform cargo replace, if cargo is master manifest then save cargo segment, move cargo CCN key to B0 CCN key, set follower not end of database flag, perform process multi follower manifests, restore cargo segment, move cargo waybill key to save waybill index, and move cargo equipment car to current car ID key
R-GCX126-cbl-00032 31:Process Associated US Manifest
Process Rules
Business View: Assuming canadian cargo has been released or authorized to deliver during the '31:Process Associated US Manifest' routine, when us manifest processing is performed, the system executes logic to ensure that set us manifest not found flag, set not end of file flag, perform get unique us cargo by car and waybill, perform get next us cargo by car and waybill until us manifest found or end of file, if end of file then exit, else move log information, concatenate machine century with machine date into log date, move machine time to log time, move log use input message to action code, move us cargo ccn key to train or us ccn field, set cargo type to us cargo, concatenate 'cdn ccn rlsed by edi 350: ' with cargo ccn key into message, and perform spawn log entry.
Given
Canadian cargo has been released or authorized to deliver
When
US manifest processing is performed
Then
Set US manifest not found flag, set not end of file flag, perform get unique US cargo by car and waybill, perform get next US cargo by car and waybill until US manifest found or end of file, if end of file then exit, else move log information, concatenate machine century with machine date into log date, move machine time to log time, move log use input message to action code, move US cargo CCN key to train or US CCN field, set cargo type to US cargo, concatenate 'CDN CCN RLSED BY EDI 350: ' with cargo CCN key into message, and perform spawn log entry
R-GCX126-cbl-00033 32:Process CSA Authorization
Decision Rules
Business View: Assuming v9 notice reason indicates authorized to deliver during the '32:Process CSA Authorization' routine, when csa authorization processing is performed, the system executes logic to ensure that if cargo csa indicator is on then move 'edi 350: accepted - csa' to info message, perform log cargo info message, set cargo status to csa delivery, set cargo csa authorization to deliver received flag to true, and perform cargo replace, else move 'edi 350: not accepted - non-csa' to info message and perform log cargo info message.
Given
V9 notice reason indicates authorized to deliver
When
CSA authorization processing is performed
Then
If cargo CSA indicator is on then move 'EDI 350: ACCEPTED - CSA' to info message, perform log cargo info message, set cargo status to CSA delivery, set cargo CSA authorization to deliver received flag to true, and perform cargo replace, else move 'EDI 350: NOT ACCEPTED - NON-CSA' to info message and perform log cargo info message
R-GCX126-cbl-00034 33:Process Follower Manifests
Process Rules
Business View: Assuming master manifest has been released or deconsolidated during the '33:Process Follower Manifests' routine, when multi follower processing is performed, the system executes logic to ensure that set accept status to 'gegb', clear follower manifest array, set index to 1, perform until follower end of database or index exceeds 100: call database with get next function for cargo using b0 qualifier, if status code is spaces and saved ccn equals master manifest ccn then if cargo is master manifest then continue else move cargo ccn key to follower manifest array at index and add 1 to index, else set follower end of database flag, subtract 1 from index, if index is less than or equal to zero then exit, else perform varying index from 1 by 1 until follower manifest at index is spaces or low values or index exceeds limit: move follower manifest ccn to cargo key value, perform cargo lookup, if cargo found then perform set release information, clear info message, if v9 released then concatenate 'edi 350: release : ' with x4 cbsa release reference id positions 1 through 15, ' at port ' with p4 port code positions 1 through 4 into info message and concatenate x4 cbsa release reference id positions 1 through 15, '/' with p4 port code positions 1 through 4 into cargo release reason, else concatenate 'edi 350: release via decon at port ' with p4 port code positions 1 through 4 into info message and concatenate 'deconsolidation at ' with p4 port code positions 1 through 4 into cargo release reason, move cargo ccn key to current ccn key, perform log cargo info message, move cargo waybill key to save waybill index, move cargo equipment car to current car id key, perform process us manifest, clear status code, set accept status to spaces, and call database with replace function for cargo.
Given
Master manifest has been released or deconsolidated
When
Multi follower processing is performed
Then
Set accept status to 'GEGB', clear follower manifest array, set index to 1, perform until follower end of database or index exceeds 100: call database with get next function for cargo using B0 qualifier, if status code is spaces and saved CCN equals master manifest CCN then if cargo is master manifest then continue else move cargo CCN key to follower manifest array at index and add 1 to index, else set follower end of database flag, subtract 1 from index, if index is less than or equal to zero then exit, else perform varying index from 1 by 1 until follower manifest at index is spaces or low values or index exceeds limit: move follower manifest CCN to cargo key value, perform cargo lookup, if cargo found then perform set release information, clear info message, if V9 released then concatenate 'EDI 350: RELEASE : ' with X4 CBSA release reference ID positions 1 through 15, ' AT PORT ' with P4 port code positions 1 through 4 into info message and concatenate X4 CBSA release reference ID positions 1 through 15, '/' with P4 port code positions 1 through 4 into cargo release reason, else concatenate 'EDI 350: RELEASE VIA DECON AT PORT ' with P4 port code positions 1 through 4 into info message and concatenate 'DECONSOLIDATION AT ' with P4 port code positions 1 through 4 into cargo release reason, move cargo CCN key to current CCN key, perform log cargo info message, move cargo waybill key to save waybill index, move cargo equipment car to current car ID key, perform process US manifest, clear status code, set accept status to spaces, and call database with replace function for cargo
R-GCX126-cbl-00035 34:Prepare Cargo Hold Email
Action Rules
Business View: Assuming cargo has been placed on hold and ccn starts with 6105 during the '34:Prepare Cargo Hold Email' routine, when merlin hold preparation is performed, the system executes logic to ensure that clear detail line 1, concatenate 'cargo on hold for inspection by cbsa - edi350' into detail line 1, clear detail line 2, concatenate 'equipment : ' with cargo equipment id for index into detail line 3, concatenate 'waybill : ' with cargo ccn carrier index, cargo origin station number index, cargo waybill number index into detail line 4, concatenate 'ccn : ' with cargo ccn key into detail line 5, concatenate 'destination : ' with cargo destination station name, ', ' with cargo destination station state code into detail line 6, concatenate 'manifest upon : ' with cargo manifest to station name into detail line 7, set line count to 7, set message type to hold, and perform email send preparation.
Given
Cargo has been placed on hold and CCN starts with 6105
When
Merlin hold preparation is performed
Then
Clear detail line 1, concatenate 'Cargo on HOLD for inspection by CBSA - EDI350' into detail line 1, clear detail line 2, concatenate 'Equipment : ' with cargo equipment ID for index into detail line 3, concatenate 'Waybill : ' with cargo CCN carrier index, cargo origin station number index, cargo waybill number index into detail line 4, concatenate 'CCN : ' with cargo CCN key into detail line 5, concatenate 'DESTINATION : ' with cargo destination station name, ', ' with cargo destination station state code into detail line 6, concatenate 'MANIFEST UPON : ' with cargo manifest to station name into detail line 7, set line count to 7, set message type to hold, and perform email send preparation
R-GCX126-cbl-00036 39:Send Email Notification
Action Rules
Business View: Assuming email notification has been prepared with message type and content during the '39:Send Email Notification' routine, when email send preparation is performed, the system executes logic to ensure that if message type is error then concatenate 'customs received err msg ' with cargo ccn key into subject, else if message type is info then concatenate 'broker/manifest mismatch ' with cargo ccn key into subject, else if message type is hold then concatenate 'cbsa cargo hold - ' with cargo ccn key into subject, else move detail line 1 to subject, save current recipient and filename, clear recipient, if admin segment found then move admin dc merlin 1 to recipient 1 and admin dc merlin 5 to recipient 2, else move 'om01247' to recipient 1 and clear recipient 2, if keywords are spaces or low values then if cargo found and cargo ccn key not spaces then move cargo ccn key to keywords, else move current ccn key to keywords, if message type is unknown then move 'unknown' to filename, clear recipient, move 'om01247' to recipient 1, and perform call email send, else if message type is error then move 'caerror' to filename, perform call email send, move 'in' to filename, clear recipient, move 'om01247' to recipient 1, and perform call email send, else if message type is info then move 'in' to filename, clear recipient, move 'om01247' to recipient 1, and perform call email send, else if message type is unrelease then move 'in' to filename, perform call email send, clear recipient, perform fetch manifest station segment, if manifest station merlin id not spaces then move 'in' to filename, move manifest station merlin id to recipient 1, and perform call email send, else if message type is release then clear recipient, perform fetch manifest station segment, if manifest station merlin id not spaces then move 'in' to filename, move manifest station merlin id to recipient 1, and perform call email send, else if message type is hold then move 'cahold' to filename, clear recipient, move 'om01247' to recipient 1, and perform call email send, then perform reset report fields.
Given
Email notification has been prepared with message type and content
When
Email send preparation is performed
Then
If message type is error then concatenate 'CUSTOMS RECEIVED ERR MSG ' with cargo CCN key into subject, else if message type is info then concatenate 'BROKER/MANIFEST MISMATCH ' with cargo CCN key into subject, else if message type is hold then concatenate 'CBSA CARGO HOLD - ' with cargo CCN key into subject, else move detail line 1 to subject, save current recipient and filename, clear recipient, if admin segment found then move admin DC Merlin 1 to recipient 1 and admin DC Merlin 5 to recipient 2, else move 'OM01247' to recipient 1 and clear recipient 2, if keywords are spaces or low values then if cargo found and cargo CCN key not spaces then move cargo CCN key to keywords, else move current CCN key to keywords, if message type is unknown then move 'UNKNOWN' to filename, clear recipient, move 'OM01247' to recipient 1, and perform call email send, else if message type is error then move 'CAERROR' to filename, perform call email send, move 'IN' to filename, clear recipient, move 'OM01247' to recipient 1, and perform call email send, else if message type is info then move 'IN' to filename, clear recipient, move 'OM01247' to recipient 1, and perform call email send, else if message type is unrelease then move 'IN' to filename, perform call email send, clear recipient, perform fetch manifest station segment, if manifest station Merlin ID not spaces then move 'IN' to filename, move manifest station Merlin ID to recipient 1, and perform call email send, else if message type is release then clear recipient, perform fetch manifest station segment, if manifest station Merlin ID not spaces then move 'IN' to filename, move manifest station Merlin ID to recipient 1, and perform call email send, else if message type is hold then move 'CAHOLD' to filename, clear recipient, move 'OM01247' to recipient 1, and perform call email send, then perform reset report fields
R-GCX126-cbl-00037 Set Program Name and Module Name
Process Rules
Business View: Assuming the program gcx126 is starting execution during the 'Set Program Name and Module Name' routine, when the program initialization begins, the system executes logic to ensure that the current program name from cccom is saved to prog-name-saved and module-name is moved to cc-prog in cccom.
Given
The program GCX126 is starting execution
When
The program initialization begins
Then
The current program name from CCCOM is saved to PROG-NAME-SAVED and MODULE-NAME is moved to CC-PROG in CCCOM
R-GCX126-cbl-00038 Initialize Working Storage Fields
Process Rules
Business View: Assuming the program is starting initialization during the 'Initialize Working Storage Fields' routine, when working storage initialization is performed, the system executes logic to ensure that log-indx is set to 1, ws-k1-remark-ndx is set to zeroes, log-array is set to spaces, ws-prev-crn is set to spaces, ws-mqs-len-header is set to length of mqs-message-header, ws-mqs-len-of-1-entry is set to length of mqs-table-entry(1), mrln-line is set to 1, ws-ctr-new is set to 1, and mrln-350-report is set to spaces.
Given
The program is starting initialization
When
Working storage initialization is performed
Then
LOG-INDX is set to 1, WS-K1-REMARK-NDX is set to ZEROES, LOG-ARRAY is set to SPACES, WS-PREV-CRN is set to SPACES, WS-MQS-LEN-HEADER is set to LENGTH OF MQS-MESSAGE-HEADER, WS-MQS-LEN-OF-1-ENTRY is set to LENGTH OF MQS-TABLE-ENTRY(1), MRLN-LINE is set to 1, WS-CTR-NEW is set to 1, and MRLN-350-REPORT is set to SPACES
R-GCX126-cbl-00039 Initialize Segment Flags
Process Rules
Business View: Assuming the program is initializing for message processing during the 'Initialize Segment Flags' routine, when segment flags are being initialized, the system executes logic to ensure that ws-no-header-found, ws-no-trailer-found, ws-no-m10-seg-found, ws-no-p4-seg-found, ws-no-n7-seg-found, ws-no-x4-seg-found, ws-no-k1-seg-found, ws-no-v9-seg-found, ws-no-end-found, and ws-cargo-not-found are all set to true.
Given
The program is initializing for message processing
When
Segment flags are being initialized
Then
WS-NO-HEADER-FOUND, WS-NO-TRAILER-FOUND, WS-NO-M10-SEG-FOUND, WS-NO-P4-SEG-FOUND, WS-NO-N7-SEG-FOUND, WS-NO-X4-SEG-FOUND, WS-NO-K1-SEG-FOUND, WS-NO-V9-SEG-FOUND, WS-NO-END-FOUND, and WS-CARGO-NOT-FOUND are all set to TRUE
R-GCX126-cbl-00041 Initialize Working Storage Fields
Process Rules
Business View: Assuming the program needs to access database tables during the 'Initialize Working Storage Fields' routine, when database access parameters are initialized, the system executes logic to ensure that cc-accept-status in cccom is set to 'ge', gcctbio-func-code is set to gu, gcstbrt-key-value is set to spaces, gcstbdp-key-value is set to spaces, gcctbio-return-flag is set to spaces, gcstbrt-ad-segment is set to spaces, second-pcb-flag is set to spaces, and unqual-ssa-flag is set to spaces.
Given
The program needs to access database tables
When
Database access parameters are initialized
Then
CC-ACCEPT-STATUS in CCCOM is set to 'GE', GCCTBIO-FUNC-CODE is set to GU, GCSTBRT-KEY-VALUE is set to SPACES, GCSTBDP-KEY-VALUE is set to SPACES, GCCTBIO-RETURN-FLAG is set to SPACES, GCSTBRT-AD-SEGMENT is set to SPACES, SECOND-PCB-FLAG is set to SPACES, and UNQUAL-SSA-FLAG is set to SPACES
R-GCX126-cbl-00042 Initialize Working Storage Fields
Process Rules
Business View: Assuming the program is preparing to process a new edi 350 message during the 'Initialize Working Storage Fields' routine, when message segment structures are initialized, the system executes logic to ensure that m10-segment, p4-segment, v9-segment, k1-segment, x4-segment, and n7-segment are all initialized to their default values.
Given
The program is preparing to process a new EDI 350 message
When
Message segment structures are initialized
Then
M10-SEGMENT, P4-SEGMENT, V9-SEGMENT, K1-SEGMENT, X4-SEGMENT, and N7-SEGMENT are all initialized to their default values
R-GCX126-cbl-00043 Retrieve Admin Configuration from GCSTBRT Table
Action Rules
Business View: Assuming the program needs to determine merlin notification recipients during the 'Retrieve Admin Configuration from GCSTBRT Table' routine, when admin configuration is retrieved with table-id 'ad' and seqid 'adminid', the system executes logic to ensure that gcctbio is called with function gu to retrieve gcstbrt segment.
Given
The program needs to determine Merlin notification recipients
When
Admin configuration is retrieved with TABLE-ID 'AD' and SEQID 'ADMINID'
Then
GCCTBIO is called with function GU to retrieve GCSTBRT segment
R-GCX126-cbl-00044 Extract Merlin User Code from Admin Config
Decision Rules
Business View: Assuming admin configuration has been retrieved from gcstbrt table during the 'Extract Merlin User Code from Admin Config' routine, when gcctbio-return-flag equals '0', the system executes logic to ensure that 88-ad-segment-found is set to true, ws-table-segment is moved to gcstbrt-ad-segment, and gcstbrt-ad-dc-p-merlin-1 is moved to ws-emi-to-usercode.
Given
Admin configuration has been retrieved from GCSTBRT table
When
GCCTBIO-RETURN-FLAG equals '0'
Then
88-AD-SEGMENT-FOUND is set to TRUE, WS-TABLE-SEGMENT is moved to GCSTBRT-AD-SEGMENT, and GCSTBRT-AD-DC-P-MERLIN-1 is moved to WS-EMI-TO-USERCODE
R-GCX126-cbl-00049 Convert Gregorian Date to Julian Date
Validation Rules
Business View: Assuming date conversion has been attempted using iscdatcv during the 'Convert Gregorian Date to Julian Date' routine, when datcv-parm-error is true, the system executes logic to ensure that cc-error-message in cccom is set to 'module iscdatcv said cccom contain invalid date' and the program aborts by performing z900-abend.
Given
Date conversion has been attempted using ISCDATCV
When
DATCV-PARM-ERROR is TRUE
Then
CC-ERROR-MESSAGE in CCCOM is set to 'MODULE ISCDATCV SAID CCCOM CONTAIN INVALID DATE' and the program aborts by performing Z900-ABEND
R-GCX126-cbl-00050 Read Initial Message from IMS Queue
Action Rules
Business View: Assuming the program needs to check the ims message queue during the 'Read Initial Message from IMS Queue' routine, when initial queue read is performed, the system executes logic to ensure that ws-ioarea is set to spaces, cc-accept-status in cccom is set to 'qcqd', and cims is called with cccom, gu function, io-pcb from cccom, and ws-ioarea.
Given
The program needs to check the IMS message queue
When
Initial queue read is performed
Then
WS-IOAREA is set to SPACES, CC-ACCEPT-STATUS in CCCOM is set to 'QCQD', and CIMS is called with CCCOM, GU function, IO-PCB from CCCOM, and WS-IOAREA
R-GCX126-cbl-00051 Establish MQ Connection to Queue Manager
Action Rules
Business View: Assuming the program needs to access mq messages during the 'Establish MQ Connection to Queue Manager' routine, when mq connection is established, the system executes logic to ensure that mqconnc is called with w03-mqmanager, w03-hconn, w03-compcode, and w03-reason.
Given
The program needs to access MQ messages
When
MQ connection is established
Then
MQCONNC is called with W03-MQMANAGER, W03-HCONN, W03-COMPCODE, and W03-REASON
R-GCX126-cbl-00052 Establish MQ Connection to Queue Manager
Validation Rules
Business View: <EXCLUSION CRITERIA> If mq connection has been attempted, and w03-compcode is not equal to mqcc-ok occurs during the 'Establish MQ Connection to Queue Manager' routine, then the system must guarantee that w03-reason is moved to w03-reason-code, output-message-text is initialized, gccmqerr is called with w03-reason-code and output-message-text, w03-reason-code and output-message-text are concatenated into mq-error-text, '355' is moved to mq-trans-set, 'conn failed' is moved to pgm-error-text, error-message2 is moved to cc-error-message in cccom, and the program aborts by performing z900-abend.
EXCLUDING
MQ connection has been attempted
When
W03-COMPCODE is not equal to MQCC-OK
Then
W03-REASON is moved to W03-REASON-CODE, OUTPUT-MESSAGE-TEXT is initialized, GCCMQERR is called with W03-REASON-CODE and OUTPUT-MESSAGE-TEXT, W03-REASON-CODE and OUTPUT-MESSAGE-TEXT are concatenated into MQ-ERROR-TEXT, '355' is moved to MQ-TRANS-SET, 'CONN FAILED' is moved to PGM-ERROR-TEXT, ERROR-MESSAGE2 is moved to CC-ERROR-MESSAGE in CCCOM, and the program aborts by performing Z900-ABEND
R-GCX126-cbl-00054 Open MQ Queue for Input
Validation Rules
Business View: <EXCLUSION CRITERIA> If mq queue open has been attempted, and w03-compcode is not equal to mqcc-ok occurs during the 'Open MQ Queue for Input' routine, then the system must guarantee that w03-reason is moved to w03-reason-code, output-message-text is initialized, gccmqerr is called with w03-reason-code and output-message-text, w03-reason-code and output-message-text are concatenated into mq-error-text, '355' is moved to mq-trans-set, 'open failed' is moved to pgm-error-text, error-message2 is moved to cc-error-message in cccom, and the program aborts by performing z900-abend.
EXCLUDING
MQ queue open has been attempted
When
W03-COMPCODE is not equal to MQCC-OK
Then
W03-REASON is moved to W03-REASON-CODE, OUTPUT-MESSAGE-TEXT is initialized, GCCMQERR is called with W03-REASON-CODE and OUTPUT-MESSAGE-TEXT, W03-REASON-CODE and OUTPUT-MESSAGE-TEXT are concatenated into MQ-ERROR-TEXT, '355' is moved to MQ-TRANS-SET, 'OPEN FAILED' is moved to PGM-ERROR-TEXT, ERROR-MESSAGE2 is moved to CC-ERROR-MESSAGE in CCCOM, and the program aborts by performing Z900-ABEND
R-GCX126-cbl-00500 Initialize Table Access Fields
Process Rules
Business View: Assuming the system needs to retrieve admin configuration data during the 'Initialize Table Access Fields' routine, when the initialization process begins, the system executes logic to ensure that all table access parameters are cleared (gcstbrt-key-value, gcstbdp-key-value, gcctbio-return-flag, gcstbrt-ad-segment) and control flags (second-pcb-flag, unqual-ssa-flag) are set to spaces.
Given
The system needs to retrieve admin configuration data
When
The initialization process begins
Then
All table access parameters are cleared (GCSTBRT-KEY-VALUE, GCSTBDP-KEY-VALUE, GCCTBIO-RETURN-FLAG, GCSTBRT-AD-SEGMENT) and control flags (SECOND-PCB-FLAG, UNQUAL-SSA-FLAG) are set to spaces
R-GCX126-cbl-00504 Call GCCTBIO to Read GCSTBRT Table
Action Rules
Business View: Assuming the function code is 'gu', table id is set to admin table identifier, sequence id is 'adminid', and all access parameters are initialized during the 'Call GCCTBIO to Read GCSTBRT Table' routine, when the gcctbio program is called with parameters cccom, second-pcb-flag, unqual-ssa-flag, gcctbio-func-code, gcstbrt-lit, gcstbrt-key-value, gcstbdp-key-value, ws-table-segment, and gcctbio-return-flag, the system executes logic to ensure that the admin configuration record is retrieved and stored in ws-table-segment with operation status returned in gcctbio-return-flag.
Given
The function code is 'GU', table ID is set to admin table identifier, sequence ID is 'ADMINID', and all access parameters are initialized
When
The GCCTBIO program is called with parameters CCCOM, SECOND-PCB-FLAG, UNQUAL-SSA-FLAG, GCCTBIO-FUNC-CODE, GCSTBRT-LIT, GCSTBRT-KEY-VALUE, GCSTBDP-KEY-VALUE, WS-TABLE-SEGMENT, and GCCTBIO-RETURN-FLAG
Then
The admin configuration record is retrieved and stored in WS-TABLE-SEGMENT with operation status returned in GCCTBIO-RETURN-FLAG
R-GCX126-cbl-00506 Set Admin Segment Found Flag
Process Rules
Business View: Assuming the gcctbio-return-flag equals '0' indicating successful retrieval during the 'Set Admin Segment Found Flag' routine, when the admin segment status needs to be recorded, the system executes logic to ensure that the condition 88-ad-segment-found is set to true.
Given
The GCCTBIO-RETURN-FLAG equals '0' indicating successful retrieval
When
The admin segment status needs to be recorded
Then
The condition 88-AD-SEGMENT-FOUND is set to TRUE
R-GCX126-cbl-00507 Move Merlin User Code from Admin Config to EMI-TO-USERCODE
Process Rules
Business View: Assuming the admin segment has been successfully found (88-ad-segment-found is true) and ws-table-segment contains the retrieved data during the 'Move Merlin User Code from Admin Config to EMI-TO-USERCODE' routine, when the merlin user code needs to be extracted, the system executes logic to ensure that ws-table-segment is moved to gcstbrt-ad-segment and gcstbrt-ad-dc-p-merlin-1 is moved to ws-emi-to-usercode.
Given
The admin segment has been successfully found (88-AD-SEGMENT-FOUND is TRUE) and WS-TABLE-SEGMENT contains the retrieved data
When
The Merlin user code needs to be extracted
Then
WS-TABLE-SEGMENT is moved to GCSTBRT-AD-SEGMENT and GCSTBRT-AD-DC-P-MERLIN-1 is moved to WS-EMI-TO-USERCODE
R-GCX126-cbl-00708 Call GCCTBIO to Read GCSTBRT Table
Action Rules
Business View: Assuming the system needs to route edi 350 notifications to merlin users during the 'Call GCCTBIO to Read GCSTBRT Table' routine, when the system calls gcctbio to retrieve the administrative configuration with table id 'ad-table-id' and sequence id 'adminid', the system executes logic to ensure that if the configuration record is found (return flag equals '0'), the system extracts the merlin user code from gcstbrt-ad-dc-p-merlin-1 field and sets the admin segment found indicator to true; otherwise, the system continues without the administrative configuration.
Given
The system needs to route EDI 350 notifications to Merlin users
When
The system calls GCCTBIO to retrieve the administrative configuration with Table ID 'AD-TABLE-ID' and Sequence ID 'ADMINID'
Then
If the configuration record is found (return flag equals '0'), the system extracts the Merlin user code from GCSTBRT-AD-DC-P-MERLIN-1 field and sets the admin segment found indicator to true; otherwise, the system continues without the administrative configuration
R-GCX126-cbl-00709 Set Function Code to GU - Get Unique
Process Rules
Business View: Assuming the system is preparing to retrieve administrative configuration data during the 'Set Function Code to GU - Get Unique' routine, when the initialization process begins, the system executes logic to ensure that the system sets the function code to 'gu' (get unique), clears all key values (gcstbrt-key-value, gcstbdp-key-value), clears the return flag (gcctbio-return-flag), clears the segment data (gcstbrt-ad-segment), and clears all control flags (second-pcb-flag, unqual-ssa-flag).
Given
The system is preparing to retrieve administrative configuration data
When
The initialization process begins
Then
The system sets the function code to 'GU' (Get Unique), clears all key values (GCSTBRT-KEY-VALUE, GCSTBDP-KEY-VALUE), clears the return flag (GCCTBIO-RETURN-FLAG), clears the segment data (GCSTBRT-AD-SEGMENT), and clears all control flags (SECOND-PCB-FLAG, UNQUAL-SSA-FLAG)
R-GCX126-cbl-00712 Call GCCTBIO Program
Action Rules
Business View: Assuming all table access parameters have been initialized with function code 'gu', table id 'ad-table-id', and sequence id 'adminid' during the 'Call GCCTBIO Program' routine, when the system calls gcctbio program with parameters cccom, second-pcb-flag, unqual-ssa-flag, gcctbio-func-code, gcstbrt-lit, gcstbrt-key-value, gcstbdp-key-value, ws-table-segment, and gcctbio-return-flag, the system executes logic to ensure that the gcctbio program executes the database operation and returns the result in gcctbio-return-flag with the retrieved data in ws-table-segment if successful.
Given
All table access parameters have been initialized with function code 'GU', table ID 'AD-TABLE-ID', and sequence ID 'ADMINID'
When
The system calls GCCTBIO program with parameters CCCOM, SECOND-PCB-FLAG, UNQUAL-SSA-FLAG, GCCTBIO-FUNC-CODE, GCSTBRT-LIT, GCSTBRT-KEY-VALUE, GCSTBDP-KEY-VALUE, WS-TABLE-SEGMENT, and GCCTBIO-RETURN-FLAG
Then
The GCCTBIO program executes the database operation and returns the result in GCCTBIO-RETURN-FLAG with the retrieved data in WS-TABLE-SEGMENT if successful
R-GCX126-cbl-00714 Move Table Segment to GCSTBRT-AD-SEGMENT
Process Rules
Business View: Assuming the administrative configuration record was successfully retrieved (gcctbio-return-flag equals '0') during the 'Move Table Segment to GCSTBRT-AD-SEGMENT' routine, when the system processes the retrieved data, the system executes logic to ensure that the system moves the contents of ws-table-segment to gcstbrt-ad-segment.
Given
The administrative configuration record was successfully retrieved (GCCTBIO-RETURN-FLAG equals '0')
When
The system processes the retrieved data
Then
The system moves the contents of WS-TABLE-SEGMENT to GCSTBRT-AD-SEGMENT
R-GCX126-cbl-00715 Extract Merlin User Code from Admin Config
Process Rules
Business View: Assuming the administrative segment data has been successfully loaded into gcstbrt-ad-segment during the 'Extract Merlin User Code from Admin Config' routine, when the system extracts the merlin routing information, the system executes logic to ensure that the system moves the value from gcstbrt-ad-dc-p-merlin-1 to ws-emi-to-usercode for use in message routing.
Given
The administrative segment data has been successfully loaded into GCSTBRT-AD-SEGMENT
When
The system extracts the Merlin routing information
Then
The system moves the value from GCSTBRT-AD-DC-P-MERLIN-1 to WS-EMI-TO-USERCODE for use in message routing
R-GCX126-cbl-00716 Set Admin Segment Found Flag
Process Rules
Business View: Assuming the merlin user code has been successfully extracted from the administrative configuration during the 'Set Admin Segment Found Flag' routine, when the system completes the administrative configuration retrieval process, the system executes logic to ensure that the system sets the condition name 88-ad-segment-found to true, indicating that valid administrative configuration is available.
Given
The Merlin user code has been successfully extracted from the administrative configuration
When
The system completes the administrative configuration retrieval process
Then
The system sets the condition name 88-AD-SEGMENT-FOUND to true, indicating that valid administrative configuration is available
R-GCX126-cbl-00508 Call MQCONNC API with Queue Manager Name
Action Rules
Business View: Assuming the system needs to process edi 350 customs messages from the message queue during the 'Call MQCONNC API with Queue Manager Name' routine, when the system initiates connection to the mq queue manager, the system executes logic to ensure that the system calls the mqconnc api with the queue manager name and receives a connection handle and completion status.
Given
The system needs to process EDI 350 customs messages from the message queue
When
The system initiates connection to the MQ Queue Manager
Then
The system calls the MQCONNC API with the Queue Manager name and receives a connection handle and completion status
R-GCX126-cbl-00511 Call GCCMQERR to Get Error Message Text
Action Rules
Business View: Assuming an mq reason code has been retrieved indicating connection failure during the 'Call GCCMQERR to Get Error Message Text' routine, when the system needs to provide a descriptive error message for the failure, the system executes logic to ensure that the system calls the gccmqerr program with the reason code and receives the corresponding error message text.
Given
An MQ reason code has been retrieved indicating connection failure
When
The system needs to provide a descriptive error message for the failure
Then
The system calls the GCCMQERR program with the reason code and receives the corresponding error message text
R-GCX126-cbl-00512 Build Error Message: Reason Code, Error Text, Transaction Set: '355', Error Type: 'CONN FAILED'
Computation Rules
Business View: Assuming the mq connection has failed and the reason code and error text have been retrieved during the 'Build Error Message: Reason Code, Error Text, Transaction Set: '355', Error Type: 'CONN FAILED'' routine, when the system prepares to report the connection failure, the system executes logic to ensure that the system builds an error message containing: the mq reason code concatenated with the error message text, transaction set value '355', and error type 'conn failed'.
Given
The MQ connection has failed and the reason code and error text have been retrieved
When
The system prepares to report the connection failure
Then
The system builds an error message containing: the MQ reason code concatenated with the error message text, transaction set value '355', and error type 'CONN FAILED'
R-GCX126-cbl-00513 Abend Program with Error Message
Process Rules
Business View: Assuming the mq connection has failed and a comprehensive error message has been constructed during the 'Abend Program with Error Message' routine, when the system cannot proceed without a valid mq connection, the system executes logic to ensure that the system abends the program with the error message containing the reason code, error text, transaction set '355', and error type 'conn failed'.
Given
The MQ connection has failed and a comprehensive error message has been constructed
When
The system cannot proceed without a valid MQ connection
Then
The system abends the program with the error message containing the reason code, error text, transaction set '355', and error type 'CONN FAILED'
R-GCX126-cbl-00514 Connection Established Successfully
Decision Rules
Business View: Assuming the mqconnc api has been called to connect to the queue manager during the 'Connection Established Successfully' routine, when the completion code returned equals mqcc-ok, the system executes logic to ensure that the system confirms the connection is established successfully and proceeds with message processing operations.
Given
The MQCONNC API has been called to connect to the Queue Manager
When
The completion code returned equals MQCC-OK
Then
The system confirms the connection is established successfully and proceeds with message processing operations
R-GCX126-cbl-00055 Connect to MQ Queue Manager
Action Rules
Business View: Assuming the program needs to process edi 350 messages from the message queue during the 'Connect to MQ Queue Manager' routine, when the system attempts to connect to the mq queue manager, the system executes logic to ensure that if connection is successful, proceed to open the queue; if connection fails, generate error message with reason code and abort processing with message 'conn failed' for transaction set '355'.
Given
The program needs to process EDI 350 messages from the message queue
When
The system attempts to connect to the MQ Queue Manager
Then
If connection is successful, proceed to open the queue; If connection fails, generate error message with reason code and abort processing with message 'CONN FAILED' for transaction set '355'
R-GCX126-cbl-00056 Open MQ Queue for Reading
Action Rules
Business View: Assuming connection to mq queue manager is established and queue name is defined during the 'Open MQ Queue for Reading' routine, when the system attempts to open the queue with input-as-queue-defined option, the system executes logic to ensure that if open is successful, proceed to retrieve messages; if open fails, generate error message with reason code and abort processing with message 'open failed' for transaction set '355'.
Given
Connection to MQ Queue Manager is established and queue name is defined
When
The system attempts to open the queue with input-as-queue-defined option
Then
If open is successful, proceed to retrieve messages; If open fails, generate error message with reason code and abort processing with message 'OPEN FAILED' for transaction set '355'
R-GCX126-cbl-00057 Retrieve Message from Queue
Action Rules
Business View: Assuming mq queue is open and ready for message retrieval during the 'Retrieve Message from Queue' routine, when the system executes mqget operation with message buffer length set to the size of mqs-message, the system executes logic to ensure that the message is retrieved into mqs-message buffer with actual data length returned in w03-datalen, and completion code and reason code are set to indicate operation status.
Given
MQ queue is open and ready for message retrieval
When
The system executes MQGET operation with message buffer length set to the size of MQS-MESSAGE
Then
The message is retrieved into MQS-MESSAGE buffer with actual data length returned in W03-DATALEN, and completion code and reason code are set to indicate operation status
R-GCX126-cbl-00058 MQ Operation Successful?
Decision Rules
Business View: Assuming mqget operation has completed and returned completion code in w03-compcode during the 'MQ Operation Successful?' routine, when the system evaluates the completion code, the system executes logic to ensure that if completion code equals mqcc-ok, proceed to check message status; if completion code equals mqcc-failed and reason equals mqrc-no-msg-available, set message not available flag; for any other completion code, set end of queue flag and prepare error message.
Given
MQGET operation has completed and returned completion code in W03-COMPCODE
When
The system evaluates the completion code
Then
If completion code equals MQCC-OK, proceed to check message status; If completion code equals MQCC-FAILED and reason equals MQRC-NO-MSG-AVAILABLE, set message not available flag; For any other completion code, set end of queue flag and prepare error message
R-GCX126-cbl-00059 Set Message Not Available Flag
Process Rules
Business View: Assuming mq get operation returned completion code mqcc-failed with reason code mqrc-no-msg-available (2033) during the 'Set Message Not Available Flag' routine, when the system processes the no message available condition, the system executes logic to ensure that set msg-not-available flag to true and exit message retrieval process without error.
Given
MQ GET operation returned completion code MQCC-FAILED with reason code MQRC-NO-MSG-AVAILABLE (2033)
When
The system processes the no message available condition
Then
Set MSG-NOT-AVAILABLE flag to TRUE and exit message retrieval process without error
R-GCX126-cbl-00060 Backout Count > 0?
Validation Rules
Business View: <EXCLUSION CRITERIA> If message was successfully retrieved with completion code mqcc-ok and backout count is available in mqmd-backoutcount, and the system checks if mqmd-backoutcount is not equal to 0 occurs during the 'Backout Count > 0?' routine, then the system must guarantee that if backout count is not equal to 0, set skip-msg-found flag to true; if backout count equals 0, proceed to validate message length.
EXCLUDING
Message was successfully retrieved with completion code MQCC-OK and backout count is available in MQMD-BACKOUTCOUNT
When
The system checks if MQMD-BACKOUTCOUNT is not equal to 0
Then
If backout count is not equal to 0, set SKIP-MSG-FOUND flag to TRUE; If backout count equals 0, proceed to validate message length
R-GCX126-cbl-00061 Set Skip Message Flag
Process Rules
Business View: <EXCLUSION CRITERIA> If message has completion code mqcc-ok and mqmd-backoutcount is not equal to 0, and the system identifies a previously failed message occurs during the 'Set Skip Message Flag' routine, then the system must guarantee that set skip-msg-found flag to true and exit message retrieval process without further processing.
EXCLUDING
Message has completion code MQCC-OK and MQMD-BACKOUTCOUNT is not equal to 0
When
The system identifies a previously failed message
Then
Set SKIP-MSG-FOUND flag to TRUE and exit message retrieval process without further processing
R-GCX126-cbl-00062 Message Length Valid?
Validation Rules
Business View: Assuming message was successfully retrieved with completion code mqcc-ok and backout count equals 0 during the 'Message Length Valid?' routine, when the system calculates ws-max-mqs-entries by subtracting header length from total data length and dividing by entry length, and checks if result is less than 1, the system executes logic to ensure that if ws-max-mqs-entries is less than 1, prepare error message 'user abend 350 message too short' and abort processing; if ws-max-mqs-entries is 1 or greater, set good-msg-found flag to true.
Given
Message was successfully retrieved with completion code MQCC-OK and backout count equals 0
When
The system calculates WS-MAX-MQS-ENTRIES by subtracting header length from total data length and dividing by entry length, and checks if result is less than 1
Then
If WS-MAX-MQS-ENTRIES is less than 1, prepare error message 'USER ABEND 350 MESSAGE TOO SHORT' and abort processing; If WS-MAX-MQS-ENTRIES is 1 or greater, set GOOD-MSG-FOUND flag to TRUE
R-GCX126-cbl-00063 Set Good Message Found Flag
Process Rules
Business View: Assuming message has completion code mqcc-ok, backout count equals 0, and calculated segment count is valid during the 'Set Good Message Found Flag' routine, when all message validation checks pass successfully, the system executes logic to ensure that set good-msg-found flag to true and proceed to calculate number of edi segments.
Given
Message has completion code MQCC-OK, backout count equals 0, and calculated segment count is valid
When
All message validation checks pass successfully
Then
Set GOOD-MSG-FOUND flag to TRUE and proceed to calculate number of EDI segments
R-GCX126-cbl-00064 Calculate Number of EDI Segments
Computation Rules
Business View: Assuming valid message is retrieved with data length in w03-datalen, header length in ws-mqs-len-header, and entry length in ws-mqs-len-of-1-entry during the 'Calculate Number of EDI Segments' routine, when the system computes ws-max-mqs-entries as ((w03-datalen minus ws-mqs-len-header) divided by ws-mqs-len-of-1-entry) rounded, the system executes logic to ensure that if calculated ws-max-mqs-entries exceeds cst-max-mqs-entries, set ws-max-mqs-entries to cst-max-mqs-entries; otherwise, use calculated value for segment count.
Given
Valid message is retrieved with data length in W03-DATALEN, header length in WS-MQS-LEN-HEADER, and entry length in WS-MQS-LEN-OF-1-ENTRY
When
The system computes WS-MAX-MQS-ENTRIES as ((W03-DATALEN minus WS-MQS-LEN-HEADER) divided by WS-MQS-LEN-OF-1-ENTRY) rounded
Then
If calculated WS-MAX-MQS-ENTRIES exceeds CST-MAX-MQS-ENTRIES, set WS-MAX-MQS-ENTRIES to CST-MAX-MQS-ENTRIES; Otherwise, use calculated value for segment count
R-GCX126-cbl-00065 Set End of Queue Flag
Process Rules
Business View: Assuming mq get operation returned completion code other than mqcc-ok or returned mqcc-failed with reason other than mqrc-no-msg-available during the 'Set End of Queue Flag' routine, when the system encounters an unexpected mq error condition, the system executes logic to ensure that set end-of-mqueue flag to true and proceed to prepare error message with reason code.
Given
MQ GET operation returned completion code other than MQCC-OK or returned MQCC-FAILED with reason other than MQRC-NO-MSG-AVAILABLE
When
The system encounters an unexpected MQ error condition
Then
Set END-OF-MQUEUE flag to TRUE and proceed to prepare error message with reason code
R-GCX126-cbl-00066 Prepare Error Message
Process Rules
Business View: Assuming mq operation failed with reason code in w03-reason during the 'Prepare Error Message' routine, when the system needs to report the mq failure, the system executes logic to ensure that move w03-reason to w03-reason-code, call gccmqerr to get error description into output-message-text, move error text to mq-error-text, set mq-trans-set to '350' or '355', set pgm-error-text to 'open failed', 'close failed', 'disc failed', or 'conn failed' as appropriate, and move complete error message to cc-error-message.
Given
MQ operation failed with reason code in W03-REASON
When
The system needs to report the MQ failure
Then
Move W03-REASON to W03-REASON-CODE, call GCCMQERR to get error description into OUTPUT-MESSAGE-TEXT, move error text to MQ-ERROR-TEXT, set MQ-TRANS-SET to '350' or '355', set PGM-ERROR-TEXT to 'OPEN FAILED', 'CLOSE FAILED', 'DISC FAILED', or 'CONN FAILED' as appropriate, and move complete error message to CC-ERROR-MESSAGE
R-GCX126-cbl-00067 Abort Processing
Action Rules
Business View: Assuming error message has been prepared for mq failure condition during the 'Abort Processing' routine, when the system determines processing cannot continue, the system executes logic to ensure that call cerr program with cccom to abort processing and terminate program execution.
Given
Error message has been prepared for MQ failure condition
When
The system determines processing cannot continue
Then
Call CERR program with CCCOM to abort processing and terminate program execution
R-GCX126-cbl-00515 Calculate: Segments = Data Length - Header Length / Entry Length
Computation Rules
Business View: Assuming ['an edi 350 message has been retrieved from the mq queue', 'the message data length (w03-datalen) is available from the mq get operation', 'the message header length (ws-mqs-len-header) equals the length of mqs-message-header structure', 'the single entry length (ws-mqs-len-of-1-entry) equals the length of one mqs-table-entry'] during the 'Calculate: Segments = Data Length - Header Length / Entry Length' routine, when ['the system calculates the number of segments'], the system executes logic to ensure that ['subtract the header length from the total message data length to get net data length', 'divide the net data length by the single entry length', 'round the result to get the number of complete segments', 'store the calculated value in ws-max-mqs-entries'].
Given
['An EDI 350 message has been retrieved from the MQ queue', 'The message data length (W03-DATALEN) is available from the MQ GET operation', 'The message header length (WS-MQS-LEN-HEADER) equals the length of MQS-MESSAGE-HEADER structure', 'The single entry length (WS-MQS-LEN-OF-1-ENTRY) equals the length of one MQS-TABLE-ENTRY']
When
['The system calculates the number of segments']
Then
['Subtract the header length from the total message data length to get net data length', 'Divide the net data length by the single entry length', 'Round the result to get the number of complete segments', 'Store the calculated value in WS-MAX-MQS-ENTRIES']
R-GCX126-cbl-00516 Calculated Segments > Maximum Allowed?
Validation Rules
Business View: Assuming ['the number of segments has been calculated and stored in ws-max-mqs-entries', 'a maximum allowed segment count is defined as cst-max-mqs-entries'] during the 'Calculated Segments > Maximum Allowed?' routine, when ['the calculated number of segments (ws-max-mqs-entries) exceeds the maximum allowed (cst-max-mqs-entries)'], the system executes logic to ensure that ['set ws-max-mqs-entries to the maximum allowed value cst-max-mqs-entries', 'discard any segments beyond the maximum limit'].
Given
['The number of segments has been calculated and stored in WS-MAX-MQS-ENTRIES', 'A maximum allowed segment count is defined as CST-MAX-MQS-ENTRIES']
When
['The calculated number of segments (WS-MAX-MQS-ENTRIES) exceeds the maximum allowed (CST-MAX-MQS-ENTRIES)']
Then
['Set WS-MAX-MQS-ENTRIES to the maximum allowed value CST-MAX-MQS-ENTRIES', 'Discard any segments beyond the maximum limit']
R-GCX126-cbl-00517 Get Header Length
Definitional Rules
Business View: Assuming ['the edi message structure includes a fixed-length header (mqs-message-header)', 'the system needs to calculate net data length for segment counting'] during the 'Get Header Length' routine, when ['the system initializes message processing parameters'], the system executes logic to ensure that ['set ws-mqs-len-header to the length of mqs-message-header structure', 'this value will be used to subtract header length from total message length'].
Given
['The EDI message structure includes a fixed-length header (MQS-MESSAGE-HEADER)', 'The system needs to calculate net data length for segment counting']
When
['The system initializes message processing parameters']
Then
['Set WS-MQS-LEN-HEADER to the length of MQS-MESSAGE-HEADER structure', 'This value will be used to subtract header length from total message length']
R-GCX126-cbl-00518 Get Single Entry Length
Definitional Rules
Business View: Assuming ['each edi segment in the message has a fixed structure (mqs-table-entry)', 'the system needs to calculate how many segments fit in the net data length'] during the 'Get Single Entry Length' routine, when ['the system initializes message processing parameters'], the system executes logic to ensure that ['set ws-mqs-len-of-1-entry to the length of one mqs-table-entry structure', 'this value will be used as the divisor to calculate segment count'].
Given
['Each EDI segment in the message has a fixed structure (MQS-TABLE-ENTRY)', 'The system needs to calculate how many segments fit in the net data length']
When
['The system initializes message processing parameters']
Then
['Set WS-MQS-LEN-OF-1-ENTRY to the length of one MQS-TABLE-ENTRY structure', 'This value will be used as the divisor to calculate segment count']
R-GCX126-cbl-00519 Get Message Data Length from MQ
Process Rules
Business View: Assuming ['an edi 350 message exists in the mq queue', 'the mq get operation has been invoked with buffer length set to the length of mqs-message'] during the 'Get Message Data Length from MQ' routine, when ['the mqget call completes successfully'], the system executes logic to ensure that ['the actual data length of the retrieved message is returned in w03-datalen', 'this length includes both the message header and all segment entries', 'w03-datalen will be used to calculate the number of segments in the message'].
Given
['An EDI 350 message exists in the MQ queue', 'The MQ GET operation has been invoked with buffer length set to the length of MQS-MESSAGE']
When
['The MQGET call completes successfully']
Then
['The actual data length of the retrieved message is returned in W03-DATALEN', 'This length includes both the message header and all segment entries', 'W03-DATALEN will be used to calculate the number of segments in the message']
R-GCX126-cbl-00717 Calculate: Segments = Data Length - Header Length / Entry Length
Computation Rules
Business View: Assuming an edi 350 message has been retrieved from the mq queue with a specific data length (w03-datalen), a known message header length (ws-mqs-len-header), and a known single entry length (ws-mqs-len-of-1-entry) during the 'Calculate: Segments = Data Length - Header Length / Entry Length' routine, when the system calculates the number of message segments, the system executes logic to ensure that the number of segments (ws-max-mqs-entries) is calculated as: (data length minus header length) divided by entry length, rounded to the nearest whole number.
Given
An EDI 350 message has been retrieved from the MQ queue with a specific data length (W03-DATALEN), a known message header length (WS-MQS-LEN-HEADER), and a known single entry length (WS-MQS-LEN-OF-1-ENTRY)
When
The system calculates the number of message segments
Then
The number of segments (WS-MAX-MQS-ENTRIES) is calculated as: (Data Length minus Header Length) divided by Entry Length, rounded to the nearest whole number
R-GCX126-cbl-00718 Segments > Maximum Allowed?
Validation Rules
Business View: Assuming the calculated number of message segments (ws-max-mqs-entries) has been determined and a maximum allowed segment count (cst-max-mqs-entries) is defined during the 'Segments > Maximum Allowed?' routine, when the calculated number of segments exceeds the maximum allowed segment count, the system executes logic to ensure that the number of segments to process (ws-max-mqs-entries) is set to the maximum allowed value (cst-max-mqs-entries).
Given
The calculated number of message segments (WS-MAX-MQS-ENTRIES) has been determined and a maximum allowed segment count (CST-MAX-MQS-ENTRIES) is defined
When
The calculated number of segments exceeds the maximum allowed segment count
Then
The number of segments to process (WS-MAX-MQS-ENTRIES) is set to the maximum allowed value (CST-MAX-MQS-ENTRIES)
R-GCX126-cbl-00719 Get Header Length
Definitional Rules
Business View: Assuming the system needs to process an edi 350 message structure during the 'Get Header Length' routine, when initializing message processing parameters, the system executes logic to ensure that the header length (ws-mqs-len-header) is set to the length of the mqs-message-header structure.
Given
The system needs to process an EDI 350 message structure
When
Initializing message processing parameters
Then
The header length (WS-MQS-LEN-HEADER) is set to the length of the MQS-MESSAGE-HEADER structure
R-GCX126-cbl-00720 Get Single Entry Length
Definitional Rules
Business View: Assuming the system needs to process an edi 350 message with multiple data entries during the 'Get Single Entry Length' routine, when initializing message processing parameters, the system executes logic to ensure that the single entry length (ws-mqs-len-of-1-entry) is set to the length of one mqs-table-entry structure.
Given
The system needs to process an EDI 350 message with multiple data entries
When
Initializing message processing parameters
Then
The single entry length (WS-MQS-LEN-OF-1-ENTRY) is set to the length of one MQS-TABLE-ENTRY structure
R-GCX126-cbl-00068 First 10 Characters = '+++3505040'?
Decision Rules
Business View: Assuming an edi 350 message has been retrieved from the mq queue with a message header field mqs-xway-hdr during the 'First 10 Characters = '+++3505040'?' routine, when the first 10 characters of mqs-xway-hdr equal '+++3505040', the system executes logic to ensure that set the message type indicator ws-conv-350 to true to identify this as a conveyance edi 350 message.
Given
An EDI 350 message has been retrieved from the MQ queue with a message header field MQS-XWAY-HDR
When
The first 10 characters of MQS-XWAY-HDR equal '+++3505040'
Then
Set the message type indicator WS-CONV-350 to TRUE to identify this as a Conveyance EDI 350 message
R-GCX126-cbl-00069 First 10 Characters = '+++3505040'?
Decision Rules
Business View: <EXCLUSION CRITERIA> If an edi 350 message has been retrieved from the mq queue with a message header field mqs-xway-hdr, and the first 10 characters of mqs-xway-hdr do not equal '+++3505040' occurs during the 'First 10 Characters = '+++3505040'?' routine, then the system must guarantee that set the message type indicator ws-cargo-350 to true to identify this as a cargo edi 350 message.
EXCLUDING
An EDI 350 message has been retrieved from the MQ queue with a message header field MQS-XWAY-HDR
When
The first 10 characters of MQS-XWAY-HDR do NOT equal '+++3505040'
Then
Set the message type indicator WS-CARGO-350 to TRUE to identify this as a Cargo EDI 350 message
R-GCX126-cbl-00070 ST - Transaction Set Header Set Header Found Flag
Process Rules
Business View: Assuming an edi 350 message is being parsed segment by segment during the 'ST - Transaction Set Header Set Header Found Flag' routine, when the current segment table id equals 'st ', the system executes logic to ensure that set the header found flag to true and set the first x4 segment flag to true to indicate the start of a new transaction set.
Given
An EDI 350 message is being parsed segment by segment
When
The current segment table ID equals 'ST '
Then
Set the header found flag to TRUE and set the first X4 segment flag to TRUE to indicate the start of a new transaction set
R-GCX126-cbl-00071 M10 - Notice/Reference Extract CCN and Notice Info
Process Rules
Business View: Assuming an edi 350 message is being parsed and an m10 segment is encountered during the 'M10 - Notice/Reference Extract CCN and Notice Info' routine, when the current segment table id equals 'm10', the system executes logic to ensure that set the m10 segment found flag to true, initialize the m10 segment structure, and move the entire m10 table entry data into the m10 segment structure for subsequent processing.
Given
An EDI 350 message is being parsed and an M10 segment is encountered
When
The current segment table ID equals 'M10'
Then
Set the M10 segment found flag to TRUE, initialize the M10 segment structure, and move the entire M10 table entry data into the M10 segment structure for subsequent processing
R-GCX126-cbl-00072 P4 - Port/Location Extract Port Code and Sub-Location
Process Rules
Business View: Assuming an edi 350 message is being parsed and a p4 segment is encountered during the 'P4 - Port/Location Extract Port Code and Sub-Location' routine, when the current segment table id equals 'p4 ', the system executes logic to ensure that set the p4 segment found flag to true, initialize the p4 segment structure, and move the entire p4 table entry data into the p4 segment structure for subsequent processing.
Given
An EDI 350 message is being parsed and a P4 segment is encountered
When
The current segment table ID equals 'P4 '
Then
Set the P4 segment found flag to TRUE, initialize the P4 segment structure, and move the entire P4 table entry data into the P4 segment structure for subsequent processing
R-GCX126-cbl-00073 V9 - Notice Reason Extract Notice Reason Code
Process Rules
Business View: Assuming an edi 350 message is being parsed and a v9 segment is encountered during the 'V9 - Notice Reason Extract Notice Reason Code' routine, when the current segment table id equals 'v9 ', the system executes logic to ensure that set the v9 segment found flag to true, initialize the v9 segment structure, and move the entire v9 table entry data into the v9 segment structure for subsequent processing.
Given
An EDI 350 message is being parsed and a V9 segment is encountered
When
The current segment table ID equals 'V9 '
Then
Set the V9 segment found flag to TRUE, initialize the V9 segment structure, and move the entire V9 table entry data into the V9 segment structure for subsequent processing
R-GCX126-cbl-00074 VID - Vehicle ID Skip Processing
Process Rules
Business View: Assuming an edi 350 message is being parsed and a vid segment is encountered during the 'VID - Vehicle ID Skip Processing' routine, when the current segment table id equals 'vid', the system executes logic to ensure that continue to the next segment without performing any processing or data extraction.
Given
An EDI 350 message is being parsed and a VID segment is encountered
When
The current segment table ID equals 'VID'
Then
Continue to the next segment without performing any processing or data extraction
R-GCX126-cbl-00075 K1 - Remarks Store Free-Form Message Increment Remark Index
Process Rules
Business View: Assuming an edi 350 message is being parsed and a k1 segment is encountered during the 'K1 - Remarks Store Free-Form Message Increment Remark Index' routine, when the current segment table id equals 'k1 ' and the remark index is less than or equal to the maximum of 50, the system executes logic to ensure that set the k1 segment found flag to true, initialize the k1 segment structure, move the k1 table entry data into the k1 segment structure, increment the remark index by 1, and store the k1 segment in the remark array at the current index position. if the remark index exceeds 50, set it to 50 and overwrite the last remark.
Given
An EDI 350 message is being parsed and a K1 segment is encountered
When
The current segment table ID equals 'K1 ' and the remark index is less than or equal to the maximum of 50
Then
Set the K1 segment found flag to TRUE, initialize the K1 segment structure, move the K1 table entry data into the K1 segment structure, increment the remark index by 1, and store the K1 segment in the remark array at the current index position. If the remark index exceeds 50, set it to 50 and overwrite the last remark
R-GCX126-cbl-00076 X4 - Release/Disposition Extract Release Reference Extract Date and Time
Process Rules
Business View: Assuming an edi 350 message is being parsed and an x4 segment is encountered during the 'X4 - Release/Disposition Extract Release Reference Extract Date and Time' routine, when the current segment table id equals 'x4 ', the system executes logic to ensure that initialize the k1 comments structure, initialize the x4 segment structure, move the x4 table entry data into the x4 segment structure, and set the x4 segment found flag to true for subsequent processing.
Given
An EDI 350 message is being parsed and an X4 segment is encountered
When
The current segment table ID equals 'X4 '
Then
Initialize the K1 comments structure, initialize the X4 segment structure, move the X4 table entry data into the X4 segment structure, and set the X4 segment found flag to TRUE for subsequent processing
R-GCX126-cbl-00077 N7 - Equipment Extract Equipment Number Store in Log Array
Process Rules
Business View: <EXCLUSION CRITERIA> If an edi 350 message is being parsed and an n7 segment is encountered, and the current segment table id equals 'n7 ' and the equipment number field is not spaces occurs during the 'N7 - Equipment Extract Equipment Number Store in Log Array' routine, then the system must guarantee that set the n7 segment found flag to true, initialize the n7 segment structure, move the n7 table entry data into the n7 segment structure, move the equipment number to the log data array at the current log index position with log type 'edi 350 eqp#:', and increment the log index by 1.
EXCLUDING
An EDI 350 message is being parsed and an N7 segment is encountered
When
The current segment table ID equals 'N7 ' and the equipment number field is not spaces
Then
Set the N7 segment found flag to TRUE, initialize the N7 segment structure, move the N7 table entry data into the N7 segment structure, move the equipment number to the log data array at the current log index position with log type 'EDI 350 EQP#:', and increment the log index by 1
R-GCX126-cbl-00078 SE - Transaction Set Trailer Set Trailer Found Flag Set End Found Flag
Process Rules
Business View: Assuming an edi 350 message is being parsed and an se segment is encountered during the 'SE - Transaction Set Trailer Set Trailer Found Flag Set End Found Flag' routine, when the current segment table id equals 'se ', the system executes logic to ensure that set the trailer found flag to true, set the end found flag to true, and perform the rest of message processing which includes logging all k1 remarks and n7 equipment numbers to the cargo information message log.
Given
An EDI 350 message is being parsed and an SE segment is encountered
When
The current segment table ID equals 'SE '
Then
Set the trailer found flag to TRUE, set the end found flag to TRUE, and perform the rest of message processing which includes logging all K1 remarks and N7 equipment numbers to the cargo information message log
R-GCX126-cbl-00079 Trigger 350 Message Processing
Decision Rules
Business View: Assuming edi segments are being parsed and both x4 and v9 segments have been successfully processed during the 'Trigger 350 Message Processing' routine, when the x4 segment found flag is true and the v9 segment found flag is true and the first x4 flag is true, the system executes logic to ensure that set the first x4 flag to false (not first x4) and perform the 350 message processing routine which evaluates the v9 notice reason code and updates cargo records based on the customs action type.
Given
EDI segments are being parsed and both X4 and V9 segments have been successfully processed
When
The X4 segment found flag is TRUE and the V9 segment found flag is TRUE and the first X4 flag is TRUE
Then
Set the first X4 flag to FALSE (not first X4) and perform the 350 message processing routine which evaluates the V9 notice reason code and updates cargo records based on the customs action type
R-GCX126-cbl-00080 Trigger 350 Message Processing
Decision Rules
Business View: Assuming edi segments are being parsed and the v9 segment has been processed and the se segment has been encountered during the 'Trigger 350 Message Processing' routine, when the v9 segment found flag is true and the first x4 flag is true and the end found flag is true, the system executes logic to ensure that set the first x4 flag to false (not first x4) and perform the 350 message processing routine which evaluates the v9 notice reason code and updates cargo records based on the customs action type.
Given
EDI segments are being parsed and the V9 segment has been processed and the SE segment has been encountered
When
The V9 segment found flag is TRUE and the first X4 flag is TRUE and the end found flag is TRUE
Then
Set the first X4 flag to FALSE (not first X4) and perform the 350 message processing routine which evaluates the V9 notice reason code and updates cargo records based on the customs action type
R-GCX126-cbl-00081 Move to Next Segment
Process Rules
Business View: Assuming a segment has been processed in the edi 350 message during the 'Move to Next Segment' routine, when the current segment processing is complete, the system executes logic to ensure that increment the line counter by 1 and continue the segment processing loop until the line counter exceeds the maximum number of message queue entries or the end found flag is set to true.
Given
A segment has been processed in the EDI 350 message
When
The current segment processing is complete
Then
Increment the line counter by 1 and continue the segment processing loop until the line counter exceeds the maximum number of message queue entries or the end found flag is set to TRUE
R-GCX126-cbl-00082 X4 - Release/Disposition Extract Release Reference Extract Date and Time
Decision Rules
Business View: Assuming an x4 segment is being processed with entry type code equal to '992' and the message type is conventional 350 during the 'X4 - Release/Disposition Extract Release Reference Extract Date and Time' routine, when the related document id (crn) in positions 1-25 is different from the previous crn, the system executes logic to ensure that move the related document id to the train key value and the previous crn field, perform train lookup by crn. if train is not found, prepare an unknown train notification message with the crn and send it. if train is found, log the arrival acknowledgment at border message, create a log entry with action code 'zzz', train crn, and message '350 ack - arrival ack at border', and spawn the log entry. then move the cbsa release reference id to the cargo key value and perform cargo border update processing. if the cargo is a master manifest, retrieve all follower manifests (maximum 100) linked to the master and update each follower with border arrival acknowledgment.
Given
An X4 segment is being processed with entry type code equal to '992' and the message type is conventional 350
When
The related document ID (CRN) in positions 1-25 is different from the previous CRN
Then
Move the related document ID to the train key value and the previous CRN field, perform train lookup by CRN. If train is not found, prepare an unknown train notification message with the CRN and send it. If train is found, log the arrival acknowledgment at border message, create a log entry with action code 'ZZZ', train CRN, and message '350 ACK - ARRIVAL ACK AT BORDER', and spawn the log entry. Then move the CBSA release reference ID to the cargo key value and perform cargo border update processing. If the cargo is a master manifest, retrieve all follower manifests (maximum 100) linked to the master and update each follower with border arrival acknowledgment
R-GCX126-cbl-00083 X4 - Release/Disposition Extract Release Reference Extract Date and Time
Validation Rules
Business View: Assuming an x4 segment is being processed with entry type code equal to '992' and the message type is conventional 350 during the 'X4 - Release/Disposition Extract Release Reference Extract Date and Time' routine, when the related document id (crn) in positions 1-25 equals the previous crn, the system executes logic to ensure that continue to the next segment without performing any train or cargo processing.
Given
An X4 segment is being processed with entry type code equal to '992' and the message type is conventional 350
When
The related document ID (CRN) in positions 1-25 equals the previous CRN
Then
Continue to the next segment without performing any train or cargo processing
R-GCX126-cbl-00084 X4 - Release/Disposition Extract Release Reference Extract Date and Time
Process Rules
Business View: <EXCLUSION CRITERIA> If an x4 segment is being processed, and the entry type code is not equal to '992' or the message type is not conventional 350 occurs during the 'X4 - Release/Disposition Extract Release Reference Extract Date and Time' routine, then the system must guarantee that set the segment previous x4 flag to true and set the x4 segment found flag to true.
EXCLUDING
An X4 segment is being processed
When
The entry type code is not equal to '992' OR the message type is not conventional 350
Then
Set the segment previous X4 flag to TRUE and set the X4 segment found flag to TRUE
R-GCX126-cbl-00085 SE - Transaction Set Trailer Set Trailer Found Flag Set End Found Flag
Process Rules
Business View: Assuming the se segment is being processed and the k1 segment found flag is true during the 'SE - Transaction Set Trailer Set Trailer Found Flag Set End Found Flag' routine, when the remark index is greater than 0 and there are k1 remarks stored in the remark array, the system executes logic to ensure that for each remark from index 1 to the remark index, if the remark is not spaces, initialize the k1 segment structure, move the remark to the k1 segment, initialize the information message field, concatenate 'edi 350 k1: ' with the first free-form message field and move to the information message field, and log the cargo information message. if the second free-form message field is not spaces, initialize the information message field, concatenate 'edi 350 k1: ' with the second free-form message field and move to the information message field, and log the cargo information message.
Given
The SE segment is being processed and the K1 segment found flag is TRUE
When
The remark index is greater than 0 and there are K1 remarks stored in the remark array
Then
For each remark from index 1 to the remark index, if the remark is not spaces, initialize the K1 segment structure, move the remark to the K1 segment, initialize the information message field, concatenate 'EDI 350 K1: ' with the first free-form message field and move to the information message field, and log the cargo information message. If the second free-form message field is not spaces, initialize the information message field, concatenate 'EDI 350 K1: ' with the second free-form message field and move to the information message field, and log the cargo information message
R-GCX126-cbl-00086 SE - Transaction Set Trailer Set Trailer Found Flag Set End Found Flag
Process Rules
Business View: Assuming the se segment is being processed and the n7 segment found flag is true during the 'SE - Transaction Set Trailer Set Trailer Found Flag Set End Found Flag' routine, when there are log entries in the log array from index 1 to 50, the system executes logic to ensure that for each log line from index 1 until the log line is spaces or index exceeds 50, initialize the information message field, move the log line to the information message field, and log the cargo information message.
Given
The SE segment is being processed and the N7 segment found flag is TRUE
When
There are log entries in the log array from index 1 to 50
Then
For each log line from index 1 until the log line is spaces or index exceeds 50, initialize the information message field, move the log line to the information message field, and log the cargo information message
R-GCX126-cbl-00520 Is Conveyance 350 AND Entry Type = 992?
Decision Rules
Business View: Assuming an x4 segment is being processed from an edi 350 message during the 'Is Conveyance 350 AND Entry Type = 992?' routine, when the message type is conveyance 350 (ws-conv-350 is true) and the x4 entry type code (x4-03-entry-typ-cde) equals '992', the system executes logic to ensure that process as train arrival acknowledgment at border, otherwise process as cargo release segment and set x4 segment found flag for cargo processing.
Given
An X4 segment is being processed from an EDI 350 message
When
The message type is Conveyance 350 (WS-CONV-350 is true) AND the X4 entry type code (X4-03-ENTRY-TYP-CDE) equals '992'
Then
Process as train arrival acknowledgment at border, otherwise process as cargo release segment and set X4 segment found flag for cargo processing
R-GCX126-cbl-00521 Is Train ID Same as Previous?
Validation Rules
Business View: Assuming a conveyance 350 message with entry type 992 is being processed during the 'Is Train ID Same as Previous?' routine, when the train release document id from x4-04-rel-doc-id (first 25 characters) equals the previously processed crn stored in ws-prev-crn, the system executes logic to ensure that skip processing this x4 segment and continue to next segment, otherwise proceed with train verification.
Given
A conveyance 350 message with entry type 992 is being processed
When
The train release document ID from X4-04-REL-DOC-ID (first 25 characters) equals the previously processed CRN stored in WS-PREV-CRN
Then
Skip processing this X4 segment and continue to next segment, otherwise proceed with train verification
R-GCX126-cbl-00522 Extract Train ID from X4-04-REL-DOC-ID
Process Rules
Business View: Assuming a new train release number is identified in the x4 segment during the 'Extract Train ID from X4-04-REL-DOC-ID' routine, when the x4-04-rel-doc-id (first 25 characters) is different from the previous crn, the system executes logic to ensure that move x4-04-rel-doc-id (first 25 characters) to b4-key-value for train lookup and to ws-prev-crn for duplicate tracking.
Given
A new train release number is identified in the X4 segment
When
The X4-04-REL-DOC-ID (first 25 characters) is different from the previous CRN
Then
Move X4-04-REL-DOC-ID (first 25 characters) to B4-KEY-VALUE for train lookup and to WS-PREV-CRN for duplicate tracking
R-GCX126-cbl-00523 Verify Train Exists in System
Action Rules
Business View: Assuming a train release number (crn) has been extracted from the x4 segment during the 'Verify Train Exists in System' routine, when the system performs a database lookup using the crn as the key value in the train root segment (b4rt), the system executes logic to ensure that return the train record if found, otherwise return a not found status code in cc-status-code.
Given
A train release number (CRN) has been extracted from the X4 segment
When
The system performs a database lookup using the CRN as the key value in the train root segment (B4RT)
Then
Return the train record if found, otherwise return a not found status code in CC-STATUS-CODE
R-GCX126-cbl-00524 Prepare Error Report: UNKNOWN TRAIN ENTRY IN EDI 350
Decision Rules
Business View: <EXCLUSION CRITERIA> If a train lookup has been performed using the crn from x4-04-rel-doc-id, and the train is not found (cc-status-code is not spaces) occurs during the 'Prepare Error Report: UNKNOWN TRAIN ENTRY IN EDI 350' routine, then the system must guarantee that prepare error message 'unknown train entry in edi 350' concatenated with the crn in detail line 1, add message 'this crn was not found.' in detail line 3, set message line count to 4, and set message type to unknown.
EXCLUDING
A train lookup has been performed using the CRN from X4-04-REL-DOC-ID
When
The train is not found (CC-STATUS-CODE is not spaces)
Then
Prepare error message 'UNKNOWN TRAIN ENTRY IN EDI 350' concatenated with the CRN in detail line 1, add message 'THIS CRN WAS NOT FOUND.' in detail line 3, set message line count to 4, and set message type to unknown
R-GCX126-cbl-00525 Send Error to Merlin
Action Rules
Business View: Assuming an unknown train error message has been prepared with crn details during the 'Send Error to Merlin' routine, when the error preparation is complete, the system executes logic to ensure that invoke the merlin email send process (z110-prep-emcsend) to transmit the error notification to the configured recipients.
Given
An unknown train error message has been prepared with CRN details
When
The error preparation is complete
Then
Invoke the Merlin email send process (Z110-PREP-EMCSEND) to transmit the error notification to the configured recipients
R-GCX126-cbl-00526 Log Train Arrival Action Code: ZZZ Message: 350 ACK - ARRIVAL ACK AT BORDER
Process Rules
Business View: Assuming a train has been successfully verified in the system using the crn during the 'Log Train Arrival Action Code: ZZZ Message: 350 ACK - ARRIVAL ACK AT BORDER' routine, when the train record exists (cc-status-code equals spaces), the system executes logic to ensure that create a log entry with current machine date in gcx105-date, current machine time in gcx105-time, action code 'zzz' in gcx105-action-code, the crn (first 25 characters of x4-04-rel-doc-id) in gcx105-train-or-us-ccn, set cargo type to canadian train (gcx105-ca-train), message '350 ack - arrival ack at border' in gcx105-message, and spawn the log entry process (z300-spawn-gct1051e).
Given
A train has been successfully verified in the system using the CRN
When
The train record exists (CC-STATUS-CODE equals spaces)
Then
Create a log entry with current machine date in GCX105-DATE, current machine time in GCX105-TIME, action code 'ZZZ' in GCX105-ACTION-CODE, the CRN (first 25 characters of X4-04-REL-DOC-ID) in GCX105-TRAIN-OR-US-CCN, set cargo type to Canadian train (GCX105-CA-TRAIN), message '350 ACK - ARRIVAL ACK AT BORDER' in GCX105-MESSAGE, and spawn the log entry process (Z300-SPAWN-GCT1051E)
R-GCX126-cbl-00527 Update Cargo Border Arrival Status
Process Rules
Business View: Assuming a valid train arrival has been logged and cargo exists for the release reference id during the 'Update Cargo Border Arrival Status' routine, when the cargo is found using x4-01-cbsa-rel-ref-id (first 25 characters) as the ccn key, the system executes logic to ensure that log the message '350 ack - arrival ack at border' to cargo information, set the cargo border arrival acknowledgment flag (gccc-border-arrival-ack) to true, and replace the cargo record in the database.
Given
A valid train arrival has been logged and cargo exists for the release reference ID
When
The cargo is found using X4-01-CBSA-REL-REF-ID (first 25 characters) as the CCN key
Then
Log the message '350 ACK - ARRIVAL ACK AT BORDER' to cargo information, set the cargo border arrival acknowledgment flag (GCCC-BORDER-ARRIVAL-ACK) to true, and replace the cargo record in the database
R-GCX126-cbl-00528 Is Master Manifest?
Decision Rules
Business View: Assuming a cargo record has been updated with border arrival acknowledgment during the 'Is Master Manifest?' routine, when the cargo master manifest indicator (gccc-master-mfst) is true, the system executes logic to ensure that proceed to retrieve and update all follower manifests, otherwise skip follower processing and continue to next segment.
Given
A cargo record has been updated with border arrival acknowledgment
When
The cargo master manifest indicator (GCCC-MASTER-MFST) is true
Then
Proceed to retrieve and update all follower manifests, otherwise skip follower processing and continue to next segment
R-GCX126-cbl-00529 Retrieve All Follower Manifests for Master up to 100
Process Rules
Business View: Assuming a master manifest has been identified with ccn key stored in gccc-ccn-key during the 'Retrieve All Follower Manifests for Master up to 100' routine, when the system performs sequential reads of cargo records using the master ccn as parent key (gccc-master-mfst-ccn), the system executes logic to ensure that collect all follower manifest ccn keys (where gccc-follower-mfst is true and master ccn matches x4-01-cbsa-rel-ref-id first 25 characters) into ws-follower-mani array up to a maximum of 100 entries, stopping when no more followers are found or limit is reached.
Given
A master manifest has been identified with CCN key stored in GCCC-CCN-KEY
When
The system performs sequential reads of cargo records using the master CCN as parent key (GCCC-MASTER-MFST-CCN)
Then
Collect all follower manifest CCN keys (where GCCC-FOLLOWER-MFST is true and master CCN matches X4-01-CBSA-REL-REF-ID first 25 characters) into WS-FOLLOWER-MANI array up to a maximum of 100 entries, stopping when no more followers are found or limit is reached
R-GCX126-cbl-00530 Update Border Arrival for Each Follower
Process Rules
Business View: Assuming a list of follower manifest ccn keys has been retrieved and stored in ws-follower-mani array during the 'Update Border Arrival for Each Follower' routine, when processing each follower ccn from index 1 to the count of followers found, the system executes logic to ensure that for each follower ccn: retrieve the cargo record using the ccn as key, if cargo is found then log message '350 ack - arrival ack at border', set the border arrival acknowledgment flag (gccc-border-arrival-ack) to true, and replace the cargo record.
Given
A list of follower manifest CCN keys has been retrieved and stored in WS-FOLLOWER-MANI array
When
Processing each follower CCN from index 1 to the count of followers found
Then
For each follower CCN: retrieve the cargo record using the CCN as key, if cargo is found then log message '350 ACK - ARRIVAL ACK AT BORDER', set the border arrival acknowledgment flag (GCCC-BORDER-ARRIVAL-ACK) to true, and replace the cargo record
R-GCX126-cbl-00531 Set X4 Segment Found Flag for Cargo Processing
Process Rules
Business View: <EXCLUSION CRITERIA> If an x4 segment is being processed, and the message is not a conveyance 350 (ws-conv-350 is false) or the entry type code is not '992' occurs during the 'Set X4 Segment Found Flag for Cargo Processing' routine, then the system must guarantee that set the previous x4 segment indicator (ws-segment-prev-x4) to true and set the x4 segment found flag (ws-x4-segment-found) to true to enable cargo release processing in subsequent steps.
EXCLUDING
An X4 segment is being processed
When
The message is not a conveyance 350 (WS-CONV-350 is false) OR the entry type code is not '992'
Then
Set the previous X4 segment indicator (WS-SEGMENT-PREV-X4) to true and set the X4 segment found flag (WS-X4-SEGMENT-FOUND) to true to enable cargo release processing in subsequent steps
R-GCX126-cbl-00721 Receive Train ID from X4 Segment
Process Rules
Business View: Assuming an x4 segment is being processed with entry type code '992' in a conventional 350 message during the 'Receive Train ID from X4 Segment' routine, when the system extracts the related document id from position 1 to 25 of the x4-04-rel-doc-id field, the system executes logic to ensure that the extracted train id is stored as the search key for train record lookup.
Given
An X4 segment is being processed with entry type code '992' in a CONVENTIONAL 350 message
When
The system extracts the related document ID from position 1 to 25 of the X4-04-REL-DOC-ID field
Then
The extracted train ID is stored as the search key for train record lookup
R-GCX126-cbl-00722 Set Train ID as Search Key
Process Rules
Business View: Assuming a train id has been extracted from the x4 segment related document id (positions 1-25) during the 'Set Train ID as Search Key' routine, when the system prepares to search for the train record in the database, the system executes logic to ensure that the train id is moved to the b4-key-value field for database query.
Given
A train ID has been extracted from the X4 segment related document ID (positions 1-25)
When
The system prepares to search for the train record in the database
Then
The train ID is moved to the B4-KEY-VALUE field for database query
R-GCX126-cbl-00723 Call Database to Retrieve Train Record
Action Rules
Business View: Assuming the b4-key-value contains a valid train id from the x4 segment during the 'Call Database to Retrieve Train Record' routine, when the system executes the z5000-gu-b4-train procedure, the system executes logic to ensure that a database get unique operation is performed on the train root segment using the provided train id.
Given
The B4-KEY-VALUE contains a valid train ID from the X4 segment
When
The system executes the Z5000-GU-B4-TRAIN procedure
Then
A database GET UNIQUE operation is performed on the train root segment using the provided train ID
R-GCX126-cbl-00725 Set Train Found Status
Process Rules
Business View: Assuming a train record has been successfully retrieved from the database with a blank status code during the 'Set Train Found Status' routine, when the system processes the found train record, the system executes logic to ensure that the system logs an arrival acknowledgment message with action code 'zzz', the train id, and the message '350 ack - arrival ack at border' by spawning the gct1051e process.
Given
A train record has been successfully retrieved from the database with a blank status code
When
The system processes the found train record
Then
The system logs an arrival acknowledgment message with action code 'ZZZ', the train ID, and the message '350 ACK - ARRIVAL ACK AT BORDER' by spawning the GCT1051E process
R-GCX126-cbl-00727 Prepare Error Report
Process Rules
Business View: <EXCLUSION CRITERIA> If a train record was not found in the database, and the system begins error notification preparation occurs during the 'Prepare Error Report' routine, then the system must guarantee that the first detail line of the merlin report is cleared to spaces to prepare for the error message.
EXCLUDING
A train record was not found in the database
When
The system begins error notification preparation
Then
The first detail line of the Merlin report is cleared to spaces to prepare for the error message
R-GCX126-cbl-00728 Add Train ID to Error Message
Process Rules
Business View: <EXCLUSION CRITERIA> If an error report is being prepared for a train not found in the system, and the system constructs the error message occurs during the 'Add Train ID to Error Message' routine, then the system must guarantee that the message 'unknown train entry in edi 350 ' concatenated with the train id (positions 1-25 of x4-04-rel-doc-id) is placed in the first detail line of the merlin report.
EXCLUDING
An error report is being prepared for a train not found in the system
When
The system constructs the error message
Then
The message 'UNKNOWN TRAIN ENTRY IN EDI 350 ' concatenated with the train ID (positions 1-25 of X4-04-REL-DOC-ID) is placed in the first detail line of the Merlin report
R-GCX126-cbl-00729 Add 'Train Not Found' Message
Process Rules
Business View: Assuming the primary error message with the train id has been constructed during the 'Add 'Train Not Found' Message' routine, when the system adds supplementary error information, the system executes logic to ensure that the message 'this crn was not found.' is placed in the third detail line of the merlin report and the line counter is set to 4.
Given
The primary error message with the train ID has been constructed
When
The system adds supplementary error information
Then
The message 'THIS CRN WAS NOT FOUND.' is placed in the third detail line of the Merlin report and the line counter is set to 4
R-GCX126-cbl-00731 Verify Train Exists in System
Process Rules
Business View: Assuming an x4 segment with entry type '992' is being processed in a conventional 350 message during the 'Verify Train Exists in System' routine, when the related document id (positions 1-25) matches the previously processed train id stored in ws-prev-crn, the system executes logic to ensure that the system skips all train verification and processing steps and continues to the next segment.
Given
An X4 segment with entry type '992' is being processed in a CONVENTIONAL 350 message
When
The related document ID (positions 1-25) matches the previously processed train ID stored in WS-PREV-CRN
Then
The system skips all train verification and processing steps and continues to the next segment
R-GCX126-cbl-00732 Retrieve Cargo Record by CCN from X4 Segment
Action Rules
Business View: Assuming an x4 segment contains a cbsa release reference id in position 1-25 during the 'Retrieve Cargo Record by CCN from X4 Segment' routine, when the system processes the x4 segment for border arrival acknowledgment, the system executes logic to ensure that the system retrieves the cargo record using the cbsa release reference id as the ccn key.
Given
An X4 segment contains a CBSA Release Reference ID in position 1-25
When
The system processes the X4 segment for border arrival acknowledgment
Then
The system retrieves the cargo record using the CBSA Release Reference ID as the CCN key
R-GCX126-cbl-00733 Cargo Found?
Validation Rules
Business View: Assuming a cargo retrieval operation has been performed using the ccn from x4 segment during the 'Cargo Found?' routine, when the system checks the cargo record status, the system executes logic to ensure that if cargo is found and not deleted, proceed with border arrival update; otherwise, skip the update process.
Given
A cargo retrieval operation has been performed using the CCN from X4 segment
When
The system checks the cargo record status
Then
If cargo is found and not deleted, proceed with border arrival update; otherwise, skip the update process
R-GCX126-cbl-00735 Log Message: '350 ACK - ARRIVAL ACK AT BORDER'
Process Rules
Business View: Assuming the border arrival acknowledgment flag has been set on the cargo record during the 'Log Message: '350 ACK - ARRIVAL ACK AT BORDER'' routine, when the system logs the border arrival event, the system executes logic to ensure that the system creates a log entry with message '350 ack - arrival ack at border' including the ccn and current date/time.
Given
The border arrival acknowledgment flag has been set on the cargo record
When
The system logs the border arrival event
Then
The system creates a log entry with message '350 ACK - ARRIVAL ACK AT BORDER' including the CCN and current date/time
R-GCX126-cbl-00737 Is Master Manifest?
Decision Rules
Business View: Assuming a cargo record has been successfully updated with border arrival acknowledgment during the 'Is Master Manifest?' routine, when the system evaluates the manifest type, the system executes logic to ensure that if the cargo is a master manifest, proceed to retrieve and update all associated follower manifests; otherwise, complete the process.
Given
A cargo record has been successfully updated with border arrival acknowledgment
When
The system evaluates the manifest type
Then
If the cargo is a master manifest, proceed to retrieve and update all associated follower manifests; otherwise, complete the process
R-GCX126-cbl-00738 Retrieve All Follower Manifests for Master CCN
Action Rules
Business View: Assuming the cargo record is identified as a master manifest during the 'Retrieve All Follower Manifests for Master CCN' routine, when the system initiates follower manifest retrieval, the system executes logic to ensure that the system retrieves all follower manifests where the master manifest ccn matches the current cargo ccn, up to a maximum of 100 followers.
Given
The cargo record is identified as a master manifest
When
The system initiates follower manifest retrieval
Then
The system retrieves all follower manifests where the master manifest CCN matches the current cargo CCN, up to a maximum of 100 followers
R-GCX126-cbl-00739 More Followers? Max 100
Process Rules
Business View: Assuming follower manifests are being retrieved for a master manifest during the 'More Followers? Max 100' routine, when the system checks for the next follower manifest, the system executes logic to ensure that if more follower manifests exist and the count is less than or equal to 100, continue processing; otherwise, complete the follower processing.
Given
Follower manifests are being retrieved for a master manifest
When
The system checks for the next follower manifest
Then
If more follower manifests exist and the count is less than or equal to 100, continue processing; otherwise, complete the follower processing
R-GCX126-cbl-00740 Get Next Follower Manifest CCN
Action Rules
Business View: <EXCLUSION CRITERIA> If there are more follower manifests to process and the maximum limit has not been reached, and the system advances to the next follower occurs during the 'Get Next Follower Manifest CCN' routine, then the system must guarantee that the system retrieves the ccn of the next follower manifest from the follower manifest array.
EXCLUDING
There are more follower manifests to process and the maximum limit has not been reached
When
The system advances to the next follower
Then
The system retrieves the CCN of the next follower manifest from the follower manifest array
R-GCX126-cbl-00741 Retrieve Follower Cargo Record
Action Rules
Business View: Assuming a follower manifest ccn has been identified during the 'Retrieve Follower Cargo Record' routine, when the system retrieves the follower cargo record, the system executes logic to ensure that the system performs a cargo retrieval operation using the follower ccn as the key.
Given
A follower manifest CCN has been identified
When
The system retrieves the follower cargo record
Then
The system performs a cargo retrieval operation using the follower CCN as the key
R-GCX126-cbl-00744 Log Arrival Message for Follower CCN
Process Rules
Business View: Assuming the border arrival acknowledgment flag has been set on the follower cargo record during the 'Log Arrival Message for Follower CCN' routine, when the system logs the border arrival event for the follower, the system executes logic to ensure that the system creates a log entry with message '350 ack - arrival ack at border' including the follower ccn and current date/time.
Given
The border arrival acknowledgment flag has been set on the follower cargo record
When
The system logs the border arrival event for the follower
Then
The system creates a log entry with message '350 ACK - ARRIVAL ACK AT BORDER' including the follower CCN and current date/time
R-GCX126-cbl-00087 Set M10 Segment Found Flag
Process Rules
Business View: Assuming an m10 segment is being processed from the edi 350 message during the 'Set M10 Segment Found Flag' routine, when the m10 segment processing begins, the system executes logic to ensure that the m10 segment found indicator is set to true.
Given
An M10 segment is being processed from the EDI 350 message
When
The M10 segment processing begins
Then
The M10 segment found indicator is set to true
R-GCX126-cbl-00088 Initialize M10 Segment Structure
Process Rules
Business View: Assuming the m10 segment found flag has been set during the 'Initialize M10 Segment Structure' routine, when preparing to load m10 segment data, the system executes logic to ensure that the m10 segment data structure is initialized to spaces/zeros.
Given
The M10 segment found flag has been set
When
Preparing to load M10 segment data
Then
The M10 segment data structure is initialized to spaces/zeros
R-GCX126-cbl-00089 Move MQS Table Entry to M10 Segment
Process Rules
Business View: Assuming the m10 segment structure has been initialized and the current line in the message queue table contains an m10 segment during the 'Move MQS Table Entry to M10 Segment' routine, when loading m10 segment data, the system executes logic to ensure that the message queue table entry at the current line position is moved to the m10 segment structure.
Given
The M10 segment structure has been initialized and the current line in the message queue table contains an M10 segment
When
Loading M10 segment data
Then
The message queue table entry at the current line position is moved to the M10 segment structure
R-GCX126-cbl-00090 Extract Notice Document Type Code
Definitional Rules
Business View: Assuming the m10 segment has been loaded with data from the message queue during the 'Extract Notice Document Type Code' routine, when extracting customs notice information, the system executes logic to ensure that the notice document type code (m10-05-notice-doc-typ-cde) is available from the m10 segment for business processing.
Given
The M10 segment has been loaded with data from the message queue
When
Extracting customs notice information
Then
The notice document type code (M10-05-NOTICE-DOC-TYP-CDE) is available from the M10 segment for business processing
R-GCX126-cbl-00091 Extract CBSA Reference/CCN
Definitional Rules
Business View: Assuming the m10 segment has been loaded with data from the message queue during the 'Extract CBSA Reference/CCN' routine, when extracting cargo identification information, the system executes logic to ensure that the ccn reference (m10-07-ccn) containing up to 25 characters is available from the m10 segment for cargo lookup and processing.
Given
The M10 segment has been loaded with data from the message queue
When
Extracting cargo identification information
Then
The CCN reference (M10-07-CCN) containing up to 25 characters is available from the M10 segment for cargo lookup and processing
R-GCX126-cbl-00092 Set P4 Segment Found Flag to TRUE
Process Rules
Business View: Assuming an edi 350 message is being processed and a p4 segment type is identified in the message queue table entry during the 'Set P4 Segment Found Flag to TRUE' routine, when the p4 segment processing routine is invoked, the system executes logic to ensure that the system sets the p4 segment found indicator to true to track that port information has been received.
Given
An EDI 350 message is being processed and a P4 segment type is identified in the message queue table entry
When
The P4 segment processing routine is invoked
Then
The system sets the P4 segment found indicator to TRUE to track that port information has been received
R-GCX126-cbl-00093 Initialize P4 Segment Structure
Process Rules
Business View: Assuming a p4 segment is ready to be processed from the edi 350 message during the 'Initialize P4 Segment Structure' routine, when the p4 segment processing begins, the system executes logic to ensure that the system initializes the p4 segment data structure by clearing all fields to spaces or zeros.
Given
A P4 segment is ready to be processed from the EDI 350 message
When
The P4 segment processing begins
Then
The system initializes the P4 segment data structure by clearing all fields to spaces or zeros
R-GCX126-cbl-00094 Move MQ Table Entry to P4 Segment
Definitional Rules
Business View: Assuming the p4 segment structure has been initialized and the message queue table contains the p4 segment data at the current line position during the 'Move MQ Table Entry to P4 Segment' routine, when the system processes the p4 segment entry, the system executes logic to ensure that the system moves the complete message queue table entry data to the p4 segment structure, making port code (p4-01-port-cde) and sub-location code (p4-02-sub-loc-cde) available for use.
Given
The P4 segment structure has been initialized and the message queue table contains the P4 segment data at the current line position
When
The system processes the P4 segment entry
Then
The system moves the complete message queue table entry data to the P4 segment structure, making port code (P4-01-PORT-CDE) and sub-location code (P4-02-SUB-LOC-CDE) available for use
R-GCX126-cbl-00095 P4 Segment Ready for Processing
Process Rules
Business View: Assuming the p4 segment data has been successfully moved from the message queue table entry to the p4 segment structure during the 'P4 Segment Ready for Processing' routine, when the p4 segment processing completes, the system executes logic to ensure that the system has the port code (4-character identifier) and sub-location code available in the p4 segment structure for use in cargo processing, release operations, and notification messages.
Given
The P4 segment data has been successfully moved from the message queue table entry to the P4 segment structure
When
The P4 segment processing completes
Then
The system has the port code (4-character identifier) and sub-location code available in the P4 segment structure for use in cargo processing, release operations, and notification messages
R-GCX126-cbl-00096 MATCHED - Document Matched
Decision Rules
Business View: Assuming an edi 350 message is being processed and a v9 segment has been extracted from the message queue table entry during the 'MATCHED - Document Matched' routine, when the v9 notice reason code indicates matched status (v9-02-matched is true), the system executes logic to ensure that the system continues processing without updating cargo status or logging additional messages.
Given
An EDI 350 message is being processed and a V9 segment has been extracted from the message queue table entry
When
The V9 notice reason code indicates MATCHED status (V9-02-MATCHED is true)
Then
The system continues processing without updating cargo status or logging additional messages
R-GCX126-cbl-00097 NOT-MATCHED - Document Not Matched
Action Rules
Business View: Assuming an edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system during the 'NOT-MATCHED - Document Not Matched' routine, when the v9 notice reason code indicates not-matched status (v9-02-not-matched is true), the system executes logic to ensure that the system logs the message 'edi 350: doc not matched' to the cargo information log.
Given
An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system
When
The V9 notice reason code indicates NOT-MATCHED status (V9-02-NOT-MATCHED is true)
Then
The system logs the message 'EDI 350: DOC NOT MATCHED' to the cargo information log
R-GCX126-cbl-00098 CARGO-COMPLETE - Cargo Complete
Action Rules
Business View: Assuming an edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system during the 'CARGO-COMPLETE - Cargo Complete' routine, when the v9 notice reason code indicates cargo-complete status (v9-02-cargo-complete is true), the system executes logic to ensure that the system logs the message 'edi 350: cargo complete message' to the cargo information log.
Given
An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system
When
The V9 notice reason code indicates CARGO-COMPLETE status (V9-02-CARGO-COMPLETE is true)
Then
The system logs the message 'EDI 350: CARGO COMPLETE MESSAGE' to the cargo information log
R-GCX126-cbl-00099 DOC-PKG-COMPLETE - Document Package Complete
Decision Rules
Business View: <EXCLUSION CRITERIA> If an edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system and x4 segment contains cbsa release reference id, and the v9 notice reason code indicates doc-pkg-complete status (v9-02-doc-pkg-complete is true) and either the first 15 characters of x4 cbsa release reference id do not match the broker entry or the first 14 characters do not match the customs transaction number and the x4 cbsa release reference id is not spaces occurs during the 'DOC-PKG-COMPLETE - Document Package Complete' routine, then the system must guarantee that the system updates the cargo broker entry with the first 15 characters of x4 cbsa release reference id, updates the customs transaction number with the first 14 characters, sets the broker date to current machine date, sets the broker time to current machine time (first 4 digits), logs the message 'edi 350: doc pkg complete : ' concatenated with the first 15 characters of x4 cbsa release reference id, and replaces the cargo record in the database.
EXCLUDING
An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and X4 segment contains CBSA release reference ID
When
The V9 notice reason code indicates DOC-PKG-COMPLETE status (V9-02-DOC-PKG-COMPLETE is true) and either the first 15 characters of X4 CBSA release reference ID do not match the broker entry OR the first 14 characters do not match the customs transaction number AND the X4 CBSA release reference ID is not spaces
Then
The system updates the cargo broker entry with the first 15 characters of X4 CBSA release reference ID, updates the customs transaction number with the first 14 characters, sets the broker date to current machine date, sets the broker time to current machine time (first 4 digits), logs the message 'EDI 350: DOC PKG COMPLETE : ' concatenated with the first 15 characters of X4 CBSA release reference ID, and replaces the cargo record in the database
R-GCX126-cbl-00100 DOC-NOT-ON-FILE - Document Not On File
Decision Rules
Business View: Assuming an edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system and x4 segment contains release document type code during the 'DOC-NOT-ON-FILE - Document Not On File' routine, when the v9 notice reason code indicates doc-not-on-file status (v9-02-doc-not-on-file is true) and the first character of x4 release document type code equals 'r', the system executes logic to ensure that the system logs the message 'edi 350: doc not on file for release ' concatenated with the first 15 characters of x4 cbsa release reference id to the cargo information log.
Given
An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and X4 segment contains release document type code
When
The V9 notice reason code indicates DOC-NOT-ON-FILE status (V9-02-DOC-NOT-ON-FILE is true) and the first character of X4 release document type code equals 'R'
Then
The system logs the message 'EDI 350: DOC NOT ON FILE FOR RELEASE ' concatenated with the first 15 characters of X4 CBSA release reference ID to the cargo information log
R-GCX126-cbl-00101 DOC-NOT-ON-FILE - Document Not On File
Decision Rules
Business View: <EXCLUSION CRITERIA> If an edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system and x4 segment contains release document type code, and the v9 notice reason code indicates doc-not-on-file status (v9-02-doc-not-on-file is true) and the first character of x4 release document type code does not equal 'r' occurs during the 'DOC-NOT-ON-FILE - Document Not On File' routine, then the system must guarantee that the system logs the message 'edi 350:doc not on file h-bill close ' concatenated with the first 25 characters of x4 cbsa release reference id to the cargo information log.
EXCLUDING
An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and X4 segment contains release document type code
When
The V9 notice reason code indicates DOC-NOT-ON-FILE status (V9-02-DOC-NOT-ON-FILE is true) and the first character of X4 release document type code does not equal 'R'
Then
The system logs the message 'EDI 350:DOC NOT ON FILE H-BILL CLOSE ' concatenated with the first 25 characters of X4 CBSA release reference ID to the cargo information log
R-GCX126-cbl-00102 REPORTED - Cargo Reported
Action Rules
Business View: Assuming an edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system during the 'REPORTED - Cargo Reported' routine, when the v9 notice reason code indicates reported status (v9-02-reported is true), the system executes logic to ensure that the system logs the message 'edi 350: cargo reported' to the cargo information log.
Given
An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system
When
The V9 notice reason code indicates REPORTED status (V9-02-REPORTED is true)
Then
The system logs the message 'EDI 350: CARGO REPORTED' to the cargo information log
R-GCX126-cbl-00103 ARRIVED - Cargo Arrived at Port
Action Rules
Business View: Assuming an edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system and p4 segment contains port code during the 'ARRIVED - Cargo Arrived at Port' routine, when the v9 notice reason code indicates arrived status (v9-02-arrived is true), the system executes logic to ensure that the system logs the message 'edi 350: cargo arrived at port ' concatenated with the first 4 characters of p4 port code to the cargo information log.
Given
An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and P4 segment contains port code
When
The V9 notice reason code indicates ARRIVED status (V9-02-ARRIVED is true)
Then
The system logs the message 'EDI 350: CARGO ARRIVED AT PORT ' concatenated with the first 4 characters of P4 port code to the cargo information log
R-GCX126-cbl-00104 RELEASED - Cargo Released
Process Rules
Business View: Assuming an edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system and x4 segment contains cbsa release reference id and p4 segment contains port code during the 'RELEASED - Cargo Released' routine, when the v9 notice reason code indicates released status (v9-02-released is true), the system executes logic to ensure that the system clears destination station numbers, sets release date to current machine date, sets release time to current machine time, sets release by to current user id, sets current status to 'released', sets release status to 'r', sets release type to 'a', clears error or release status index, clears error status, sets release reason to x4 cbsa release reference id (first 15 characters) concatenated with '/' and p4 port code (first 4 characters), logs the message 'edi 350: release : ' concatenated with x4 cbsa release reference id (first 15 characters) and ' at port ' and p4 port code (first 4 characters), processes associated us manifest records, replaces the cargo record in the database, and if the cargo is a master manifest then processes all follower manifests (up to 100) with the same release information.
Given
An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and X4 segment contains CBSA release reference ID and P4 segment contains port code
When
The V9 notice reason code indicates RELEASED status (V9-02-RELEASED is true)
Then
The system clears destination station numbers, sets release date to current machine date, sets release time to current machine time, sets release by to current user ID, sets current status to 'RELEASED', sets release status to 'R', sets release type to 'A', clears error or release status index, clears error status, sets release reason to X4 CBSA release reference ID (first 15 characters) concatenated with '/' and P4 port code (first 4 characters), logs the message 'EDI 350: RELEASE : ' concatenated with X4 CBSA release reference ID (first 15 characters) and ' AT PORT ' and P4 port code (first 4 characters), processes associated US manifest records, replaces the cargo record in the database, and if the cargo is a master manifest then processes all follower manifests (up to 100) with the same release information
R-GCX126-cbl-00105 AUTH-TO-DELIVER - Authorized to Deliver
Decision Rules
Business View: Assuming an edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system and the cargo csa indicator is on during the 'AUTH-TO-DELIVER - Authorized to Deliver' routine, when the v9 notice reason code indicates auth-to-deliver status (v9-02-auth-to-deliver is true), the system executes logic to ensure that the system logs the message 'edi 350: accepted - csa', sets cargo status to csa delivery, sets csa authorization to deliver received flag to true, replaces the cargo record in the database, and processes associated us manifest records.
Given
An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and the cargo CSA indicator is ON
When
The V9 notice reason code indicates AUTH-TO-DELIVER status (V9-02-AUTH-TO-DELIVER is true)
Then
The system logs the message 'EDI 350: ACCEPTED - CSA', sets cargo status to CSA delivery, sets CSA authorization to deliver received flag to true, replaces the cargo record in the database, and processes associated US manifest records
R-GCX126-cbl-00106 AUTH-TO-DELIVER - Authorized to Deliver
Decision Rules
Business View: Assuming an edi 350 message is being processing and a v9 segment has been extracted with cargo found in the system and the cargo csa indicator is off during the 'AUTH-TO-DELIVER - Authorized to Deliver' routine, when the v9 notice reason code indicates auth-to-deliver status (v9-02-auth-to-deliver is true), the system executes logic to ensure that the system logs the message 'edi 350: not accepted - non-csa' and processes associated us manifest records without updating the cargo record.
Given
An EDI 350 message is being processing and a V9 segment has been extracted with cargo found in the system and the cargo CSA indicator is OFF
When
The V9 notice reason code indicates AUTH-TO-DELIVER status (V9-02-AUTH-TO-DELIVER is true)
Then
The system logs the message 'EDI 350: NOT ACCEPTED - NON-CSA' and processes associated US manifest records without updating the cargo record
R-GCX126-cbl-00107 HELD - Goods Held for Examination
Decision Rules
Business View: Assuming an edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system during the 'HELD - Goods Held for Examination' routine, when the v9 notice reason code indicates held status (v9-02-held is true), the system executes logic to ensure that the system logs the message 'edi 350: goods held for examination', sets cargo status to hold, replaces the cargo record in the database, and if the first 4 characters of the cargo ccn equal '6105' then prepares a merlin hold notification containing equipment id, waybill number, ccn, destination station name and state, and manifest upon station name, and sends the notification to the merlin system.
Given
An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system
When
The V9 notice reason code indicates HELD status (V9-02-HELD is true)
Then
The system logs the message 'EDI 350: GOODS HELD FOR EXAMINATION', sets cargo status to HOLD, replaces the cargo record in the database, and if the first 4 characters of the cargo CCN equal '6105' then prepares a Merlin hold notification containing equipment ID, waybill number, CCN, destination station name and state, and manifest upon station name, and sends the notification to the Merlin system
R-GCX126-cbl-00108 DECON - Deconsolidation Release
Process Rules
Business View: Assuming an edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system and p4 segment contains port code during the 'DECON - Deconsolidation Release' routine, when the v9 notice reason code indicates decon status (v9-02-decon is true), the system executes logic to ensure that the system clears destination station numbers, sets release date to current machine date, sets release time to current machine time, sets release by to current user id, sets current status to 'released', sets release status to 'r', sets release type to 'a', clears error or release status index, clears error status, sets release reason to 'deconsolidation at ' concatenated with p4 port code (first 4 characters), logs the message 'edi 350: release via decon at port ' concatenated with p4 port code (first 4 characters), processes associated us manifest records, replaces the cargo record in the database, and if the cargo is a master manifest then processes all follower manifests (up to 100) with the same release information.
Given
An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system and P4 segment contains port code
When
The V9 notice reason code indicates DECON status (V9-02-DECON is true)
Then
The system clears destination station numbers, sets release date to current machine date, sets release time to current machine time, sets release by to current user ID, sets current status to 'RELEASED', sets release status to 'R', sets release type to 'A', clears error or release status index, clears error status, sets release reason to 'DECONSOLIDATION AT ' concatenated with P4 port code (first 4 characters), logs the message 'EDI 350: RELEASE VIA DECON AT PORT ' concatenated with P4 port code (first 4 characters), processes associated US manifest records, replaces the cargo record in the database, and if the cargo is a master manifest then processes all follower manifests (up to 100) with the same release information
R-GCX126-cbl-00109 Other - Invalid Notice Reason
Validation Rules
Business View: <EXCLUSION CRITERIA> If an edi 350 message is being processed and a v9 segment has been extracted with cargo found in the system, and the v9 notice reason code does not match any of the recognized status codes (matched, not-matched, cargo-complete, doc-pkg-complete, doc-not-on-file, reported, arrived, released, auth-to-deliver, held, or decon) occurs during the 'Other - Invalid Notice Reason' routine, then the system must guarantee that the system logs the message 'edi 350: invalid notice reason code ' concatenated with the first 4 characters of the v9 notice reason code to the cargo information log.
EXCLUDING
An EDI 350 message is being processed and a V9 segment has been extracted with cargo found in the system
When
The V9 notice reason code does not match any of the recognized status codes (MATCHED, NOT-MATCHED, CARGO-COMPLETE, DOC-PKG-COMPLETE, DOC-NOT-ON-FILE, REPORTED, ARRIVED, RELEASED, AUTH-TO-DELIVER, HELD, or DECON)
Then
The system logs the message 'EDI 350: INVALID NOTICE REASON CODE ' concatenated with the first 4 characters of the V9 notice reason code to the cargo information log
R-GCX126-cbl-00110 Initialize V9 Segment
Process Rules
Business View: Assuming an edi 350 message is being processed and a v9 segment table id has been identified in the message queue table entry during the 'Initialize V9 Segment' routine, when the system begins processing the v9 segment, the system executes logic to ensure that the system initializes the v9 segment data structure to spaces or zeros.
Given
An EDI 350 message is being processed and a V9 segment table ID has been identified in the message queue table entry
When
The system begins processing the V9 segment
Then
The system initializes the V9 segment data structure to spaces or zeros
R-GCX126-cbl-00111 Move MQS Table Entry to V9 Segment
Process Rules
Business View: Assuming an edi 350 message is being processed and the v9 segment structure has been initialized and the current line in the message queue table contains a v9 segment during the 'Move MQS Table Entry to V9 Segment' routine, when the system processes the v9 segment table entry, the system executes logic to ensure that the system moves the message queue table entry at the current line position to the v9 segment data structure.
Given
An EDI 350 message is being processed and the V9 segment structure has been initialized and the current line in the message queue table contains a V9 segment
When
The system processes the V9 segment table entry
Then
The system moves the message queue table entry at the current line position to the V9 segment data structure
R-GCX126-cbl-00112 Set V9 Segment Found Flag
Process Rules
Business View: Assuming an edi 350 message is being processed and the v9 segment data has been extracted from the message queue table entry during the 'Set V9 Segment Found Flag' routine, when the v9 segment extraction is complete, the system executes logic to ensure that the system sets the v9 segment found flag to true.
Given
An EDI 350 message is being processed and the V9 segment data has been extracted from the message queue table entry
When
The V9 segment extraction is complete
Then
The system sets the V9 segment found flag to true
R-GCX126-cbl-00113 Process K1 Remarks Segment - Store up to 9 free-form message segments in array for later logging
Process Rules
Business View: Assuming an edi 350 message is being processed and a k1 segment entry is encountered in the message queue table at the current line position during the 'Process K1 Remarks Segment - Store up to 9 free-form message segments in array for later logging' routine, when the k1 segment is identified and needs to be stored for later logging, the system executes logic to ensure that the system sets the k1 segment found indicator to true, initializes the k1 segment structure, copies the message queue table entry to the k1 segment structure, increments the k1 remark index counter by 1, and stores the k1 segment in the remark array at the current index position.
Given
An EDI 350 message is being processed and a K1 segment entry is encountered in the message queue table at the current line position
When
The K1 segment is identified and needs to be stored for later logging
Then
The system sets the K1 segment found indicator to true, initializes the K1 segment structure, copies the message queue table entry to the K1 segment structure, increments the K1 remark index counter by 1, and stores the K1 segment in the remark array at the current index position
R-GCX126-cbl-00114 Index Exceeds Maximum of 9?
Validation Rules
Business View: Assuming the k1 remark index counter has been incremented after receiving a k1 segment during the 'Index Exceeds Maximum of 9?' routine, when the k1 remark index counter exceeds the maximum allowed value of 9, the system executes logic to ensure that the system resets the k1 remark index counter to the maximum value of 9, preventing any additional remarks beyond the ninth position from being stored, and the current k1 segment overwrites the remark at position 9.
Given
The K1 remark index counter has been incremented after receiving a K1 segment
When
The K1 remark index counter exceeds the maximum allowed value of 9
Then
The system resets the K1 remark index counter to the maximum value of 9, preventing any additional remarks beyond the ninth position from being stored, and the current K1 segment overwrites the remark at position 9
R-GCX126-cbl-00115 Store K1 Segment in Remark Array at Current Index
Process Rules
Business View: Assuming the k1 remark index counter is within the valid range of 1 to 9 after incrementing during the 'Store K1 Segment in Remark Array at Current Index' routine, when the k1 segment needs to be stored in the remark array, the system executes logic to ensure that the system stores the complete k1 segment structure in the remark array at the position indicated by the current k1 remark index counter value.
Given
The K1 remark index counter is within the valid range of 1 to 9 after incrementing
When
The K1 segment needs to be stored in the remark array
Then
The system stores the complete K1 segment structure in the remark array at the position indicated by the current K1 remark index counter value
R-GCX126-cbl-00116 Set K1 Segment Found Flag
Process Rules
Business View: Assuming a k1 segment is identified in the current message queue table entry during the 'Set K1 Segment Found Flag' routine, when k1 segment processing begins, the system executes logic to ensure that the system sets the k1 segment found indicator flag to true to track that at least one k1 remark segment has been processed in the current transaction.
Given
A K1 segment is identified in the current message queue table entry
When
K1 segment processing begins
Then
The system sets the K1 segment found indicator flag to true to track that at least one K1 remark segment has been processed in the current transaction
R-GCX126-cbl-00117 Set N7 Segment Found Flag
Process Rules
Business View: Assuming an n7 segment is being processed from the edi 350 message queue during the 'Set N7 Segment Found Flag' routine, when the n7 segment processing begins, the system executes logic to ensure that the system sets the n7 segment found indicator to true to track that equipment information is present in this transaction.
Given
An N7 segment is being processed from the EDI 350 message queue
When
The N7 segment processing begins
Then
The system sets the N7 segment found indicator to TRUE to track that equipment information is present in this transaction
R-GCX126-cbl-00118 Initialize N7 Segment Structure
Process Rules
Business View: Assuming an n7 segment is ready to be processed during the 'Initialize N7 Segment Structure' routine, when the n7 segment found flag has been set, the system executes logic to ensure that the system initializes the n7 segment structure to spaces to clear any previous data.
Given
An N7 segment is ready to be processed
When
The N7 segment found flag has been set
Then
The system initializes the N7 segment structure to spaces to clear any previous data
R-GCX126-cbl-00119 Move MQ Table Entry to N7 Segment
Process Rules
Business View: Assuming the n7 segment structure has been initialized during the 'Move MQ Table Entry to N7 Segment' routine, when the current line in the message queue table contains an n7 segment, the system executes logic to ensure that the system moves the message queue table entry data to the n7 segment structure for further processing.
Given
The N7 segment structure has been initialized
When
The current line in the message queue table contains an N7 segment
Then
The system moves the message queue table entry data to the N7 segment structure for further processing
R-GCX126-cbl-00120 Equipment Number Present?
Validation Rules
Business View: Assuming the n7 segment data has been loaded into the working structure during the 'Equipment Number Present?' routine, when the system evaluates the equipment number field in the n7 segment, the system executes logic to ensure that if the equipment number field contains spaces, skip equipment logging; otherwise, proceed to log the equipment number.
Given
The N7 segment data has been loaded into the working structure
When
The system evaluates the equipment number field in the N7 segment
Then
If the equipment number field contains spaces, skip equipment logging; otherwise, proceed to log the equipment number
R-GCX126-cbl-00121 Store Equipment Number in Log Array
Process Rules
Business View: Assuming the n7 segment contains a non-blank equipment number during the 'Store Equipment Number in Log Array' routine, when the equipment number validation passes, the system executes logic to ensure that the system stores the equipment number value from the n7 segment into the log data array at the current log index position.
Given
The N7 segment contains a non-blank equipment number
When
The equipment number validation passes
Then
The system stores the equipment number value from the N7 segment into the log data array at the current log index position
R-GCX126-cbl-00122 Set Log Type as 'EDI 350 EQP#:'
Process Rules
Business View: Assuming the equipment number has been stored in the log data array during the 'Set Log Type as 'EDI 350 EQP#:'' routine, when the log entry is being prepared, the system executes logic to ensure that the system sets the log type field to 'edi 350 eqp#:' to identify this entry as equipment information from an edi 350 message.
Given
The equipment number has been stored in the log data array
When
The log entry is being prepared
Then
The system sets the log type field to 'EDI 350 EQP#:' to identify this entry as equipment information from an EDI 350 message
R-GCX126-cbl-00124 Skip Logging
Decision Rules
Business View: Assuming the n7 segment has been loaded and the equipment number field contains only spaces during the 'Skip Logging' routine, when the equipment number validation determines the field is blank, the system executes logic to ensure that the system skips all equipment logging steps and proceeds to end the n7 segment processing.
Given
The N7 segment has been loaded and the equipment number field contains only spaces
When
The equipment number validation determines the field is blank
Then
The system skips all equipment logging steps and proceeds to end the N7 segment processing
R-GCX126-cbl-00125 Is X4 Segment Entry Type = '992' AND Conveyance 350?
Decision Rules
Business View: Assuming an x4 segment is being processed from the edi 350 message during the 'Is X4 Segment Entry Type = '992' AND Conveyance 350?' routine, when the x4-03-entry-typ-cde equals '992' and the message type indicator ws-conv-350 is true, the system executes logic to ensure that proceed with train arrival processing for conveyance 350.
Given
An X4 segment is being processed from the EDI 350 message
When
The X4-03-ENTRY-TYP-CDE equals '992' AND the message type indicator WS-CONV-350 is true
Then
Proceed with train arrival processing for conveyance 350
R-GCX126-cbl-00126 Is Train ID Same as Previous?
Validation Rules
Business View: Assuming a conveyance 350 message with entry type '992' is being processed and a train id exists in x4-04-rel-doc-id (first 25 characters) during the 'Is Train ID Same as Previous?' routine, when the first 25 characters of x4-04-rel-doc-id equal the value stored in ws-prev-crn, the system executes logic to ensure that skip processing and continue to the next segment without any updates.
Given
A conveyance 350 message with entry type '992' is being processed AND a train ID exists in X4-04-REL-DOC-ID (first 25 characters)
When
The first 25 characters of X4-04-REL-DOC-ID equal the value stored in WS-PREV-CRN
Then
Skip processing and continue to the next segment without any updates
R-GCX126-cbl-00127 Extract Train ID from X4-04-REL-DOC-ID First 25 Characters
Process Rules
Business View: Assuming a conveyance 350 message with entry type '992' is being processed and the train id is different from the previous one during the 'Extract Train ID from X4-04-REL-DOC-ID First 25 Characters' routine, when the first 25 characters of x4-04-rel-doc-id are extracted, the system executes logic to ensure that store the extracted train id in b4-key-value for database lookup and store in ws-prev-crn for duplicate checking.
Given
A conveyance 350 message with entry type '992' is being processed AND the train ID is different from the previous one
When
The first 25 characters of X4-04-REL-DOC-ID are extracted
Then
Store the extracted train ID in B4-KEY-VALUE for database lookup AND store in WS-PREV-CRN for duplicate checking
R-GCX126-cbl-00129 Prepare Error Report: 'UNKNOWN TRAIN ENTRY IN EDI 350' Include Train ID 'THIS CRN WAS NOT FOUND'
Process Rules
Business View: <EXCLUSION CRITERIA> If a train id from x4-04-rel-doc-id (first 25 characters) has been looked up in the database and the train was not found (cc-status-code is not spaces), and the train verification fails occurs during the 'Prepare Error Report: 'UNKNOWN TRAIN ENTRY IN EDI 350' Include Train ID 'THIS CRN WAS NOT FOUND'' routine, then the system must guarantee that prepare error report with message 'unknown train entry in edi 350' concatenated with the train id in mrln-dtl-line(01) and add message 'this crn was not found.' in mrln-dtl-line(03) and set mrln-line to 4 and set message type indicator to unknown (88-z110-mrln-type-is-unknown).
EXCLUDING
A train ID from X4-04-REL-DOC-ID (first 25 characters) has been looked up in the database AND the train was not found (CC-STATUS-CODE is not SPACES)
When
The train verification fails
Then
Prepare error report with message 'UNKNOWN TRAIN ENTRY IN EDI 350' concatenated with the train ID in MRLN-DTL-LINE(01) AND add message 'THIS CRN WAS NOT FOUND.' in MRLN-DTL-LINE(03) AND set MRLN-LINE to 4 AND set message type indicator to unknown (88-Z110-MRLN-TYPE-IS-UNKNOWN)
R-GCX126-cbl-00130 Send Error Report to Merlin
Action Rules
Business View: Assuming an error report has been prepared for an unknown train entry with message type set to unknown during the 'Send Error Report to Merlin' routine, when the error notification is ready to be sent, the system executes logic to ensure that invoke the merlin notification preparation process (z110-prep-emcsend) to send the error report.
Given
An error report has been prepared for an unknown train entry with message type set to unknown
When
The error notification is ready to be sent
Then
Invoke the Merlin notification preparation process (Z110-PREP-EMCSEND) to send the error report
R-GCX126-cbl-00131 Log Arrival Acknowledgment: Date: Current Machine Date, Time: Current Machine Time, Action Code: 'ZZZ', Train ID: From X4 Segment, Message: '350 ACK - ARRIVAL ACK AT BORDER'
Process Rules
Business View: Assuming a train has been successfully verified in the system database (cc-status-code equals spaces) and the train id is available from x4-04-rel-doc-id (first 25 characters) during the 'Log Arrival Acknowledgment: Date: Current Machine Date, Time: Current Machine Time, Action Code: 'ZZZ', Train ID: From X4 Segment, Message: '350 ACK - ARRIVAL ACK AT BORDER'' routine, when the arrival acknowledgment needs to be logged, the system executes logic to ensure that move log information to gcx105 structure and set gcx105-date to current machine century and date (cc-machine-century concatenated with cc-machine-date-x) and set gcx105-time to current machine time (cc-machine-time-x) and set gcx105-action-code to 'zzz' and set gcx105-train-or-us-ccn to the train id from x4-04-rel-doc-id (first 25 characters) and set gcx105-ca-train indicator to true and set gcx105-message to '350 ack - arrival ack at border'.
Given
A train has been successfully verified in the system database (CC-STATUS-CODE equals SPACES) AND the train ID is available from X4-04-REL-DOC-ID (first 25 characters)
When
The arrival acknowledgment needs to be logged
Then
Move log information to GCX105 structure AND set GCX105-DATE to current machine century and date (CC-MACHINE-CENTURY concatenated with CC-MACHINE-DATE-X) AND set GCX105-TIME to current machine time (CC-MACHINE-TIME-X) AND set GCX105-ACTION-CODE to 'ZZZ' AND set GCX105-TRAIN-OR-US-CCN to the train ID from X4-04-REL-DOC-ID (first 25 characters) AND set GCX105-CA-TRAIN indicator to true AND set GCX105-MESSAGE to '350 ACK - ARRIVAL ACK AT BORDER'
R-GCX126-cbl-00134 Is Master Manifest?
Decision Rules
Business View: Assuming a cargo record has been retrieved and updated with border arrival acknowledgment during the 'Is Master Manifest?' routine, when the system checks the manifest type, the system executes logic to ensure that if gccc-master-mfst indicator is true, proceed to update follower manifests, otherwise continue to next segment.
Given
A cargo record has been retrieved and updated with border arrival acknowledgment
When
The system checks the manifest type
Then
If GCCC-MASTER-MFST indicator is true, proceed to update follower manifests, otherwise continue to next segment
R-GCX126-cbl-00135 Update Border Arrival for All Follower Manifests Up to 100 Followers
Process Rules
Business View: Assuming the current cargo is a master manifest (gccc-master-mfst is true) and the master manifest ccn is available in gccc-ccn-key during the 'Update Border Arrival for All Follower Manifests Up to 100 Followers' routine, when follower manifests need to be updated with border arrival status, the system executes logic to ensure that set gcb0rt-ccn-key to the master manifest ccn and initialize follower manifest array (ws-follower-mani-array) to spaces and set ws-follower-not-end-of-db indicator and set counter i to 1 and perform loop until ws-follower-end-of-db or i exceeds 100: retrieve next cargo record using gn function with ccrt-b0rt-ssaq, if status is blank and master manifest ccn matches x4-01-cbsa-rel-ref-id (first 25 characters) and cargo is a follower manifest, store follower ccn in ws-follower-mani(i) and increment i, otherwise set ws-follower-end-of-db and after loop, subtract 1 from i and if i is greater than 0, perform loop varying j from 1 to i: set key-value of ccrt-ssaq and a2rt-ssaq to ws-follower-mani(j) and perform a351-update-cargo-border to update each follower manifest.
Given
The current cargo is a master manifest (GCCC-MASTER-MFST is true) AND the master manifest CCN is available in GCCC-CCN-KEY
When
Follower manifests need to be updated with border arrival status
Then
Set GCB0RT-CCN-KEY to the master manifest CCN AND initialize follower manifest array (WS-FOLLOWER-MANI-ARRAY) to spaces AND set WS-FOLLOWER-NOT-END-OF-DB indicator AND set counter I to 1 AND perform loop until WS-FOLLOWER-END-OF-DB or I exceeds 100: retrieve next cargo record using GN function with CCRT-B0RT-SSAQ, if status is blank AND master manifest CCN matches X4-01-CBSA-REL-REF-ID (first 25 characters) AND cargo is a follower manifest, store follower CCN in WS-FOLLOWER-MANI(I) and increment I, otherwise set WS-FOLLOWER-END-OF-DB AND after loop, subtract 1 from I AND if I is greater than 0, perform loop varying J from 1 to I: set KEY-VALUE of CCRT-SSAQ and A2RT-SSAQ to WS-FOLLOWER-MANI(J) AND perform A351-UPDATE-CARGO-BORDER to update each follower manifest
R-GCX126-cbl-00532 Save Master CCN Key, Initialize Follower Manifest Array, Set Index to 1
Process Rules
Business View: Assuming a master manifest cargo record has been identified for border arrival acknowledgment during the 'Save Master CCN Key, Initialize Follower Manifest Array, Set Index to 1' routine, when the system begins processing follower manifests, the system executes logic to ensure that the master manifest ccn key is saved, the follower manifest array is cleared of any previous data, the follower manifest counter is set to 1, and the end-of-database flag is set to indicate more records may exist.
Given
A master manifest cargo record has been identified for border arrival acknowledgment
When
The system begins processing follower manifests
Then
The master manifest CCN key is saved, the follower manifest array is cleared of any previous data, the follower manifest counter is set to 1, and the end-of-database flag is set to indicate more records may exist
R-GCX126-cbl-00533 Get Next Cargo Record
Action Rules
Business View: Assuming the system is searching for follower manifests associated with a master manifest ccn during the 'Get Next Cargo Record' routine, when the system requests the next cargo record using the get next function with the master manifest ccn as the search key, the system executes logic to ensure that the next cargo record is retrieved from the cargo table and made available for evaluation.
Given
The system is searching for follower manifests associated with a master manifest CCN
When
The system requests the next cargo record using the Get Next function with the master manifest CCN as the search key
Then
The next cargo record is retrieved from the cargo table and made available for evaluation
R-GCX126-cbl-00534 Status Code = Blank AND Master CCN Matches?
Validation Rules
Business View: Assuming a cargo record has been retrieved from the database during the 'Status Code = Blank AND Master CCN Matches?' routine, when the system evaluates the cargo record, the system executes logic to ensure that if the database status code is blank (indicating successful retrieval) and the cargo record's master manifest ccn equals the saved master ccn, the record is considered valid for further processing; otherwise, the record is skipped.
Given
A cargo record has been retrieved from the database
When
The system evaluates the cargo record
Then
If the database status code is blank (indicating successful retrieval) AND the cargo record's master manifest CCN equals the saved master CCN, the record is considered valid for further processing; otherwise, the record is skipped
R-GCX126-cbl-00535 Is Follower Manifest?
Decision Rules
Business View: Assuming a cargo record has been validated as belonging to the master manifest group during the 'Is Follower Manifest?' routine, when the system checks the manifest type indicator, the system executes logic to ensure that if the cargo record is identified as a follower manifest (not the master manifest), it is selected for inclusion in the follower array; otherwise, it is skipped.
Given
A cargo record has been validated as belonging to the master manifest group
When
The system checks the manifest type indicator
Then
If the cargo record is identified as a follower manifest (not the master manifest), it is selected for inclusion in the follower array; otherwise, it is skipped
R-GCX126-cbl-00536 Store Follower CCN in Array, Increment Index
Process Rules
Business View: Assuming a cargo record has been identified as a follower manifest during the 'Store Follower CCN in Array, Increment Index' routine, when the system stores the follower information, the system executes logic to ensure that the follower manifest's ccn key is stored in the follower manifest array at the current index position, and the index counter is incremented by 1.
Given
A cargo record has been identified as a follower manifest
When
The system stores the follower information
Then
The follower manifest's CCN key is stored in the follower manifest array at the current index position, and the index counter is incremented by 1
R-GCX126-cbl-00537 End of Database OR Index > 100?
Policy Rules
Business View: Assuming the system is collecting follower manifest ccns during the 'End of Database OR Index > 100?' routine, when the system checks whether to continue retrieving more cargo records, the system executes logic to ensure that if the end of database is reached or the index counter exceeds 100, the collection process stops; otherwise, the system continues to retrieve the next cargo record.
Given
The system is collecting follower manifest CCNs
When
The system checks whether to continue retrieving more cargo records
Then
If the end of database is reached OR the index counter exceeds 100, the collection process stops; otherwise, the system continues to retrieve the next cargo record
R-GCX126-cbl-00538 Subtract 1 from Index
Computation Rules
Business View: Assuming the system has completed collecting follower manifest ccns during the 'Subtract 1 from Index' routine, when the collection loop terminates, the system executes logic to ensure that the index counter is decremented by 1 to convert from a 1-based counter to the actual count of follower manifests stored in the array.
Given
The system has completed collecting follower manifest CCNs
When
The collection loop terminates
Then
The index counter is decremented by 1 to convert from a 1-based counter to the actual count of follower manifests stored in the array
R-GCX126-cbl-00539 Index <= 0?
Validation Rules
Business View: Assuming the follower manifest collection process has completed and the index has been adjusted during the 'Index <= 0?' routine, when the system checks if any follower manifests were found, the system executes logic to ensure that if the adjusted index is less than or equal to 0, no follower manifests exist and processing terminates; otherwise, the system proceeds to update each follower manifest.
Given
The follower manifest collection process has completed and the index has been adjusted
When
The system checks if any follower manifests were found
Then
If the adjusted index is less than or equal to 0, no follower manifests exist and processing terminates; otherwise, the system proceeds to update each follower manifest
R-GCX126-cbl-00540 Set Loop Counter J to 1
Process Rules
Business View: Assuming at least one follower manifest ccn has been collected in the array during the 'Set Loop Counter J to 1' routine, when the system prepares to update follower manifests, the system executes logic to ensure that the loop counter j is set to 1 to begin processing from the first follower manifest in the array.
Given
At least one follower manifest CCN has been collected in the array
When
The system prepares to update follower manifests
Then
The loop counter J is set to 1 to begin processing from the first follower manifest in the array
R-GCX126-cbl-00541 Follower CCN Empty OR J > Index?
Decision Rules
Business View: Assuming the system is iterating through the follower manifest array during the 'Follower CCN Empty OR J > Index?' routine, when the system checks whether to process the next follower manifest, the system executes logic to ensure that if the current follower ccn position is empty (spaces or low-values) or the loop counter j exceeds the total count of follower manifests (index), the update loop terminates; otherwise, processing continues with the current follower ccn.
Given
The system is iterating through the follower manifest array
When
The system checks whether to process the next follower manifest
Then
If the current follower CCN position is empty (spaces or low-values) OR the loop counter J exceeds the total count of follower manifests (Index), the update loop terminates; otherwise, processing continues with the current follower CCN
R-GCX126-cbl-00542 Get Follower CCN from Array
Process Rules
Business View: Assuming the loop counter j points to a valid position in the follower manifest array during the 'Get Follower CCN from Array' routine, when the system prepares to update a follower manifest, the system executes logic to ensure that the follower manifest ccn at position j is retrieved from the array and set as the search key for cargo record retrieval.
Given
The loop counter J points to a valid position in the follower manifest array
When
The system prepares to update a follower manifest
Then
The follower manifest CCN at position J is retrieved from the array and set as the search key for cargo record retrieval
R-GCX126-cbl-00543 Retrieve Follower Cargo Record by CCN
Action Rules
Business View: Assuming a follower manifest ccn has been retrieved from the array during the 'Retrieve Follower Cargo Record by CCN' routine, when the system requests the cargo record using the get hold update function with the follower ccn as the key, the system executes logic to ensure that the follower cargo record is retrieved from the cargo table and locked for update.
Given
A follower manifest CCN has been retrieved from the array
When
The system requests the cargo record using the Get Hold Update function with the follower CCN as the key
Then
The follower cargo record is retrieved from the cargo table and locked for update
R-GCX126-cbl-00544 Cargo Found?
Validation Rules
Business View: Assuming the system has attempted to retrieve a follower cargo record by ccn during the 'Cargo Found?' routine, when the system evaluates the retrieval result, the system executes logic to ensure that if the cargo record is found (cargo-found flag is true), the system proceeds to update the border arrival acknowledgment; otherwise, the system skips to the next follower manifest.
Given
The system has attempted to retrieve a follower cargo record by CCN
When
The system evaluates the retrieval result
Then
If the cargo record is found (cargo-found flag is true), the system proceeds to update the border arrival acknowledgment; otherwise, the system skips to the next follower manifest
R-GCX126-cbl-00545 Log Border Arrival Message: '350 ACK - ARRIVAL ACK AT BORDER'
Process Rules
Business View: Assuming a follower cargo record has been successfully retrieved during the 'Log Border Arrival Message: '350 ACK - ARRIVAL ACK AT BORDER'' routine, when the system prepares to update the border arrival status, the system executes logic to ensure that an information message '350 ack - arrival ack at border' is logged to the cargo history with the current follower ccn as the reference.
Given
A follower cargo record has been successfully retrieved
When
The system prepares to update the border arrival status
Then
An information message '350 ACK - ARRIVAL ACK AT BORDER' is logged to the cargo history with the current follower CCN as the reference
R-GCX126-cbl-00546 Set Border Arrival Acknowledgment Flag
Action Rules
Business View: Assuming the border arrival message has been logged for the follower manifest during the 'Set Border Arrival Acknowledgment Flag' routine, when the system updates the cargo record status, the system executes logic to ensure that the border arrival acknowledgment flag in the cargo record is set to true to indicate customs has acknowledged the cargo's arrival at the border.
Given
The border arrival message has been logged for the follower manifest
When
The system updates the cargo record status
Then
The border arrival acknowledgment flag in the cargo record is set to true to indicate customs has acknowledged the cargo's arrival at the border
R-GCX126-cbl-00548 Increment Loop Counter J
Process Rules
Business View: Assuming a follower manifest has been processed (either updated or skipped) during the 'Increment Loop Counter J' routine, when the system prepares to process the next follower, the system executes logic to ensure that the loop counter j is incremented by 1 to point to the next follower manifest ccn in the array.
Given
A follower manifest has been processed (either updated or skipped)
When
The system prepares to process the next follower
Then
The loop counter J is incremented by 1 to point to the next follower manifest CCN in the array
R-GCX126-cbl-00746 Set Accept Status to 'GEGB'
Process Rules
Business View: Assuming a request to retrieve the next us cargo record from the database during the 'Set Accept Status to 'GEGB'' routine, when the system prepares to execute a get next operation, the system executes logic to ensure that the system sets accept status to 'gegb', segment type to gcsusrt, function to gn (get next), index type to car-wb (car id and waybill), and operator to '>' (greater than).
Given
A request to retrieve the next US cargo record from the database
When
The system prepares to execute a Get Next operation
Then
The system sets Accept Status to 'GEGB', Segment Type to GCSUSRT, Function to GN (Get Next), Index Type to CAR-WB (Car ID and Waybill), and Operator to '>' (greater than)
R-GCX126-cbl-00747 Call GCCUSIO to Get Next Record
Action Rules
Business View: Assuming query parameters are set with accept status 'gegb', segment gcsusrt, function gn, index car-wb, and operator '>' during the 'Call GCCUSIO to Get Next Record' routine, when the system calls gccusio program, the system executes logic to ensure that the system retrieves the next us cargo record from gcsusrt table based on car id and waybill index.
Given
Query parameters are set with Accept Status 'GEGB', Segment GCSUSRT, Function GN, Index CAR-WB, and Operator '>'
When
The system calls GCCUSIO program
Then
The system retrieves the next US cargo record from GCSUSRT table based on Car ID and Waybill index
R-GCX126-cbl-00750 Cargo Deleted or TR Created?
Decision Rules
Business View: Assuming a matching us cargo record has been found based on car id and waybill during the 'Cargo Deleted or TR Created?' routine, when the system checks the cargo record's deletion status and train creation indicator, the system executes logic to ensure that if cargo is marked as deleted (rt10-cpcargo-deleted is true) or train has already been created for it (tr-created-for-it equals 'y'), skip this record and continue to next; otherwise, set us manifest found flag to indicate a valid record has been located.
Given
A matching US cargo record has been found based on Car ID and Waybill
When
The system checks the cargo record's deletion status and train creation indicator
Then
If cargo is marked as deleted (RT10-CPCARGO-DELETED is true) OR train has already been created for it (TR-CREATED-FOR-IT equals 'Y'), skip this record and continue to next; otherwise, set US Manifest Found flag to indicate a valid record has been located
R-GCX126-cbl-00753 Set US Manifest Found Flag
Process Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record matches the current car id and waybill and is not deleted and does not have a train created for it, and the system completes all validation checks successfully occurs during the 'Set US Manifest Found Flag' routine, then the system must guarantee that the system sets the us manifest found flag to true to indicate a valid record is available for processing.
EXCLUDING
A US cargo record matches the current Car ID and Waybill AND is not deleted AND does not have a train created for it
When
The system completes all validation checks successfully
Then
The system sets the US Manifest Found flag to true to indicate a valid record is available for processing
R-GCX126-cbl-00136 Retrieve Cargo Record by CCN
Action Rules
Business View: Assuming a ccn (cargo control number) is provided in the ccrt-ssaq key value and a2rt-ssaq key value during the 'Retrieve Cargo Record by CCN' routine, when the system performs a get hold unique operation on the cargo database using the ccn key, the system executes logic to ensure that the cargo record segment (gccc-cargo-report-segment) is retrieved if it exists, and the cargo status switches are set to indicate whether the cargo was found, deleted, or has other status conditions.
Given
A CCN (Cargo Control Number) is provided in the CCRT-SSAQ key value and A2RT-SSAQ key value
When
The system performs a Get Hold Unique operation on the cargo database using the CCN key
Then
The cargo record segment (GCCC-CARGO-REPORT-SEGMENT) is retrieved if it exists, and the cargo status switches are set to indicate whether the cargo was found, deleted, or has other status conditions
R-GCX126-cbl-00138 Set Border Arrival Acknowledgment Flag
Action Rules
Business View: Assuming a valid cargo record exists in the database during the 'Set Border Arrival Acknowledgment Flag' routine, when the system processes a border arrival acknowledgment from the edi 350 message, the system executes logic to ensure that the gccc-border-arrival-ack flag is set to true in the cargo record segment.
Given
A valid cargo record exists in the database
When
The system processes a border arrival acknowledgment from the EDI 350 message
Then
The GCCC-BORDER-ARRIVAL-ACK flag is set to true in the cargo record segment
R-GCX126-cbl-00139 Log Message: '350 ACK - ARRIVAL ACK AT BORDER'
Process Rules
Business View: Assuming a cargo record has been identified for border arrival acknowledgment and the current ccn key is stored in ws-current-ccn-key during the 'Log Message: '350 ACK - ARRIVAL ACK AT BORDER'' routine, when the system prepares to log the border arrival event, the system executes logic to ensure that the message '350 ack - arrival ack at border' is moved to ws-gcx105-info-msg, the log information is populated with current machine date, time, user id, and ccn, the action code is set to log-use-input-message, the cargo type is set to gcx105-ca-cargo, and the gct1051e transaction is spawned to create the log entry.
Given
A cargo record has been identified for border arrival acknowledgment and the current CCN key is stored in WS-CURRENT-CCN-KEY
When
The system prepares to log the border arrival event
Then
The message '350 ACK - ARRIVAL ACK AT BORDER' is moved to WS-GCX105-INFO-MSG, the log information is populated with current machine date, time, user ID, and CCN, the action code is set to LOG-USE-INPUT-MESSAGE, the cargo type is set to GCX105-CA-CARGO, and the GCT1051E transaction is spawned to create the log entry
R-GCX126-cbl-00140 Update Cargo Record in Database
Action Rules
Business View: Assuming the cargo record segment (gccc-cargo-report-segment) has been updated with the border arrival acknowledgment flag during the 'Update Cargo Record in Database' routine, when the system executes the replace operation, the system executes logic to ensure that the cims program is called with repl function code, gccc-pcb, and gccc-cargo-report-segment to update the cargo record in the database, and the accept status is cleared.
Given
The cargo record segment (GCCC-CARGO-REPORT-SEGMENT) has been updated with the border arrival acknowledgment flag
When
The system executes the replace operation
Then
The CIMS program is called with REPL function code, GCCC-PCB, and GCCC-CARGO-REPORT-SEGMENT to update the cargo record in the database, and the accept status is cleared
R-GCX126-cbl-00141 Is Cargo a Master Manifest?
Decision Rules
Business View: Assuming a cargo record has been retrieved with release reference id from x4 segment entry type '992' during the 'Is Cargo a Master Manifest?' routine, when the system checks if the cargo is a master manifest, the system executes logic to ensure that if cargo is not a master manifest, skip follower processing and exit; if cargo is a master manifest, proceed to initialize follower manifest array and retrieve all associated follower manifests.
Given
A cargo record has been retrieved with release reference ID from X4 segment entry type '992'
When
The system checks if the cargo is a master manifest
Then
If cargo is NOT a master manifest, skip follower processing and exit; If cargo IS a master manifest, proceed to initialize follower manifest array and retrieve all associated follower manifests
R-GCX126-cbl-00142 Initialize Follower Manifest Array, Set Index I = 1
Process Rules
Business View: Assuming the cargo is confirmed as a master manifest during the 'Initialize Follower Manifest Array, Set Index I = 1' routine, when the system begins the process of collecting follower manifests, the system executes logic to ensure that initialize follower manifest array to spaces, set array index i to 1, and set end-of-database flag to false.
Given
The cargo is confirmed as a master manifest
When
The system begins the process of collecting follower manifests
Then
Initialize follower manifest array to spaces, set array index I to 1, and set end-of-database flag to false
R-GCX126-cbl-00143 Set Search Key to Master CCN
Process Rules
Business View: Assuming the follower manifest array has been initialized and the cargo is a master manifest during the 'Set Search Key to Master CCN' routine, when the system prepares to search for follower manifests, the system executes logic to ensure that set the database search key (gcb0rt-ccn-key) to the master manifest's ccn key (gccc-ccn-key).
Given
The follower manifest array has been initialized and the cargo is a master manifest
When
The system prepares to search for follower manifests
Then
Set the database search key (GCB0RT-CCN-KEY) to the master manifest's CCN key (GCCC-CCN-KEY)
R-GCX126-cbl-00144 Get Next Cargo Record from Database
Action Rules
Business View: Assuming the search key has been set to the master ccn and the system is ready to retrieve cargo records during the 'Get Next Cargo Record from Database' routine, when the system executes a get next database call, the system executes logic to ensure that retrieve the next cargo report segment from the database using pcb7 with qualified ssa for b0rt segment.
Given
The search key has been set to the master CCN and the system is ready to retrieve cargo records
When
The system executes a Get Next database call
Then
Retrieve the next cargo report segment from the database using PCB7 with qualified SSA for B0RT segment
R-GCX126-cbl-00146 Master CCN Matches?
Validation Rules
Business View: Assuming a cargo record has been successfully retrieved from the database during the 'Master CCN Matches?' routine, when the system compares the retrieved cargo's master manifest ccn (gccc-master-mfst-ccn) with the original release reference id (x4-01-cbsa-rel-ref-id first 25 characters), the system executes logic to ensure that if master ccns do not match, set end-of-database flag to true and stop retrieval; if master ccns match, proceed to check if the record is a follower manifest.
Given
A cargo record has been successfully retrieved from the database
When
The system compares the retrieved cargo's master manifest CCN (GCCC-MASTER-MFST-CCN) with the original release reference ID (X4-01-CBSA-REL-REF-ID first 25 characters)
Then
If master CCNs do NOT match, set end-of-database flag to true and stop retrieval; If master CCNs match, proceed to check if the record is a follower manifest
R-GCX126-cbl-00147 Is Follower Manifest?
Decision Rules
Business View: Assuming a cargo record has been retrieved and its master ccn matches the search criteria during the 'Is Follower Manifest?' routine, when the system checks if the cargo is a follower manifest (gccc-follower-mfst), the system executes logic to ensure that if cargo is a follower manifest, store its ccn in the follower array; if cargo is the master manifest itself, skip storage and continue to next record.
Given
A cargo record has been retrieved and its master CCN matches the search criteria
When
The system checks if the cargo is a follower manifest (GCCC-FOLLOWER-MFST)
Then
If cargo is a follower manifest, store its CCN in the follower array; If cargo is the master manifest itself, skip storage and continue to next record
R-GCX126-cbl-00148 Store Follower CCN in Array Position I, Increment I
Process Rules
Business View: Assuming a cargo record has been identified as a follower manifest during the 'Store Follower CCN in Array Position I, Increment I' routine, when the system stores the follower information, the system executes logic to ensure that move the follower's ccn key (gccc-ccn-key) to the follower manifest array at position i (ws-follower-mani(i)) and add 1 to index i.
Given
A cargo record has been identified as a follower manifest
When
The system stores the follower information
Then
Move the follower's CCN key (GCCC-CCN-KEY) to the follower manifest array at position I (WS-FOLLOWER-MANI(I)) and add 1 to index I
R-GCX126-cbl-00151 Calculate Total Followers Count = I - 1
Computation Rules
Business View: Assuming the database retrieval loop has completed and end-of-database flag is set during the 'Calculate Total Followers Count = I - 1' routine, when the system calculates the total number of followers collected, the system executes logic to ensure that subtract 1 from index i to get the actual count of follower manifests stored in the array.
Given
The database retrieval loop has completed and end-of-database flag is set
When
The system calculates the total number of followers collected
Then
Subtract 1 from index I to get the actual count of follower manifests stored in the array
R-GCX126-cbl-00153 Loop Through Each Follower in Array J = 1 to Count
Process Rules
Business View: Assuming at least one follower manifest exists in the array during the 'Loop Through Each Follower in Array J = 1 to Count' routine, when the system begins processing followers, the system executes logic to ensure that loop through the follower array starting at j=1, incrementing by 1 each iteration, until j exceeds the count or the follower ccn at position i is spaces or low-values or j exceeds i.
Given
At least one follower manifest exists in the array
When
The system begins processing followers
Then
Loop through the follower array starting at J=1, incrementing by 1 each iteration, until J exceeds the count OR the follower CCN at position I is spaces or low-values OR J exceeds I
R-GCX126-cbl-00155 Retrieve Follower Cargo Record
Action Rules
Business View: Assuming the follower ccn has been set as the database key during the 'Retrieve Follower Cargo Record' routine, when the system retrieves the follower cargo record, the system executes logic to ensure that execute get hold unique (ghu) call to retrieve the cargo report segment from the database using the follower's ccn key.
Given
The follower CCN has been set as the database key
When
The system retrieves the follower cargo record
Then
Execute Get Hold Unique (GHU) call to retrieve the cargo report segment from the database using the follower's CCN key
R-GCX126-cbl-00156 Set Border Arrival Acknowledgment Flag = TRUE
Process Rules
Business View: Assuming the follower cargo record has been successfully retrieved during the 'Set Border Arrival Acknowledgment Flag = TRUE' routine, when the system updates the border arrival status, the system executes logic to ensure that set the border arrival acknowledgment flag (gccc-border-arrival-ack) to true in the cargo report segment.
Given
The follower cargo record has been successfully retrieved
When
The system updates the border arrival status
Then
Set the border arrival acknowledgment flag (GCCC-BORDER-ARRIVAL-ACK) to true in the cargo report segment
R-GCX126-cbl-00157 Log Message: '350 ACK - ARRIVAL ACK AT BORDER'
Process Rules
Business View: Assuming the border arrival acknowledgment flag has been set for the follower during the 'Log Message: '350 ACK - ARRIVAL ACK AT BORDER'' routine, when the system logs the border arrival event, the system executes logic to ensure that create a log entry with message '350 ack - arrival ack at border', current ccn key, current date and time, and action code 'zzz' for canadian cargo type.
Given
The border arrival acknowledgment flag has been set for the follower
When
The system logs the border arrival event
Then
Create a log entry with message '350 ACK - ARRIVAL ACK AT BORDER', current CCN key, current date and time, and action code 'ZZZ' for Canadian cargo type
R-GCX126-cbl-00158 Update Follower Cargo Record in Database
Action Rules
Business View: Assuming the follower cargo record has been updated with border arrival acknowledgment and logged during the 'Update Follower Cargo Record in Database' routine, when the system saves the changes to the database, the system executes logic to ensure that execute replace (repl) call to update the cargo report segment in the database, clear status code and set accept status to blank.
Given
The follower cargo record has been updated with border arrival acknowledgment and logged
When
The system saves the changes to the database
Then
Execute Replace (REPL) call to update the cargo report segment in the database, clear status code and set accept status to blank
R-GCX126-cbl-00159 More Followers?
Decision Rules
Business View: Assuming a follower manifest has been updated in the database during the 'More Followers?' routine, when the system checks if more followers exist, the system executes logic to ensure that if loop counter j has not exceeded the total count and the next array position does not contain spaces or low-values, continue to next follower; otherwise, exit the follower processing loop.
Given
A follower manifest has been updated in the database
When
The system checks if more followers exist
Then
If loop counter J has not exceeded the total count AND the next array position does not contain spaces or low-values, continue to next follower; Otherwise, exit the follower processing loop
R-GCX126-cbl-00549 Initialize Follower Manifest Array, Set Index I = 1, Set Not End of Database Flag
Process Rules
Business View: Assuming a master manifest cargo record needs to have its follower manifests retrieved during the 'Initialize Follower Manifest Array, Set Index I = 1, Set Not End of Database Flag' routine, when the follower manifest retrieval process begins, the system executes logic to ensure that the follower manifest array is cleared to spaces, the array index is set to 1, and the end-of-database flag is set to indicate more records may exist.
Given
A master manifest cargo record needs to have its follower manifests retrieved
When
The follower manifest retrieval process begins
Then
The follower manifest array is cleared to spaces, the array index is set to 1, and the end-of-database flag is set to indicate more records may exist
R-GCX126-cbl-00550 Set Master CCN Key from Current Cargo Record
Process Rules
Business View: Assuming a cargo record has been identified as a master manifest with a valid ccn key during the 'Set Master CCN Key from Current Cargo Record' routine, when the system prepares to search for follower manifests, the system executes logic to ensure that the master manifest's ccn key is set as the search criterion for retrieving related follower manifests from the cargo database.
Given
A cargo record has been identified as a master manifest with a valid CCN key
When
The system prepares to search for follower manifests
Then
The master manifest's CCN key is set as the search criterion for retrieving related follower manifests from the cargo database
R-GCX126-cbl-00551 Get Next Cargo Record Using Master CCN Key
Action Rules
Business View: Assuming a master ccn key has been established as the search criterion during the 'Get Next Cargo Record Using Master CCN Key' routine, when the system requests the next cargo record from the database, the system executes logic to ensure that the database returns the next cargo record where the master manifest ccn matches the search key, and the database status code is set to indicate success or failure.
Given
A master CCN key has been established as the search criterion
When
The system requests the next cargo record from the database
Then
The database returns the next cargo record where the master manifest CCN matches the search key, and the database status code is set to indicate success or failure
R-GCX126-cbl-00553 Master CCN Matches?
Validation Rules
Business View: Assuming a cargo record has been successfully retrieved from the database during the 'Master CCN Matches?' routine, when the system compares the retrieved record's master manifest ccn with the search key, the system executes logic to ensure that if the master manifest ccn in the retrieved record equals the search key, processing continues to check if it is a follower; otherwise, the end-of-database flag is set to terminate the retrieval loop.
Given
A cargo record has been successfully retrieved from the database
When
The system compares the retrieved record's master manifest CCN with the search key
Then
If the master manifest CCN in the retrieved record equals the search key, processing continues to check if it is a follower; otherwise, the end-of-database flag is set to terminate the retrieval loop
R-GCX126-cbl-00554 Is Follower Manifest?
Decision Rules
Business View: Assuming a cargo record has been retrieved and its master ccn has been verified to match the search key during the 'Is Follower Manifest?' routine, when the system checks the manifest type indicator of the cargo record, the system executes logic to ensure that if the cargo record is identified as a follower manifest, its ccn is stored in the follower array; if it is the master manifest itself, the system skips storage and checks the array size limit.
Given
A cargo record has been retrieved and its master CCN has been verified to match the search key
When
The system checks the manifest type indicator of the cargo record
Then
If the cargo record is identified as a follower manifest, its CCN is stored in the follower array; if it is the master manifest itself, the system skips storage and checks the array size limit
R-GCX126-cbl-00555 Store Follower CCN in Array Position I
Process Rules
Business View: Assuming a cargo record has been confirmed as a follower manifest with a valid ccn during the 'Store Follower CCN in Array Position I' routine, when the system stores the follower information, the system executes logic to ensure that the follower manifest's ccn is moved to the array position indicated by the current index value i.
Given
A cargo record has been confirmed as a follower manifest with a valid CCN
When
The system stores the follower information
Then
The follower manifest's CCN is moved to the array position indicated by the current index value I
R-GCX126-cbl-00556 Increment Index I
Process Rules
Business View: Assuming a follower manifest ccn has been successfully stored in the array during the 'Increment Index I' routine, when the system prepares to process the next potential follower, the system executes logic to ensure that the array index i is incremented by 1.
Given
A follower manifest CCN has been successfully stored in the array
When
The system prepares to process the next potential follower
Then
The array index I is incremented by 1
R-GCX126-cbl-00559 Subtract 1 from Index I - Final Count of Followers
Computation Rules
Business View: Assuming the retrieval loop has terminated with the end-of-database flag set during the 'Subtract 1 from Index I - Final Count of Followers' routine, when the system calculates the final count of follower manifests, the system executes logic to ensure that the value 1 is subtracted from index i to obtain the actual count of follower manifests stored in the array.
Given
The retrieval loop has terminated with the end-of-database flag set
When
The system calculates the final count of follower manifests
Then
The value 1 is subtracted from index I to obtain the actual count of follower manifests stored in the array
R-GCX126-cbl-00560 Follower Count > 0?
Decision Rules
Business View: Assuming the final follower count has been calculated by subtracting 1 from index i during the 'Follower Count > 0?' routine, when the system checks if any followers were found, the system executes logic to ensure that if the adjusted index i is less than or equal to 0, no follower manifests were found and the process exits; if i is greater than 0, follower manifests exist and are available for further processing.
Given
The final follower count has been calculated by subtracting 1 from index I
When
The system checks if any followers were found
Then
If the adjusted index I is less than or equal to 0, no follower manifests were found and the process exits; if I is greater than 0, follower manifests exist and are available for further processing
R-GCX126-cbl-00754 Set Accept Status to 'GEGB'
Process Rules
Business View: Assuming a master manifest cargo record is being processed during the 'Set Accept Status to 'GEGB'' routine, when the system needs to retrieve all associated follower manifests, the system executes logic to ensure that the database access status is set to 'gegb' to enable hierarchical navigation through cargo records.
Given
A master manifest cargo record is being processed
When
The system needs to retrieve all associated follower manifests
Then
The database access status is set to 'GEGB' to enable hierarchical navigation through cargo records
R-GCX126-cbl-00755 Set Master CCN Key from Current Cargo
Process Rules
Business View: Assuming a master manifest cargo record with a valid ccn key is currently loaded during the 'Set Master CCN Key from Current Cargo' routine, when the system prepares to search for follower manifests, the system executes logic to ensure that the master manifest's ccn key is stored as the search reference key for subsequent follower manifest retrieval.
Given
A master manifest cargo record with a valid CCN key is currently loaded
When
The system prepares to search for follower manifests
Then
The master manifest's CCN key is stored as the search reference key for subsequent follower manifest retrieval
R-GCX126-cbl-00756 Initialize Follower Manifest Array
Process Rules
Business View: Assuming the system is about to search for follower manifests during the 'Initialize Follower Manifest Array' routine, when the follower manifest collection process begins, the system executes logic to ensure that the follower manifest array is initialized to spaces to ensure no residual data from previous processing.
Given
The system is about to search for follower manifests
When
The follower manifest collection process begins
Then
The follower manifest array is initialized to spaces to ensure no residual data from previous processing
R-GCX126-cbl-00757 Set Follower Not End of DB Flag
Process Rules
Business View: Assuming the follower manifest search is about to begin during the 'Set Follower Not End of DB Flag' routine, when the system initializes the database navigation state, the system executes logic to ensure that the end-of-database flag is set to 'not end of db' to allow record retrieval to proceed.
Given
The follower manifest search is about to begin
When
The system initializes the database navigation state
Then
The end-of-database flag is set to 'Not End of DB' to allow record retrieval to proceed
R-GCX126-cbl-00758 Set Index I to 1
Process Rules
Business View: Assuming the follower manifest array has been initialized during the 'Set Index I to 1' routine, when the system prepares to store follower manifest ccns, the system executes logic to ensure that the array index counter is set to 1 to point to the first available storage position.
Given
The follower manifest array has been initialized
When
The system prepares to store follower manifest CCNs
Then
The array index counter is set to 1 to point to the first available storage position
R-GCX126-cbl-00759 End of DB OR Index > 100?
Decision Rules
Business View: Assuming the system is in the process of collecting follower manifests and the current array index position and database status are known during the 'End of DB OR Index > 100?' routine, when the system checks if more follower manifests can be retrieved, the system executes logic to ensure that the search continues if the end of database has not been reached and the array index is 100 or less, otherwise the search terminates.
Given
The system is in the process of collecting follower manifests AND the current array index position and database status are known
When
The system checks if more follower manifests can be retrieved
Then
The search continues if the end of database has not been reached AND the array index is 100 or less, otherwise the search terminates
R-GCX126-cbl-00762 Master CCN Matches Current CCN?
Validation Rules
Business View: Assuming a cargo record has been successfully retrieved from the database and the master ccn key is known during the 'Master CCN Matches Current CCN?' routine, when the system validates the cargo record's master manifest association, the system executes logic to ensure that if the retrieved cargo's master manifest ccn matches the stored master ccn key, the record is validated for further processing, otherwise the end-of-database flag is set.
Given
A cargo record has been successfully retrieved from the database AND the master CCN key is known
When
The system validates the cargo record's master manifest association
Then
If the retrieved cargo's master manifest CCN matches the stored master CCN key, the record is validated for further processing, otherwise the end-of-database flag is set
R-GCX126-cbl-00763 Is Follower Manifest?
Decision Rules
Business View: Assuming a cargo record has been retrieved and validated as belonging to the current master manifest during the 'Is Follower Manifest?' routine, when the system checks the cargo record's manifest type, the system executes logic to ensure that if the cargo is a follower manifest, its ccn is stored in the array, if it is a master manifest, it is skipped and the loop continues.
Given
A cargo record has been retrieved AND validated as belonging to the current master manifest
When
The system checks the cargo record's manifest type
Then
If the cargo is a follower manifest, its CCN is stored in the array, if it is a master manifest, it is skipped and the loop continues
R-GCX126-cbl-00764 Store Follower CCN in Array at Index I
Process Rules
Business View: Assuming a cargo record has been identified as a follower manifest and the current array index is within capacity (1-100) during the 'Store Follower CCN in Array at Index I' routine, when the system stores the follower manifest information, the system executes logic to ensure that the follower manifest's ccn key is stored in the array at the position indicated by the current index value.
Given
A cargo record has been identified as a follower manifest AND the current array index is within capacity (1-100)
When
The system stores the follower manifest information
Then
The follower manifest's CCN key is stored in the array at the position indicated by the current index value
R-GCX126-cbl-00765 Increment Index I by 1
Process Rules
Business View: Assuming a follower manifest ccn has been successfully stored in the array during the 'Increment Index I by 1' routine, when the system prepares for the next follower manifest, the system executes logic to ensure that the array index counter is incremented by 1 to point to the next available storage position.
Given
A follower manifest CCN has been successfully stored in the array
When
The system prepares for the next follower manifest
Then
The array index counter is incremented by 1 to point to the next available storage position
R-GCX126-cbl-00766 Set Follower End of DB Flag
Process Rules
Business View: <EXCLUSION CRITERIA> If either the database retrieval returned a non-blank status code or the retrieved cargo's master ccn does not match the current master ccn, and the system determines that no more valid follower manifests can be retrieved occurs during the 'Set Follower End of DB Flag' routine, then the system must guarantee that the end-of-database flag is set to 'end of db' to terminate the search loop.
EXCLUDING
Either the database retrieval returned a non-blank status code OR the retrieved cargo's master CCN does not match the current master CCN
When
The system determines that no more valid follower manifests can be retrieved
Then
The end-of-database flag is set to 'End of DB' to terminate the search loop
R-GCX126-cbl-00767 End: Return to Calling Process
Process Rules
Business View: Assuming either the end-of-database has been reached or the array capacity limit of 100 has been reached or all follower manifests have been collected during the 'End: Return to Calling Process' routine, when the follower manifest search loop terminates, the system executes logic to ensure that control returns to the calling process with the follower manifest array containing all collected follower ccns (up to 100 entries).
Given
Either the end-of-database has been reached OR the array capacity limit of 100 has been reached OR all follower manifests have been collected
When
The follower manifest search loop terminates
Then
Control returns to the calling process with the follower manifest array containing all collected follower CCNs (up to 100 entries)
R-GCX126-cbl-00561 Set Master CCN as Search Key
Process Rules
Business View: Assuming a master manifest cargo record exists with a valid ccn during the 'Set Master CCN as Search Key' routine, when the system needs to find all follower manifests associated with this master, the system executes logic to ensure that the system sets the master manifest ccn as the search key for database retrieval.
Given
A master manifest cargo record exists with a valid CCN
When
The system needs to find all follower manifests associated with this master
Then
The system sets the master manifest CCN as the search key for database retrieval
R-GCX126-cbl-00562 Initialize Follower Manifest Array
Process Rules
Business View: Assuming the system is about to collect follower manifest ccns during the 'Initialize Follower Manifest Array' routine, when the collection process begins, the system executes logic to ensure that the system clears the follower manifest array by setting all entries to spaces.
Given
The system is about to collect follower manifest CCNs
When
The collection process begins
Then
The system clears the follower manifest array by setting all entries to spaces
R-GCX126-cbl-00563 Set Counter to 1
Process Rules
Business View: Assuming the follower manifest collection process is starting during the 'Set Counter to 1' routine, when the system prepares to iterate through cargo records, the system executes logic to ensure that the system sets the counter variable to 1 to begin indexing from the first position.
Given
The follower manifest collection process is starting
When
The system prepares to iterate through cargo records
Then
The system sets the counter variable to 1 to begin indexing from the first position
R-GCX126-cbl-00564 Retrieve Next Cargo Record
Action Rules
Business View: Assuming a master manifest ccn is set as the search key during the 'Retrieve Next Cargo Record' routine, when the system executes a database retrieval operation, the system executes logic to ensure that the system retrieves the next cargo record that matches or follows the master ccn in the database hierarchy.
Given
A master manifest CCN is set as the search key
When
The system executes a database retrieval operation
Then
The system retrieves the next cargo record that matches or follows the master CCN in the database hierarchy
R-GCX126-cbl-00566 Master CCN Matches?
Decision Rules
Business View: Assuming a cargo record has been successfully retrieved from the database during the 'Master CCN Matches?' routine, when the system compares the master manifest ccn field in the retrieved record with the search key master ccn, the system executes logic to ensure that if the master manifest ccn in the retrieved record matches the search key, the record is potentially a follower manifest and processing continues; otherwise, the system marks end of database and stops searching.
Given
A cargo record has been successfully retrieved from the database
When
The system compares the master manifest CCN field in the retrieved record with the search key master CCN
Then
If the master manifest CCN in the retrieved record matches the search key, the record is potentially a follower manifest and processing continues; otherwise, the system marks end of database and stops searching
R-GCX126-cbl-00567 Is Follower Manifest?
Decision Rules
Business View: Assuming a cargo record has been retrieved and its master ccn matches the search key during the 'Is Follower Manifest?' routine, when the system checks the manifest type indicator in the cargo record, the system executes logic to ensure that if the cargo record is identified as a follower manifest (not a master manifest), it is added to the collection; if it is a master manifest, it is skipped and the system retrieves the next record.
Given
A cargo record has been retrieved and its master CCN matches the search key
When
The system checks the manifest type indicator in the cargo record
Then
If the cargo record is identified as a follower manifest (not a master manifest), it is added to the collection; if it is a master manifest, it is skipped and the system retrieves the next record
R-GCX126-cbl-00568 Store Follower CCN in Array
Process Rules
Business View: Assuming a cargo record has been identified as a follower manifest during the 'Store Follower CCN in Array' routine, when the system needs to collect this follower for later processing, the system executes logic to ensure that the system stores the follower manifest ccn in the array at the position indicated by the current counter value.
Given
A cargo record has been identified as a follower manifest
When
The system needs to collect this follower for later processing
Then
The system stores the follower manifest CCN in the array at the position indicated by the current counter value
R-GCX126-cbl-00569 Increment Counter
Process Rules
Business View: Assuming a follower manifest ccn has been stored in the array during the 'Increment Counter' routine, when the system prepares to continue searching for more followers, the system executes logic to ensure that the system adds 1 to the counter variable to move to the next array position.
Given
A follower manifest CCN has been stored in the array
When
The system prepares to continue searching for more followers
Then
The system adds 1 to the counter variable to move to the next array position
R-GCX126-cbl-00570 Counter > 100?
Validation Rules
Business View: Assuming the counter has been incremented after storing a follower manifest ccn during the 'Counter > 100?' routine, when the system checks if the maximum limit has been reached, the system executes logic to ensure that if the counter exceeds 100, the system stops searching for more followers and proceeds to calculate the total count; otherwise, it continues retrieving the next cargo record.
Given
The counter has been incremented after storing a follower manifest CCN
When
The system checks if the maximum limit has been reached
Then
If the counter exceeds 100, the system stops searching for more followers and proceeds to calculate the total count; otherwise, it continues retrieving the next cargo record
R-GCX126-cbl-00571 End of Database?
Decision Rules
Business View: Assuming the system has attempted to retrieve a cargo record during the 'End of Database?' routine, when the database operation returns a non-blank status code or the master ccn no longer matches, the system executes logic to ensure that the system sets the end-of-database flag and stops searching for more follower manifests.
Given
The system has attempted to retrieve a cargo record
When
The database operation returns a non-blank status code or the master CCN no longer matches
Then
The system sets the end-of-database flag and stops searching for more follower manifests
R-GCX126-cbl-00572 Calculate Total Follower Count
Computation Rules
Business View: Assuming the search for follower manifests has completed (either by reaching the limit, end of database, or no more matches) during the 'Calculate Total Follower Count' routine, when the system needs to determine how many followers were actually found, the system executes logic to ensure that the system subtracts 1 from the counter variable to get the accurate count of follower manifests stored in the array.
Given
The search for follower manifests has completed (either by reaching the limit, end of database, or no more matches)
When
The system needs to determine how many followers were actually found
Then
The system subtracts 1 from the counter variable to get the accurate count of follower manifests stored in the array
R-GCX126-cbl-00573 Any Followers Found?
Decision Rules
Business View: Assuming the follower manifest search has completed and the count has been calculated during the 'Any Followers Found?' routine, when the system checks if any followers were collected, the system executes logic to ensure that if the count is less than or equal to 0, the system exits the process without performing any updates; if the count is greater than 0, the system proceeds to process each follower.
Given
The follower manifest search has completed and the count has been calculated
When
The system checks if any followers were collected
Then
If the count is less than or equal to 0, the system exits the process without performing any updates; if the count is greater than 0, the system proceeds to process each follower
R-GCX126-cbl-00574 Get Next Follower CCN from Array
Process Rules
Business View: Assuming at least one follower manifest ccn exists in the collection array during the 'Get Next Follower CCN from Array' routine, when the system begins or continues the update process, the system executes logic to ensure that the system retrieves the next follower manifest ccn from the array based on the current iteration position.
Given
At least one follower manifest CCN exists in the collection array
When
The system begins or continues the update process
Then
The system retrieves the next follower manifest CCN from the array based on the current iteration position
R-GCX126-cbl-00575 Retrieve Follower Cargo Record
Action Rules
Business View: Assuming a follower manifest ccn has been retrieved from the collection array during the 'Retrieve Follower Cargo Record' routine, when the system needs to update the follower manifest, the system executes logic to ensure that the system retrieves the complete cargo record from the database using the follower ccn as the key.
Given
A follower manifest CCN has been retrieved from the collection array
When
The system needs to update the follower manifest
Then
The system retrieves the complete cargo record from the database using the follower CCN as the key
R-GCX126-cbl-00577 Log Border Arrival Message: '350 ACK - ARRIVAL ACK AT BORDER'
Process Rules
Business View: Assuming a follower manifest cargo record has been successfully retrieved during the 'Log Border Arrival Message: '350 ACK - ARRIVAL ACK AT BORDER'' routine, when the system prepares to update the cargo record with border arrival acknowledgment, the system executes logic to ensure that the system creates a log entry with the message '350 ack - arrival ack at border' associated with the follower manifest ccn.
Given
A follower manifest cargo record has been successfully retrieved
When
The system prepares to update the cargo record with border arrival acknowledgment
Then
The system creates a log entry with the message '350 ACK - ARRIVAL ACK AT BORDER' associated with the follower manifest CCN
R-GCX126-cbl-00578 Set Border Arrival Flag to TRUE
Process Rules
Business View: Assuming a follower manifest cargo record has been retrieved and logged during the 'Set Border Arrival Flag to TRUE' routine, when the system updates the cargo status, the system executes logic to ensure that the system sets the border arrival acknowledgment flag to true in the cargo record.
Given
A follower manifest cargo record has been retrieved and logged
When
The system updates the cargo status
Then
The system sets the border arrival acknowledgment flag to TRUE in the cargo record
R-GCX126-cbl-00580 More Followers to Process?
Decision Rules
Business View: Assuming one follower manifest has been processed (either updated or skipped) during the 'More Followers to Process?' routine, when the system checks the iteration status, the system executes logic to ensure that if there are more follower ccns in the array that have not been processed (not spaces or low-values), the system retrieves the next follower ccn; otherwise, the process completes.
Given
One follower manifest has been processed (either updated or skipped)
When
The system checks the iteration status
Then
If there are more follower CCNs in the array that have not been processed (not spaces or low-values), the system retrieves the next follower CCN; otherwise, the process completes
R-GCX126-cbl-00768 Initialize Loop Counter I = 1
Process Rules
Business View: Assuming a master manifest ccn has been identified for processing during the 'Initialize Loop Counter I = 1' routine, when the system begins to retrieve follower manifests, the system executes logic to ensure that the loop counter i is set to 1 and the follower manifest array is initialized to spaces.
Given
A master manifest CCN has been identified for processing
When
The system begins to retrieve follower manifests
Then
The loop counter I is set to 1 and the follower manifest array is initialized to spaces
R-GCX126-cbl-00769 Set Accept Status to 'GEGB'
Action Rules
Business View: Assuming the system is ready to retrieve the next follower manifest record during the 'Set Accept Status to 'GEGB'' routine, when database access is initiated, the system executes logic to ensure that the accept status is set to 'gegb' to enable get next operation.
Given
The system is ready to retrieve the next follower manifest record
When
Database access is initiated
Then
The accept status is set to 'GEGB' to enable Get Next operation
R-GCX126-cbl-00770 Call CIMS with GN Function
Action Rules
Business View: Assuming the accept status is set to 'gegb' and the master ccn key is positioned during the 'Call CIMS with GN Function' routine, when the cims program is called with gn (get next) function using pcb7 and qualified ssa for master ccn, the system executes logic to ensure that the next cargo report segment is retrieved into the cargo report segment area.
Given
The accept status is set to 'GEGB' and the master CCN key is positioned
When
The CIMS program is called with GN (Get Next) function using PCB7 and qualified SSA for master CCN
Then
The next cargo report segment is retrieved into the cargo report segment area
R-GCX126-cbl-00772 Master CCN Matches Saved CCN?
Decision Rules
Business View: Assuming a cargo record has been successfully retrieved from the database during the 'Master CCN Matches Saved CCN?' routine, when the master manifest ccn field of the retrieved record is compared to the saved ccn, the system executes logic to ensure that if the master manifest ccn equals the saved ccn, continue processing; otherwise set end of database flag to true.
Given
A cargo record has been successfully retrieved from the database
When
The master manifest CCN field of the retrieved record is compared to the saved CCN
Then
If the master manifest CCN equals the saved CCN, continue processing; otherwise set end of database flag to true
R-GCX126-cbl-00773 Is Follower Manifest?
Decision Rules
Business View: Assuming a cargo record with matching master ccn has been retrieved during the 'Is Follower Manifest?' routine, when the manifest type indicator is evaluated, the system executes logic to ensure that if the record is a follower manifest (not a master), store its ccn; if it is a master manifest, skip and continue to next record.
Given
A cargo record with matching master CCN has been retrieved
When
The manifest type indicator is evaluated
Then
If the record is a follower manifest (not a master), store its CCN; if it is a master manifest, skip and continue to next record
R-GCX126-cbl-00774 Store Follower CCN in Array Position I
Process Rules
Business View: Assuming a follower manifest record has been identified during the 'Store Follower CCN in Array Position I' routine, when the ccn needs to be stored for later processing, the system executes logic to ensure that the cargo ccn key is moved to the follower manifest array at position i.
Given
A follower manifest record has been identified
When
The CCN needs to be stored for later processing
Then
The cargo CCN key is moved to the follower manifest array at position I
R-GCX126-cbl-00775 Increment Counter I
Process Rules
Business View: Assuming a follower manifest ccn has been stored in the array during the 'Increment Counter I' routine, when the system prepares to retrieve the next follower manifest, the system executes logic to ensure that the counter i is incremented by 1.
Given
A follower manifest CCN has been stored in the array
When
The system prepares to retrieve the next follower manifest
Then
The counter I is incremented by 1
R-GCX126-cbl-00776 I > 100 or End of Database?
Process Rules
Business View: Assuming the system is processing follower manifests in a loop during the 'I > 100 or End of Database?' routine, when the loop termination conditions are evaluated, the system executes logic to ensure that if counter i exceeds 100 or the end of database flag is true, exit the loop; otherwise continue retrieving next record.
Given
The system is processing follower manifests in a loop
When
The loop termination conditions are evaluated
Then
If counter I exceeds 100 OR the end of database flag is true, exit the loop; otherwise continue retrieving next record
R-GCX126-cbl-00778 End Loop
Process Rules
Business View: Assuming the loop has processed all available follower manifests or reached the maximum limit of 100 or encountered end of database during the 'End Loop' routine, when the loop termination point is reached, the system executes logic to ensure that the counter i is decremented by 1 to reflect the actual count of follower manifests retrieved.
Given
The loop has processed all available follower manifests OR reached the maximum limit of 100 OR encountered end of database
When
The loop termination point is reached
Then
The counter I is decremented by 1 to reflect the actual count of follower manifests retrieved
R-GCX126-cbl-00160 Train ID Same as Previous CRN?
Decision Rules
Business View: Assuming a conveyance 350 message is being processed with x4 segment entry type code equal to '992' and the x4 related document id (first 25 characters) is available during the 'Train ID Same as Previous CRN?' routine, when the x4 related document id (first 25 characters) matches the previously processed train id stored in memory, the system executes logic to ensure that the system skips all processing for this train id and continues to the next segment without performing train lookup, validation, or border arrival acknowledgment.
Given
A conveyance 350 message is being processed with X4 segment entry type code equal to '992' and the X4 related document ID (first 25 characters) is available
When
The X4 related document ID (first 25 characters) matches the previously processed train ID stored in memory
Then
The system skips all processing for this train ID and continues to the next segment without performing train lookup, validation, or border arrival acknowledgment
R-GCX126-cbl-00161 Lookup Train in System Using Train ID
Action Rules
Business View: Assuming a conveyance 350 message with x4 segment entry type code equal to '992' and the x4 related document id (first 25 characters) is different from the previously processed train id during the 'Lookup Train in System Using Train ID' routine, when the system needs to validate the train entry, the system executes logic to ensure that the system stores the x4 related document id (first 25 characters) as the current train id in memory and performs a database lookup using this train id as the key value to retrieve the train root segment.
Given
A conveyance 350 message with X4 segment entry type code equal to '992' and the X4 related document ID (first 25 characters) is different from the previously processed train ID
When
The system needs to validate the train entry
Then
The system stores the X4 related document ID (first 25 characters) as the current train ID in memory and performs a database lookup using this train ID as the key value to retrieve the train root segment
R-GCX126-cbl-00162 Train Exists in System?
Validation Rules
Business View: Assuming a database lookup has been performed for a train id from the x4 segment related document id during the 'Train Exists in System?' routine, when the database operation completes, the system executes logic to ensure that if the database status code is not blank (spaces), the train does not exist and error processing is triggered; if the database status code is blank (spaces), the train exists and normal processing continues.
Given
A database lookup has been performed for a train ID from the X4 segment related document ID
When
The database operation completes
Then
If the database status code is not blank (spaces), the train does not exist and error processing is triggered; if the database status code is blank (spaces), the train exists and normal processing continues
R-GCX126-cbl-00163 Set Message: 'UNKNOWN TRAIN ENTRY IN EDI 350'
Process Rules
Business View: <EXCLUSION CRITERIA> If a train id lookup has failed and the train does not exist in the system, and the error report preparation begins occurs during the 'Set Message: 'UNKNOWN TRAIN ENTRY IN EDI 350'' routine, then the system must guarantee that the system clears the first detail line of the report and sets the message to 'unknown train entry in edi 350 ' concatenated with the train id (first 25 characters of x4 related document id).
EXCLUDING
A train ID lookup has failed and the train does not exist in the system
When
The error report preparation begins
Then
The system clears the first detail line of the report and sets the message to 'UNKNOWN TRAIN ENTRY IN EDI 350 ' concatenated with the train ID (first 25 characters of X4 related document ID)
R-GCX126-cbl-00164 Add Train ID to Report
Process Rules
Business View: Assuming the error report header message is being prepared for an unknown train during the 'Add Train ID to Report' routine, when the train id needs to be added to the report, the system executes logic to ensure that the system appends the x4 related document id (first 25 characters) to the error message 'unknown train entry in edi 350 ' in the first detail line of the report.
Given
The error report header message is being prepared for an unknown train
When
The train ID needs to be added to the report
Then
The system appends the X4 related document ID (first 25 characters) to the error message 'UNKNOWN TRAIN ENTRY IN EDI 350 ' in the first detail line of the report
R-GCX126-cbl-00165 Add Message: 'THIS CRN WAS NOT FOUND'
Process Rules
Business View: Assuming the error report is being prepared for an unknown train id during the 'Add Message: 'THIS CRN WAS NOT FOUND'' routine, when additional explanation is needed in the report, the system executes logic to ensure that the system sets the third detail line of the report to the message 'this crn was not found.'.
Given
The error report is being prepared for an unknown train ID
When
Additional explanation is needed in the report
Then
The system sets the third detail line of the report to the message 'THIS CRN WAS NOT FOUND.'
R-GCX126-cbl-00167 Send Error Report to Merlin
Action Rules
Business View: <EXCLUSION CRITERIA> If an error report has been fully prepared with message 'unknown train entry in edi 350' followed by the train id, message 'this crn was not found.', report line count set to 4, and report type marked as 'unknown', and the error report is ready to be sent occurs during the 'Send Error Report to Merlin' routine, then the system must guarantee that the system invokes the merlin notification preparation process to send the error report to the configured recipients.
EXCLUDING
An error report has been fully prepared with message 'UNKNOWN TRAIN ENTRY IN EDI 350' followed by the train ID, message 'THIS CRN WAS NOT FOUND.', report line count set to 4, and report type marked as 'UNKNOWN'
When
The error report is ready to be sent
Then
The system invokes the Merlin notification preparation process to send the error report to the configured recipients
R-GCX126-cbl-00168 Continue Processing
Process Rules
Business View: Assuming either the train id matches the previously processed train id or the train id was successfully found in the system database during the 'Continue Processing' routine, when train validation is complete, the system executes logic to ensure that the system proceeds to log the train arrival information, create a log entry with action code 'zzz', message '350 ack - arrival ack at border', and spawns the logging transaction for the train.
Given
Either the train ID matches the previously processed train ID OR the train ID was successfully found in the system database
When
Train validation is complete
Then
The system proceeds to log the train arrival information, create a log entry with action code 'ZZZ', message '350 ACK - ARRIVAL ACK AT BORDER', and spawns the logging transaction for the train
R-GCX126-cbl-00169 Check if K1 Segments Were Found
Decision Rules
Business View: Assuming edi 350 message segments have been processed and k1 segment found indicator is set to true during the 'Check if K1 Segments Were Found' routine, when the system begins the k1 remarks logging process, the system executes logic to ensure that the system initiates the loop to process all stored k1 remarks from index 1 to the maximum k1 remark index.
Given
EDI 350 message segments have been processed and K1 segment found indicator is set to true
When
The system begins the K1 remarks logging process
Then
The system initiates the loop to process all stored K1 remarks from index 1 to the maximum K1 remark index
R-GCX126-cbl-00170 Check if K1 Segments Were Found, More K1 Remarks to Process?, K1 Remark Empty?
Validation Rules
Business View: Assuming k1 segments were found and the loop counter is within the valid range (counter <= k1 remark index) during the 'Check if K1 Segments Were Found, More K1 Remarks to Process?, K1 Remark Empty?' routine, when the current k1 remark entry in the array equals spaces, the system executes logic to ensure that the system increments the loop counter and continues to check the next k1 remark without logging.
Given
K1 segments were found and the loop counter is within the valid range (counter <= K1 remark index)
When
The current K1 remark entry in the array equals spaces
Then
The system increments the loop counter and continues to check the next K1 remark without logging
R-GCX126-cbl-00171 Get K1 Remark from Array, Build Log Message: 'EDI 350 K1:' + First Free-Form Message, Log Cargo Information Message
Process Rules
Business View: Assuming a non-empty k1 remark exists at the current loop index position during the 'Get K1 Remark from Array, Build Log Message: 'EDI 350 K1:' + First Free-Form Message, Log Cargo Information Message' routine, when the system retrieves the k1 segment from the remark array, the system executes logic to ensure that the system initializes the k1 segment structure, moves the remark data to k1 segment, clears the information message work area, concatenates 'edi 350 k1: ' with the first free-form message field (k1-01-free-form-message), stores the result in the information message work area, and invokes the cargo information message logging process.
Given
A non-empty K1 remark exists at the current loop index position
When
The system retrieves the K1 segment from the remark array
Then
The system initializes the K1 segment structure, moves the remark data to K1 segment, clears the information message work area, concatenates 'EDI 350 K1: ' with the first free-form message field (K1-01-FREE-FORM-MESSAGE), stores the result in the information message work area, and invokes the cargo information message logging process
R-GCX126-cbl-00172 Check Second Free-Form Message Exists?, Build Log Message: 'EDI 350 K1:' + Second Free-Form Message, Log Cargo Information Message
Process Rules
Business View: <EXCLUSION CRITERIA> If the first free-form message from the k1 segment has been logged and the k1 segment contains a second free-form message field, and the second free-form message field (k1-02-free-form-message) is not equal to spaces occurs during the 'Check Second Free-Form Message Exists?, Build Log Message: 'EDI 350 K1:' + Second Free-Form Message, Log Cargo Information Message' routine, then the system must guarantee that the system clears the information message work area, concatenates 'edi 350 k1: ' with the second free-form message field, stores the result in the information message work area, and invokes the cargo information message logging process.
EXCLUDING
The first free-form message from the K1 segment has been logged and the K1 segment contains a second free-form message field
When
The second free-form message field (K1-02-FREE-FORM-MESSAGE) is not equal to spaces
Then
The system clears the information message work area, concatenates 'EDI 350 K1: ' with the second free-form message field, stores the result in the information message work area, and invokes the cargo information message logging process
R-GCX126-cbl-00174 Check if K1 Segments Were Found
Decision Rules
Business View: Assuming edi 350 message segments have been processed during the 'Check if K1 Segments Were Found' routine, when the k1 segment found indicator is set to false (no k1 segments were found), the system executes logic to ensure that the system skips the k1 remarks logging process entirely and proceeds to the next processing step.
Given
EDI 350 message segments have been processed
When
The K1 segment found indicator is set to false (no K1 segments were found)
Then
The system skips the K1 remarks logging process entirely and proceeds to the next processing step
R-GCX126-cbl-00175 N7 Segment Found?
Decision Rules
Business View: Assuming an edi 350 message has been processed and all segments have been parsed during the 'N7 Segment Found?' routine, when the n7 segment found indicator is set to false (ws-no-n7-seg-found), the system executes logic to ensure that the system skips all n7 equipment logging operations and proceeds to the end of the logging process.
Given
An EDI 350 message has been processed and all segments have been parsed
When
The N7 segment found indicator is set to false (WS-NO-N7-SEG-FOUND)
Then
The system skips all N7 equipment logging operations and proceeds to the end of the logging process
R-GCX126-cbl-00176 N7 Segment Found?
Decision Rules
Business View: Assuming an edi 350 message has been processed and n7 equipment segments were found during the 'N7 Segment Found?' routine, when the n7 segment found indicator is set to true (ws-n7-segment-found), the system executes logic to ensure that the system initiates the loop to process and log all equipment information from the log-line array starting at index 1.
Given
An EDI 350 message has been processed and N7 equipment segments were found
When
The N7 segment found indicator is set to true (WS-N7-SEGMENT-FOUND)
Then
The system initiates the loop to process and log all equipment information from the LOG-LINE array starting at index 1
R-GCX126-cbl-00177 Initialize Loop Counter to 1
Process Rules
Business View: Assuming n7 equipment segments were found in the edi 350 message during the 'Initialize Loop Counter to 1' routine, when the system begins the equipment logging process, the system executes logic to ensure that the loop counter (log-indx) is set to 1 to start processing from the first log-line entry.
Given
N7 equipment segments were found in the EDI 350 message
When
The system begins the equipment logging process
Then
The loop counter (LOG-INDX) is set to 1 to start processing from the first LOG-LINE entry
R-GCX126-cbl-00183 Move LOG-LINE to Message Field
Process Rules
Business View: Assuming a log-line entry has been retrieved from the array at the current loop index during the 'Move LOG-LINE to Message Field' routine, when the system prepares the equipment information for logging, the system executes logic to ensure that the log-line entry content is moved to the ws-gcx105-info-msg field, clearing any previous content in that field.
Given
A LOG-LINE entry has been retrieved from the array at the current loop index
When
The system prepares the equipment information for logging
Then
The LOG-LINE entry content is moved to the WS-GCX105-INFO-MSG field, clearing any previous content in that field
R-GCX126-cbl-00184 42: Log Cargo Information Message
Action Rules
Business View: Assuming equipment information from log-line has been moved to ws-gcx105-info-msg field during the '42: Log Cargo Information Message' routine, when the system invokes the z150-log-cargo-info-msg procedure, the system executes logic to ensure that the equipment information is logged to cargo history with current date, time, ccn, cargo type indicator, and action code.
Given
Equipment information from LOG-LINE has been moved to WS-GCX105-INFO-MSG field
When
The system invokes the Z150-LOG-CARGO-INFO-MSG procedure
Then
The equipment information is logged to cargo history with current date, time, CCN, cargo type indicator, and action code
R-GCX126-cbl-00187 Extract CCN from M10 Segment M10-07-CCN
Process Rules
Business View: Assuming an edi 350 message has been parsed and m10 segment data is available during the 'Extract CCN from M10 Segment M10-07-CCN' routine, when the cargo lookup process is initiated, the system executes logic to ensure that the ccn value from m10-07-ccn field (positions 1-25) is extracted and prepared for database search.
Given
An EDI 350 message has been parsed and M10 segment data is available
When
The cargo lookup process is initiated
Then
The CCN value from M10-07-CCN field (positions 1-25) is extracted and prepared for database search
R-GCX126-cbl-00188 Set Search Keys: - CCRT-SSAQ Key = CCN - A2RT-SSAQ Key = CCN
Process Rules
Business View: Assuming the ccn has been extracted from m10-07-ccn field during the 'Set Search Keys: - CCRT-SSAQ Key = CCN - A2RT-SSAQ Key = CCN' routine, when database search keys need to be established, the system executes logic to ensure that the ccn value is assigned to both ccrt-ssaq key-value and a2rt-ssaq key-value for qualified segment search.
Given
The CCN has been extracted from M10-07-CCN field
When
Database search keys need to be established
Then
The CCN value is assigned to both CCRT-SSAQ KEY-VALUE and A2RT-SSAQ KEY-VALUE for qualified segment search
R-GCX126-cbl-00189 Call Database GHU Function to Retrieve Cargo
Action Rules
Business View: Assuming the search keys have been set with the ccn value during the 'Call Database GHU Function to Retrieve Cargo' routine, when the cargo record retrieval is executed, the system executes logic to ensure that the system calls cims with ghu function code against gccc-pcb using ccrt-ssaq qualified search to retrieve gccc-cargo-report-segment.
Given
The search keys have been set with the CCN value
When
The cargo record retrieval is executed
Then
The system calls CIMS with GHU function code against GCCC-PCB using CCRT-SSAQ qualified search to retrieve GCCC-CARGO-REPORT-SEGMENT
R-GCX126-cbl-00192 Retrieve Secondary Cargo Segment GCSCCS52
Action Rules
Business View: Assuming the primary cargo record has been successfully retrieved during the 'Retrieve Secondary Cargo Segment GCSCCS52' routine, when secondary segment retrieval is initiated, the system executes logic to ensure that the system calls cims with ghu function code against gca2-pcb using a2rt-ssaq qualified search to retrieve gcsccs52 segment, and if not found (status = 'ge'), initializes gcsccs52 to spaces.
Given
The primary cargo record has been successfully retrieved
When
Secondary segment retrieval is initiated
Then
The system calls CIMS with GHU function code against GCA2-PCB using A2RT-SSAQ qualified search to retrieve GCSCCS52 segment, and if not found (status = 'GE'), initializes GCSCCS52 to SPACES
R-GCX126-cbl-00202 Save Cargo Data: - CCN Key - Equipment Car ID - Waybill Index - Release Information
Process Rules
Business View: Assuming the cargo record has been successfully retrieved and status checks completed during the 'Save Cargo Data: - CCN Key - Equipment Car ID - Waybill Index - Release Information' routine, when cargo data needs to be preserved for processing, the system executes logic to ensure that the system saves gccc-cargo-report-segment to ws-save-gcsccrt, gccc-ccn-key to ws-current-ccn-key and ws-save-ccn, gccc-equipment-car to ws-current-carid-key, gccc-release-information to ws-save-release-information, and gccc-waybill-key-for-index to save-waybill-index.
Given
The cargo record has been successfully retrieved and status checks completed
When
Cargo data needs to be preserved for processing
Then
The system saves GCCC-CARGO-REPORT-SEGMENT to WS-SAVE-GCSCCRT, GCCC-CCN-KEY to WS-CURRENT-CCN-KEY and WS-SAVE-CCN, GCCC-EQUIPMENT-CAR to WS-CURRENT-CARID-KEY, GCCC-RELEASE-INFORMATION to WS-SAVE-RELEASE-INFORMATION, and GCCC-WAYBILL-KEY-FOR-INDEX to SAVE-WAYBILL-INDEX
R-GCX126-cbl-00204 Cargo Found?
Validation Rules
Business View: Assuming an edi 350 message has been received with a ccn (cargo control number) in the m10 segment during the 'Cargo Found?' routine, when the system attempts to retrieve the cargo record using the ccn, the system executes logic to ensure that the system determines if the cargo record exists or not found in the database.
Given
An EDI 350 message has been received with a CCN (Cargo Control Number) in the M10 segment
When
The system attempts to retrieve the cargo record using the CCN
Then
The system determines if the cargo record exists or not found in the database
R-GCX126-cbl-00205 Notice Reason = RELEASED?
Decision Rules
Business View: <EXCLUSION CRITERIA> If cargo record is not found in the database, and the v9 segment notice reason code is evaluated occurs during the 'Notice Reason = RELEASED?' routine, then the system must guarantee that the system checks if the notice reason code equals released (v9-02-released).
EXCLUDING
Cargo record is not found in the database
When
The V9 segment notice reason code is evaluated
Then
The system checks if the notice reason code equals RELEASED (V9-02-RELEASED)
R-GCX126-cbl-00206 Prepare Error Report
Process Rules
Business View: <EXCLUSION CRITERIA> If cargo is not found and notice reason is released, and the system prepares to send an error notification occurs during the 'Prepare Error Report' routine, then the system must guarantee that the system initializes the merlin report structure (mrln-350-report) with spaces.
EXCLUDING
Cargo is not found and notice reason is RELEASED
When
The system prepares to send an error notification
Then
The system initializes the Merlin report structure (MRLN-350-REPORT) with spaces
R-GCX126-cbl-00207 Set Report Line 1: 'UNKNOWN EDI 350 RELEASE FROM CBSA' + CCN
Action Rules
Business View: Assuming the error report structure is initialized during the 'Set Report Line 1: 'UNKNOWN EDI 350 RELEASE FROM CBSA' + CCN' routine, when the system constructs the error message, the system executes logic to ensure that the system sets mrln-dtl-line(01) to 'unknown edi 350 release from cbsa ' concatenated with the ccn from m10-07-ccn (first 25 characters).
Given
The error report structure is initialized
When
The system constructs the error message
Then
The system sets MRLN-DTL-LINE(01) to 'UNKNOWN EDI 350 RELEASE FROM CBSA ' concatenated with the CCN from M10-07-CCN (first 25 characters)
R-GCX126-cbl-00208 Set Report Line 3: 'THIS CCN WAS NOT FOUND.'
Action Rules
Business View: Assuming the first line of the error message has been set during the 'Set Report Line 3: 'THIS CCN WAS NOT FOUND.'' routine, when the system continues building the error message, the system executes logic to ensure that the system sets mrln-dtl-line(03) to 'this ccn was not found.'.
Given
The first line of the error message has been set
When
The system continues building the error message
Then
The system sets MRLN-DTL-LINE(03) to 'THIS CCN WAS NOT FOUND.'
R-GCX126-cbl-00209 Set Report Line 4: 'RELEASE NUMBER:' + Release Reference + 'DONE BY PORT' + Port Code
Action Rules
Business View: Assuming the explanatory text has been added to line 3 during the 'Set Report Line 4: 'RELEASE NUMBER:' + Release Reference + 'DONE BY PORT' + Port Code' routine, when the system adds release details to the error message, the system executes logic to ensure that the system sets mrln-dtl-line(04) by concatenating 'release number: ', x4-01-cbsa-rel-ref-id (first 15 characters), ' done by port ', and p4-01-port-cde (first 4 characters).
Given
The explanatory text has been added to line 3
When
The system adds release details to the error message
Then
The system sets MRLN-DTL-LINE(04) by concatenating 'RELEASE NUMBER: ', X4-01-CBSA-REL-REF-ID (first 15 characters), ' DONE BY PORT ', and P4-01-PORT-CDE (first 4 characters)
R-GCX126-cbl-00210 Set Report Line Count = 5
Action Rules
Business View: Assuming all error message lines have been populated during the 'Set Report Line Count = 5' routine, when the system finalizes the error report structure, the system executes logic to ensure that the system sets mrln-line to 5 indicating the total number of report lines.
Given
All error message lines have been populated
When
The system finalizes the error report structure
Then
The system sets MRLN-LINE to 5 indicating the total number of report lines
R-GCX126-cbl-00214 Check Notice Reason is DECON?
Decision Rules
Business View: <EXCLUSION CRITERIA> If an edi 350 message has been received and parsed with v9 segment containing notice reason code indicating decon, and the cargo lookup using the ccn from m10 segment has returned cargo not found status, and the system evaluates the cargo not found condition and the v9-02-decon notice reason code is true occurs during the 'Check Notice Reason is DECON?' routine, then the system must guarantee that the system prepares an error report with subject line 'unknown edi 350 dcon notice' followed by the ccn from m10-07-ccn field (first 25 characters), sets detail line 3 to 'this ccn was not found.', sets detail line 4 with house bill close number from x4-01-cbsa-rel-ref-id (first 25 characters) and port code from p4-01-port-cde (first 4 characters) in format 'house bill close number [value] done by port [value]', sets total lines to 5, marks message type as unknown, routes the notification to user om01247 with filename unknown, and invokes the email notification process.
EXCLUDING
An EDI 350 message has been received and parsed with V9 segment containing notice reason code indicating DECON, and the cargo lookup using the CCN from M10 segment has returned cargo not found status
When
The system evaluates the cargo not found condition and the V9-02-DECON notice reason code is true
Then
The system prepares an error report with subject line 'UNKNOWN EDI 350 DCON NOTICE' followed by the CCN from M10-07-CCN field (first 25 characters), sets detail line 3 to 'THIS CCN WAS NOT FOUND.', sets detail line 4 with house bill close number from X4-01-CBSA-REL-REF-ID (first 25 characters) and port code from P4-01-PORT-CDE (first 4 characters) in format 'HOUSE BILL CLOSE NUMBER [value] DONE BY PORT [value]', sets total lines to 5, marks message type as unknown, routes the notification to user OM01247 with filename UNKNOWN, and invokes the email notification process
R-GCX126-cbl-00215 Prepare Error Report: Subject, Include CCN, Message
Process Rules
Business View: <EXCLUSION CRITERIA> If the cargo not found condition exists and v9-02-decon notice reason code is true, and the system begins preparing the error notification occurs during the 'Prepare Error Report: Subject, Include CCN, Message' routine, then the system must guarantee that the system clears mrln-dtl-line array element 1, constructs a string 'unknown edi 350 dcon notice ' concatenated with m10-07-ccn field positions 1 through 25 and stores it in mrln-dtl-line element 1, and sets mrln-dtl-line element 3 to the literal value 'this ccn was not found.'.
EXCLUDING
The cargo not found condition exists and V9-02-DECON notice reason code is true
When
The system begins preparing the error notification
Then
The system clears MRLN-DTL-LINE array element 1, constructs a string 'UNKNOWN EDI 350 DCON NOTICE ' concatenated with M10-07-CCN field positions 1 through 25 and stores it in MRLN-DTL-LINE element 1, and sets MRLN-DTL-LINE element 3 to the literal value 'THIS CCN WAS NOT FOUND.'
R-GCX126-cbl-00216 Add House Bill Close Information: House Bill Close Number, Port Code
Process Rules
Business View: Assuming the error report header has been prepared with subject and primary message during the 'Add House Bill Close Information: House Bill Close Number, Port Code' routine, when the system adds detailed information to the error report, the system executes logic to ensure that the system constructs a string starting with 'house bill close number' followed by x4-01-cbsa-rel-ref-id field positions 1 through 25, then ' done by port ' followed by p4-01-port-cde field positions 1 through 4, and stores this complete string in mrln-dtl-line array element 4.
Given
The error report header has been prepared with subject and primary message
When
The system adds detailed information to the error report
Then
The system constructs a string starting with 'HOUSE BILL CLOSE NUMBER' followed by X4-01-CBSA-REL-REF-ID field positions 1 through 25, then ' DONE BY PORT ' followed by P4-01-PORT-CDE field positions 1 through 4, and stores this complete string in MRLN-DTL-LINE array element 4
R-GCX126-cbl-00217 Prepare Error Report: Subject, Include CCN, Message
Process Rules
Business View: Assuming all detail lines for the deconsolidation error report have been populated during the 'Prepare Error Report: Subject, Include CCN, Message' routine, when the system finalizes the error report structure, the system executes logic to ensure that the system sets mrln-line to value 5 indicating 5 detail lines are present and sets the 88-level condition 88-z110-mrln-type-is-unknown to true.
Given
All detail lines for the deconsolidation error report have been populated
When
The system finalizes the error report structure
Then
The system sets MRLN-LINE to value 5 indicating 5 detail lines are present and sets the 88-level condition 88-Z110-MRLN-TYPE-IS-UNKNOWN to true
R-GCX126-cbl-00218 Set Email Routing: Route to OM01247, Filename UNKNOWN
Action Rules
Business View: Assuming the error report has been fully prepared with all detail lines and message type set to unknown during the 'Set Email Routing: Route to OM01247, Filename UNKNOWN' routine, when the system determines the routing for the error notification, the system executes logic to ensure that the system sets emi-destination-filename to 'unknown', clears emi-to-usercode to spaces, and sets emi-to-usercodes array element 1 to 'om01247'.
Given
The error report has been fully prepared with all detail lines and message type set to unknown
When
The system determines the routing for the error notification
Then
The system sets EMI-DESTINATION-FILENAME to 'UNKNOWN', clears EMI-TO-USERCODE to spaces, and sets EMI-TO-USERCODES array element 1 to 'OM01247'
R-GCX126-cbl-00219 Send Error Email Notification via EMCSEND2
Action Rules
Business View: Assuming the error report is complete with subject line, detail lines, message type set to unknown, and routing configured to user om01247 with filename unknown during the 'Send Error Email Notification via EMCSEND2' routine, when the system is ready to send the notification, the system executes logic to ensure that the system invokes the z115-call-emcsend procedure which calls the emcsend2 program passing the from usercode, destination filename, to usercode, copy usercode, subject, keywords, report content, return status flag, segment numbers, and item type parameters.
Given
The error report is complete with subject line, detail lines, message type set to unknown, and routing configured to user OM01247 with filename UNKNOWN
When
The system is ready to send the notification
Then
The system invokes the Z115-CALL-EMCSEND procedure which calls the EMCSEND2 program passing the from usercode, destination filename, to usercode, copy usercode, subject, keywords, report content, return status flag, segment numbers, and item type parameters
R-GCX126-cbl-00220 Handle Unknown Cargo Entry
Action Rules
Business View: <EXCLUSION CRITERIA> If an edi 350 message has been processed with m10 segment containing ccn (cargo control number), v9 segment containing notice document type code and notice reason code, and the cargo lookup returned 'cargo not found' status, and the v9 notice reason code is not 'released' and not 'decon' occurs during the 'Handle Unknown Cargo Entry' routine, then the system must guarantee that the system prepares an error email notification with subject 'unknown edi 350 entry from cbsa' followed by the ccn, message line 1 contains 'unknown edi 350 entry from cbsa' with the ccn, message line 3 contains 'this ccn was not found.', message line 4 contains 'notice doc type: ' followed by the notice document type code, ' with reason code ' followed by the first 4 characters of the notice reason code, sets the line count to 5, sets the recipient to 'om01247', sets the email type indicator to 'unknown', and sends the email notification.
EXCLUDING
An EDI 350 message has been processed with M10 segment containing CCN (Cargo Control Number), V9 segment containing notice document type code and notice reason code, and the cargo lookup returned 'cargo not found' status
When
The V9 notice reason code is NOT 'RELEASED' AND NOT 'DECON'
Then
The system prepares an error email notification with subject 'UNKNOWN EDI 350 ENTRY FROM CBSA' followed by the CCN, message line 1 contains 'UNKNOWN EDI 350 ENTRY FROM CBSA' with the CCN, message line 3 contains 'THIS CCN WAS NOT FOUND.', message line 4 contains 'NOTICE DOC TYPE: ' followed by the notice document type code, ' WITH REASON CODE ' followed by the first 4 characters of the notice reason code, sets the line count to 5, sets the recipient to 'OM01247', sets the email type indicator to 'UNKNOWN', and sends the email notification
R-GCX126-cbl-00221 Check Notice Reason Code
Decision Rules
Business View: <EXCLUSION CRITERIA> If an edi 350 message has been processed with cargo not found status and v9 segment containing notice reason code, and the v9 notice reason code indicates 'released' occurs during the 'Check Notice Reason Code' routine, then the system must guarantee that the system skips the unknown entry notification process and exits without sending the generic unknown cargo entry email.
EXCLUDING
An EDI 350 message has been processed with cargo not found status and V9 segment containing notice reason code
When
The V9 notice reason code indicates 'RELEASED'
Then
The system skips the unknown entry notification process and exits without sending the generic unknown cargo entry email
R-GCX126-cbl-00222 Check Notice Reason Code
Decision Rules
Business View: <EXCLUSION CRITERIA> If an edi 350 message has been processed with cargo not found status and v9 segment containing notice reason code, and the v9 notice reason code indicates 'decon' (deconsolidation) occurs during the 'Check Notice Reason Code' routine, then the system must guarantee that the system skips the unknown entry notification process and exits without sending the generic unknown cargo entry email.
EXCLUDING
An EDI 350 message has been processed with cargo not found status and V9 segment containing notice reason code
When
The V9 notice reason code indicates 'DECON' (deconsolidation)
Then
The system skips the unknown entry notification process and exits without sending the generic unknown cargo entry email
R-GCX126-cbl-00223 Set Subject: 'UNKNOWN EDI 350 ENTRY FROM CBSA'
Process Rules
Business View: Assuming an unknown cargo entry notification needs to be sent with ccn from m10 segment during the 'Set Subject: 'UNKNOWN EDI 350 ENTRY FROM CBSA'' routine, when the email subject is being prepared, the system executes logic to ensure that the system sets the email subject to 'unknown edi 350 entry from cbsa ' concatenated with the 25-character ccn from m10-07-ccn field.
Given
An unknown cargo entry notification needs to be sent with CCN from M10 segment
When
The email subject is being prepared
Then
The system sets the email subject to 'UNKNOWN EDI 350 ENTRY FROM CBSA ' concatenated with the 25-character CCN from M10-07-CCN field
R-GCX126-cbl-00224 Add CCN to Message Line 1
Process Rules
Business View: Assuming an unknown cargo entry notification is being prepared with ccn from m10 segment during the 'Add CCN to Message Line 1' routine, when the email message body is being constructed, the system executes logic to ensure that the system sets message detail line 1 to 'unknown edi 350 entry from cbsa ' concatenated with the first 25 characters of m10-07-ccn field.
Given
An unknown cargo entry notification is being prepared with CCN from M10 segment
When
The email message body is being constructed
Then
The system sets message detail line 1 to 'UNKNOWN EDI 350 ENTRY FROM CBSA ' concatenated with the first 25 characters of M10-07-CCN field
R-GCX126-cbl-00225 Add 'THIS CCN WAS NOT FOUND' to Message Line 3
Process Rules
Business View: Assuming an unknown cargo entry notification is being prepared during the 'Add 'THIS CCN WAS NOT FOUND' to Message Line 3' routine, when the email message body is being constructed, the system executes logic to ensure that the system sets message detail line 3 to 'this ccn was not found.'.
Given
An unknown cargo entry notification is being prepared
When
The email message body is being constructed
Then
The system sets message detail line 3 to 'THIS CCN WAS NOT FOUND.'
R-GCX126-cbl-00226 Add Notice Document Type and Reason Code to Line 4
Process Rules
Business View: Assuming an unknown cargo entry notification is being prepared with m10 segment containing notice document type code and v9 segment containing notice reason code during the 'Add Notice Document Type and Reason Code to Line 4' routine, when the email message body is being constructed, the system executes logic to ensure that the system sets message detail line 4 to 'notice doc type: ' concatenated with m10-05-notice-doc-typ-cde, followed by ' with reason code ' concatenated with the first 4 characters of v9-02-notice-rsn-cde field.
Given
An unknown cargo entry notification is being prepared with M10 segment containing notice document type code and V9 segment containing notice reason code
When
The email message body is being constructed
Then
The system sets message detail line 4 to 'NOTICE DOC TYPE: ' concatenated with M10-05-NOTICE-DOC-TYP-CDE, followed by ' WITH REASON CODE ' concatenated with the first 4 characters of V9-02-NOTICE-RSN-CDE field
R-GCX126-cbl-00227 Add Notice Document Type and Reason Code to Line 4
Process Rules
Business View: Assuming an unknown cargo entry notification email has been prepared with 4 message detail lines during the 'Add Notice Document Type and Reason Code to Line 4' routine, when the email is ready to be sent, the system executes logic to ensure that the system sets the message line count to 5.
Given
An unknown cargo entry notification email has been prepared with 4 message detail lines
When
The email is ready to be sent
Then
The system sets the message line count to 5
R-GCX126-cbl-00230 Send Email Notification
Action Rules
Business View: Assuming an unknown cargo entry notification has been fully prepared with subject, message lines, recipient, and email type during the 'Send Email Notification' routine, when the notification is ready to be dispatched, the system executes logic to ensure that the system performs the email preparation and sending routine (z110-prep-emcsend).
Given
An unknown cargo entry notification has been fully prepared with subject, message lines, recipient, and email type
When
The notification is ready to be dispatched
Then
The system performs the email preparation and sending routine (Z110-PREP-EMCSEND)
R-GCX126-cbl-00231 Process Document Not Matched - Log 'DOC NOT MATCHED' message when V9 notice reason is NOT-MATCHED
Process Rules
Business View: Assuming a cargo record exists in the system with a valid ccn (cargo control number) and an edi 350 message has been received and parsed with a v9 segment containing a notice reason code during the 'Process Document Not Matched - Log 'DOC NOT MATCHED' message when V9 notice reason is NOT-MATCHED' routine, when the v9 segment notice reason code indicates not-matched status, the system executes logic to ensure that the system clears the log information message variable, sets the message text to 'edi 350: doc not matched', moves the message to the log info variable, and invokes the log cargo information message process to record the message with the current ccn, current machine date, current machine time, current user id, action code for input message, and cargo type indicator.
Given
A cargo record exists in the system with a valid CCN (Cargo Control Number) and an EDI 350 message has been received and parsed with a V9 segment containing a notice reason code
When
The V9 segment notice reason code indicates NOT-MATCHED status
Then
The system clears the log information message variable, sets the message text to 'EDI 350: DOC NOT MATCHED', moves the message to the log info variable, and invokes the log cargo information message process to record the message with the current CCN, current machine date, current machine time, current user ID, action code for input message, and cargo type indicator
R-GCX126-cbl-00232 Process Cargo Complete - Log 'CARGO COMPLETE MESSAGE' when V9 notice reason is CARGO-COMPLETE
Process Rules
Business View: Assuming an edi 350 message has been received and parsed, and a cargo record exists in the system matching the ccn from the m10 segment, and the v9 segment notice reason code indicates cargo-complete status during the 'Process Cargo Complete - Log 'CARGO COMPLETE MESSAGE' when V9 notice reason is CARGO-COMPLETE' routine, when the system processes the v9 segment with cargo-complete notice reason code, the system executes logic to ensure that the system prepares a log message 'edi 350: cargo complete message', sets the log information with current machine date and time, the cargo ccn key, action code for input message, and cargo type as ca-cargo, and spawns a gct1051e transaction to record the message in the cargo history log.
Given
An EDI 350 message has been received and parsed, and a cargo record exists in the system matching the CCN from the M10 segment, and the V9 segment notice reason code indicates CARGO-COMPLETE status
When
The system processes the V9 segment with CARGO-COMPLETE notice reason code
Then
The system prepares a log message 'EDI 350: CARGO COMPLETE MESSAGE', sets the log information with current machine date and time, the cargo CCN key, action code for input message, and cargo type as CA-CARGO, and spawns a GCT1051E transaction to record the message in the cargo history log
R-GCX126-cbl-00233 Update broker entry, customs transaction number, broker date/time, log 'DOC PKG COMPLETE' message, and update cargo record
Decision Rules
Business View: <EXCLUSION CRITERIA> If a cargo record exists in the database with current broker entry and customs transaction number, and an edi 350 message with v9 segment indicating document package complete status and x4 segment containing cbsa release reference id, and the x4 cbsa release reference id (first 15 characters) is different from the current broker entry or the x4 cbsa release reference id (first 14 characters) is different from the current customs transaction number, and the x4 cbsa release reference id is not spaces occurs during the 'Update broker entry, customs transaction number, broker date/time, log 'DOC PKG COMPLETE' message, and update cargo record' routine, then the system must guarantee that update the cargo broker entry with x4 release reference id (first 15 characters), update the customs transaction number with x4 release reference id (first 14 characters), update the broker date with current machine date, update the broker time with current machine time (first 4 characters), build and log the message 'edi 350: doc pkg complete : ' concatenated with x4 release reference id (first 15 characters), and replace the cargo record in the database.
EXCLUDING
A cargo record exists in the database with current broker entry and customs transaction number, and an EDI 350 message with V9 segment indicating Document Package Complete status and X4 segment containing CBSA Release Reference ID
When
The X4 CBSA Release Reference ID (first 15 characters) is different from the current broker entry OR the X4 CBSA Release Reference ID (first 14 characters) is different from the current customs transaction number, AND the X4 CBSA Release Reference ID is not spaces
Then
Update the cargo broker entry with X4 Release Reference ID (first 15 characters), update the customs transaction number with X4 Release Reference ID (first 14 characters), update the broker date with current machine date, update the broker time with current machine time (first 4 characters), build and log the message 'EDI 350: DOC PKG COMPLETE : ' concatenated with X4 Release Reference ID (first 15 characters), and replace the cargo record in the database
R-GCX126-cbl-00234 Skip Update - Values Already Match
Decision Rules
Business View: Assuming a cargo record exists with current broker entry and customs transaction number, and an edi 350 message with v9 segment indicating document package complete status and x4 segment containing cbsa release reference id during the 'Skip Update - Values Already Match' routine, when the x4 cbsa release reference id (first 15 characters) equals the current broker entry and the x4 cbsa release reference id (first 14 characters) equals the current customs transaction number, the system executes logic to ensure that skip all update operations and continue to next processing step without modifying the cargo record.
Given
A cargo record exists with current broker entry and customs transaction number, and an EDI 350 message with V9 segment indicating Document Package Complete status and X4 segment containing CBSA Release Reference ID
When
The X4 CBSA Release Reference ID (first 15 characters) equals the current broker entry AND the X4 CBSA Release Reference ID (first 14 characters) equals the current customs transaction number
Then
Skip all update operations and continue to next processing step without modifying the cargo record
R-GCX126-cbl-00235 Skip Update - Values Already Match
Validation Rules
Business View: Assuming a cargo record exists in the database and an edi 350 message with v9 segment indicating document package complete status and x4 segment during the 'Skip Update - Values Already Match' routine, when the x4 cbsa release reference id is spaces (blank), the system executes logic to ensure that skip all update operations and continue to next processing step without modifying the cargo record.
Given
A cargo record exists in the database and an EDI 350 message with V9 segment indicating Document Package Complete status and X4 segment
When
The X4 CBSA Release Reference ID is spaces (blank)
Then
Skip all update operations and continue to next processing step without modifying the cargo record
R-GCX126-cbl-00240 Build Log Message: 'EDI 350: DOC PKG COMPLETE : ' + X4 Release Reference First 15 Characters
Process Rules
Business View: Assuming the cargo record has been updated with new broker entry, customs transaction number, broker date, and broker time during the 'Build Log Message: 'EDI 350: DOC PKG COMPLETE : ' + X4 Release Reference First 15 Characters' routine, when preparing to log the document package completion event, the system executes logic to ensure that construct a log message by concatenating the literal text 'edi 350: doc pkg complete : ' with the first 15 characters of x4 cbsa release reference id and store in the log message field.
Given
The cargo record has been updated with new broker entry, customs transaction number, broker date, and broker time
When
Preparing to log the document package completion event
Then
Construct a log message by concatenating the literal text 'EDI 350: DOC PKG COMPLETE : ' with the first 15 characters of X4 CBSA Release Reference ID and store in the log message field
R-GCX126-cbl-00241 Log Cargo Information Message
Action Rules
Business View: Assuming the log message has been constructed with document package complete details during the 'Log Cargo Information Message' routine, when recording the document package completion event, the system executes logic to ensure that invoke the log cargo information message process (z150-log-cargo-info-msg) to write the message to the cargo audit log with current date, time, user id, ccn, and the constructed message text.
Given
The log message has been constructed with document package complete details
When
Recording the document package completion event
Then
Invoke the log cargo information message process (Z150-LOG-CARGO-INFO-MSG) to write the message to the cargo audit log with current date, time, user ID, CCN, and the constructed message text
R-GCX126-cbl-00243 Log Message: 'EDI 350: DOC NOT ON FILE FOR RELEASE' with CBSA Release Reference ID
Decision Rules
Business View: Assuming an edi 350 message is being processed with v9 notice reason code indicating 'doc-not-on-file' and x4 segment contains release document type code and cbsa release reference id during the 'Log Message: 'EDI 350: DOC NOT ON FILE FOR RELEASE' with CBSA Release Reference ID' routine, when the x4 release document type code (position 1, length 1) starts with 'r' indicating a release type transaction, the system executes logic to ensure that the system logs an informational message 'edi 350: doc not on file for release' concatenated with the cbsa release reference id (first 15 characters) to the cargo information log.
Given
An EDI 350 message is being processed with V9 notice reason code indicating 'DOC-NOT-ON-FILE' and X4 segment contains release document type code and CBSA release reference ID
When
The X4 release document type code (position 1, length 1) starts with 'R' indicating a release type transaction
Then
The system logs an informational message 'EDI 350: DOC NOT ON FILE FOR RELEASE' concatenated with the CBSA release reference ID (first 15 characters) to the cargo information log
R-GCX126-cbl-00244 Log Message: 'EDI 350: DOC NOT ON FILE H-BILL CLOSE' with CBSA Release Reference ID
Decision Rules
Business View: <EXCLUSION CRITERIA> If an edi 350 message is being processed with v9 notice reason code indicating 'doc-not-on-file' and x4 segment contains release document type code and cbsa release reference id, and the x4 release document type code (position 1, length 1) does not start with 'r' indicating a non-release type transaction (house bill close) occurs during the 'Log Message: 'EDI 350: DOC NOT ON FILE H-BILL CLOSE' with CBSA Release Reference ID' routine, then the system must guarantee that the system logs an informational message 'edi 350:doc not on file h-bill close' concatenated with the cbsa release reference id (full 25 characters) to the cargo information log.
EXCLUDING
An EDI 350 message is being processed with V9 notice reason code indicating 'DOC-NOT-ON-FILE' and X4 segment contains release document type code and CBSA release reference ID
When
The X4 release document type code (position 1, length 1) does not start with 'R' indicating a non-release type transaction (house bill close)
Then
The system logs an informational message 'EDI 350:DOC NOT ON FILE H-BILL CLOSE' concatenated with the CBSA release reference ID (full 25 characters) to the cargo information log
R-GCX126-cbl-00245 Process Document Not On File
Decision Rules
Business View: Assuming an edi 350 message is being processed with cargo found in the system during the 'Process Document Not On File' routine, when the v9 segment notice reason code equals 'doc-not-on-file', the system executes logic to ensure that the system proceeds to check the release document type to determine the appropriate logging message format.
Given
An EDI 350 message is being processed with cargo found in the system
When
The V9 segment notice reason code equals 'DOC-NOT-ON-FILE'
Then
The system proceeds to check the release document type to determine the appropriate logging message format
R-GCX126-cbl-00246 Process Cargo Reported - Log 'CARGO REPORTED' message when V9 notice reason is REPORTED
Process Rules
Business View: Assuming an edi 350 message has been received and parsed with v9 segment containing notice reason code, and cargo record exists in the database with a valid ccn (cargo control number) during the 'Process Cargo Reported - Log 'CARGO REPORTED' message when V9 notice reason is REPORTED' routine, when the v9 segment notice reason code indicates reported status, the system executes logic to ensure that the system clears the message work area (ws-gcx105-info-msg), builds the message string 'edi 350: cargo reported', and invokes the log cargo information message process (z150-log-cargo-info-msg) to record this status change in the cargo history with the current ccn, date, time, and user information.
Given
An EDI 350 message has been received and parsed with V9 segment containing notice reason code, and cargo record exists in the database with a valid CCN (Cargo Control Number)
When
The V9 segment notice reason code indicates REPORTED status
Then
The system clears the message work area (WS-GCX105-INFO-MSG), builds the message string 'EDI 350: CARGO REPORTED', and invokes the log cargo information message process (Z150-LOG-CARGO-INFO-MSG) to record this status change in the cargo history with the current CCN, date, time, and user information
R-GCX126-cbl-00247 Process Cargo Reported - Log 'CARGO REPORTED' message when V9 notice reason is REPORTED
Decision Rules
Business View: Assuming an edi 350 message v9 segment has been processed and the notice reason code field (v9-02-notice-rsn-cde) is available for evaluation during the 'Process Cargo Reported - Log 'CARGO REPORTED' message when V9 notice reason is REPORTED' routine, when the system evaluates the v9 notice reason code against the reported condition (v9-02-reported), the system executes logic to ensure that if the condition is true, the system proceeds to log the cargo reported message; otherwise, the system continues to evaluate other notice reason code conditions.
Given
An EDI 350 message V9 segment has been processed and the notice reason code field (V9-02-NOTICE-RSN-CDE) is available for evaluation
When
The system evaluates the V9 notice reason code against the REPORTED condition (V9-02-REPORTED)
Then
If the condition is true, the system proceeds to log the cargo reported message; otherwise, the system continues to evaluate other notice reason code conditions
R-GCX126-cbl-00248 Process Cargo Reported - Log 'CARGO REPORTED' message when V9 notice reason is REPORTED
Action Rules
Business View: Assuming the v9 notice reason code has been confirmed as reported status and the message work area (ws-gcx105-info-msg) is available during the 'Process Cargo Reported - Log 'CARGO REPORTED' message when V9 notice reason is REPORTED' routine, when the system prepares the log message content, the system executes logic to ensure that the system clears the message work area (ws-gcx105-info-msg) to spaces and builds the message string 'edi 350: cargo reported' into the work area.
Given
The V9 notice reason code has been confirmed as REPORTED status and the message work area (WS-GCX105-INFO-MSG) is available
When
The system prepares the log message content
Then
The system clears the message work area (WS-GCX105-INFO-MSG) to spaces and builds the message string 'EDI 350: CARGO REPORTED' into the work area
R-GCX126-cbl-00249 Process Cargo Reported - Log 'CARGO REPORTED' message when V9 notice reason is REPORTED
Action Rules
Business View: Assuming the cargo reported message 'edi 350: cargo reported' has been prepared in the message work area (ws-gcx105-info-msg), and the current cargo ccn is available in ws-current-ccn-key during the 'Process Cargo Reported - Log 'CARGO REPORTED' message when V9 notice reason is REPORTED' routine, when the system invokes the log cargo information message process (z150-log-cargo-info-msg), the system executes logic to ensure that the logging service records the message to cargo history with the current machine date, machine time, user id (acf2-userid), action code (log-use-input-message), cargo ccn, cargo type indicator (gcx105-ca-cargo), and the prepared message text.
Given
The cargo reported message 'EDI 350: CARGO REPORTED' has been prepared in the message work area (WS-GCX105-INFO-MSG), and the current cargo CCN is available in WS-CURRENT-CCN-KEY
When
The system invokes the log cargo information message process (Z150-LOG-CARGO-INFO-MSG)
Then
The logging service records the message to cargo history with the current machine date, machine time, user ID (ACF2-USERID), action code (LOG-USE-INPUT-MESSAGE), cargo CCN, cargo type indicator (GCX105-CA-CARGO), and the prepared message text
R-GCX126-cbl-00250 Process Cargo Arrived - Log 'CARGO ARRIVED AT PORT' message when V9 notice reason is ARRIVED
Process Rules
Business View: Assuming an edi 350 message has been received and parsed with v9 segment notice reason code indicating arrived status and p4 segment containing a valid port code during the 'Process Cargo Arrived - Log 'CARGO ARRIVED AT PORT' message when V9 notice reason is ARRIVED' routine, when the system processes the cargo arrival status, the system executes logic to ensure that the system prepares a log message 'edi 350: cargo arrived at port' concatenated with the 4-character port code from p4 segment, sets the current machine date and time, sets the ccn key as the cargo identifier, sets the action code to indicate input message usage, marks the log as canadian cargo type, and writes the log message to the ims message queue via gct1051e transaction.
Given
An EDI 350 message has been received and parsed with V9 segment notice reason code indicating ARRIVED status and P4 segment containing a valid port code
When
The system processes the cargo arrival status
Then
The system prepares a log message 'EDI 350: CARGO ARRIVED AT PORT' concatenated with the 4-character port code from P4 segment, sets the current machine date and time, sets the CCN key as the cargo identifier, sets the action code to indicate input message usage, marks the log as Canadian cargo type, and writes the log message to the IMS message queue via GCT1051E transaction
R-GCX126-cbl-00251 Prepare Log Message: 'EDI 350: CARGO ARRIVED AT PORT'
Computation Rules
Business View: Assuming the v9 segment indicates arrived status and the p4 segment contains a port code in positions 1 through 4 during the 'Prepare Log Message: 'EDI 350: CARGO ARRIVED AT PORT'' routine, when the system prepares the arrival log message, the system executes logic to ensure that the system initializes the log message field to spaces, concatenates the text 'edi 350: cargo arrived at port ' with the 4-character port code from p4-01-port-cde positions 1 through 4, and stores the result in ws-gcx105-info-msg field.
Given
The V9 segment indicates ARRIVED status and the P4 segment contains a port code in positions 1 through 4
When
The system prepares the arrival log message
Then
The system initializes the log message field to spaces, concatenates the text 'EDI 350: CARGO ARRIVED AT PORT ' with the 4-character port code from P4-01-PORT-CDE positions 1 through 4, and stores the result in WS-GCX105-INFO-MSG field
R-GCX126-cbl-00252 Set Log Information: - Current Date/Time - CCN Key - Action Code
Process Rules
Business View: Assuming a cargo arrival log message has been prepared with port information and the current ccn key is available in ws-current-ccn-key during the 'Set Log Information: - Current Date/Time - CCN Key - Action Code' routine, when the system sets the log information for the arrival event, the system executes logic to ensure that the system clears the gcx105 input area to spaces, sets the security byte to high-value, sets the sending transaction to 'gct1261e', sets the acf2 user id from the common control area, concatenates the machine century with the machine date to form gcx105-date, moves the machine time to gcx105-time, moves the current ccn key to gcx105-train-or-us-ccn, sets the cargo type indicator to canadian cargo, sets the action code to log-use-input-message, and moves the prepared arrival message from ws-gcx105-info-msg to gcx105-message.
Given
A cargo arrival log message has been prepared with port information and the current CCN key is available in WS-CURRENT-CCN-KEY
When
The system sets the log information for the arrival event
Then
The system clears the GCX105 input area to spaces, sets the security byte to high-value, sets the sending transaction to 'GCT1261E', sets the ACF2 user ID from the common control area, concatenates the machine century with the machine date to form GCX105-DATE, moves the machine time to GCX105-TIME, moves the current CCN key to GCX105-TRAIN-OR-US-CCN, sets the cargo type indicator to Canadian cargo, sets the action code to LOG-USE-INPUT-MESSAGE, and moves the prepared arrival message from WS-GCX105-INFO-MSG to GCX105-MESSAGE
R-GCX126-cbl-00253 42: Log Cargo Information Message to IMS Message Queue
Action Rules
Business View: <EXCLUSION CRITERIA> If the gcx105 log structure has been populated with arrival event information including date, time, ccn, and message text, and the message field is not spaces or low-values, and the system writes the log entry to the message queue occurs during the '42: Log Cargo Information Message to IMS Message Queue' routine, then the system must guarantee that the system replaces all spaces in gcx105-date with zeroes, replaces all spaces in gcx105-time with '1', moves the gcx105-input to gct1051e-msg, sets the accept status to blank, calls cims with chng function for the alternate pcb and gct1051e segment, calls writmsgl with the alternate pcb, message code, message text, message length and module name, and calls cims with purg function for the alternate pcb to commit the message.
EXCLUDING
The GCX105 log structure has been populated with arrival event information including date, time, CCN, and message text, and the message field is not spaces or low-values
When
The system writes the log entry to the message queue
Then
The system replaces all spaces in GCX105-DATE with zeroes, replaces all spaces in GCX105-TIME with '1', moves the GCX105-INPUT to GCT1051E-MSG, sets the accept status to blank, calls CIMS with CHNG function for the alternate PCB and GCT1051E segment, calls WRITMSGL with the alternate PCB, message code, message text, message length and module name, and calls CIMS with PURG function for the alternate PCB to commit the message
R-GCX126-cbl-00254 Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields
Action Rules
Business View: Assuming a cargo record exists with v9 segment indicating released status during the 'Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields' routine, when the system processes the release notification, the system executes logic to ensure that the cargo destination station number index field is set to spaces and the cargo destination station number for index field is set to spaces.
Given
A cargo record exists with V9 segment indicating RELEASED status
When
The system processes the release notification
Then
The cargo destination station number index field is set to spaces AND the cargo destination station number for index field is set to spaces
R-GCX126-cbl-00255 Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields
Action Rules
Business View: Assuming a cargo record exists with v9 segment indicating released status during the 'Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields' routine, when the system processes the release notification, the system executes logic to ensure that the cargo release date is set to current machine date and the cargo release time is set to current machine time.
Given
A cargo record exists with V9 segment indicating RELEASED status
When
The system processes the release notification
Then
The cargo release date is set to current machine date AND the cargo release time is set to current machine time
R-GCX126-cbl-00256 Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields
Action Rules
Business View: Assuming a cargo record exists with v9 segment indicating released status during the 'Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields' routine, when the system processes the release notification, the system executes logic to ensure that the cargo release by field is set to the current user id from the system.
Given
A cargo record exists with V9 segment indicating RELEASED status
When
The system processes the release notification
Then
The cargo release by field is set to the current user ID from the system
R-GCX126-cbl-00257 Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields
Action Rules
Business View: Assuming a cargo record exists with v9 segment indicating released status during the 'Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields' routine, when the system processes the release notification, the system executes logic to ensure that the cargo current status field is set to 'released'.
Given
A cargo record exists with V9 segment indicating RELEASED status
When
The system processes the release notification
Then
The cargo current status field is set to 'RELEASED'
R-GCX126-cbl-00258 Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields
Action Rules
Business View: Assuming a cargo record exists with v9 segment indicating released status during the 'Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields' routine, when the system processes the release notification, the system executes logic to ensure that the cargo release status field is set to 'r'.
Given
A cargo record exists with V9 segment indicating RELEASED status
When
The system processes the release notification
Then
The cargo release status field is set to 'R'
R-GCX126-cbl-00259 Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields
Action Rules
Business View: Assuming a cargo record exists with v9 segment indicating released status during the 'Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields' routine, when the system processes the release notification, the system executes logic to ensure that the cargo release type field is set to 'a'.
Given
A cargo record exists with V9 segment indicating RELEASED status
When
The system processes the release notification
Then
The cargo release type field is set to 'A'
R-GCX126-cbl-00260 Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields
Action Rules
Business View: Assuming a cargo record exists with v9 segment indicating released status during the 'Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields' routine, when the system processes the release notification, the system executes logic to ensure that the cargo release reason field is set to spaces.
Given
A cargo record exists with V9 segment indicating RELEASED status
When
The system processes the release notification
Then
The cargo release reason field is set to spaces
R-GCX126-cbl-00261 Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields
Action Rules
Business View: Assuming a cargo record exists with v9 segment indicating released status during the 'Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields' routine, when the system processes the release notification, the system executes logic to ensure that the cargo error or release status index field is set to spaces.
Given
A cargo record exists with V9 segment indicating RELEASED status
When
The system processes the release notification
Then
The cargo error or release status index field is set to spaces
R-GCX126-cbl-00262 Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields
Action Rules
Business View: Assuming a cargo record exists with v9 segment indicating released status during the 'Set Release Information: Clear destination station, Set release date/time from system, Set release by user ID, Set status to RELEASED, Set release status R, Set release type A, Clear error fields' routine, when the system processes the release notification, the system executes logic to ensure that the cargo error status field is set to spaces.
Given
A cargo record exists with V9 segment indicating RELEASED status
When
The system processes the release notification
Then
The cargo error status field is set to spaces
R-GCX126-cbl-00263 Build Log Message: RELEASE: release-ref AT PORT port-code
Computation Rules
Business View: Assuming a cargo record exists with v9 segment indicating released status and x4 segment contains cbsa release reference id and p4 segment contains port code during the 'Build Log Message: RELEASE: release-ref AT PORT port-code' routine, when the system builds the release log message, the system executes logic to ensure that the log message is formatted as 'edi 350: release : ' concatenated with the first 15 characters of x4 cbsa release reference id concatenated with ' at port ' concatenated with the first 4 characters of p4 port code.
Given
A cargo record exists with V9 segment indicating RELEASED status AND X4 segment contains CBSA release reference ID AND P4 segment contains port code
When
The system builds the release log message
Then
The log message is formatted as 'EDI 350: RELEASE : ' concatenated with the first 15 characters of X4 CBSA release reference ID concatenated with ' AT PORT ' concatenated with the first 4 characters of P4 port code
R-GCX126-cbl-00264 Build Release Reason: release-ref / port-code
Computation Rules
Business View: Assuming a cargo record exists with v9 segment indicating released status and x4 segment contains cbsa release reference id and p4 segment contains port code during the 'Build Release Reason: release-ref / port-code' routine, when the system builds the release reason, the system executes logic to ensure that the release reason is formatted as the first 15 characters of x4 cbsa release reference id concatenated with '/' concatenated with the first 4 characters of p4 port code.
Given
A cargo record exists with V9 segment indicating RELEASED status AND X4 segment contains CBSA release reference ID AND P4 segment contains port code
When
The system builds the release reason
Then
The release reason is formatted as the first 15 characters of X4 CBSA release reference ID concatenated with '/' concatenated with the first 4 characters of P4 port code
R-GCX126-cbl-00266 Log Release Message to Cargo
Action Rules
Business View: Assuming the release log message has been constructed and the cargo ccn is known during the 'Log Release Message to Cargo' routine, when the system logs the release information, the system executes logic to ensure that a log entry is created with current system date, current system time, cargo ccn as the reference, cargo type indicator set to canadian cargo, action code set to use input message, and the message set to the constructed release log message.
Given
The release log message has been constructed AND the cargo CCN is known
When
The system logs the release information
Then
A log entry is created with current system date, current system time, cargo CCN as the reference, cargo type indicator set to Canadian cargo, action code set to use input message, and the message set to the constructed release log message
R-GCX126-cbl-00267 Search for Associated US Manifest: Match by Car ID, Match by Waybill Number, Verify not deleted, Verify no TR created
Process Rules
Business View: Assuming a canadian cargo record has been released and the cargo has an equipment car id and waybill number during the 'Search for Associated US Manifest: Match by Car ID, Match by Waybill Number, Verify not deleted, Verify no TR created' routine, when the system searches for associated us manifest, the system executes logic to ensure that the system retrieves us cargo records where the car id number index matches the first 12 characters of the current car id and the waybill number index matches the saved waybill index and the cargo is not deleted and no train has been created for it.
Given
A Canadian cargo record has been released AND the cargo has an equipment car ID and waybill number
When
The system searches for associated US manifest
Then
The system retrieves US cargo records where the car ID number index matches the first 12 characters of the current car ID AND the waybill number index matches the saved waybill index AND the cargo is not deleted AND no train has been created for it
R-GCX126-cbl-00268 US Manifest Found?
Decision Rules
Business View: Assuming the system has searched for us cargo records matching the car id and waybill number during the 'US Manifest Found?' routine, when the system evaluates the search results, the system executes logic to ensure that if a us cargo record is found where car id matches and waybill matches and cargo is not deleted and no train created, then us manifest found indicator is set to true, otherwise it is set to false.
Given
The system has searched for US cargo records matching the car ID and waybill number
When
The system evaluates the search results
Then
If a US cargo record is found where car ID matches AND waybill matches AND cargo is not deleted AND no train created, then US manifest found indicator is set to true, otherwise it is set to false
R-GCX126-cbl-00269 Log to US Cargo: CDN CCN RLSED BY EDI 350: canadian-ccn
Action Rules
Business View: Assuming a us manifest record has been found that matches the canadian cargo's car id and waybill number during the 'Log to US Cargo: CDN CCN RLSED BY EDI 350: canadian-ccn' routine, when the system logs the release to us cargo, the system executes logic to ensure that a log entry is created with current system date, current system time, us ccn as the reference, cargo type indicator set to us cargo, action code set to use input message, and the message formatted as 'cdn ccn rlsed by edi 350: ' concatenated with the canadian cargo ccn.
Given
A US manifest record has been found that matches the Canadian cargo's car ID and waybill number
When
The system logs the release to US cargo
Then
A log entry is created with current system date, current system time, US CCN as the reference, cargo type indicator set to US cargo, action code set to use input message, and the message formatted as 'CDN CCN RLSED BY EDI 350: ' concatenated with the Canadian cargo CCN
R-GCX126-cbl-00271 Update Canadian Cargo Record with Release Information
Action Rules
Business View: Assuming all release information has been set in the cargo segment including release date, time, user, status, type, and reason during the 'Update Canadian Cargo Record with Release Information' routine, when the system updates the cargo record, the system executes logic to ensure that the cargo report segment is replaced in the database with the updated release information.
Given
All release information has been set in the cargo segment including release date, time, user, status, type, and reason
When
The system updates the cargo record
Then
The cargo report segment is replaced in the database with the updated release information
R-GCX126-cbl-00272 Is Master Manifest?
Decision Rules
Business View: Assuming a cargo record has been released during the 'Is Master Manifest?' routine, when the system checks the cargo type, the system executes logic to ensure that if the cargo master manifest indicator is true, then proceed to process follower manifests, otherwise end the release process.
Given
A cargo record has been released
When
The system checks the cargo type
Then
If the cargo master manifest indicator is true, then proceed to process follower manifests, otherwise end the release process
R-GCX126-cbl-00273 Retrieve All Follower Manifests for Master CCN up to 100 records
Process Rules
Business View: Assuming a cargo is identified as a master manifest with a specific ccn during the 'Retrieve All Follower Manifests for Master CCN up to 100 records' routine, when the system retrieves follower manifests, the system executes logic to ensure that the system retrieves all cargo records where the master manifest ccn matches the current cargo ccn and the cargo is a follower manifest (not a master) and stores up to 100 follower ccn keys in an array and stops retrieval when end of database is reached or 100 records are retrieved.
Given
A cargo is identified as a master manifest with a specific CCN
When
The system retrieves follower manifests
Then
The system retrieves all cargo records where the master manifest CCN matches the current cargo CCN AND the cargo is a follower manifest (not a master) AND stores up to 100 follower CCN keys in an array AND stops retrieval when end of database is reached OR 100 records are retrieved
R-GCX126-cbl-00274 For Each Follower Manifest
Process Rules
Business View: Assuming follower manifest ccns have been retrieved and stored in an array during the 'For Each Follower Manifest' routine, when the system processes follower manifests, the system executes logic to ensure that for each follower ccn in the array from position 1 to the count of retrieved followers, the system retrieves the cargo record using the follower ccn and processes it if the ccn is not spaces or low-values.
Given
Follower manifest CCNs have been retrieved and stored in an array
When
The system processes follower manifests
Then
For each follower CCN in the array from position 1 to the count of retrieved followers, the system retrieves the cargo record using the follower CCN AND processes it if the CCN is not spaces or low-values
R-GCX126-cbl-00275 Set Release Information for Follower
Action Rules
Business View: Assuming a follower manifest cargo record has been retrieved during the 'Set Release Information for Follower' routine, when the system sets release information for the follower, the system executes logic to ensure that the follower cargo destination station number fields are cleared and release date is set to current machine date and release time is set to current machine time and release by is set to current user id and current status is set to 'released' and release status is set to 'r' and release type is set to 'a' and error fields are cleared.
Given
A follower manifest cargo record has been retrieved
When
The system sets release information for the follower
Then
The follower cargo destination station number fields are cleared AND release date is set to current machine date AND release time is set to current machine time AND release by is set to current user ID AND current status is set to 'RELEASED' AND release status is set to 'R' AND release type is set to 'A' AND error fields are cleared
R-GCX126-cbl-00276 Build Message Based on Type
Decision Rules
Business View: Assuming a follower manifest is being processed and the v9 segment contains a notice reason code during the 'Build Message Based on Type' routine, when the system builds the log message for the follower, the system executes logic to ensure that if v9 notice reason code indicates released, then format message as release type, otherwise if v9 notice reason code indicates decon, then format message as deconsolidation type.
Given
A follower manifest is being processed AND the V9 segment contains a notice reason code
When
The system builds the log message for the follower
Then
If V9 notice reason code indicates RELEASED, then format message as release type, otherwise if V9 notice reason code indicates DECON, then format message as deconsolidation type
R-GCX126-cbl-00277 RELEASE: release-ref AT PORT port-code
Computation Rules
Business View: Assuming a follower manifest is being processed and v9 segment indicates released status during the 'RELEASE: release-ref AT PORT port-code' routine, when the system builds the release message, the system executes logic to ensure that the log message is formatted as 'edi 350: release : ' concatenated with the first 15 characters of x4 cbsa release reference id concatenated with ' at port ' concatenated with the first 4 characters of p4 port code.
Given
A follower manifest is being processed AND V9 segment indicates RELEASED status
When
The system builds the release message
Then
The log message is formatted as 'EDI 350: RELEASE : ' concatenated with the first 15 characters of X4 CBSA release reference ID concatenated with ' AT PORT ' concatenated with the first 4 characters of P4 port code
R-GCX126-cbl-00278 RELEASE VIA DECON AT PORT port-code
Computation Rules
Business View: Assuming a follower manifest is being processed and v9 segment indicates decon status during the 'RELEASE VIA DECON AT PORT port-code' routine, when the system builds the release message, the system executes logic to ensure that the log message is formatted as 'edi 350: release via decon at port ' concatenated with the first 4 characters of p4 port code.
Given
A follower manifest is being processed AND V9 segment indicates DECON status
When
The system builds the release message
Then
The log message is formatted as 'EDI 350: RELEASE VIA DECON AT PORT ' concatenated with the first 4 characters of P4 port code
R-GCX126-cbl-00279 Build Reason Based on Type
Decision Rules
Business View: Assuming a follower manifest is being processed and the v9 segment contains a notice reason code during the 'Build Reason Based on Type' routine, when the system builds the release reason for the follower, the system executes logic to ensure that if v9 notice reason code indicates released, then format reason as standard release type, otherwise if v9 notice reason code indicates decon, then format reason as deconsolidation type.
Given
A follower manifest is being processed AND the V9 segment contains a notice reason code
When
The system builds the release reason for the follower
Then
If V9 notice reason code indicates RELEASED, then format reason as standard release type, otherwise if V9 notice reason code indicates DECON, then format reason as deconsolidation type
R-GCX126-cbl-00280 release-ref / port-code
Computation Rules
Business View: Assuming a follower manifest is being processed and v9 segment indicates released status during the 'release-ref / port-code' routine, when the system builds the release reason, the system executes logic to ensure that the release reason is formatted as the first 15 characters of x4 cbsa release reference id concatenated with '/' concatenated with the first 4 characters of p4 port code.
Given
A follower manifest is being processed AND V9 segment indicates RELEASED status
When
The system builds the release reason
Then
The release reason is formatted as the first 15 characters of X4 CBSA release reference ID concatenated with '/' concatenated with the first 4 characters of P4 port code
R-GCX126-cbl-00281 DECONSOLIDATION AT port-code
Computation Rules
Business View: Assuming a follower manifest is being processed and v9 segment indicates decon status during the 'DECONSOLIDATION AT port-code' routine, when the system builds the release reason, the system executes logic to ensure that the release reason is formatted as 'deconsolidation at ' concatenated with the first 4 characters of p4 port code.
Given
A follower manifest is being processed AND V9 segment indicates DECON status
When
The system builds the release reason
Then
The release reason is formatted as 'DECONSOLIDATION AT ' concatenated with the first 4 characters of P4 port code
R-GCX126-cbl-00282 Log Release Message to Follower Cargo
Action Rules
Business View: Assuming the release log message has been constructed for the follower and the follower cargo ccn is known during the 'Log Release Message to Follower Cargo' routine, when the system logs the release information, the system executes logic to ensure that a log entry is created with current system date, current system time, follower cargo ccn as the reference, cargo type indicator set to canadian cargo, action code set to use input message, and the message set to the constructed release log message.
Given
The release log message has been constructed for the follower AND the follower cargo CCN is known
When
The system logs the release information
Then
A log entry is created with current system date, current system time, follower cargo CCN as the reference, cargo type indicator set to Canadian cargo, action code set to use input message, and the message set to the constructed release log message
R-GCX126-cbl-00283 Update Follower Release Reason
Action Rules
Business View: Assuming the release reason has been built for the follower manifest during the 'Update Follower Release Reason' routine, when the system updates the follower cargo record, the system executes logic to ensure that the follower cargo release reason field is set to the constructed release reason string.
Given
The release reason has been built for the follower manifest
When
The system updates the follower cargo record
Then
The follower cargo release reason field is set to the constructed release reason string
R-GCX126-cbl-00284 Find Associated US Manifest for Follower
Process Rules
Business View: Assuming a follower manifest cargo record has been released and the follower has an equipment car id and waybill number during the 'Find Associated US Manifest for Follower' routine, when the system searches for associated us manifest, the system executes logic to ensure that the system retrieves us cargo records where the car id number index matches the first 12 characters of the follower's car id and the waybill number index matches the follower's waybill index and the cargo is not deleted and no train has been created for it.
Given
A follower manifest cargo record has been released AND the follower has an equipment car ID and waybill number
When
The system searches for associated US manifest
Then
The system retrieves US cargo records where the car ID number index matches the first 12 characters of the follower's car ID AND the waybill number index matches the follower's waybill index AND the cargo is not deleted AND no train has been created for it
R-GCX126-cbl-00285 US Manifest Found?
Decision Rules
Business View: Assuming the system has searched for us cargo records matching the follower's car id and waybill number during the 'US Manifest Found?' routine, when the system evaluates the search results, the system executes logic to ensure that if a us cargo record is found where car id matches and waybill matches and cargo is not deleted and no train created, then us manifest found indicator is set to true, otherwise it is set to false.
Given
The system has searched for US cargo records matching the follower's car ID and waybill number
When
The system evaluates the search results
Then
If a US cargo record is found where car ID matches AND waybill matches AND cargo is not deleted AND no train created, then US manifest found indicator is set to true, otherwise it is set to false
R-GCX126-cbl-00286 Log to US Cargo: CDN CCN RLSED BY EDI 350
Action Rules
Business View: Assuming a us manifest record has been found that matches the follower cargo's car id and waybill number during the 'Log to US Cargo: CDN CCN RLSED BY EDI 350' routine, when the system logs the release to us cargo, the system executes logic to ensure that a log entry is created with current system date, current system time, us ccn as the reference, cargo type indicator set to us cargo, action code set to use input message, and the message formatted as 'cdn ccn rlsed by edi 350: ' concatenated with the follower canadian cargo ccn.
Given
A US manifest record has been found that matches the follower cargo's car ID and waybill number
When
The system logs the release to US cargo
Then
A log entry is created with current system date, current system time, US CCN as the reference, cargo type indicator set to US cargo, action code set to use input message, and the message formatted as 'CDN CCN RLSED BY EDI 350: ' concatenated with the follower Canadian cargo CCN
R-GCX126-cbl-00287 Update Follower Cargo Record
Action Rules
Business View: Assuming all release information has been set in the follower cargo segment including release date, time, user, status, type, and reason during the 'Update Follower Cargo Record' routine, when the system updates the follower cargo record, the system executes logic to ensure that the follower cargo report segment is replaced in the database with the updated release information.
Given
All release information has been set in the follower cargo segment including release date, time, user, status, type, and reason
When
The system updates the follower cargo record
Then
The follower cargo report segment is replaced in the database with the updated release information
R-GCX126-cbl-00288 More Followers?
Decision Rules
Business View: Assuming a follower manifest has been processed and there is an array of follower ccns during the 'More Followers?' routine, when the system checks for more followers, the system executes logic to ensure that if the current position in the follower array is less than the total count of followers and the next follower ccn is not spaces or low-values, then continue processing the next follower, otherwise end follower processing.
Given
A follower manifest has been processed AND there is an array of follower CCNs
When
The system checks for more followers
Then
If the current position in the follower array is less than the total count of followers AND the next follower CCN is not spaces or low-values, then continue processing the next follower, otherwise end follower processing
R-GCX126-cbl-00589 Initialize Search Parameters: Set Car ID from Current Cargo, Set Waybill Index from Current Cargo, Set US CCN to Low Values
Process Rules
Business View: Assuming a cargo record has been processed and current cargo equipment car id and waybill index are available during the 'Initialize Search Parameters: Set Car ID from Current Cargo, Set Waybill Index from Current Cargo, Set US CCN to Low Values' routine, when the system initiates a search for associated us manifest records, the system executes logic to ensure that the search parameters are initialized with car id from current cargo equipment car key, waybill index from saved waybill index, and us ccn key index set to low values.
Given
A cargo record has been processed and current cargo equipment car ID and waybill index are available
When
The system initiates a search for associated US manifest records
Then
The search parameters are initialized with car ID from current cargo equipment car key, waybill index from saved waybill index, and US CCN key index set to low values
R-GCX126-cbl-00590 Set Search Criteria: Function: Get Unique GU, Index Type: Car-Waybill, Operator: Greater Than or Equal
Process Rules
Business View: Assuming search parameters have been initialized with car id and waybill index during the 'Set Search Criteria: Function: Get Unique GU, Index Type: Car-Waybill, Operator: Greater Than or Equal' routine, when the system prepares to execute the database search, the system executes logic to ensure that the search function is set to get unique (gu), segment type is set to us cargo record (gcsusrt), index type is set to car-waybill, and operator is set to greater than or equal (>=).
Given
Search parameters have been initialized with car ID and waybill index
When
The system prepares to execute the database search
Then
The search function is set to Get Unique (GU), segment type is set to US cargo record (GCSUSRT), index type is set to Car-Waybill, and operator is set to greater than or equal (>=)
R-GCX126-cbl-00591 Execute Database Search on US Cargo Table
Action Rules
Business View: Assuming search criteria are configured with function gu, segment gcsusrt, index car-waybill, and operator >= during the 'Execute Database Search on US Cargo Table' routine, when the system executes the database call, the system executes logic to ensure that the gccusio program is invoked with the search parameters to retrieve us cargo records from gcsusrt table.
Given
Search criteria are configured with function GU, segment GCSUSRT, index Car-Waybill, and operator >=
When
The system executes the database call
Then
The GCCUSIO program is invoked with the search parameters to retrieve US cargo records from GCSUSRT table
R-GCX126-cbl-00594 Cargo Deleted OR TR Created?
Decision Rules
Business View: Assuming a us cargo record has been retrieved and validated for car id and waybill match during the 'Cargo Deleted OR TR Created?' routine, when the system checks the cargo processing eligibility, the system executes logic to ensure that if the us cargo is marked as deleted or the train-created-for-it indicator equals 'y', the record is skipped and search continues, otherwise the us manifest found flag is set to true.
Given
A US cargo record has been retrieved and validated for car ID and waybill match
When
The system checks the cargo processing eligibility
Then
If the US cargo is marked as deleted OR the train-created-for-it indicator equals 'Y', the record is skipped and search continues, otherwise the US manifest found flag is set to true
R-GCX126-cbl-00595 Set US Manifest Found Flag
Process Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record matches car id and waybill and is not deleted and does not have train created, and the system completes validation checks occurs during the 'Set US Manifest Found Flag' routine, then the system must guarantee that the us manifest found flag is set to true to indicate a valid associated us manifest has been located.
EXCLUDING
A US cargo record matches car ID and waybill AND is not deleted AND does not have train created
When
The system completes validation checks
Then
The US manifest found flag is set to true to indicate a valid associated US manifest has been located
R-GCX126-cbl-00596 Continue to Next Record
Process Rules
Business View: Assuming a us cargo record has been found but is marked as deleted or has train created indicator set to 'y' during the 'Continue to Next Record' routine, when the system needs to continue searching for valid records, the system executes logic to ensure that the search function is set to get next (gn), segment type remains gcsusrt, index type remains car-waybill, operator is set to greater than (>), and the database call is executed to retrieve the next record in sequence.
Given
A US cargo record has been found but is marked as deleted OR has train created indicator set to 'Y'
When
The system needs to continue searching for valid records
Then
The search function is set to Get Next (GN), segment type remains GCSUSRT, index type remains Car-Waybill, operator is set to greater than (>), and the database call is executed to retrieve the next record in sequence
R-GCX126-cbl-00785 Call GCCUSIO to Search US Cargo
Action Rules
Business View: Assuming all search parameters are configured with segment type gcsusrt, function gu, index car-wb, operator '>=', car id, waybill index, and us ccn key during the 'Call GCCUSIO to Search US Cargo' routine, when the system executes the database search, the system executes logic to ensure that the gccusio module is called with the control communication area, search parameters, and us cargo segment structure to retrieve matching records.
Given
All search parameters are configured with segment type GCSUSRT, function GU, index CAR-WB, operator '>=', car ID, waybill index, and US CCN key
When
The system executes the database search
Then
The GCCUSIO module is called with the control communication area, search parameters, and US cargo segment structure to retrieve matching records
R-GCX126-cbl-00791 Cargo Deleted or TR Created? - Yes - Skip
Decision Rules
Business View: Assuming a matching us cargo record is found with deletion status set or train-created flag equals 'y' during the 'Cargo Deleted or TR Created? - Yes - Skip' routine, when the system processes the validation result, the system executes logic to ensure that the system continues without setting the us manifest found flag, allowing the search to proceed to the next record.
Given
A matching US cargo record is found with deletion status set OR train-created flag equals 'Y'
When
The system processes the validation result
Then
The system continues without setting the US manifest found flag, allowing the search to proceed to the next record
R-GCX126-cbl-00792 Set US Manifest Found Flag
Decision Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record matches the equipment car id and waybill number and is not deleted and does not have train-created flag set to 'y', and the system confirms the record is valid for processing occurs during the 'Set US Manifest Found Flag' routine, then the system must guarantee that the us manifest found flag (ws-us-mfst-found) is set to true to indicate a valid matching record has been located.
EXCLUDING
A US cargo record matches the equipment car ID and waybill number AND is not deleted AND does not have train-created flag set to 'Y'
When
The system confirms the record is valid for processing
Then
The US manifest found flag (WS-US-MFST-FOUND) is set to TRUE to indicate a valid matching record has been located
R-GCX126-cbl-00938 Set Search Parameters
Process Rules
Business View: Assuming a current cargo record with equipment car id and waybill index during the 'Set Search Parameters' routine, when preparing to search for associated us cargo records, the system executes logic to ensure that set search parameters with car id from current cargo key, waybill index from saved waybill, us ccn key to low-values, database accept status to 'gegb', segment type to gcsusrt, function to get unique (gu), index type to car-wb (car-waybill), and operator to greater than or equal ('>=').
Given
A current cargo record with equipment car ID and waybill index
When
Preparing to search for associated US cargo records
Then
Set search parameters with car ID from current cargo key, waybill index from saved waybill, US CCN key to LOW-VALUES, database accept status to 'GEGB', segment type to GCSUSRT, function to Get Unique (GU), index type to CAR-WB (Car-Waybill), and operator to greater than or equal ('>=')
R-GCX126-cbl-00943 Set Segment Type to GCSUSRT
Definitional Rules
Business View: Assuming database search parameters are being configured during the 'Set Segment Type to GCSUSRT' routine, when specifying which segment type to retrieve, the system executes logic to ensure that set gcwusio-seg-gcsusrt to true to indicate us cargo report segment (gcsusrt) should be accessed.
Given
Database search parameters are being configured
When
Specifying which segment type to retrieve
Then
Set GCWUSIO-SEG-GCSUSRT to TRUE to indicate US cargo report segment (GCSUSRT) should be accessed
R-GCX126-cbl-00992 Call GCCUSIO with Parameters
Action Rules
Business View: Assuming all search parameters are configured including segment type gcsusrt, function type (gu or gn), index type car-wb, and search operator during the 'Call GCCUSIO with Parameters' routine, when the system executes the database search, the system executes logic to ensure that the gccusio program is called with the control communication area, search parameters, and us cargo segment structure to retrieve matching records.
Given
All search parameters are configured including segment type GCSUSRT, function type (GU or GN), index type CAR-WB, and search operator
When
The system executes the database search
Then
The GCCUSIO program is called with the control communication area, search parameters, and US cargo segment structure to retrieve matching records
R-GCX126-cbl-00996 Cargo Deleted?, Continue to Next Record
Validation Rules
Business View: Assuming a us cargo record has been retrieved that matches equipment and waybill criteria during the 'Cargo Deleted?, Continue to Next Record' routine, when the cargo record has a deletion status indicator set to deleted, the system executes logic to ensure that the record is skipped without setting the us manifest found flag, and processing continues to allow searching for the next record.
Given
A US cargo record has been retrieved that matches equipment and waybill criteria
When
The cargo record has a deletion status indicator set to deleted
Then
The record is skipped without setting the US manifest found flag, and processing continues to allow searching for the next record
R-GCX126-cbl-00997 TR Created?, Continue to Next Record
Validation Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record has been retrieved that matches equipment and waybill criteria and is not deleted, and the cargo record has the train-created indicator set to 'y' (yes) occurs during the 'TR Created?, Continue to Next Record' routine, then the system must guarantee that the record is skipped without setting the us manifest found flag, and processing continues to allow searching for the next record.
EXCLUDING
A US cargo record has been retrieved that matches equipment and waybill criteria and is not deleted
When
The cargo record has the train-created indicator set to 'Y' (Yes)
Then
The record is skipped without setting the US manifest found flag, and processing continues to allow searching for the next record
R-GCX126-cbl-00998 Set US Manifest Found Flag
Decision Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record has been retrieved that matches equipment car id and waybill number, is not marked as deleted, and does not have a train record already created, and all validation checks pass successfully occurs during the 'Set US Manifest Found Flag' routine, then the system must guarantee that the us manifest found flag is set to true to indicate a valid associated us cargo record has been located and is ready for processing.
EXCLUDING
A US cargo record has been retrieved that matches equipment car ID and waybill number, is not marked as deleted, and does not have a train record already created
When
All validation checks pass successfully
Then
The US manifest found flag is set to TRUE to indicate a valid associated US cargo record has been located and is ready for processing
R-GCX126-cbl-00598 Is Cargo a Master Manifest?
Decision Rules
Business View: Assuming a cargo record has been retrieved and processed for release or deconsolidation during the 'Is Cargo a Master Manifest?' routine, when the system evaluates whether to process associated follower manifests, the system executes logic to ensure that if the cargo is not a master manifest, skip follower processing and exit; if the cargo is a master manifest, proceed to save master information and process followers.
Given
A cargo record has been retrieved and processed for release or deconsolidation
When
The system evaluates whether to process associated follower manifests
Then
If the cargo is not a master manifest, skip follower processing and exit; If the cargo is a master manifest, proceed to save master information and process followers
R-GCX126-cbl-00599 Save Master Cargo Information
Process Rules
Business View: Assuming the cargo is confirmed as a master manifest during the 'Save Master Cargo Information' routine, when the system prepares to process follower manifests, the system executes logic to ensure that save the complete master cargo report segment to working storage; save the master ccn key; save the master waybill key for index; save the master equipment car identifier.
Given
The cargo is confirmed as a master manifest
When
The system prepares to process follower manifests
Then
Save the complete master cargo report segment to working storage; Save the master CCN key; Save the master waybill key for index; Save the master equipment car identifier
R-GCX126-cbl-00600 Initialize Follower Array, Set Counter to 1, Max 100 Followers
Process Rules
Business View: Assuming master cargo information has been saved during the 'Initialize Follower Array, Set Counter to 1, Max 100 Followers' routine, when the system begins collecting follower manifests, the system executes logic to ensure that clear the follower manifest array (set all entries to spaces); set the follower array counter to 1; set the end-of-database flag to false (not end of database); establish maximum limit of 100 follower manifests.
Given
Master cargo information has been saved
When
The system begins collecting follower manifests
Then
Clear the follower manifest array (set all entries to spaces); Set the follower array counter to 1; Set the end-of-database flag to false (not end of database); Establish maximum limit of 100 follower manifests
R-GCX126-cbl-00601 Get Next Follower Manifest Using Master CCN
Action Rules
Business View: Assuming the follower collection process is active and the counter is within the 100-follower limit during the 'Get Next Follower Manifest Using Master CCN' routine, when the system requests the next follower manifest record, the system executes logic to ensure that execute database get next operation using master ccn key; set database accept status to 'gegb'; use cargo report segment pcb7; use qualified ssa with master ccn key (ccrt-b0rt-ssaq).
Given
The follower collection process is active and the counter is within the 100-follower limit
When
The system requests the next follower manifest record
Then
Execute database Get Next operation using master CCN key; Set database accept status to 'GEGB'; Use cargo report segment PCB7; Use qualified SSA with master CCN key (CCRT-B0RT-SSAQ)
R-GCX126-cbl-00602 Database Status OK?
Decision Rules
Business View: Assuming a get next operation has been executed to retrieve a follower manifest during the 'Database Status OK?' routine, when the system evaluates the database return status code, the system executes logic to ensure that if status code is blank (spaces), the retrieval was successful and processing continues; if status code is not blank, set the end-of-database flag to true and stop retrieving followers.
Given
A Get Next operation has been executed to retrieve a follower manifest
When
The system evaluates the database return status code
Then
If status code is blank (spaces), the retrieval was successful and processing continues; If status code is not blank, set the end-of-database flag to true and stop retrieving followers
R-GCX126-cbl-00603 Follower's Master CCN Matches Current Master?
Validation Rules
Business View: Assuming a cargo record has been successfully retrieved from the database during the 'Follower's Master CCN Matches Current Master?' routine, when the system validates the master-follower relationship, the system executes logic to ensure that if the retrieved cargo's master manifest ccn equals the saved master ccn key, the relationship is valid and processing continues; if the master manifest ccn does not match, set the end-of-database flag to true and stop retrieving followers.
Given
A cargo record has been successfully retrieved from the database
When
The system validates the master-follower relationship
Then
If the retrieved cargo's master manifest CCN equals the saved master CCN key, the relationship is valid and processing continues; If the master manifest CCN does not match, set the end-of-database flag to true and stop retrieving followers
R-GCX126-cbl-00604 Is This a Follower Manifest?
Decision Rules
Business View: Assuming a cargo record has been retrieved and validated as belonging to the current master during the 'Is This a Follower Manifest?' routine, when the system checks the manifest type indicator, the system executes logic to ensure that if the cargo is identified as a follower manifest, store its ccn in the follower array; if the cargo is identified as a master manifest, skip storage and continue to check for more followers.
Given
A cargo record has been retrieved and validated as belonging to the current master
When
The system checks the manifest type indicator
Then
If the cargo is identified as a follower manifest, store its CCN in the follower array; If the cargo is identified as a master manifest, skip storage and continue to check for more followers
R-GCX126-cbl-00605 Store Follower CCN in Array, Increment Counter
Process Rules
Business View: Assuming a cargo record has been confirmed as a follower manifest of the current master during the 'Store Follower CCN in Array, Increment Counter' routine, when the system stores the follower information, the system executes logic to ensure that move the follower's ccn key to the follower manifest array at position indicated by counter; add 1 to the counter.
Given
A cargo record has been confirmed as a follower manifest of the current master
When
The system stores the follower information
Then
Move the follower's CCN key to the follower manifest array at position indicated by counter; Add 1 to the counter
R-GCX126-cbl-00609 Loop Through Each Follower in Array
Process Rules
Business View: Assuming at least one follower manifest has been collected in the array during the 'Loop Through Each Follower in Array' routine, when the system begins processing the collected followers, the system executes logic to ensure that start loop with index j at position 1; continue loop incrementing j by 1 each iteration; stop loop when follower manifest array entry at position i is spaces or low-values or when j exceeds i (the total count of followers).
Given
At least one follower manifest has been collected in the array
When
The system begins processing the collected followers
Then
Start loop with index J at position 1; Continue loop incrementing J by 1 each iteration; Stop loop when follower manifest array entry at position I is spaces or low-values OR when J exceeds I (the total count of followers)
R-GCX126-cbl-00610 Retrieve Follower Cargo by CCN
Action Rules
Business View: Assuming a follower ccn has been retrieved from the processing array at position j during the 'Retrieve Follower Cargo by CCN' routine, when the system retrieves the follower cargo record, the system executes logic to ensure that move the follower ccn to the cargo report segment key value (ccrt-ssaq); move the follower ccn to the alternate segment key value (a2rt-ssaq); execute get hold unique database operation (z3000-ghu-cargo); evaluate cargo found status based on database return.
Given
A follower CCN has been retrieved from the processing array at position J
When
The system retrieves the follower cargo record
Then
Move the follower CCN to the cargo report segment key value (CCRT-SSAQ); Move the follower CCN to the alternate segment key value (A2RT-SSAQ); Execute Get Hold Unique database operation (Z3000-GHU-CARGO); Evaluate cargo found status based on database return
R-GCX126-cbl-00613 Notice Reason Type?
Decision Rules
Business View: Assuming release information has been set for the follower manifest during the 'Notice Reason Type?' routine, when the system determines the type of release message to log, the system executes logic to ensure that if the v9 notice reason code indicates released, proceed to log release message; if the v9 notice reason code indicates deconsolidation, proceed to log deconsolidation message.
Given
Release information has been set for the follower manifest
When
The system determines the type of release message to log
Then
If the V9 notice reason code indicates RELEASED, proceed to log release message; If the V9 notice reason code indicates DECONSOLIDATION, proceed to log deconsolidation message
R-GCX126-cbl-00614 Log Message: 'EDI 350: RELEASE : [Ref] AT PORT [Port]', Set Release Reason: '[Ref]/[Port]'
Process Rules
Business View: Assuming the follower manifest is being released through standard release process during the 'Log Message: 'EDI 350: RELEASE : [Ref] AT PORT [Port]', Set Release Reason: '[Ref]/[Port]'' routine, when the system logs the release information, the system executes logic to ensure that clear the information message field to spaces; build message string: 'edi 350: release : ' concatenated with cbsa release reference id (first 15 characters) concatenated with ' at port ' concatenated with port code (first 4 characters); move the built message to information message field; build release reason string: cbsa release reference id (first 15 characters) concatenated with '/' concatenated with port code (first 4 characters); move the built reason to cargo release reason field; set current ccn key to information message ccn key; execute log cargo information message procedure (z150-log-cargo-info-msg).
Given
The follower manifest is being released through standard release process
When
The system logs the release information
Then
Clear the information message field to spaces; Build message string: 'EDI 350: RELEASE : ' concatenated with CBSA release reference ID (first 15 characters) concatenated with ' AT PORT ' concatenated with port code (first 4 characters); Move the built message to information message field; Build release reason string: CBSA release reference ID (first 15 characters) concatenated with '/' concatenated with port code (first 4 characters); Move the built reason to cargo release reason field; Set current CCN key to information message CCN key; Execute log cargo information message procedure (Z150-LOG-CARGO-INFO-MSG)
R-GCX126-cbl-00615 Log Message: 'EDI 350: RELEASE VIA DECON AT PORT [Port]', Set Release Reason: 'DECONSOLIDATION AT [Port]'
Process Rules
Business View: Assuming the follower manifest is being released through deconsolidation process during the 'Log Message: 'EDI 350: RELEASE VIA DECON AT PORT [Port]', Set Release Reason: 'DECONSOLIDATION AT [Port]'' routine, when the system logs the deconsolidation information, the system executes logic to ensure that clear the information message field to spaces; build message string: 'edi 350: release via decon at port ' concatenated with port code (first 4 characters); move the built message to information message field; build release reason string: 'deconsolidation at ' concatenated with port code (first 4 characters); move the built reason to cargo release reason field; set current ccn key to information message ccn key; execute log cargo information message procedure (z150-log-cargo-info-msg).
Given
The follower manifest is being released through deconsolidation process
When
The system logs the deconsolidation information
Then
Clear the information message field to spaces; Build message string: 'EDI 350: RELEASE VIA DECON AT PORT ' concatenated with port code (first 4 characters); Move the built message to information message field; Build release reason string: 'DECONSOLIDATION AT ' concatenated with port code (first 4 characters); Move the built reason to cargo release reason field; Set current CCN key to information message CCN key; Execute log cargo information message procedure (Z150-LOG-CARGO-INFO-MSG)
R-GCX126-cbl-00616 Process Associated US Manifest: Find US Cargo by Car ID and Waybill, Log Release to US CCN
Process Rules
Business View: Assuming a follower manifest has been released or deconsolidated during the 'Process Associated US Manifest: Find US Cargo by Car ID and Waybill, Log Release to US CCN' routine, when the system processes associated us manifest, the system executes logic to ensure that set us manifest not found flag to true; set not end-of-file flag to true; move current equipment car id key to us cargo car id index; move saved waybill index to us cargo waybill index; execute get unique us cargo by car and waybill (z3300-gu-us-cargo-by-carwb); execute get next us cargo by car and waybill repeatedly (z3350-gn-us-cargo-by-carwb) until us manifest found or end-of-file; if end-of-file reached, exit us manifest processing; if us manifest found: move log information, build date string from machine century and date, move machine time to log time, set action code to use input message, move us ccn key to train or us ccn field, set us cargo indicator to true, build message string 'cdn ccn rlsed by edi 350: ' concatenated with canadian ccn key, execute spawn log entry procedure (z300-spawn-gct1051e).
Given
A follower manifest has been released or deconsolidated
When
The system processes associated US manifest
Then
Set US manifest not found flag to true; Set not end-of-file flag to true; Move current equipment car ID key to US cargo car ID index; Move saved waybill index to US cargo waybill index; Execute Get Unique US cargo by car and waybill (Z3300-GU-US-CARGO-BY-CARWB); Execute Get Next US cargo by car and waybill repeatedly (Z3350-GN-US-CARGO-BY-CARWB) until US manifest found or end-of-file; If end-of-file reached, exit US manifest processing; If US manifest found: move log information, build date string from machine century and date, move machine time to log time, set action code to use input message, move US CCN key to train or US CCN field, set US cargo indicator to true, build message string 'CDN CCN RLSED BY EDI 350: ' concatenated with Canadian CCN key, execute spawn log entry procedure (Z300-SPAWN-GCT1051E)
R-GCX126-cbl-00617 Update Follower Cargo Record in Database
Action Rules
Business View: Assuming all release information has been set for the follower manifest and us manifest processing is complete during the 'Update Follower Cargo Record in Database' routine, when the system updates the follower cargo record, the system executes logic to ensure that move spaces to database status code; move blank to database accept status; execute database replace operation using cargo pcb; pass cargo report segment for update.
Given
All release information has been set for the follower manifest and US manifest processing is complete
When
The system updates the follower cargo record
Then
Move spaces to database status code; Move blank to database accept status; Execute database Replace operation using cargo PCB; Pass cargo report segment for update
R-GCX126-cbl-00618 More Followers in Array?
Decision Rules
Business View: Assuming a follower manifest has been processed and updated during the 'More Followers in Array?' routine, when the system determines whether to continue the processing loop, the system executes logic to ensure that if the current loop index j is less than the total follower count i, continue loop to process next follower; if the current loop index j equals or exceeds the total follower count i, exit loop and proceed to restore master information.
Given
A follower manifest has been processed and updated
When
The system determines whether to continue the processing loop
Then
If the current loop index J is less than the total follower count I, continue loop to process next follower; If the current loop index J equals or exceeds the total follower count I, exit loop and proceed to restore master information
R-GCX126-cbl-00619 Restore Master Cargo Information
Process Rules
Business View: Assuming all follower manifests have been processed and updated during the 'Restore Master Cargo Information' routine, when the system completes follower processing, the system executes logic to ensure that move saved master cargo report segment to current cargo report segment; move saved master waybill key to current waybill index; move saved master equipment car to current car id key.
Given
All follower manifests have been processed and updated
When
The system completes follower processing
Then
Move saved master cargo report segment to current cargo report segment; Move saved master waybill key to current waybill index; Move saved master equipment car to current car ID key
R-GCX126-cbl-00793 Initialize Loop Counter I = 1, Set Not End of DB Flag
Process Rules
Business View: Assuming a master manifest needs to have its follower manifests identified during the 'Initialize Loop Counter I = 1, Set Not End of DB Flag' routine, when the follower manifest collection process begins, the system executes logic to ensure that the loop counter i is set to 1 and the end-of-database flag is set to indicate more records may exist.
Given
A master manifest needs to have its follower manifests identified
When
The follower manifest collection process begins
Then
The loop counter I is set to 1 AND the end-of-database flag is set to indicate more records may exist
R-GCX126-cbl-00794 Set Accept Status to 'GEGB'
Action Rules
Business View: Assuming the system is ready to retrieve the next follower manifest record during the 'Set Accept Status to 'GEGB'' routine, when database access is initiated, the system executes logic to ensure that the accept status is set to 'gegb' to enable get next with browse capability.
Given
The system is ready to retrieve the next follower manifest record
When
Database access is initiated
Then
The accept status is set to 'GEGB' to enable Get Next with Browse capability
R-GCX126-cbl-00795 Call IMS GN Function Using Master CCN Key
Action Rules
Business View: Assuming the master manifest ccn key is available in gcb0rt-ccn-key and the database access mode is set to 'gegb' during the 'Call IMS GN Function Using Master CCN Key' routine, when the ims get next function is called with pcb7 using the ccrt-b0rt-ssaq qualified search, the system executes logic to ensure that the next cargo report segment is retrieved into gccc-cargo-report-segment.
Given
The master manifest CCN key is available in GCB0RT-CCN-KEY AND the database access mode is set to 'GEGB'
When
The IMS Get Next function is called with PCB7 using the CCRT-B0RT-SSAQ qualified search
Then
The next cargo report segment is retrieved into GCCC-CARGO-REPORT-SEGMENT
R-GCX126-cbl-00797 Master CCN Matches?
Decision Rules
Business View: Assuming a cargo record has been successfully retrieved from the database and the saved master ccn is available in ws-save-ccn during the 'Master CCN Matches?' routine, when the master manifest ccn of the retrieved cargo (gccc-master-mfst-ccn) is compared to the saved master ccn, the system executes logic to ensure that if the master manifest ccn matches the saved ccn, the cargo belongs to this master and processing continues to check if it is a follower or if the master manifest ccn does not match, the cargo belongs to a different master and the end-of-database flag is set and loop processing terminates.
Given
A cargo record has been successfully retrieved from the database AND the saved master CCN is available in WS-SAVE-CCN
When
The master manifest CCN of the retrieved cargo (GCCC-MASTER-MFST-CCN) is compared to the saved master CCN
Then
If the master manifest CCN matches the saved CCN, the cargo belongs to this master AND processing continues to check if it is a follower OR If the master manifest CCN does not match, the cargo belongs to a different master AND the end-of-database flag is set AND loop processing terminates
R-GCX126-cbl-00798 Is Follower Manifest?
Decision Rules
Business View: Assuming a cargo record has been retrieved that belongs to the correct master manifest during the 'Is Follower Manifest?' routine, when the cargo manifest type indicator (gccc-follower-mfst) is evaluated, the system executes logic to ensure that if the cargo is identified as a follower manifest, its ccn is stored in the follower array and the loop counter is incremented or if the cargo is the master manifest itself, it is skipped and the loop continues to the next record.
Given
A cargo record has been retrieved that belongs to the correct master manifest
When
The cargo manifest type indicator (GCCC-FOLLOWER-MFST) is evaluated
Then
If the cargo is identified as a follower manifest, its CCN is stored in the follower array AND the loop counter is incremented OR If the cargo is the master manifest itself, it is skipped AND the loop continues to the next record
R-GCX126-cbl-00799 Store Follower CCN in Array Position I
Process Rules
Business View: Assuming a cargo record has been confirmed as a follower manifest of the current master during the 'Store Follower CCN in Array Position I' routine, when the follower manifest is being recorded, the system executes logic to ensure that the follower manifest ccn (gccc-ccn-key) is stored in the follower manifest array at position i (ws-follower-mani(i)).
Given
A cargo record has been confirmed as a follower manifest of the current master
When
The follower manifest is being recorded
Then
The follower manifest CCN (GCCC-CCN-KEY) is stored in the follower manifest array at position I (WS-FOLLOWER-MANI(I))
R-GCX126-cbl-00800 Increment Counter I
Process Rules
Business View: Assuming a follower manifest ccn has been stored in the array at position i during the 'Increment Counter I' routine, when the counter is incremented, the system executes logic to ensure that the loop counter i is increased by 1 to point to the next available array position.
Given
A follower manifest CCN has been stored in the array at position I
When
The counter is incremented
Then
The loop counter I is increased by 1 to point to the next available array position
R-GCX126-cbl-00801 Counter I > 100?
Validation Rules
Business View: Assuming follower manifests are being collected in an array with maximum capacity of 100 during the 'Counter I > 100?' routine, when the loop counter i is evaluated after incrementing, the system executes logic to ensure that if counter i exceeds 100, the end-of-database flag is set and loop processing terminates to prevent array overflow or if counter i is 100 or less, the loop continues to retrieve the next record.
Given
Follower manifests are being collected in an array with maximum capacity of 100
When
The loop counter I is evaluated after incrementing
Then
If counter I exceeds 100, the end-of-database flag is set AND loop processing terminates to prevent array overflow OR If counter I is 100 or less, the loop continues to retrieve the next record
R-GCX126-cbl-00803 End Loop
Process Rules
Business View: Assuming the follower manifest collection loop has completed due to end-of-database flag or maximum iterations reached during the 'End Loop' routine, when loop processing ends, the system executes logic to ensure that the loop counter i is decremented by 1 to reflect the actual count of follower manifests collected and if the count is zero or negative, processing exits immediately or if follower manifests were collected, they are available in the ws-follower-mani array for further processing.
Given
The follower manifest collection loop has completed due to end-of-database flag OR maximum iterations reached
When
Loop processing ends
Then
The loop counter I is decremented by 1 to reflect the actual count of follower manifests collected AND if the count is zero or negative, processing exits immediately OR if follower manifests were collected, they are available in the WS-FOLLOWER-MANI array for further processing
R-GCX126-cbl-00811 Set Release Type to 'A'
Definitional Rules
Business View: Assuming a cargo record is being processed for customs release via edi 350 message during the 'Set Release Type to 'A'' routine, when the system sets release information, the system executes logic to ensure that the release type is set to 'a' indicating automatic release.
Given
A cargo record is being processed for customs release via EDI 350 message
When
The system sets release information
Then
The release type is set to 'A' indicating automatic release
R-GCX126-cbl-00815 Initialize US Manifest Search Flags
Process Rules
Business View: Assuming a canadian cargo record has been processed for release or deconsolidation during the 'Initialize US Manifest Search Flags' routine, when the system initiates the us manifest search process, the system executes logic to ensure that the us manifest not found flag is set to true and the not end-of-file flag is set to true.
Given
A Canadian cargo record has been processed for release or deconsolidation
When
The system initiates the US manifest search process
Then
The US manifest not found flag is set to true AND the not end-of-file flag is set to true
R-GCX126-cbl-00817 Retrieve US Cargo Record by Car ID and Waybill
Action Rules
Business View: Assuming us cargo search keys are set with car id and waybill index during the 'Retrieve US Cargo Record by Car ID and Waybill' routine, when the system executes the initial us cargo retrieval using gu function with car-wb index and >= operator, the system executes logic to ensure that the system retrieves the first us cargo record matching or exceeding the search criteria.
Given
US cargo search keys are set with car ID and waybill index
When
The system executes the initial US cargo retrieval using GU function with CAR-WB index and >= operator
Then
The system retrieves the first US cargo record matching or exceeding the search criteria
R-GCX126-cbl-00820 Cargo Deleted or TR Created?
Decision Rules
Business View: Assuming a matching us cargo record by car id and waybill has been found during the 'Cargo Deleted or TR Created?' routine, when the system checks the cargo deletion status indicator and train created indicator, the system executes logic to ensure that if cargo is marked as deleted or train created indicator equals 'y', continue to get next record else set us manifest found flag to true.
Given
A matching US cargo record by car ID and waybill has been found
When
The system checks the cargo deletion status indicator AND train created indicator
Then
If cargo is marked as deleted OR train created indicator equals 'Y', continue to get next record ELSE set US manifest found flag to true
R-GCX126-cbl-00821 Set US Manifest Found Flag
Process Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record exists that matches car id and waybill and is not deleted and does not have a train created, and the system completes validation checks occurs during the 'Set US Manifest Found Flag' routine, then the system must guarantee that the us manifest found flag is set to true.
EXCLUDING
A US cargo record exists that matches car ID and waybill AND is not deleted AND does not have a train created
When
The system completes validation checks
Then
The US manifest found flag is set to true
R-GCX126-cbl-00825 Cargo Deleted or TR Created?
Decision Rules
Business View: Assuming a next matching us cargo record by car id and waybill has been found during the 'Cargo Deleted or TR Created?' routine, when the system checks the cargo deletion status indicator and train created indicator, the system executes logic to ensure that if cargo is marked as deleted or train created indicator equals 'y', continue to get next record else set us manifest found flag to true.
Given
A next matching US cargo record by car ID and waybill has been found
When
The system checks the cargo deletion status indicator AND train created indicator
Then
If cargo is marked as deleted OR train created indicator equals 'Y', continue to get next record ELSE set US manifest found flag to true
R-GCX126-cbl-00826 Set US Manifest Found Flag
Process Rules
Business View: <EXCLUSION CRITERIA> If a next us cargo record exists that matches car id and waybill and is not deleted and does not have a train created, and the system completes validation checks occurs during the 'Set US Manifest Found Flag' routine, then the system must guarantee that the us manifest found flag is set to true.
EXCLUDING
A next US cargo record exists that matches car ID and waybill AND is not deleted AND does not have a train created
When
The system completes validation checks
Then
The US manifest found flag is set to true
R-GCX126-cbl-00827 US Manifest Found?
Decision Rules
Business View: Assuming the us manifest search process has completed all retrieval and validation steps during the 'US Manifest Found?' routine, when the system checks the us manifest found flag, the system executes logic to ensure that if us manifest found flag is false (not found), exit the process else proceed to prepare log entry.
Given
The US manifest search process has completed all retrieval and validation steps
When
The system checks the US manifest found flag
Then
If US manifest found flag is false (not found), exit the process ELSE proceed to prepare log entry
R-GCX126-cbl-00828 Prepare Log Entry: Current Date/Time, US CCN, Action Code: LOG-USE-INPUT-MESSAGE, Message: CDN CCN RLSED BY EDI 350
Process Rules
Business View: Assuming a valid us manifest record has been found during the 'Prepare Log Entry: Current Date/Time, US CCN, Action Code: LOG-USE-INPUT-MESSAGE, Message: CDN CCN RLSED BY EDI 350' routine, when the system prepares the log entry, the system executes logic to ensure that the log date is set to current machine century concatenated with current machine date and the log time is set to current machine time and the action code is set to log-use-input-message and the us ccn key is set as the train or us ccn identifier and the cargo type indicator is set to us cargo and the message is set to 'cdn ccn rlsed by edi 350: ' concatenated with the canadian ccn key.
Given
A valid US manifest record has been found
When
The system prepares the log entry
Then
The log date is set to current machine century concatenated with current machine date AND the log time is set to current machine time AND the action code is set to LOG-USE-INPUT-MESSAGE AND the US CCN key is set as the train or US CCN identifier AND the cargo type indicator is set to US cargo AND the message is set to 'CDN CCN RLSED BY EDI 350: ' concatenated with the Canadian CCN key
R-GCX126-cbl-00829 Spawn GCT1051E Transaction to Log Release Message
Action Rules
Business View: Assuming the log entry has been prepared with date, time, us ccn, action code, and release message during the 'Spawn GCT1051E Transaction to Log Release Message' routine, when the system invokes the gct1051e logging process, the system executes logic to ensure that a log transaction is created recording the canadian cargo release notification for the associated us cargo.
Given
The log entry has been prepared with date, time, US CCN, action code, and release message
When
The system invokes the GCT1051E logging process
Then
A log transaction is created recording the Canadian cargo release notification for the associated US cargo
R-GCX126-cbl-00947 Prepare Log Entry: - Current Date/Time - US CCN - Action Code: LOG-USE-INPUT-MESSAGE - Message: CDN CCN RLSED BY EDI 350
Process Rules
Business View: <EXCLUSION CRITERIA> If ['a canadian cargo has been released via edi 350 message', 'a corresponding us cargo manifest exists with matching equipment car id and waybill number', 'the us cargo is not deleted and no train has been created for it', 'the system has current machine date and time available'], and ['the system processes the us manifest associated with the released canadian cargo'] occurs during the 'Prepare Log Entry: - Current Date/Time - US CCN - Action Code: LOG-USE-INPUT-MESSAGE - Message: CDN CCN RLSED BY EDI 350' routine, then the system must guarantee that ['extract current machine century and date in ccyymmdd format', 'extract current machine time in hhmmss format', 'set the action code to log-use-input-message', 'set the target identifier to the us cargo control number', 'set the cargo type indicator to us-cargo', "build the log message by concatenating 'cdn ccn rlsed by edi 350: ' with the canadian cargo control number", 'populate the gcx105 log structure with date, time, action code, us ccn, cargo type, and message', 'invoke the gct1051e transaction to create the log entry'].
EXCLUDING
['A Canadian cargo has been released via EDI 350 message', 'A corresponding US cargo manifest exists with matching equipment car ID and waybill number', 'The US cargo is not deleted and no train has been created for it', 'The system has current machine date and time available']
When
['The system processes the US manifest associated with the released Canadian cargo']
Then
['Extract current machine century and date in CCYYMMDD format', 'Extract current machine time in HHMMSS format', 'Set the action code to LOG-USE-INPUT-MESSAGE', 'Set the target identifier to the US cargo control number', 'Set the cargo type indicator to US-CARGO', "Build the log message by concatenating 'CDN CCN RLSED BY EDI 350: ' with the Canadian cargo control number", 'Populate the GCX105 log structure with date, time, action code, US CCN, cargo type, and message', 'Invoke the GCT1051E transaction to create the log entry']
R-GCX126-cbl-00950 Set Action Code to LOG-USE-INPUT-MESSAGE
Definitional Rules
Business View: Assuming ['a us cargo log entry is being prepared'] during the 'Set Action Code to LOG-USE-INPUT-MESSAGE' routine, when ['setting the action code for the log entry'], the system executes logic to ensure that ['set gcx105-action-code to log-use-input-message'].
Given
['A US cargo log entry is being prepared']
When
['Setting the action code for the log entry']
Then
['Set GCX105-ACTION-CODE to LOG-USE-INPUT-MESSAGE']
R-GCX126-cbl-00951 Set US CCN as Target
Definitional Rules
Business View: Assuming ['a us cargo manifest has been retrieved (gcusrt-us-ccn-key)', 'the us cargo control number is available'] during the 'Set US CCN as Target' routine, when ['preparing the log entry for us cargo release'], the system executes logic to ensure that ['move gcusrt-us-ccn-key to gcx105-train-or-us-ccn field'].
Given
['A US cargo manifest has been retrieved (GCUSRT-US-CCN-KEY)', 'The US cargo control number is available']
When
['Preparing the log entry for US cargo release']
Then
['Move GCUSRT-US-CCN-KEY to GCX105-TRAIN-OR-US-CCN field']
R-GCX126-cbl-00953 Build Message Text and Concatenate: 'CDN CCN RLSED BY EDI 350: ' + Canadian CCN
Computation Rules
Business View: Assuming ['the canadian cargo control number (gccc-ccn-key) is available', 'a us cargo release is being logged'] during the 'Build Message Text and Concatenate: 'CDN CCN RLSED BY EDI 350: ' + Canadian CCN' routine, when ['building the log message text'], the system executes logic to ensure that ["concatenate the literal text 'cdn ccn rlsed by edi 350: ' with gccc-ccn-key", 'store the concatenated message in gcx105-message field'].
Given
['The Canadian cargo control number (GCCC-CCN-KEY) is available', 'A US cargo release is being logged']
When
['Building the log message text']
Then
["Concatenate the literal text 'CDN CCN RLSED BY EDI 350: ' with GCCC-CCN-KEY", 'Store the concatenated message in GCX105-MESSAGE field']
R-GCX126-cbl-00954 Call GCT1051E Transaction to Log Entry
Action Rules
Business View: Assuming ['gcx105 log structure is fully populated with date, time, action code, us ccn, cargo type, and message', 'all required log information has been prepared'] during the 'Call GCT1051E Transaction to Log Entry' routine, when ['ready to create the log entry'], the system executes logic to ensure that ['call z300-spawn-gct1051e procedure to create the log entry'].
Given
['GCX105 log structure is fully populated with date, time, action code, US CCN, cargo type, and message', 'All required log information has been prepared']
When
['Ready to create the log entry']
Then
['Call Z300-SPAWN-GCT1051E procedure to create the log entry']
R-GCX126-cbl-00999 Call Z200-MOVE-LOG-INFORMATION to Initialize Log Structure
Process Rules
Business View: Assuming a cargo information message needs to be logged during the 'Call Z200-MOVE-LOG-INFORMATION to Initialize Log Structure' routine, when the log structure initialization is invoked, the system executes logic to ensure that the log input area is cleared to spaces and the security byte is set to high-value and the sending transaction is set to 'gct1261e' and the user id from the common control area is copied to the log structure.
Given
A cargo information message needs to be logged
When
The log structure initialization is invoked
Then
The log input area is cleared to spaces AND the security byte is set to high-value AND the sending transaction is set to 'GCT1261E' AND the user ID from the common control area is copied to the log structure
R-GCX126-cbl-01004 Log Message Empty?
Validation Rules
Business View: Assuming a log entry creation request is initiated for gct1051e during the 'Log Message Empty?' routine, when the gcx105-message field is empty (spaces) or contains only low-values, the system executes logic to ensure that the system skips the log entry creation process and exits the z300-spawn-gct1051e section without writing any log record.
Given
A log entry creation request is initiated for GCT1051E
When
The GCX105-MESSAGE field is empty (spaces) OR contains only low-values
Then
The system skips the log entry creation process and exits the Z300-SPAWN-GCT1051E section without writing any log record
R-GCX126-cbl-01005 Normalize Date - Replace Spaces with Zeros
Validation Rules
Business View: Assuming a valid log message exists in gcx105-message during the 'Normalize Date - Replace Spaces with Zeros' routine, when the gcx105-date field contains space characters, the system executes logic to ensure that the system replaces all spaces in gcx105-date with zeroes to ensure proper date formatting.
Given
A valid log message exists in GCX105-MESSAGE
When
The GCX105-DATE field contains space characters
Then
The system replaces all spaces in GCX105-DATE with zeroes to ensure proper date formatting
R-GCX126-cbl-01006 Normalize Time - Replace Spaces with '1'
Validation Rules
Business View: Assuming a valid log message exists in gcx105-message and the gcx105-date field has been normalized during the 'Normalize Time - Replace Spaces with '1'' routine, when the gcx105-time field contains space characters, the system executes logic to ensure that the system replaces all spaces in gcx105-time with the character '1' to ensure proper time formatting.
Given
A valid log message exists in GCX105-MESSAGE AND the GCX105-DATE field has been normalized
When
The GCX105-TIME field contains space characters
Then
The system replaces all spaces in GCX105-TIME with the character '1' to ensure proper time formatting
R-GCX126-cbl-01007 Move Log Input to GCT1051E Message
Process Rules
Business View: Assuming the gcx105-date and gcx105-time fields have been normalized and a valid log message exists during the 'Move Log Input to GCT1051E Message' routine, when the log entry preparation is in progress, the system executes logic to ensure that the system moves the complete gcx105-input structure to the gct1051e-msg field.
Given
The GCX105-DATE and GCX105-TIME fields have been normalized AND a valid log message exists
When
The log entry preparation is in progress
Then
The system moves the complete GCX105-INPUT structure to the GCT1051E-MSG field
R-GCX126-cbl-01008 Call CIMS with CHNG Function
Action Rules
Business View: Assuming the gct1051e message structure has been populated with log data during the 'Call CIMS with CHNG Function' routine, when the system is ready to write the log entry, the system executes logic to ensure that the system calls cims with chng function using the alternate pcb and gct1051e message to change the message destination.
Given
The GCT1051E message structure has been populated with log data
When
The system is ready to write the log entry
Then
The system calls CIMS with CHNG function using the alternate PCB and GCT1051E message to change the message destination
R-GCX126-cbl-01009 Call WRITMSGL to Write Message Log
Action Rules
Business View: Assuming the message destination has been changed to the alternate pcb and the gct1051e message is populated during the 'Call WRITMSGL to Write Message Log' routine, when the system is ready to persist the log entry, the system executes logic to ensure that the system calls writmsgl with the alternate pcb, gct1051e message code, message content, message length, and module name to write the log entry.
Given
The message destination has been changed to the alternate PCB AND the GCT1051E message is populated
When
The system is ready to persist the log entry
Then
The system calls WRITMSGL with the alternate PCB, GCT1051E message code, message content, message length, and module name to write the log entry
R-GCX126-cbl-01010 Call CIMS with PURG Function to Commit
Action Rules
Business View: Assuming the log entry has been written to the message queue via writmsgl during the 'Call CIMS with PURG Function to Commit' routine, when the log entry write operation is complete, the system executes logic to ensure that the system calls cims with purg function using the alternate pcb to commit the transaction and make the log entry permanent.
Given
The log entry has been written to the message queue via WRITMSGL
When
The log entry write operation is complete
Then
The system calls CIMS with PURG function using the alternate PCB to commit the transaction and make the log entry permanent
R-GCX126-cbl-00289 Log Message: 'EDI 350: AUTHORIZED TO PROCEED'
Process Rules
Business View: Assuming an edi 350 message with v9 segment notice reason code indicating 'auth to deliver' status during the 'Log Message: 'EDI 350: AUTHORIZED TO PROCEED'' routine, when the authorization to deliver processing begins, the system executes logic to ensure that the system logs the message 'edi 350: authorized to proceed' to the cargo information log with current date, time, and cargo ccn.
Given
An EDI 350 message with V9 segment notice reason code indicating 'AUTH TO DELIVER' status
When
The authorization to deliver processing begins
Then
The system logs the message 'EDI 350: AUTHORIZED TO PROCEED' to the cargo information log with current date, time, and cargo CCN
R-GCX126-cbl-00290 Is Cargo CSA Manifest?
Decision Rules
Business View: Assuming a cargo record with authorization to deliver status from edi 350 during the 'Is Cargo CSA Manifest?' routine, when the system evaluates the cargo's csa indicator, the system executes logic to ensure that if csa indicator is on, proceed with csa authorization processing; if csa indicator is off, log non-csa rejection message.
Given
A cargo record with authorization to deliver status from EDI 350
When
The system evaluates the cargo's CSA indicator
Then
If CSA indicator is ON, proceed with CSA authorization processing; If CSA indicator is OFF, log non-CSA rejection message
R-GCX126-cbl-00291 Process CSA Authorization: - Log 'EDI 350: ACCEPTED - CSA' - Set Status to CSA-DLV - Set CSA Authorization Flag
Process Rules
Business View: Assuming a cargo record with csa indicator on and authorization to deliver status from edi 350 during the 'Process CSA Authorization: - Log 'EDI 350: ACCEPTED - CSA' - Set Status to CSA-DLV - Set CSA Authorization Flag' routine, when the system processes the csa authorization, the system executes logic to ensure that the system logs 'edi 350: accepted - csa' message, sets cargo current status to 'csa-dlv', sets csa authorization to deliver received flag to true.
Given
A cargo record with CSA indicator ON and authorization to deliver status from EDI 350
When
The system processes the CSA authorization
Then
The system logs 'EDI 350: ACCEPTED - CSA' message, sets cargo current status to 'CSA-DLV', sets CSA authorization to deliver received flag to TRUE
R-GCX126-cbl-00293 Log Message: 'EDI 350: NOT ACCEPTED - NON-CSA'
Process Rules
Business View: Assuming a cargo record with csa indicator off and authorization to deliver status from edi 350 during the 'Log Message: 'EDI 350: NOT ACCEPTED - NON-CSA'' routine, when the system evaluates the non-csa cargo, the system executes logic to ensure that the system logs 'edi 350: not accepted - non-csa' message to the cargo information log without updating cargo status.
Given
A cargo record with CSA indicator OFF and authorization to deliver status from EDI 350
When
The system evaluates the non-CSA cargo
Then
The system logs 'EDI 350: NOT ACCEPTED - NON-CSA' message to the cargo information log without updating cargo status
R-GCX126-cbl-00294 Process Associated US Manifest: - Find US Cargo by Car ID and Waybill - Log Release Message to US CCN - Reference Canadian CCN
Process Rules
Business View: Assuming a cargo record with authorization to deliver status and associated equipment car id and waybill number during the 'Process Associated US Manifest: - Find US Cargo by Car ID and Waybill - Log Release Message to US CCN - Reference Canadian CCN' routine, when the authorization processing is complete, the system executes logic to ensure that the system searches for us cargo records matching the car id and waybill number, and if found and not deleted and no train created, logs a message 'cdn ccn rlsed by edi 350' with the canadian ccn to the us cargo log entry.
Given
A cargo record with authorization to deliver status and associated equipment car ID and waybill number
When
The authorization processing is complete
Then
The system searches for US cargo records matching the car ID and waybill number, and if found and not deleted and no train created, logs a message 'CDN CCN RLSED BY EDI 350' with the Canadian CCN to the US cargo log entry
R-GCX126-cbl-00295 Log Message: 'EDI 350: GOODS HELD FOR EXAMINATION'
Process Rules
Business View: Assuming an edi 350 message with v9 notice reason code indicating held status has been received for a cargo during the 'Log Message: 'EDI 350: GOODS HELD FOR EXAMINATION'' routine, when the cargo hold processing is initiated, the system executes logic to ensure that the system logs the message 'edi 350: goods held for examination' to the cargo information log.
Given
An EDI 350 message with V9 notice reason code indicating HELD status has been received for a cargo
When
The cargo hold processing is initiated
Then
The system logs the message 'EDI 350: GOODS HELD FOR EXAMINATION' to the cargo information log
R-GCX126-cbl-00296 Set Cargo Status to HOLD
Decision Rules
Business View: Assuming a cargo record exists in the system and customs has issued a hold notice via edi 350 during the 'Set Cargo Status to HOLD' routine, when the hold status processing is executed, the system executes logic to ensure that the cargo status is set to hold in the cargo record.
Given
A cargo record exists in the system and customs has issued a hold notice via EDI 350
When
The hold status processing is executed
Then
The cargo status is set to HOLD in the cargo record
R-GCX126-cbl-00299 Prepare Hold Email: - Subject: 'CBSA CARGO HOLD' - Equipment ID - Waybill Number - CCN - Destination Station - Manifest Station
Process Rules
Business View: Assuming a cargo with ccn starting with '6105' has been placed on hold during the 'Prepare Hold Email: - Subject: 'CBSA CARGO HOLD' - Equipment ID - Waybill Number - CCN - Destination Station - Manifest Station' routine, when the hold notification preparation is executed, the system executes logic to ensure that the system creates an email with subject 'cbsa cargo hold - [ccn]' and body containing: line 1 - 'cargo on hold for inspection by cbsa - edi350', line 3 - 'equipment: [equipment id]', line 4 - 'waybill: [carrier][origin station][waybill number]', line 5 - 'ccn: [ccn]', line 6 - 'destination: [destination station name], [state code]', line 7 - 'manifest upon: [manifest station name]'.
Given
A cargo with CCN starting with '6105' has been placed on hold
When
The hold notification preparation is executed
Then
The system creates an email with subject 'CBSA CARGO HOLD - [CCN]' and body containing: line 1 - 'Cargo on HOLD for inspection by CBSA - EDI350', line 3 - 'Equipment: [Equipment ID]', line 4 - 'Waybill: [Carrier][Origin Station][Waybill Number]', line 5 - 'CCN: [CCN]', line 6 - 'DESTINATION: [Destination Station Name], [State Code]', line 7 - 'MANIFEST UPON: [Manifest Station Name]'
R-GCX126-cbl-00300 Set Email Route: - Filename: CAHOLD - To: OM01247
Process Rules
Business View: Assuming the hold notification email content has been prepared during the 'Set Email Route: - Filename: CAHOLD - To: OM01247' routine, when the email routing is configured, the system executes logic to ensure that the system sets the destination filename to 'cahold', sets the primary recipient to 'om01247', and sets the message type indicator to hold.
Given
The hold notification email content has been prepared
When
The email routing is configured
Then
The system sets the destination filename to 'CAHOLD', sets the primary recipient to 'OM01247', and sets the message type indicator to HOLD
R-GCX126-cbl-00302 V9 Notice Reason = DECON?
Decision Rules
Business View: Assuming an edi 350 message has been received and parsed with v9 segment containing notice reason code during the 'V9 Notice Reason = DECON?' routine, when the system evaluates the v9 notice reason code field, the system executes logic to ensure that if v9-02-decon is true, proceed with deconsolidation release processing; otherwise, skip deconsolidation processing and continue to next evaluation.
Given
An EDI 350 message has been received and parsed with V9 segment containing notice reason code
When
The system evaluates the V9 notice reason code field
Then
If V9-02-DECON is true, proceed with deconsolidation release processing; otherwise, skip deconsolidation processing and continue to next evaluation
R-GCX126-cbl-00304 Log Message: 'RELEASE VIA DECON AT PORT' + Port Code
Process Rules
Business View: Assuming deconsolidation release information has been set and p4 segment contains port code during the 'Log Message: 'RELEASE VIA DECON AT PORT' + Port Code' routine, when the system logs the deconsolidation release event, the system executes logic to ensure that construct message 'edi 350: release via decon at port ' concatenated with p4-01-port-cde (first 4 characters), store in ws-gcx105-info-msg, and perform z150-log-cargo-info-msg to create audit log entry.
Given
Deconsolidation release information has been set and P4 segment contains port code
When
The system logs the deconsolidation release event
Then
Construct message 'EDI 350: RELEASE VIA DECON AT PORT ' concatenated with P4-01-PORT-CDE (first 4 characters), store in WS-GCX105-INFO-MSG, and perform Z150-LOG-CARGO-INFO-MSG to create audit log entry
R-GCX126-cbl-00305 Update Release Reason: 'DECONSOLIDATION AT' + Port Code
Action Rules
Business View: Assuming p4 segment contains the port code where deconsolidation occurred during the 'Update Release Reason: 'DECONSOLIDATION AT' + Port Code' routine, when the system updates the release reason for deconsolidation, the system executes logic to ensure that construct string 'deconsolidation at ' concatenated with p4-01-port-cde (first 4 characters) and store in gccc-release-reason field.
Given
P4 segment contains the port code where deconsolidation occurred
When
The system updates the release reason for deconsolidation
Then
Construct string 'DECONSOLIDATION AT ' concatenated with P4-01-PORT-CDE (first 4 characters) and store in GCCC-RELEASE-REASON field
R-GCX126-cbl-00306 31: Process Associated US Manifest - Find US manifest by car ID and waybill - Log release message to US CCN - Reference Canadian CCN
Action Rules
Business View: Assuming a canadian cargo has been released via deconsolidation with valid equipment car id and waybill number stored in ws-current-carid-key and save-waybill-index during the '31: Process Associated US Manifest - Find US manifest by car ID and waybill - Log release message to US CCN - Reference Canadian CCN' routine, when the system processes the associated us manifest, the system executes logic to ensure that perform z3300-gu-us-cargo-by-carwb to retrieve us cargo by car id and waybill, then perform z3350-gn-us-cargo-by-carwb until ws-us-mfst-found is true or ws-eof is true; if us manifest found and not eof, perform z200-move-log-information, construct gcx105-date from cc-machine-century and cc-machine-date-x, set gcx105-time to cc-machine-time-x, set gcx105-action-code to log-use-input-message, set gcx105-train-or-us-ccn to gcusrt-us-ccn-key, set gcx105-us-cargo to true, construct gcx105-message as 'cdn ccn rlsed by edi 350: ' concatenated with gccc-ccn-key, and perform z300-spawn-gct1051e.
Given
A Canadian cargo has been released via deconsolidation with valid equipment car ID and waybill number stored in WS-CURRENT-CARID-KEY and SAVE-WAYBILL-INDEX
When
The system processes the associated US manifest
Then
Perform Z3300-GU-US-CARGO-BY-CARWB to retrieve US cargo by car ID and waybill, then perform Z3350-GN-US-CARGO-BY-CARWB until WS-US-MFST-FOUND is true or WS-EOF is true; if US manifest found and not EOF, perform Z200-MOVE-LOG-INFORMATION, construct GCX105-DATE from CC-MACHINE-CENTURY and CC-MACHINE-DATE-X, set GCX105-TIME to CC-MACHINE-TIME-X, set GCX105-ACTION-CODE to LOG-USE-INPUT-MESSAGE, set GCX105-TRAIN-OR-US-CCN to GCUSRT-US-CCN-KEY, set GCX105-US-CARGO to true, construct GCX105-MESSAGE as 'CDN CCN RLSED BY EDI 350: ' concatenated with GCCC-CCN-KEY, and perform Z300-SPAWN-GCT1051E
R-GCX126-cbl-00308 43: Update Cargo Record - Replace cargo record in database
Action Rules
Business View: Assuming cargo record gccc-cargo-report-segment has been updated with release information during the '43: Update Cargo Record - Replace cargo record in database' routine, when the system updates the cargo record, the system executes logic to ensure that perform z3100-repl-cargo which clears cc-status-code, sets cc-accept-status to spaces, and calls cims with repl function code, gccc-pcb, and gccc-cargo-report-segment to replace the cargo record.
Given
Cargo record GCCC-CARGO-REPORT-SEGMENT has been updated with release information
When
The system updates the cargo record
Then
Perform Z3100-REPL-CARGO which clears CC-STATUS-CODE, sets CC-ACCEPT-STATUS to spaces, and calls CIMS with REPL function code, GCCC-PCB, and GCCC-CARGO-REPORT-SEGMENT to replace the cargo record
R-GCX126-cbl-00309 Is Master Manifest?
Decision Rules
Business View: Assuming a cargo record has been updated with deconsolidation release information during the 'Is Master Manifest?' routine, when the system checks the manifest type, the system executes logic to ensure that if gccc-master-mfst is true, proceed to process follower manifests; otherwise, end deconsolidation processing.
Given
A cargo record has been updated with deconsolidation release information
When
The system checks the manifest type
Then
If GCCC-MASTER-MFST is true, proceed to process follower manifests; otherwise, end deconsolidation processing
R-GCX126-cbl-00310 33: Process Follower Manifests - Retrieve all follower manifests - Set release information for each - Log release message - Update release reason - Process US manifest - Update cargo record
Process Rules
Business View: Assuming current cargo is a master manifest that has been released via deconsolidation with gccc-ccn-key stored in gcb0rt-ccn-key during the '33: Process Follower Manifests - Retrieve all follower manifests - Set release information for each - Log release message - Update release reason - Process US manifest - Update cargo record' routine, when the system processes follower manifests, the system executes logic to ensure that save gccc-cargo-report-segment to ws-save-gcsccrt, set cc-accept-status to 'gegb', initialize ws-follower-mani-array to spaces, set ws-follower-not-end-of-db to true, set i to 1; perform until ws-follower-end-of-db or i > 100: call cims with gn, gccc-pcb7, gccc-cargo-report-segment, and ccrt-b0rt-ssaq; if cc-status-code is space and gccc-master-mfst-ccn equals ws-save-ccn: if gccc-follower-mfst is true, move gccc-ccn-key to ws-follower-mani(i) and add 1 to i; else set ws-follower-end-of-db to true; subtract 1 from i; if i > 0, perform varying j from 1 by 1 until ws-follower-mani(i) is spaces or low-values or j > i: move ws-follower-mani(j) to key-value of ccrt-ssaq and a2rt-ssaq, perform z3000-ghu-cargo; if ws-cargo-found: perform d110-set-release-information, construct ws-gcx105-info-msg as 'edi 350: release via decon at port ' concatenated with p4-01-port-cde (first 4 characters), construct gccc-release-reason as 'deconsolidation at ' concatenated with p4-01-port-cde (first 4 characters), move gccc-ccn-key to ws-current-ccn-key, perform z150-log-cargo-info-msg, move gccc-waybill-key-for-index to save-waybill-index, move gccc-equipment-car to ws-current-carid-key, perform d120-process-us-mfst, clear cc-status-code, set cc-accept-status to spaces, and call cims with repl, gccc-pcb, and gccc-cargo-report-segment.
Given
Current cargo is a master manifest that has been released via deconsolidation with GCCC-CCN-KEY stored in GCB0RT-CCN-KEY
When
The system processes follower manifests
Then
Save GCCC-CARGO-REPORT-SEGMENT to WS-SAVE-GCSCCRT, set CC-ACCEPT-STATUS to 'GEGB', initialize WS-FOLLOWER-MANI-ARRAY to spaces, set WS-FOLLOWER-NOT-END-OF-DB to true, set I to 1; perform until WS-FOLLOWER-END-OF-DB or I > 100: call CIMS with GN, GCCC-PCB7, GCCC-CARGO-REPORT-SEGMENT, and CCRT-B0RT-SSAQ; if CC-STATUS-CODE is space and GCCC-MASTER-MFST-CCN equals WS-SAVE-CCN: if GCCC-FOLLOWER-MFST is true, move GCCC-CCN-KEY to WS-FOLLOWER-MANI(I) and add 1 to I; else set WS-FOLLOWER-END-OF-DB to true; subtract 1 from I; if I > 0, perform varying J from 1 by 1 until WS-FOLLOWER-MANI(I) is spaces or low-values or J > I: move WS-FOLLOWER-MANI(J) to KEY-VALUE of CCRT-SSAQ and A2RT-SSAQ, perform Z3000-GHU-CARGO; if WS-CARGO-FOUND: perform D110-SET-RELEASE-INFORMATION, construct WS-GCX105-INFO-MSG as 'EDI 350: RELEASE VIA DECON AT PORT ' concatenated with P4-01-PORT-CDE (first 4 characters), construct GCCC-RELEASE-REASON as 'DECONSOLIDATION AT ' concatenated with P4-01-PORT-CDE (first 4 characters), move GCCC-CCN-KEY to WS-CURRENT-CCN-KEY, perform Z150-LOG-CARGO-INFO-MSG, move GCCC-WAYBILL-KEY-FOR-INDEX to SAVE-WAYBILL-INDEX, move GCCC-EQUIPMENT-CAR to WS-CURRENT-CARID-KEY, perform D120-PROCESS-US-MFST, clear CC-STATUS-CODE, set CC-ACCEPT-STATUS to spaces, and call CIMS with REPL, GCCC-PCB, and GCCC-CARGO-REPORT-SEGMENT
R-GCX126-cbl-00311 33: Process Follower Manifests - Retrieve all follower manifests
Action Rules
Business View: Assuming a master manifest ccn is stored in gcb0rt-ccn-key and ws-save-ccn during the '33: Process Follower Manifests - Retrieve all follower manifests' routine, when the system retrieves follower manifests, the system executes logic to ensure that set cc-accept-status to 'gegb', initialize ws-follower-mani-array to spaces, set i to 1, set ws-follower-not-end-of-db to true; perform until ws-follower-end-of-db is true or i > 100: call cims with gn function, gccc-pcb7, gccc-cargo-report-segment, and ccrt-b0rt-ssaq; if cc-status-code is space and gccc-master-mfst-ccn equals ws-save-ccn: if gccc-follower-mfst is true, move gccc-ccn-key to ws-follower-mani(i) and add 1 to i; else if cc-status-code is not space or gccc-master-mfst-ccn does not equal ws-save-ccn, set ws-follower-end-of-db to true; subtract 1 from i after loop completes.
Given
A master manifest CCN is stored in GCB0RT-CCN-KEY and WS-SAVE-CCN
When
The system retrieves follower manifests
Then
Set CC-ACCEPT-STATUS to 'GEGB', initialize WS-FOLLOWER-MANI-ARRAY to spaces, set I to 1, set WS-FOLLOWER-NOT-END-OF-DB to true; perform until WS-FOLLOWER-END-OF-DB is true or I > 100: call CIMS with GN function, GCCC-PCB7, GCCC-CARGO-REPORT-SEGMENT, and CCRT-B0RT-SSAQ; if CC-STATUS-CODE is space and GCCC-MASTER-MFST-CCN equals WS-SAVE-CCN: if GCCC-FOLLOWER-MFST is true, move GCCC-CCN-KEY to WS-FOLLOWER-MANI(I) and add 1 to I; else if CC-STATUS-CODE is not space or GCCC-MASTER-MFST-CCN does not equal WS-SAVE-CCN, set WS-FOLLOWER-END-OF-DB to true; subtract 1 from I after loop completes
R-GCX126-cbl-00312 33: Process Follower Manifests - Set release information for each
Action Rules
Business View: Assuming follower manifest ccn is stored in ws-follower-mani(j) and cargo record has been retrieved during the '33: Process Follower Manifests - Set release information for each' routine, when the system sets release information for the follower, the system executes logic to ensure that if ws-cargo-found is true, perform d110-set-release-information which clears gccc-destin-stn-num-index and gccc-destin-stn-num-for-index to spaces, sets gccc-release-date to cc-machine-date-x, sets gccc-release-time to cc-machine-time-x, sets gccc-release-by to cc-acf2-userid, sets gccc-current-status to 'released', sets gccc-release-status to 'r', sets gccc-release-type to 'a', clears gccc-release-reason to spaces, clears gccc-err-or-rel-status-index to spaces, and clears gccc-error-status to spaces.
Given
Follower manifest CCN is stored in WS-FOLLOWER-MANI(J) and cargo record has been retrieved
When
The system sets release information for the follower
Then
If WS-CARGO-FOUND is true, perform D110-SET-RELEASE-INFORMATION which clears GCCC-DESTIN-STN-NUM-INDEX and GCCC-DESTIN-STN-NUM-FOR-INDEX to spaces, sets GCCC-RELEASE-DATE to CC-MACHINE-DATE-X, sets GCCC-RELEASE-TIME to CC-MACHINE-TIME-X, sets GCCC-RELEASE-BY to CC-ACF2-USERID, sets GCCC-CURRENT-STATUS to 'RELEASED', sets GCCC-RELEASE-STATUS to 'R', sets GCCC-RELEASE-TYPE to 'A', clears GCCC-RELEASE-REASON to spaces, clears GCCC-ERR-OR-REL-STATUS-INDEX to spaces, and clears GCCC-ERROR-STATUS to spaces
R-GCX126-cbl-00313 33: Process Follower Manifests - Log release message
Process Rules
Business View: Assuming follower manifest has been found and release information has been set during the '33: Process Follower Manifests - Log release message' routine, when the system logs the release message for the follower, the system executes logic to ensure that clear ws-gcx105-info-msg to spaces, construct message 'edi 350: release via decon at port ' concatenated with p4-01-port-cde (first 4 characters) and store in ws-gcx105-info-msg, move gccc-ccn-key to ws-current-ccn-key, and perform z150-log-cargo-info-msg.
Given
Follower manifest has been found and release information has been set
When
The system logs the release message for the follower
Then
Clear WS-GCX105-INFO-MSG to spaces, construct message 'EDI 350: RELEASE VIA DECON AT PORT ' concatenated with P4-01-PORT-CDE (first 4 characters) and store in WS-GCX105-INFO-MSG, move GCCC-CCN-KEY to WS-CURRENT-CCN-KEY, and perform Z150-LOG-CARGO-INFO-MSG
R-GCX126-cbl-00314 33: Process Follower Manifests - Update release reason
Action Rules
Business View: Assuming follower manifest has been found and p4 segment contains port code during the '33: Process Follower Manifests - Update release reason' routine, when the system updates the release reason for the follower, the system executes logic to ensure that construct string 'deconsolidation at ' concatenated with p4-01-port-cde (first 4 characters) and store in gccc-release-reason field.
Given
Follower manifest has been found and P4 segment contains port code
When
The system updates the release reason for the follower
Then
Construct string 'DECONSOLIDATION AT ' concatenated with P4-01-PORT-CDE (first 4 characters) and store in GCCC-RELEASE-REASON field
R-GCX126-cbl-00315 33: Process Follower Manifests - Process US manifest
Action Rules
Business View: Assuming follower manifest has been found with valid gccc-waybill-key-for-index and gccc-equipment-car during the '33: Process Follower Manifests - Process US manifest' routine, when the system processes the us manifest for the follower, the system executes logic to ensure that move gccc-waybill-key-for-index to save-waybill-index, move gccc-equipment-car to ws-current-carid-key, and perform d120-process-us-mfst which sets ws-us-mfst-not-found to true, sets ws-not-eof to true, performs z3300-gu-us-cargo-by-carwb, performs z3350-gn-us-cargo-by-carwb until ws-us-mfst-found or ws-eof; if not eof: performs z200-move-log-information, constructs gcx105-date from cc-machine-century and cc-machine-date-x, sets gcx105-time to cc-machine-time-x, sets gcx105-action-code to log-use-input-message, sets gcx105-train-or-us-ccn to gcusrt-us-ccn-key, sets gcx105-us-cargo to true, constructs gcx105-message as 'cdn ccn rlsed by edi 350: ' concatenated with gccc-ccn-key, and performs z300-spawn-gct1051e.
Given
Follower manifest has been found with valid GCCC-WAYBILL-KEY-FOR-INDEX and GCCC-EQUIPMENT-CAR
When
The system processes the US manifest for the follower
Then
Move GCCC-WAYBILL-KEY-FOR-INDEX to SAVE-WAYBILL-INDEX, move GCCC-EQUIPMENT-CAR to WS-CURRENT-CARID-KEY, and perform D120-PROCESS-US-MFST which sets WS-US-MFST-NOT-FOUND to true, sets WS-NOT-EOF to true, performs Z3300-GU-US-CARGO-BY-CARWB, performs Z3350-GN-US-CARGO-BY-CARWB until WS-US-MFST-FOUND or WS-EOF; if not EOF: performs Z200-MOVE-LOG-INFORMATION, constructs GCX105-DATE from CC-MACHINE-CENTURY and CC-MACHINE-DATE-X, sets GCX105-TIME to CC-MACHINE-TIME-X, sets GCX105-ACTION-CODE to LOG-USE-INPUT-MESSAGE, sets GCX105-TRAIN-OR-US-CCN to GCUSRT-US-CCN-KEY, sets GCX105-US-CARGO to true, constructs GCX105-MESSAGE as 'CDN CCN RLSED BY EDI 350: ' concatenated with GCCC-CCN-KEY, and performs Z300-SPAWN-GCT1051E
R-GCX126-cbl-00316 33: Process Follower Manifests - Update cargo record
Action Rules
Business View: Assuming follower cargo record gccc-cargo-report-segment has been updated with release information during the '33: Process Follower Manifests - Update cargo record' routine, when the system updates the follower cargo record, the system executes logic to ensure that clear cc-status-code to spaces, set cc-accept-status to spaces, and call cims with repl function code, gccc-pcb, and gccc-cargo-report-segment to replace the cargo record.
Given
Follower cargo record GCCC-CARGO-REPORT-SEGMENT has been updated with release information
When
The system updates the follower cargo record
Then
Clear CC-STATUS-CODE to spaces, set CC-ACCEPT-STATUS to spaces, and call CIMS with REPL function code, GCCC-PCB, and GCCC-CARGO-REPORT-SEGMENT to replace the cargo record
R-GCX126-cbl-00620 Save Master Cargo Information
Process Rules
Business View: Assuming a master manifest cargo record has been identified for deconsolidation processing during the 'Save Master Cargo Information' routine, when the system begins processing follower manifests, the system executes logic to ensure that the master cargo segment, master ccn key, and master waybill index are saved to temporary storage for later restoration.
Given
A master manifest cargo record has been identified for deconsolidation processing
When
The system begins processing follower manifests
Then
The master cargo segment, master CCN key, and master waybill index are saved to temporary storage for later restoration
R-GCX126-cbl-00621 Get Next Cargo Record
Process Rules
Business View: Assuming a master manifest ccn exists and follower manifest array is initialized with index starting at 1 during the 'Get Next Cargo Record' routine, when the system retrieves the next cargo record using the master ccn as the parent reference, the system executes logic to ensure that the system continues retrieving cargo records until either end of database is reached or the index exceeds 100 follower manifests.
Given
A master manifest CCN exists and follower manifest array is initialized with index starting at 1
When
The system retrieves the next cargo record using the master CCN as the parent reference
Then
The system continues retrieving cargo records until either end of database is reached OR the index exceeds 100 follower manifests
R-GCX126-cbl-00622 Status Code = Blank AND Master CCN Matches?
Validation Rules
Business View: Assuming a cargo record has been retrieved from the database during the 'Status Code = Blank AND Master CCN Matches?' routine, when the system validates the cargo record, the system executes logic to ensure that the cargo record is considered valid if the database status code is blank (successful retrieval) and the cargo's master manifest ccn matches the current master ccn being processed.
Given
A cargo record has been retrieved from the database
When
The system validates the cargo record
Then
The cargo record is considered valid if the database status code is blank (successful retrieval) AND the cargo's master manifest CCN matches the current master CCN being processed
R-GCX126-cbl-00623 Is Follower Manifest?
Decision Rules
Business View: Assuming a cargo record has been validated as belonging to the master manifest ccn during the 'Is Follower Manifest?' routine, when the system checks the manifest type indicator, the system executes logic to ensure that the cargo is identified as a follower manifest if it is not flagged as a master manifest.
Given
A cargo record has been validated as belonging to the master manifest CCN
When
The system checks the manifest type indicator
Then
The cargo is identified as a follower manifest if it is NOT flagged as a master manifest
R-GCX126-cbl-00624 Store Follower CCN in Array
Process Rules
Business View: Assuming a cargo record has been identified as a valid follower manifest during the 'Store Follower CCN in Array' routine, when the system stores the follower ccn, the system executes logic to ensure that the follower manifest ccn key is stored in the follower array at the current index position and the index is incremented by 1.
Given
A cargo record has been identified as a valid follower manifest
When
The system stores the follower CCN
Then
The follower manifest CCN key is stored in the follower array at the current index position AND the index is incremented by 1
R-GCX126-cbl-00625 Index <= 0?
Validation Rules
Business View: Assuming the follower manifest retrieval process has completed and the index has been decremented by 1 during the 'Index <= 0?' routine, when the system checks if any follower manifests were found, the system executes logic to ensure that if the adjusted index is less than or equal to 0, exit the process as no follower manifests exist for this master.
Given
The follower manifest retrieval process has completed and the index has been decremented by 1
When
The system checks if any follower manifests were found
Then
If the adjusted index is less than or equal to 0, exit the process as no follower manifests exist for this master
R-GCX126-cbl-00626 Initialize Loop Counter J to 1
Process Rules
Business View: Assuming at least one follower manifest ccn has been stored in the follower array during the 'Initialize Loop Counter J to 1' routine, when the system prepares to process each follower manifest, the system executes logic to ensure that the loop counter j is set to 1 to begin processing from the first follower manifest in the array.
Given
At least one follower manifest CCN has been stored in the follower array
When
The system prepares to process each follower manifest
Then
The loop counter J is set to 1 to begin processing from the first follower manifest in the array
R-GCX126-cbl-00627 Follower CCN Empty OR J > Index?
Decision Rules
Business View: Assuming the system is iterating through the follower manifest array during the 'Follower CCN Empty OR J > Index?' routine, when the system checks the loop continuation condition, the system executes logic to ensure that the loop continues if the follower ccn at position j is not empty (not spaces or low-values) and the counter j has not exceeded the total number of followers (index).
Given
The system is iterating through the follower manifest array
When
The system checks the loop continuation condition
Then
The loop continues if the follower CCN at position J is not empty (not spaces or low-values) AND the counter J has not exceeded the total number of followers (index)
R-GCX126-cbl-00628 Retrieve Follower Cargo by CCN
Action Rules
Business View: Assuming a follower manifest ccn exists at the current array position j during the 'Retrieve Follower Cargo by CCN' routine, when the system retrieves the cargo record, the system executes logic to ensure that the follower ccn is used as the key value to retrieve the cargo report segment from the database.
Given
A follower manifest CCN exists at the current array position J
When
The system retrieves the cargo record
Then
The follower CCN is used as the key value to retrieve the cargo report segment from the database
R-GCX126-cbl-00629 Cargo Found?
Validation Rules
Business View: Assuming the system has attempted to retrieve a follower cargo record by ccn during the 'Cargo Found?' routine, when the system checks the retrieval result, the system executes logic to ensure that the cargo is considered found if the cargo found indicator is set to true, otherwise skip to the next follower manifest.
Given
The system has attempted to retrieve a follower cargo record by CCN
When
The system checks the retrieval result
Then
The cargo is considered found if the cargo found indicator is set to true, otherwise skip to the next follower manifest
R-GCX126-cbl-00631 Build Release Message
Computation Rules
Business View: Assuming release information has been applied to the follower cargo record during the 'Build Release Message' routine, when the system builds the release message, the system executes logic to ensure that the message is formatted as 'edi 350: release via decon at port' followed by the port code from the p4 segment (first 4 characters).
Given
Release information has been applied to the follower cargo record
When
The system builds the release message
Then
The message is formatted as 'EDI 350: RELEASE VIA DECON AT PORT' followed by the port code from the P4 segment (first 4 characters)
R-GCX126-cbl-00632 Set Release Reason with Deconsolidation Port
Process Rules
Business View: Assuming the release message has been built for the follower manifest during the 'Set Release Reason with Deconsolidation Port' routine, when the system sets the release reason, the system executes logic to ensure that the release reason field is populated with 'deconsolidation at' followed by the port code from the p4 segment (first 4 characters).
Given
The release message has been built for the follower manifest
When
The system sets the release reason
Then
The release reason field is populated with 'DECONSOLIDATION AT' followed by the port code from the P4 segment (first 4 characters)
R-GCX126-cbl-00633 Log Release Message to Follower CCN
Process Rules
Business View: Assuming the release reason has been set for the follower cargo record during the 'Log Release Message to Follower CCN' routine, when the system logs the release message, the system executes logic to ensure that the current follower ccn key is set as the current ccn key and the release message is logged to the cargo information message log with current date, time, user id, and action code.
Given
The release reason has been set for the follower cargo record
When
The system logs the release message
Then
The current follower CCN key is set as the current CCN key AND the release message is logged to the cargo information message log with current date, time, user ID, and action code
R-GCX126-cbl-00634 Save Follower Waybill Index
Process Rules
Business View: Assuming the release message has been logged for the follower cargo during the 'Save Follower Waybill Index' routine, when the system prepares to process the us manifest, the system executes logic to ensure that the follower's waybill key for index is saved to the waybill index variable and the follower's equipment car id is saved to the current car id key variable.
Given
The release message has been logged for the follower cargo
When
The system prepares to process the US manifest
Then
The follower's waybill key for index is saved to the waybill index variable AND the follower's equipment car ID is saved to the current car ID key variable
R-GCX126-cbl-00635 Process Associated US Manifest for Follower
Action Rules
Business View: Assuming the follower cargo waybill index and equipment car id have been saved during the 'Process Associated US Manifest for Follower' routine, when the system processes the us manifest, the system executes logic to ensure that the system searches for us cargo records matching the equipment car id and waybill number, and if found (not deleted and no train created), logs a message indicating the canadian ccn was released by edi 350 with the us ccn reference.
Given
The follower cargo waybill index and equipment car ID have been saved
When
The system processes the US manifest
Then
The system searches for US cargo records matching the equipment car ID and waybill number, and if found (not deleted and no train created), logs a message indicating the Canadian CCN was released by EDI 350 with the US CCN reference
R-GCX126-cbl-00636 Update Follower Cargo Record
Action Rules
Business View: Assuming all release information has been applied to the follower cargo record and us manifest has been processed during the 'Update Follower Cargo Record' routine, when the system updates the database, the system executes logic to ensure that the cargo report segment is replaced in the database with the updated follower cargo information.
Given
All release information has been applied to the follower cargo record and US manifest has been processed
When
The system updates the database
Then
The cargo report segment is replaced in the database with the updated follower cargo information
R-GCX126-cbl-00637 Increment Loop Counter J
Process Rules
Business View: Assuming the current follower manifest has been fully processed and updated during the 'Increment Loop Counter J' routine, when the system advances to the next follower, the system executes logic to ensure that the loop counter j is incremented by 1 to point to the next follower ccn in the array.
Given
The current follower manifest has been fully processed and updated
When
The system advances to the next follower
Then
The loop counter J is incremented by 1 to point to the next follower CCN in the array
R-GCX126-cbl-00638 Restore Master Cargo Information
Process Rules
Business View: Assuming all follower manifests in the array have been processed or an empty follower ccn position was encountered during the 'Restore Master Cargo Information' routine, when the system completes follower processing, the system executes logic to ensure that the saved master cargo segment is restored to the cargo report segment, the saved master waybill index is restored to the waybill index variable, and the saved master equipment car id is restored to the current car id key variable.
Given
All follower manifests in the array have been processed OR an empty follower CCN position was encountered
When
The system completes follower processing
Then
The saved master cargo segment is restored to the cargo report segment, the saved master waybill index is restored to the waybill index variable, and the saved master equipment car ID is restored to the current car ID key variable
R-GCX126-cbl-00836 Set US Manifest Found Flag
Process Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record has been retrieved that matches equipment and waybill, is not deleted, and does not have train created, and the system completes all validation checks successfully occurs during the 'Set US Manifest Found Flag' routine, then the system must guarantee that the us manifest found flag is set to true indicating a valid record is available for processing.
EXCLUDING
A US cargo record has been retrieved that matches equipment and waybill, is not deleted, and does not have train created
When
The system completes all validation checks successfully
Then
The US manifest found flag is set to true indicating a valid record is available for processing
R-GCX126-cbl-00843 Set Release Type to 'A'
Action Rules
Business View: Assuming a cargo record is being processed for release or deconsolidation via edi 350 message during the 'Set Release Type to 'A'' routine, when the release information is being set, the system executes logic to ensure that the cargo release type field is set to the code 'a' indicating automatic release.
Given
A cargo record is being processed for release or deconsolidation via EDI 350 message
When
The release information is being set
Then
The cargo release type field is set to the code 'A' indicating automatic release
R-GCX126-cbl-00847 Set Car ID and Waybill from Follower Manifest
Process Rules
Business View: Assuming a follower manifest cargo record is being processed for release during the 'Set Car ID and Waybill from Follower Manifest' routine, when the system prepares to search for associated us cargo records, the system executes logic to ensure that the equipment car identifier is extracted from the current cargo record's equipment car field and the waybill number is extracted from the saved waybill index field for use in the us cargo search.
Given
A follower manifest cargo record is being processed for release
When
The system prepares to search for associated US cargo records
Then
The equipment car identifier is extracted from the current cargo record's equipment car field and the waybill number is extracted from the saved waybill index field for use in the US cargo search
R-GCX126-cbl-00848 Retrieve US Cargo by Car ID and Waybill
Action Rules
Business View: Assuming an equipment car identifier and waybill number have been extracted from the canadian cargo record during the 'Retrieve US Cargo by Car ID and Waybill' routine, when the system searches for the associated us cargo manifest, the system executes logic to ensure that the system retrieves the us cargo record where the car identifier index matches the equipment car identifier and the waybill number index matches the waybill number, using a greater-than-or-equal-to search operator, and sets an end-of-database indicator if no record is found or if the retrieved record does not match the search criteria.
Given
An equipment car identifier and waybill number have been extracted from the Canadian cargo record
When
The system searches for the associated US cargo manifest
Then
The system retrieves the US cargo record where the car identifier index matches the equipment car identifier and the waybill number index matches the waybill number, using a greater-than-or-equal-to search operator, and sets an end-of-database indicator if no record is found or if the retrieved record does not match the search criteria
R-GCX126-cbl-00851 Prepare Log Message
Process Rules
Business View: Assuming a valid us cargo record has been identified for release logging during the 'Prepare Log Message' routine, when the system prepares to create a log entry, the system executes logic to ensure that the log input structure is cleared to spaces, the security byte is set to high-value, the sending transaction is set to 'gct1261e', and the user identifier is set to the current session's user identifier.
Given
A valid US cargo record has been identified for release logging
When
The system prepares to create a log entry
Then
The log input structure is cleared to spaces, the security byte is set to high-value, the sending transaction is set to 'GCT1261E', and the user identifier is set to the current session's user identifier
R-GCX126-cbl-00852 Build Message: 'CDN CCN RLSED BY EDI 350: ' + Canadian CCN
Computation Rules
Business View: Assuming the log information structure has been initialized and the canadian cargo control number is available from the current cargo record during the 'Build Message: 'CDN CCN RLSED BY EDI 350: ' + Canadian CCN' routine, when the system builds the log message content, the system executes logic to ensure that the log message is constructed by concatenating the text 'cdn ccn rlsed by edi 350: ' with the canadian cargo control number key from the current cargo record.
Given
The log information structure has been initialized and the Canadian cargo control number is available from the current cargo record
When
The system builds the log message content
Then
The log message is constructed by concatenating the text 'CDN CCN RLSED BY EDI 350: ' with the Canadian cargo control number key from the current cargo record
R-GCX126-cbl-00853 Set Log Details: Date/Time from System, Action Code: LOG-USE-INPUT-MESSAGE, US CCN as Reference, Type: US Cargo
Process Rules
Business View: Assuming the log message has been constructed and the us cargo record contains the us cargo control number during the 'Set Log Details: Date/Time from System, Action Code: LOG-USE-INPUT-MESSAGE, US CCN as Reference, Type: US Cargo' routine, when the system completes the log entry details, the system executes logic to ensure that the log date is set to the current machine century concatenated with the current machine date, the log time is set to the current machine time, the action code is set to log-use-input-message, the train or us cargo control number field is set to the us cargo control number key from the retrieved record, and the cargo type indicator is set to us cargo.
Given
The log message has been constructed and the US cargo record contains the US cargo control number
When
The system completes the log entry details
Then
The log date is set to the current machine century concatenated with the current machine date, the log time is set to the current machine time, the action code is set to LOG-USE-INPUT-MESSAGE, the train or US cargo control number field is set to the US cargo control number key from the retrieved record, and the cargo type indicator is set to US cargo
R-GCX126-cbl-00854 Spawn GCT1051E Transaction to Log Message
Action Rules
Business View: Assuming all log entry fields have been populated with the us cargo release information during the 'Spawn GCT1051E Transaction to Log Message' routine, when the system executes the log entry creation process, the system executes logic to ensure that if the log message is not spaces or low-values, the system replaces all spaces in the date with zeroes, replaces all spaces in the time with '1', moves the log input to the gct1051e message structure, changes the alternate program communication block, calls the write message log function with the message code, message content, message length and module name, and purges the alternate program communication block.
Given
All log entry fields have been populated with the US cargo release information
When
The system executes the log entry creation process
Then
If the log message is not spaces or low-values, the system replaces all spaces in the date with zeroes, replaces all spaces in the time with '1', moves the log input to the GCT1051E message structure, changes the alternate program communication block, calls the write message log function with the message code, message content, message length and module name, and purges the alternate program communication block
R-GCX126-cbl-00855 No Action - Skip This US Cargo
Decision Rules
Business View: Assuming a us cargo record has been retrieved that either has a deleted status or has the train-created-for-it indicator set to 'y' during the 'No Action - Skip This US Cargo' routine, when the system evaluates whether to process the cargo, the system executes logic to ensure that the system performs no logging or update operations and proceeds to the end of the us manifest processing routine.
Given
A US cargo record has been retrieved that either has a deleted status or has the train-created-for-it indicator set to 'Y'
When
The system evaluates whether to process the cargo
Then
The system performs no logging or update operations and proceeds to the end of the US manifest processing routine
R-GCX126-cbl-00856 End: US Manifest Processing Complete
Process Rules
Business View: Assuming either no us cargo was found, the us cargo was invalid and skipped, or the us cargo release has been successfully logged during the 'End: US Manifest Processing Complete' routine, when the system reaches the end of the us manifest processing routine, the system executes logic to ensure that the system exits the us manifest processing section and returns control to the follower manifest processing loop.
Given
Either no US cargo was found, the US cargo was invalid and skipped, or the US cargo release has been successfully logged
When
The system reaches the end of the US manifest processing routine
Then
The system exits the US manifest processing section and returns control to the follower manifest processing loop
R-GCX126-cbl-00955 Initialize GCX105 Input Structure
Process Rules
Business View: Assuming a log message needs to be prepared for the gct1051e transaction during the 'Initialize GCX105 Input Structure' routine, when the log message preparation process begins, the system executes logic to ensure that the gcx105 input structure is cleared to spaces to ensure no residual data remains.
Given
A log message needs to be prepared for the GCT1051E transaction
When
The log message preparation process begins
Then
The GCX105 input structure is cleared to spaces to ensure no residual data remains
R-GCX126-cbl-00956 Set Security Byte to HIGH-VALUE
Authorization Rules
Business View: Assuming the log message structure has been initialized during the 'Set Security Byte to HIGH-VALUE' routine, when security attributes need to be set for the log entry, the system executes logic to ensure that the security byte in gcx105 structure is set to high-value to indicate system-level security.
Given
The log message structure has been initialized
When
Security attributes need to be set for the log entry
Then
The security byte in GCX105 structure is set to HIGH-VALUE to indicate system-level security
R-GCX126-cbl-00957 Set Sending Transaction = 'GCT1261E'
Definitional Rules
Business View: Assuming the log message is being prepared by the gct1261e program during the 'Set Sending Transaction = 'GCT1261E'' routine, when the sending transaction identifier needs to be recorded, the system executes logic to ensure that the sending transaction field in gcx105 structure is set to 'gct1261e'.
Given
The log message is being prepared by the GCT1261E program
When
The sending transaction identifier needs to be recorded
Then
The sending transaction field in GCX105 structure is set to 'GCT1261E'
R-GCX126-cbl-00961 Format Message for GCT1051E
Process Rules
Business View: Assuming the gcx105 input structure has been fully populated with log information during the 'Format Message for GCT1051E' routine, when the message needs to be formatted for the gct1051e transaction, the system executes logic to ensure that the gcx105 input data is moved to the gct1051e message structure for subsequent logging operations.
Given
The GCX105 input structure has been fully populated with log information
When
The message needs to be formatted for the GCT1051E transaction
Then
The GCX105 input data is moved to the GCT1051E message structure for subsequent logging operations
R-GCX126-cbl-00962 Format Message for GCT1051E
Validation Rules
Business View: Assuming a log message is being prepared for the gct1051e transaction during the 'Format Message for GCT1051E' routine, when the message content in gcx105-message is spaces or low-values, the system executes logic to ensure that the log message preparation process is terminated without further processing.
Given
A log message is being prepared for the GCT1051E transaction
When
The message content in GCX105-MESSAGE is spaces or low-values
Then
The log message preparation process is terminated without further processing
R-GCX126-cbl-01011 Log Message Empty?
Validation Rules
Business View: Assuming a log message (gcx105-message) is being prepared for writing to the audit trail during the 'Log Message Empty?' routine, when the log message field contains only spaces or low values, the system executes logic to ensure that the system skips all logging operations and exits the z300-spawn-gct1051e section without writing any log entry.
Given
A log message (GCX105-MESSAGE) is being prepared for writing to the audit trail
When
The log message field contains only spaces OR low values
Then
The system skips all logging operations and exits the Z300-SPAWN-GCT1051E section without writing any log entry
R-GCX126-cbl-01012 Replace Spaces with Zeroes in Date
Validation Rules
Business View: Assuming a log message with a date field (gcx105-date) is ready to be written during the 'Replace Spaces with Zeroes in Date' routine, when the date field contains any space characters, the system executes logic to ensure that the system replaces all spaces in the date field with zeroes to ensure numeric consistency.
Given
A log message with a date field (GCX105-DATE) is ready to be written
When
The date field contains any space characters
Then
The system replaces all spaces in the date field with zeroes to ensure numeric consistency
R-GCX126-cbl-01013 Replace Spaces with '1' in Time
Validation Rules
Business View: Assuming a log message with a time field (gcx105-time) is ready to be written during the 'Replace Spaces with '1' in Time' routine, when the time field contains any space characters, the system executes logic to ensure that the system replaces all spaces in the time field with the character '1' to ensure data consistency.
Given
A log message with a time field (GCX105-TIME) is ready to be written
When
The time field contains any space characters
Then
The system replaces all spaces in the time field with the character '1' to ensure data consistency
R-GCX126-cbl-01014 Move Log Input to GCT1051E Message
Process Rules
Business View: Assuming a validated log input structure (gcx105-input) with normalized date and time fields during the 'Move Log Input to GCT1051E Message' routine, when the log message is ready to be written to the audit trail, the system executes logic to ensure that the system moves the entire log input structure to the gct1051e message format (gct1051e-msg).
Given
A validated log input structure (GCX105-INPUT) with normalized date and time fields
When
The log message is ready to be written to the audit trail
Then
The system moves the entire log input structure to the GCT1051E message format (GCT1051E-MSG)
R-GCX126-cbl-01015 Call CIMS with CHNG Function
Action Rules
Business View: Assuming a formatted log message (gct1051e) ready to be written during the 'Call CIMS with CHNG Function' routine, when the system needs to write the log entry to the audit trail, the system executes logic to ensure that the system calls cims with chng function using the alternate pcb (alt-pcb of cccom) and the gct1051e message structure to change the message destination.
Given
A formatted log message (GCT1051E) ready to be written
When
The system needs to write the log entry to the audit trail
Then
The system calls CIMS with CHNG function using the alternate PCB (ALT-PCB OF CCCOM) and the GCT1051E message structure to change the message destination
R-GCX126-cbl-01016 Call WRITMSGL to Write Message
Action Rules
Business View: Assuming a log message with changed destination in the alternate pcb during the 'Call WRITMSGL to Write Message' routine, when the system is ready to persist the log entry, the system executes logic to ensure that the system calls writmsgl utility with parameters: cccom control block, alternate pcb, message code (gct1051e-msg-code), message text (gct1051e-message), message length (gct1051e-msg-lgth), and module name (gct1051e-mod-name) to write the log entry to the audit trail.
Given
A log message with changed destination in the alternate PCB
When
The system is ready to persist the log entry
Then
The system calls WRITMSGL utility with parameters: CCCOM control block, alternate PCB, message code (GCT1051E-MSG-CODE), message text (GCT1051E-MESSAGE), message length (GCT1051E-MSG-LGTH), and module name (GCT1051E-MOD-NAME) to write the log entry to the audit trail
R-GCX126-cbl-01017 Call CIMS with PURG Function
Process Rules
Business View: Assuming a log entry has been successfully written to the audit trail via the alternate pcb during the 'Call CIMS with PURG Function' routine, when the log writing operation is complete, the system executes logic to ensure that the system calls cims with purg function using the alternate pcb (alt-pcb of cccom) to purge the message from the queue.
Given
A log entry has been successfully written to the audit trail via the alternate PCB
When
The log writing operation is complete
Then
The system calls CIMS with PURG function using the alternate PCB (ALT-PCB OF CCCOM) to purge the message from the queue
R-GCX126-cbl-00323 Set Release Type to 'A'
Action Rules
Business View: Assuming a cargo record is being released through edi 350 message processing during the 'Set Release Type to 'A'' routine, when the release information is being set, the system executes logic to ensure that the cargo release type field is set to the character 'a'.
Given
A cargo record is being released through EDI 350 message processing
When
The release information is being set
Then
The cargo release type field is set to the character 'A'
R-GCX126-cbl-00327 Initialize US Manifest Search Flags
Process Rules
Business View: Assuming a canadian cargo record has been processed with release or deconsolidation status during the 'Initialize US Manifest Search Flags' routine, when the system initiates us manifest search process, the system executes logic to ensure that us manifest found flag is set to false and end of file flag is set to false.
Given
A Canadian cargo record has been processed with release or deconsolidation status
When
The system initiates US manifest search process
Then
US manifest found flag is set to false AND end of file flag is set to false
R-GCX126-cbl-00328 Set Search Keys: Car ID and Waybill Index
Process Rules
Business View: Assuming a canadian cargo record with equipment car id and waybill index exists during the 'Set Search Keys: Car ID and Waybill Index' routine, when the system prepares to search for us manifest, the system executes logic to ensure that us cargo search key car id is set to current canadian cargo equipment car id and us cargo search key waybill index is set to saved canadian cargo waybill index.
Given
A Canadian cargo record with equipment car ID and waybill index exists
When
The system prepares to search for US manifest
Then
US cargo search key car ID is set to current Canadian cargo equipment car ID AND US cargo search key waybill index is set to saved Canadian cargo waybill index
R-GCX126-cbl-00329 Retrieve First US Cargo Record by Car ID and Waybill
Action Rules
Business View: Assuming us cargo search keys are set with car id and waybill index during the 'Retrieve First US Cargo Record by Car ID and Waybill' routine, when the system executes first us cargo retrieval using car-waybill index with '>=' operator, the system executes logic to ensure that database returns first us cargo record matching or exceeding the search criteria.
Given
US cargo search keys are set with car ID and waybill index
When
The system executes first US cargo retrieval using car-waybill index with '>=' operator
Then
Database returns first US cargo record matching or exceeding the search criteria
R-GCX126-cbl-00332 Cargo Deleted or TR Created?
Decision Rules
Business View: Assuming a us cargo record with matching car id and waybill has been retrieved during the 'Cargo Deleted or TR Created?' routine, when the system checks us cargo deletion status indicator or train created indicator, the system executes logic to ensure that if cargo is deleted or train created indicator equals 'y', skip this record and continue search else set us manifest found flag to true.
Given
A US cargo record with matching car ID and waybill has been retrieved
When
The system checks US cargo deletion status indicator OR train created indicator
Then
If cargo is deleted OR train created indicator equals 'Y', skip this record and continue search ELSE set US manifest found flag to true
R-GCX126-cbl-00333 Set US Manifest Found Flag
Process Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record matches car id and waybill and is not deleted and does not have train created, and the system validates the us cargo record occurs during the 'Set US Manifest Found Flag' routine, then the system must guarantee that us manifest found flag is set to true.
EXCLUDING
A US cargo record matches car ID and waybill AND is not deleted AND does not have train created
When
The system validates the US cargo record
Then
US manifest found flag is set to true
R-GCX126-cbl-00334 US Manifest Found?
Decision Rules
Business View: Assuming first us cargo retrieval and validation has completed during the 'US Manifest Found?' routine, when the system checks us manifest found flag, the system executes logic to ensure that if us manifest found flag is true, proceed to prepare log information else retrieve next us cargo record.
Given
First US cargo retrieval and validation has completed
When
The system checks US manifest found flag
Then
If US manifest found flag is true, proceed to prepare log information ELSE retrieve next US cargo record
R-GCX126-cbl-00338 Cargo Deleted or TR Created?
Decision Rules
Business View: Assuming a next us cargo record with matching car id and waybill has been retrieved during the 'Cargo Deleted or TR Created?' routine, when the system checks us cargo deletion status indicator or train created indicator, the system executes logic to ensure that if cargo is deleted or train created indicator equals 'y', check for end of file to continue search else set us manifest found flag to true.
Given
A next US cargo record with matching car ID and waybill has been retrieved
When
The system checks US cargo deletion status indicator OR train created indicator
Then
If cargo is deleted OR train created indicator equals 'Y', check for end of file to continue search ELSE set US manifest found flag to true
R-GCX126-cbl-00339 Set US Manifest Found Flag
Process Rules
Business View: <EXCLUSION CRITERIA> If a next us cargo record matches car id and waybill and is not deleted and does not have train created, and the system validates the next us cargo record occurs during the 'Set US Manifest Found Flag' routine, then the system must guarantee that us manifest found flag is set to true.
EXCLUDING
A next US cargo record matches car ID and waybill AND is not deleted AND does not have train created
When
The system validates the next US cargo record
Then
US manifest found flag is set to true
R-GCX126-cbl-00340 End of File?
Decision Rules
Business View: Assuming a us cargo record has been retrieved and validated during the 'End of File?' routine, when the system checks end of file flag, the system executes logic to ensure that if end of file flag is true, exit us manifest processing else retrieve next us cargo record.
Given
A US cargo record has been retrieved and validated
When
The system checks end of file flag
Then
If end of file flag is true, exit US manifest processing ELSE retrieve next US cargo record
R-GCX126-cbl-00341 Prepare Log Information: - Current Date/Time - US CCN - Action Code: LOG-USE-INPUT-MESSAGE - Message Type: US Cargo
Process Rules
Business View: Assuming a valid us manifest record has been found during the 'Prepare Log Information: - Current Date/Time - US CCN - Action Code: LOG-USE-INPUT-MESSAGE - Message Type: US Cargo' routine, when the system prepares to log the release message, the system executes logic to ensure that log date is set to current machine century and date and log time is set to current machine time and log ccn is set to us cargo ccn and action code is set to log-use-input-message and cargo type indicator is set to us cargo.
Given
A valid US manifest record has been found
When
The system prepares to log the release message
Then
Log date is set to current machine century and date AND log time is set to current machine time AND log CCN is set to US cargo CCN AND action code is set to LOG-USE-INPUT-MESSAGE AND cargo type indicator is set to US Cargo
R-GCX126-cbl-00342 Build Release Message: 'CDN CCN RLSED BY EDI 350: ' + Canadian CCN
Computation Rules
Business View: Assuming log information has been prepared with us cargo details during the 'Build Release Message: 'CDN CCN RLSED BY EDI 350: ' + Canadian CCN' routine, when the system builds the release message, the system executes logic to ensure that message text is set to 'cdn ccn rlsed by edi 350: ' concatenated with canadian cargo ccn key.
Given
Log information has been prepared with US cargo details
When
The system builds the release message
Then
Message text is set to 'CDN CCN RLSED BY EDI 350: ' concatenated with Canadian cargo CCN key
R-GCX126-cbl-00343 Spawn GCT1051E Transaction to Log Message
Action Rules
Business View: Assuming release message has been built with all required log information during the 'Spawn GCT1051E Transaction to Log Message' routine, when the system invokes gct1051e logging transaction, the system executes logic to ensure that log entry is created with date, time, us ccn, action code, cargo type, and release message.
Given
Release message has been built with all required log information
When
The system invokes GCT1051E logging transaction
Then
Log entry is created with date, time, US CCN, action code, cargo type, and release message
R-GCX126-cbl-00640 Call Database to Get First US Cargo Record
Action Rules
Business View: Assuming the search parameters are initialized with car id, waybill index, and us ccn key set to low values, and the search operator is set to '>=' during the 'Call Database to Get First US Cargo Record' routine, when the system calls the database i/o module to retrieve us cargo using the car id and waybill index, the system executes logic to ensure that the system executes a gu (get unique) function against the us cargo segment with the specified search criteria and returns the first matching or next higher record.
Given
The search parameters are initialized with car ID, waybill index, and US CCN key set to low values, and the search operator is set to '>='
When
The system calls the database I/O module to retrieve US cargo using the car ID and waybill index
Then
The system executes a GU (Get Unique) function against the US cargo segment with the specified search criteria and returns the first matching or next higher record
R-GCX126-cbl-00643 Cargo Deleted or TR Created?
Validation Rules
Business View: Assuming a us cargo record has been retrieved and validated for car id and waybill match during the 'Cargo Deleted or TR Created?' routine, when the system checks the us cargo's deletion status indicator and the train-created indicator, the system executes logic to ensure that if the cargo deletion status is 'd' (deleted) or the train-created-for-it indicator is 'y', the record is skipped and end-of-database flag is set; if both conditions are false, the us manifest found flag is set.
Given
A US cargo record has been retrieved and validated for car ID and waybill match
When
The system checks the US cargo's deletion status indicator and the train-created indicator
Then
If the cargo deletion status is 'D' (deleted) or the train-created-for-it indicator is 'Y', the record is skipped and end-of-database flag is set; if both conditions are false, the US manifest found flag is set
R-GCX126-cbl-00644 Mark US Manifest Found
Decision Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record exists that matches the car id and waybill, is not deleted, and does not have a train already created, and all validation checks pass successfully occurs during the 'Mark US Manifest Found' routine, then the system must guarantee that the system sets the us manifest found indicator to true, allowing the us cargo to be processed for release updates.
EXCLUDING
A US cargo record exists that matches the car ID and waybill, is not deleted, and does not have a train already created
When
All validation checks pass successfully
Then
The system sets the US manifest found indicator to true, allowing the US cargo to be processed for release updates
R-GCX126-cbl-00864 Call GCCUSIO to Retrieve US Cargo
Action Rules
Business View: Assuming all search parameters are configured with car identifier, waybill index, function code gu, index type car-waybill, and operator '>=' during the 'Call GCCUSIO to Retrieve US Cargo' routine, when the system executes the database retrieval operation, the system executes logic to ensure that the gccusio module is called with the configured parameters to retrieve the us cargo record into the gcsusrt segment.
Given
All search parameters are configured with car identifier, waybill index, function code GU, index type Car-Waybill, and operator '>='
When
The system executes the database retrieval operation
Then
The GCCUSIO module is called with the configured parameters to retrieve the US cargo record into the GCSUSRT segment
R-GCX126-cbl-00867 Cargo Deleted or TR Created?
Decision Rules
Business View: Assuming a us cargo record has been retrieved and validated for car identifier and waybill match during the 'Cargo Deleted or TR Created?' routine, when the system checks if the cargo is marked as deleted or if a train has already been created for it (tr-created-for-it = 'y'), the system executes logic to ensure that if either condition is true, skip setting the us manifest found flag and proceed to completion; otherwise continue to set the found flag.
Given
A US cargo record has been retrieved and validated for car identifier and waybill match
When
The system checks if the cargo is marked as deleted OR if a train has already been created for it (TR-CREATED-FOR-IT = 'Y')
Then
If either condition is true, skip setting the US manifest found flag and proceed to completion; otherwise continue to set the found flag
R-GCX126-cbl-00868 Set US Manifest Found Flag
Process Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record has been retrieved that matches the car identifier and waybill, is not deleted, and does not have a train already created, and all validation checks pass successfully occurs during the 'Set US Manifest Found Flag' routine, then the system must guarantee that the us manifest found flag is set to true to indicate a valid record is available for processing.
EXCLUDING
A US cargo record has been retrieved that matches the car identifier and waybill, is not deleted, and does not have a train already created
When
All validation checks pass successfully
Then
The US manifest found flag is set to true to indicate a valid record is available for processing
R-GCX126-cbl-00646 Set Search Parameters: - Car ID from Current Cargo - Waybill Index from Current Cargo - Operator: Greater Than
Process Rules
Business View: Assuming a current cargo record exists with a car identification key and waybill index during the 'Set Search Parameters: - Car ID from Current Cargo - Waybill Index from Current Cargo - Operator: Greater Than' routine, when the system prepares to retrieve the next us cargo record by car and waybill, the system executes logic to ensure that the search parameters are set with car id from current cargo's car identification key, waybill index from saved waybill index, function code set to get next, segment type set to us cargo, index type set to car-waybill, and operator set to greater than ('>') for sequential retrieval.
Given
A current cargo record exists with a car identification key and waybill index
When
The system prepares to retrieve the next US cargo record by car and waybill
Then
The search parameters are set with car ID from current cargo's car identification key, waybill index from saved waybill index, function code set to Get Next, segment type set to US cargo, index type set to car-waybill, and operator set to greater than ('>') for sequential retrieval
R-GCX126-cbl-00647 Call Database to Get Next US Cargo Record by Car/Waybill Index
Action Rules
Business View: Assuming search parameters are configured with car id, waybill index, get next function, us cargo segment type, car-waybill index type, and greater-than operator during the 'Call Database to Get Next US Cargo Record by Car/Waybill Index' routine, when the database retrieval operation is invoked, the system executes logic to ensure that the system calls the cargo input/output module to retrieve the next us cargo record based on the car-waybill index.
Given
Search parameters are configured with car ID, waybill index, Get Next function, US cargo segment type, car-waybill index type, and greater-than operator
When
The database retrieval operation is invoked
Then
The system calls the cargo input/output module to retrieve the next US cargo record based on the car-waybill index
R-GCX126-cbl-00651 Transfer Receipt Created?
Validation Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record has been retrieved, validated for match, and confirmed as not deleted, and the system checks if a transfer receipt exists for this cargo occurs during the 'Transfer Receipt Created?' routine, then the system must guarantee that if the transfer receipt created indicator equals 'y', the record is skipped and processing continues to the next iteration; otherwise, the us manifest found flag is set to true.
EXCLUDING
A US cargo record has been retrieved, validated for match, and confirmed as not deleted
When
The system checks if a transfer receipt exists for this cargo
Then
If the transfer receipt created indicator equals 'Y', the record is skipped and processing continues to the next iteration; otherwise, the US manifest found flag is set to true
R-GCX126-cbl-00652 Set US Manifest Found Flag
Decision Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record has been retrieved that matches car id and waybill, is not deleted, and has no transfer receipt created, and all validation checks pass successfully occurs during the 'Set US Manifest Found Flag' routine, then the system must guarantee that the us manifest found flag is set to true to indicate a valid matching record has been located.
EXCLUDING
A US cargo record has been retrieved that matches car ID and waybill, is not deleted, and has no transfer receipt created
When
All validation checks pass successfully
Then
The US manifest found flag is set to true to indicate a valid matching record has been located
R-GCX126-cbl-00869 Set Accept Status to 'GEGB'
Process Rules
Business View: Assuming a request to retrieve the next us cargo record by car and waybill index during the 'Set Accept Status to 'GEGB'' routine, when the system prepares to call the database access routine, the system executes logic to ensure that the accept status is set to 'gegb', segment type is set to gcsusrt, function code is set to get next (gn), index type is set to car/waybill, and operator is set to '>' for sequential retrieval.
Given
A request to retrieve the next US cargo record by car and waybill index
When
The system prepares to call the database access routine
Then
The accept status is set to 'GEGB', segment type is set to GCSUSRT, function code is set to Get Next (GN), index type is set to Car/Waybill, and operator is set to '>' for sequential retrieval
R-GCX126-cbl-00870 Call GCCUSIO to Read Next Record
Action Rules
Business View: Assuming database call parameters are configured with accept status 'gegb', segment gcsusrt, function gn, car/waybill index, and operator '>' during the 'Call GCCUSIO to Read Next Record' routine, when the gccusio routine is called with the parameter block and us cargo segment, the system executes logic to ensure that the system retrieves the next us cargo record from the gcsusrt table based on the car/waybill index position.
Given
Database call parameters are configured with accept status 'GEGB', segment GCSUSRT, function GN, car/waybill index, and operator '>'
When
The GCCUSIO routine is called with the parameter block and US cargo segment
Then
The system retrieves the next US cargo record from the GCSUSRT table based on the car/waybill index position
R-GCX126-cbl-00873 Cargo Deleted or TR Created?
Validation Rules
Business View: Assuming a us cargo record matches the car id and waybill number criteria during the 'Cargo Deleted or TR Created?' routine, when the system checks if the cargo delete status indicator is set to deleted or the train-created-for-it indicator is 'y', the system executes logic to ensure that if either condition is true, skip this record and continue to next; otherwise set us manifest found flag to true.
Given
A US cargo record matches the car ID and waybill number criteria
When
The system checks if the cargo delete status indicator is set to deleted OR the train-created-for-it indicator is 'Y'
Then
If either condition is true, skip this record and continue to next; otherwise set US manifest found flag to true
R-GCX126-cbl-00874 Set US Manifest Found Flag
Process Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record matches car id and waybill number and is not deleted and does not have a train created for it, and all validation checks pass successfully occurs during the 'Set US Manifest Found Flag' routine, then the system must guarantee that the us manifest found flag is set to true indicating a valid matching record has been located.
EXCLUDING
A US cargo record matches car ID and waybill number AND is not deleted AND does not have a train created for it
When
All validation checks pass successfully
Then
The US manifest found flag is set to true indicating a valid matching record has been located
R-GCX126-cbl-00344 Is Cargo CSA Manifest?
Decision Rules
Business View: Assuming an edi 350 message with v9 segment notice reason code indicating 'authorization to deliver' and the cargo record exists in the database and the cargo has csa indicator turned on (gccc-csa-ind-on is true) during the 'Is Cargo CSA Manifest?' routine, when the system processes the authorization to deliver message, the system executes logic to ensure that the system logs the message 'edi 350: accepted - csa' and sets the cargo current status to csa-dlv (gccc-status-csa-dlv) and sets the csa authorization to deliver received flag to true (gccc-csa-auth-deliver-recd) and updates the cargo record in the database.
Given
An EDI 350 message with V9 segment notice reason code indicating 'Authorization to Deliver' AND the cargo record exists in the database AND the cargo has CSA indicator turned ON (GCCC-CSA-IND-ON is true)
When
The system processes the authorization to deliver message
Then
The system logs the message 'EDI 350: ACCEPTED - CSA' AND sets the cargo current status to CSA-DLV (GCCC-STATUS-CSA-DLV) AND sets the CSA authorization to deliver received flag to TRUE (GCCC-CSA-AUTH-DELIVER-RECD) AND updates the cargo record in the database
R-GCX126-cbl-00345 Is Cargo CSA Manifest?
Decision Rules
Business View: Assuming an edi 350 message with v9 segment notice reason code indicating 'authorization to deliver' and the cargo record exists in the database and the cargo has csa indicator turned off (gccc-csa-ind-on is false) during the 'Is Cargo CSA Manifest?' routine, when the system processes the authorization to deliver message, the system executes logic to ensure that the system logs the message 'edi 350: not accepted - non-csa' and does not update the cargo record in the database.
Given
An EDI 350 message with V9 segment notice reason code indicating 'Authorization to Deliver' AND the cargo record exists in the database AND the cargo has CSA indicator turned OFF (GCCC-CSA-IND-ON is false)
When
The system processes the authorization to deliver message
Then
The system logs the message 'EDI 350: NOT ACCEPTED - NON-CSA' AND does not update the cargo record in the database
R-GCX126-cbl-00346 Log Message: 'EDI 350: ACCEPTED - CSA'
Process Rules
Business View: Assuming the cargo is a csa manifest (gccc-csa-ind-on is true) and an authorization to deliver message is being processed during the 'Log Message: 'EDI 350: ACCEPTED - CSA'' routine, when the system logs the csa acceptance, the system executes logic to ensure that the system creates a log message 'edi 350: accepted - csa' and includes the current machine date in format ccyymmdd and includes the current machine time in format hhmmss and includes the current ccn key (ws-current-ccn-key) and sets the cargo type indicator to ca-cargo and sets the action code to 'log-use-input-message' and spawns a gct1051e log entry.
Given
The cargo is a CSA manifest (GCCC-CSA-IND-ON is true) AND an authorization to deliver message is being processed
When
The system logs the CSA acceptance
Then
The system creates a log message 'EDI 350: ACCEPTED - CSA' AND includes the current machine date in format CCYYMMDD AND includes the current machine time in format HHMMSS AND includes the current CCN key (WS-CURRENT-CCN-KEY) AND sets the cargo type indicator to CA-CARGO AND sets the action code to 'LOG-USE-INPUT-MESSAGE' AND spawns a GCT1051E log entry
R-GCX126-cbl-00347 Log Message: 'EDI 350: NOT ACCEPTED - NON-CSA'
Process Rules
Business View: <EXCLUSION CRITERIA> If the cargo is not a csa manifest (gccc-csa-ind-on is false) and an authorization to deliver message is being processed, and the system logs the non-csa rejection occurs during the 'Log Message: 'EDI 350: NOT ACCEPTED - NON-CSA'' routine, then the system must guarantee that the system creates a log message 'edi 350: not accepted - non-csa' and includes the current machine date in format ccyymmdd and includes the current machine time in format hhmmss and includes the current ccn key (ws-current-ccn-key) and sets the cargo type indicator to ca-cargo and sets the action code to 'log-use-input-message' and spawns a gct1051e log entry.
EXCLUDING
The cargo is not a CSA manifest (GCCC-CSA-IND-ON is false) AND an authorization to deliver message is being processed
When
The system logs the non-CSA rejection
Then
The system creates a log message 'EDI 350: NOT ACCEPTED - NON-CSA' AND includes the current machine date in format CCYYMMDD AND includes the current machine time in format HHMMSS AND includes the current CCN key (WS-CURRENT-CCN-KEY) AND sets the cargo type indicator to CA-CARGO AND sets the action code to 'LOG-USE-INPUT-MESSAGE' AND spawns a GCT1051E log entry
R-GCX126-cbl-00348 Set Cargo Status to CSA-DLV
Action Rules
Business View: Assuming the cargo is a csa manifest and the authorization to deliver message has been accepted during the 'Set Cargo Status to CSA-DLV' routine, when the system updates the cargo status, the system executes logic to ensure that the system sets the cargo status indicator to gccc-status-csa-dlv (csa delivery authorized status).
Given
The cargo is a CSA manifest AND the authorization to deliver message has been accepted
When
The system updates the cargo status
Then
The system sets the cargo status indicator to GCCC-STATUS-CSA-DLV (CSA delivery authorized status)
R-GCX126-cbl-00349 Set CSA Authorization Deliver Flag to TRUE
Action Rules
Business View: Assuming the cargo is a csa manifest and the authorization to deliver message has been accepted and the cargo status has been set to csa-dlv during the 'Set CSA Authorization Deliver Flag to TRUE' routine, when the system sets the authorization flag, the system executes logic to ensure that the system sets the csa authorization to deliver received flag (gccc-csa-auth-deliver-recd) to true.
Given
The cargo is a CSA manifest AND the authorization to deliver message has been accepted AND the cargo status has been set to CSA-DLV
When
The system sets the authorization flag
Then
The system sets the CSA authorization to deliver received flag (GCCC-CSA-AUTH-DELIVER-RECD) to TRUE
R-GCX126-cbl-00350 Update Cargo Record in Database
Action Rules
Business View: Assuming the cargo is a csa manifest and the authorization to deliver has been accepted and the cargo status has been set to csa-dlv and the csa authorization flag has been set to true during the 'Update Cargo Record in Database' routine, when the system updates the cargo record, the system executes logic to ensure that the system replaces the cargo record (gccc-cargo-report-segment) in the database using the repl function through the gccc-pcb program control block.
Given
The cargo is a CSA manifest AND the authorization to deliver has been accepted AND the cargo status has been set to CSA-DLV AND the CSA authorization flag has been set to TRUE
When
The system updates the cargo record
Then
The system replaces the cargo record (GCCC-CARGO-REPORT-SEGMENT) in the database using the REPL function through the GCCC-PCB program control block
R-GCX126-cbl-00351 End Process
Process Rules
Business View: Assuming an authorization to deliver message has been processed (either accepted for csa or rejected for non-csa) during the 'End Process' routine, when the system completes the authorization processing, the system executes logic to ensure that the system performs us manifest processing (d120-process-us-mfst) to update any associated us cargo records with the canadian ccn release information.
Given
An authorization to deliver message has been processed (either accepted for CSA or rejected for non-CSA)
When
The system completes the authorization processing
Then
The system performs US manifest processing (D120-PROCESS-US-MFST) to update any associated US cargo records with the Canadian CCN release information
R-GCX126-cbl-00352 Initialize Follower Array, Set Index I = 1
Process Rules
Business View: Assuming a master manifest needs to be processed for follower manifests during the 'Initialize Follower Array, Set Index I = 1' routine, when the follower manifest processing begins, the system executes logic to ensure that the follower manifest array is cleared to spaces and the processing index i is set to 1.
Given
A master manifest needs to be processed for follower manifests
When
The follower manifest processing begins
Then
The follower manifest array is cleared to spaces and the processing index I is set to 1
R-GCX126-cbl-00353 Set Master CCN as Search Key
Process Rules
Business View: Assuming a master manifest ccn exists in the cargo report segment during the 'Set Master CCN as Search Key' routine, when preparing to search for follower manifests, the system executes logic to ensure that the master manifest ccn is set as the search key in the database query structure.
Given
A master manifest CCN exists in the cargo report segment
When
Preparing to search for follower manifests
Then
The master manifest CCN is set as the search key in the database query structure
R-GCX126-cbl-00354 Get Next Cargo Record from Database
Action Rules
Business View: Assuming the database search key is set to the master manifest ccn during the 'Get Next Cargo Record from Database' routine, when retrieving follower manifests, the system executes logic to ensure that the system calls the database with get next function using the cargo pcb and qualified ssa for the master ccn key.
Given
The database search key is set to the master manifest CCN
When
Retrieving follower manifests
Then
The system calls the database with Get Next function using the cargo PCB and qualified SSA for the master CCN key
R-GCX126-cbl-00356 Same Master CCN?
Validation Rules
Business View: Assuming a cargo record has been successfully retrieved from the database during the 'Same Master CCN?' routine, when checking if the record is associated with the current master manifest, the system executes logic to ensure that if the master manifest ccn in the retrieved record equals the saved master ccn, continue processing; otherwise, set the end-of-database flag to true.
Given
A cargo record has been successfully retrieved from the database
When
Checking if the record is associated with the current master manifest
Then
If the master manifest CCN in the retrieved record equals the saved master CCN, continue processing; otherwise, set the end-of-database flag to true
R-GCX126-cbl-00357 Is Follower Manifest?
Decision Rules
Business View: Assuming a cargo record with matching master ccn has been retrieved during the 'Is Follower Manifest?' routine, when evaluating the manifest type, the system executes logic to ensure that if the cargo is a follower manifest (not a master manifest), store its ccn in the follower array; if it is a master manifest, skip to retrieve the next record.
Given
A cargo record with matching master CCN has been retrieved
When
Evaluating the manifest type
Then
If the cargo is a follower manifest (not a master manifest), store its CCN in the follower array; if it is a master manifest, skip to retrieve the next record
R-GCX126-cbl-00358 Store Follower CCN in Array Position I
Process Rules
Business View: Assuming a follower manifest has been identified during the 'Store Follower CCN in Array Position I' routine, when storing the follower information, the system executes logic to ensure that the follower manifest ccn is moved to the follower array at position i.
Given
A follower manifest has been identified
When
Storing the follower information
Then
The follower manifest CCN is moved to the follower array at position I
R-GCX126-cbl-00359 Increment Index I
Process Rules
Business View: Assuming a follower manifest ccn has been stored in the array during the 'Increment Index I' routine, when preparing to process the next follower, the system executes logic to ensure that the index i is incremented by 1.
Given
A follower manifest CCN has been stored in the array
When
Preparing to process the next follower
Then
The index I is incremented by 1
R-GCX126-cbl-00364 Initialize Loop Index J = 1
Process Rules
Business View: Assuming at least one follower manifest exists in the array during the 'Initialize Loop Index J = 1' routine, when starting to process individual followers, the system executes logic to ensure that the loop index j is initialized to 1.
Given
At least one follower manifest exists in the array
When
Starting to process individual followers
Then
The loop index J is initialized to 1
R-GCX126-cbl-00365 Get Follower CCN from Array Position J
Process Rules
Business View: Assuming the loop index j points to a valid array position during the 'Get Follower CCN from Array Position J' routine, when processing a specific follower manifest, the system executes logic to ensure that the follower ccn at array position j is retrieved and set as the search key.
Given
The loop index J points to a valid array position
When
Processing a specific follower manifest
Then
The follower CCN at array position J is retrieved and set as the search key
R-GCX126-cbl-00369 Notice Reason?
Decision Rules
Business View: Assuming release information has been set for the follower during the 'Notice Reason?' routine, when determining the type of release, the system executes logic to ensure that if the notice reason code indicates 'released', log a standard release message; if it indicates 'decon', log a deconsolidation release message.
Given
Release information has been set for the follower
When
Determining the type of release
Then
If the notice reason code indicates 'Released', log a standard release message; if it indicates 'Decon', log a deconsolidation release message
R-GCX126-cbl-00370 Log Message: 'EDI 350: RELEASE' with Release Ref and Port
Process Rules
Business View: Assuming the notice reason code indicates a standard release during the 'Log Message: 'EDI 350: RELEASE' with Release Ref and Port' routine, when logging the release action, the system executes logic to ensure that a message is logged with the text 'edi 350: release : ' concatenated with the release reference id (first 15 characters) and ' at port ' concatenated with the port code (first 4 characters).
Given
The notice reason code indicates a standard release
When
Logging the release action
Then
A message is logged with the text 'EDI 350: RELEASE : ' concatenated with the release reference ID (first 15 characters) and ' AT PORT ' concatenated with the port code (first 4 characters)
R-GCX126-cbl-00371 Set Release Reason: Release Ref / Port Code
Process Rules
Business View: Assuming a standard release message has been logged during the 'Set Release Reason: Release Ref / Port Code' routine, when recording the release reason, the system executes logic to ensure that the release reason field is set to the release reference id (first 15 characters) concatenated with '/' and the port code (first 4 characters).
Given
A standard release message has been logged
When
Recording the release reason
Then
The release reason field is set to the release reference ID (first 15 characters) concatenated with '/' and the port code (first 4 characters)
R-GCX126-cbl-00372 Log Message: 'EDI 350: RELEASE VIA DECON AT PORT' with Port
Process Rules
Business View: Assuming the notice reason code indicates a deconsolidation release during the 'Log Message: 'EDI 350: RELEASE VIA DECON AT PORT' with Port' routine, when logging the deconsolidation action, the system executes logic to ensure that a message is logged with the text 'edi 350: release via decon at port ' concatenated with the port code (first 4 characters).
Given
The notice reason code indicates a deconsolidation release
When
Logging the deconsolidation action
Then
A message is logged with the text 'EDI 350: RELEASE VIA DECON AT PORT ' concatenated with the port code (first 4 characters)
R-GCX126-cbl-00373 Set Release Reason: 'DECONSOLIDATION AT' Port
Process Rules
Business View: Assuming a deconsolidation release message has been logged during the 'Set Release Reason: 'DECONSOLIDATION AT' Port' routine, when recording the deconsolidation reason, the system executes logic to ensure that the release reason field is set to 'deconsolidation at ' concatenated with the port code (first 4 characters).
Given
A deconsolidation release message has been logged
When
Recording the deconsolidation reason
Then
The release reason field is set to 'DECONSOLIDATION AT ' concatenated with the port code (first 4 characters)
R-GCX126-cbl-00374 Process Associated US Manifest
Action Rules
Business View: Assuming the release reason has been set for the follower during the 'Process Associated US Manifest' routine, when processing related us cargo, the system executes logic to ensure that the us manifest processing routine is performed to search for and update us cargo records using the equipment car id and waybill number.
Given
The release reason has been set for the follower
When
Processing related US cargo
Then
The US manifest processing routine is performed to search for and update US cargo records using the equipment car ID and waybill number
R-GCX126-cbl-00375 Update Follower Cargo Record
Action Rules
Business View: Assuming all release information has been set and us manifest has been processed during the 'Update Follower Cargo Record' routine, when persisting the changes to the database, the system executes logic to ensure that the system calls the database with replace function to update the follower cargo record, with status code cleared to spaces and accept status set to blank.
Given
All release information has been set and US manifest has been processed
When
Persisting the changes to the database
Then
The system calls the database with Replace function to update the follower cargo record, with status code cleared to spaces and accept status set to blank
R-GCX126-cbl-00654 Initialize Follower Manifest Array
Process Rules
Business View: Assuming a master manifest ccn needs to be processed for follower manifests during the 'Initialize Follower Manifest Array' routine, when the follower manifest retrieval process begins, the system executes logic to ensure that the follower manifest array is cleared to spaces, the counter i is set to 1, and the database end flag is set to indicate not end of database.
Given
A master manifest CCN needs to be processed for follower manifests
When
The follower manifest retrieval process begins
Then
The follower manifest array is cleared to spaces, the counter I is set to 1, and the database end flag is set to indicate not end of database
R-GCX126-cbl-00655 End of Database OR Counter > 100?
Validation Rules
Business View: Assuming follower manifests are being retrieved for a master manifest during the 'End of Database OR Counter > 100?' routine, when the counter i exceeds 100 or the end of database flag is set to true, the system executes logic to ensure that the retrieval loop terminates and proceeds to finalize the count.
Given
Follower manifests are being retrieved for a master manifest
When
The counter I exceeds 100 OR the end of database flag is set to true
Then
The retrieval loop terminates and proceeds to finalize the count
R-GCX126-cbl-00656 Get Next Cargo Record Using Master CCN
Action Rules
Business View: Assuming the master manifest ccn is stored in gcb0rt-ccn-key during the 'Get Next Cargo Record Using Master CCN' routine, when the system needs to find the next cargo record in the hierarchy, the system executes logic to ensure that a database call is made using function code gn (get next) with the cargo report segment and the master ccn qualifier to retrieve the next record.
Given
The master manifest CCN is stored in GCB0RT-CCN-KEY
When
The system needs to find the next cargo record in the hierarchy
Then
A database call is made using function code GN (Get Next) with the cargo report segment and the master CCN qualifier to retrieve the next record
R-GCX126-cbl-00658 Master Manifest CCN Matches Current CCN?
Decision Rules
Business View: Assuming a cargo record has been successfully retrieved from the database during the 'Master Manifest CCN Matches Current CCN?' routine, when the master manifest ccn field (gccc-master-mfst-ccn) in the cargo record is compared with the current master ccn (ws-save-ccn), the system executes logic to ensure that if they match, the cargo is part of the master manifest hierarchy and processing continues; otherwise, the end of database flag is set to true indicating no more related records.
Given
A cargo record has been successfully retrieved from the database
When
The master manifest CCN field (GCCC-MASTER-MFST-CCN) in the cargo record is compared with the current master CCN (WS-SAVE-CCN)
Then
If they match, the cargo is part of the master manifest hierarchy and processing continues; otherwise, the end of database flag is set to true indicating no more related records
R-GCX126-cbl-00659 Is Follower Manifest?
Decision Rules
Business View: Assuming a cargo record has been retrieved and verified to belong to the master manifest hierarchy during the 'Is Follower Manifest?' routine, when the manifest type indicator (gccc-follower-mfst) is evaluated, the system executes logic to ensure that if the cargo record is identified as a follower manifest (not a master manifest), it is eligible for collection; otherwise, the loop continues to the next record.
Given
A cargo record has been retrieved and verified to belong to the master manifest hierarchy
When
The manifest type indicator (GCCC-FOLLOWER-MFST) is evaluated
Then
If the cargo record is identified as a follower manifest (not a master manifest), it is eligible for collection; otherwise, the loop continues to the next record
R-GCX126-cbl-00660 Store Follower CCN in Array Position I
Process Rules
Business View: Assuming a cargo record has been identified as a follower manifest belonging to the master manifest during the 'Store Follower CCN in Array Position I' routine, when the follower manifest ccn needs to be stored, the system executes logic to ensure that the ccn key (gccc-ccn-key) is moved to the follower manifest array at position i (ws-follower-mani(i)).
Given
A cargo record has been identified as a follower manifest belonging to the master manifest
When
The follower manifest CCN needs to be stored
Then
The CCN key (GCCC-CCN-KEY) is moved to the follower manifest array at position I (WS-FOLLOWER-MANI(I))
R-GCX126-cbl-00661 Increment Counter I
Process Rules
Business View: Assuming a follower manifest ccn has been stored in the array during the 'Increment Counter I' routine, when the counter needs to be updated for the next iteration, the system executes logic to ensure that the counter i is incremented by 1.
Given
A follower manifest CCN has been stored in the array
When
The counter needs to be updated for the next iteration
Then
The counter I is incremented by 1
R-GCX126-cbl-00662 Subtract 1 from Counter I
Computation Rules
Business View: Assuming the follower manifest retrieval loop has completed (either by reaching end of database or maximum count) during the 'Subtract 1 from Counter I' routine, when the final count needs to be determined, the system executes logic to ensure that the counter i is decremented by 1 to represent the actual number of follower manifests stored in the array.
Given
The follower manifest retrieval loop has completed (either by reaching end of database or maximum count)
When
The final count needs to be determined
Then
The counter I is decremented by 1 to represent the actual number of follower manifests stored in the array
R-GCX126-cbl-00663 Counter I <= 0?
Decision Rules
Business View: Assuming the follower manifest retrieval process has completed and the counter has been adjusted during the 'Counter I <= 0?' routine, when the final count (i) is evaluated, the system executes logic to ensure that if i is less than or equal to 0, no follower manifests were found and processing exits; if i is greater than 0, the follower manifest array contains valid entries for processing.
Given
The follower manifest retrieval process has completed and the counter has been adjusted
When
The final count (I) is evaluated
Then
If I is less than or equal to 0, no follower manifests were found and processing exits; if I is greater than 0, the follower manifest array contains valid entries for processing
R-GCX126-cbl-00664 Return: No Follower Manifests Found
Process Rules
Business View: Assuming the follower manifest count is zero or negative during the 'Return: No Follower Manifests Found' routine, when the system needs to complete the retrieval process, the system executes logic to ensure that control returns to the calling process with an empty follower manifest array, and no further follower processing occurs.
Given
The follower manifest count is zero or negative
When
The system needs to complete the retrieval process
Then
Control returns to the calling process with an empty follower manifest array, and no further follower processing occurs
R-GCX126-cbl-00665 Return: Follower Manifests Array Populated
Process Rules
Business View: Assuming the follower manifest count is greater than zero and the array contains valid follower ccns during the 'Return: Follower Manifests Array Populated' routine, when the system needs to apply release information to follower manifests, the system executes logic to ensure that control proceeds to iterate through the follower manifest array and apply the same release information to each follower that was applied to the master manifest.
Given
The follower manifest count is greater than zero and the array contains valid follower CCNs
When
The system needs to apply release information to follower manifests
Then
Control proceeds to iterate through the follower manifest array and apply the same release information to each follower that was applied to the master manifest
R-GCX126-cbl-00877 Call IMS Database with GN Function
Action Rules
Business View: Assuming the database status code is set to 'gegb' and the master ccn key is positioned in the qualified ssa during the 'Call IMS Database with GN Function' routine, when the system executes the database call with gn function for pcb7 and cargo report segment using qualified ssa for b0rt, the system executes logic to ensure that the next cargo record is retrieved into the cargo report segment and the database status code is updated to reflect the result.
Given
The database status code is set to 'GEGB' and the master CCN key is positioned in the qualified SSA
When
The system executes the database call with GN function for PCB7 and cargo report segment using qualified SSA for B0RT
Then
The next cargo record is retrieved into the cargo report segment and the database status code is updated to reflect the result
R-GCX126-cbl-00879 Check Master Manifest CCN Match
Validation Rules
Business View: Assuming a cargo record has been successfully retrieved from the database during the 'Check Master Manifest CCN Match' routine, when the system compares the master manifest ccn from the cargo record against the saved input ccn, the system executes logic to ensure that the system determines if the retrieved record belongs to the same master manifest hierarchy for further processing.
Given
A cargo record has been successfully retrieved from the database
When
The system compares the master manifest CCN from the cargo record against the saved input CCN
Then
The system determines if the retrieved record belongs to the same master manifest hierarchy for further processing
R-GCX126-cbl-00880 Master CCN Matches Input CCN?
Decision Rules
Business View: Assuming the master manifest ccn from the cargo record and the saved input ccn are available for comparison during the 'Master CCN Matches Input CCN?' routine, when the system evaluates if the master manifest ccn equals the saved input ccn, the system executes logic to ensure that if they match, continue checking the manifest type; if they do not match, set the end of database flag to stop processing.
Given
The master manifest CCN from the cargo record and the saved input CCN are available for comparison
When
The system evaluates if the master manifest CCN equals the saved input CCN
Then
If they match, continue checking the manifest type; if they do not match, set the end of database flag to stop processing
R-GCX126-cbl-00881 Is Master Manifest?
Decision Rules
Business View: Assuming a cargo record has been retrieved that belongs to the same master manifest ccn during the 'Is Master Manifest?' routine, when the system checks if the cargo record is identified as a master manifest, the system executes logic to ensure that if it is a master manifest, skip this record and continue to the next; if not, check if it is a follower manifest.
Given
A cargo record has been retrieved that belongs to the same master manifest CCN
When
The system checks if the cargo record is identified as a master manifest
Then
If it is a master manifest, skip this record and continue to the next; if not, check if it is a follower manifest
R-GCX126-cbl-00882 Is Follower Manifest?
Decision Rules
Business View: <EXCLUSION CRITERIA> If a cargo record has been retrieved that is not a master manifest but belongs to the same master manifest ccn, and the system checks if the cargo record is identified as a follower manifest occurs during the 'Is Follower Manifest?' routine, then the system must guarantee that if it is a follower manifest, store its ccn in the follower array and increment the index; if not, skip this record and continue to the next.
EXCLUDING
A cargo record has been retrieved that is not a master manifest but belongs to the same master manifest CCN
When
The system checks if the cargo record is identified as a follower manifest
Then
If it is a follower manifest, store its CCN in the follower array and increment the index; if not, skip this record and continue to the next
R-GCX126-cbl-00883 Store Follower CCN in Array
Process Rules
Business View: Assuming a cargo record has been identified as a follower manifest belonging to the current master manifest during the 'Store Follower CCN in Array' routine, when the system stores the ccn key from the cargo record, the system executes logic to ensure that the follower manifest ccn is placed in the follower manifest array at the current index position.
Given
A cargo record has been identified as a follower manifest belonging to the current master manifest
When
The system stores the CCN key from the cargo record
Then
The follower manifest CCN is placed in the follower manifest array at the current index position
R-GCX126-cbl-00884 Increment Array Index
Process Rules
Business View: Assuming a follower manifest ccn has been stored in the follower manifest array during the 'Increment Array Index' routine, when the system increments the array index counter, the system executes logic to ensure that the array index is increased by 1 to point to the next available position in the follower manifest array.
Given
A follower manifest CCN has been stored in the follower manifest array
When
The system increments the array index counter
Then
The array index is increased by 1 to point to the next available position in the follower manifest array
R-GCX126-cbl-00885 Set End of Database Flag
Process Rules
Business View: <EXCLUSION CRITERIA> If either the database status code indicates no more records, or the master manifest ccn does not match the input ccn, and the system determines that database traversal should stop occurs during the 'Set End of Database Flag' routine, then the system must guarantee that the end of database flag is set to true to terminate the retrieval loop.
EXCLUDING
Either the database status code indicates no more records, or the master manifest CCN does not match the input CCN
When
The system determines that database traversal should stop
Then
The end of database flag is set to TRUE to terminate the retrieval loop
R-GCX126-cbl-00886 Continue to Next Record
Process Rules
Business View: <EXCLUSION CRITERIA> If the current cargo record is either a master manifest or not a follower manifest, and the system determines the current record should be skipped occurs during the 'Continue to Next Record' routine, then the system must guarantee that control returns to the caller to continue the loop and retrieve the next cargo record.
EXCLUDING
The current cargo record is either a master manifest or not a follower manifest
When
The system determines the current record should be skipped
Then
Control returns to the caller to continue the loop and retrieve the next cargo record
R-GCX126-cbl-00887 End: Return to Caller
Process Rules
Business View: Assuming either the end of database flag has been set or a record has been processed during the 'End: Return to Caller' routine, when the procedure completes its execution, the system executes logic to ensure that control returns to the calling procedure with the follower manifest array populated with all valid follower ccns found, or with the end of database flag set if no more records exist.
Given
Either the end of database flag has been set or a record has been processed
When
The procedure completes its execution
Then
Control returns to the calling procedure with the follower manifest array populated with all valid follower CCNs found, or with the end of database flag set if no more records exist
R-GCX126-cbl-00666 Initialize Follower Array Index J = 1
Process Rules
Business View: Assuming a follower manifest array exists with potential follower ccns during the 'Initialize Follower Array Index J = 1' routine, when the system begins processing follower manifests for a master manifest release, the system executes logic to ensure that the array index j is initialized to 1 to start processing from the first follower manifest.
Given
A follower manifest array exists with potential follower CCNs
When
The system begins processing follower manifests for a master manifest release
Then
The array index J is initialized to 1 to start processing from the first follower manifest
R-GCX126-cbl-00667 Follower Manifest Available?
Decision Rules
Business View: Assuming the follower manifest array with index j and a maximum limit of 100 follower manifests during the 'Follower Manifest Available?' routine, when the system checks if more follower manifests need to be processed, the system executes logic to ensure that processing continues if the follower manifest at index j is not spaces or low-values and j is less than or equal to the total number of followers and j does not exceed 100.
Given
The follower manifest array with index J and a maximum limit of 100 follower manifests
When
The system checks if more follower manifests need to be processed
Then
Processing continues if the follower manifest at index J is not spaces or low-values AND J is less than or equal to the total number of followers AND J does not exceed 100
R-GCX126-cbl-00668 Get Follower CCN from Array
Process Rules
Business View: Assuming a follower manifest array with index j pointing to a valid entry during the 'Get Follower CCN from Array' routine, when the system needs to process a specific follower manifest, the system executes logic to ensure that the follower ccn at array position j is moved to the cargo lookup key fields (ccrt-ssaq and a2rt-ssaq).
Given
A follower manifest array with index J pointing to a valid entry
When
The system needs to process a specific follower manifest
Then
The follower CCN at array position J is moved to the cargo lookup key fields (CCRT-SSAQ and A2RT-SSAQ)
R-GCX126-cbl-00669 16: Lookup Cargo by Follower CCN
Action Rules
Business View: Assuming a follower manifest ccn has been retrieved from the array during the '16: Lookup Cargo by Follower CCN' routine, when the system performs a cargo lookup using the follower ccn, the system executes logic to ensure that the cargo record is retrieved from gcsccrt table using ghu operation and cargo status switches are set to indicate if cargo was found, deleted, or has other status conditions.
Given
A follower manifest CCN has been retrieved from the array
When
The system performs a cargo lookup using the follower CCN
Then
The cargo record is retrieved from GCSCCRT table using GHU operation AND cargo status switches are set to indicate if cargo was found, deleted, or has other status conditions
R-GCX126-cbl-00670 Cargo Found?
Validation Rules
Business View: Assuming a cargo lookup has been performed for the follower manifest ccn during the 'Cargo Found?' routine, when the system evaluates the cargo lookup result, the system executes logic to ensure that processing continues if cargo is found (ws-cargo-found is true) and cargo is not deleted and cargo is not returned and waybill matches (if applicable), otherwise skip to next follower.
Given
A cargo lookup has been performed for the follower manifest CCN
When
The system evaluates the cargo lookup result
Then
Processing continues if cargo is found (WS-CARGO-FOUND is true) AND cargo is not deleted AND cargo is not returned AND waybill matches (if applicable), otherwise skip to next follower
R-GCX126-cbl-00671 Notice Reason Type?
Decision Rules
Business View: Assuming a valid cargo record exists for the follower manifest and the v9 segment contains a notice reason code during the 'Notice Reason Type?' routine, when the system determines the type of release message to create, the system executes logic to ensure that if v9-02-released is true, process as standard release, otherwise if v9-02-decon is true, process as deconsolidation release.
Given
A valid cargo record exists for the follower manifest AND the V9 segment contains a notice reason code
When
The system determines the type of release message to create
Then
If V9-02-RELEASED is true, process as standard release, otherwise if V9-02-DECON is true, process as deconsolidation release
R-GCX126-cbl-00672 Build Release Message with Release Reference and Port
Process Rules
Business View: Assuming the follower manifest has a standard release notice reason code (v9-02-released) and x4 segment contains release reference id and p4 segment contains port code during the 'Build Release Message with Release Reference and Port' routine, when the system builds the release message for logging, the system executes logic to ensure that the message 'edi 350: release : ' is concatenated with x4-01-cbsa-rel-ref-id (first 15 characters) and ' at port ' and p4-01-port-cde (first 4 characters) into ws-gcx105-info-msg.
Given
The follower manifest has a standard release notice reason code (V9-02-RELEASED) AND X4 segment contains release reference ID AND P4 segment contains port code
When
The system builds the release message for logging
Then
The message 'EDI 350: RELEASE : ' is concatenated with X4-01-CBSA-REL-REF-ID (first 15 characters) and ' AT PORT ' and P4-01-PORT-CDE (first 4 characters) into WS-GCX105-INFO-MSG
R-GCX126-cbl-00673 Build Decon Release Message with Port
Process Rules
Business View: Assuming the follower manifest has a deconsolidation notice reason code (v9-02-decon) and p4 segment contains port code during the 'Build Decon Release Message with Port' routine, when the system builds the deconsolidation release message for logging, the system executes logic to ensure that the message 'edi 350: release via decon at port ' is concatenated with p4-01-port-cde (first 4 characters) into ws-gcx105-info-msg.
Given
The follower manifest has a deconsolidation notice reason code (V9-02-DECON) AND P4 segment contains port code
When
The system builds the deconsolidation release message for logging
Then
The message 'EDI 350: RELEASE VIA DECON AT PORT ' is concatenated with P4-01-PORT-CDE (first 4 characters) into WS-GCX105-INFO-MSG
R-GCX126-cbl-00674 Set Release Reason with Release Reference and Port
Process Rules
Business View: Assuming the follower manifest has a standard release notice reason code (v9-02-released) and x4 segment contains release reference id and p4 segment contains port code during the 'Set Release Reason with Release Reference and Port' routine, when the system updates the cargo release reason field, the system executes logic to ensure that x4-01-cbsa-rel-ref-id (first 15 characters) and '/' and p4-01-port-cde (first 4 characters) are concatenated into gccc-release-reason.
Given
The follower manifest has a standard release notice reason code (V9-02-RELEASED) AND X4 segment contains release reference ID AND P4 segment contains port code
When
The system updates the cargo release reason field
Then
X4-01-CBSA-REL-REF-ID (first 15 characters) and '/' and P4-01-PORT-CDE (first 4 characters) are concatenated into GCCC-RELEASE-REASON
R-GCX126-cbl-00675 Set Release Reason with Deconsolidation Port
Process Rules
Business View: Assuming the follower manifest has a deconsolidation notice reason code (v9-02-decon) and p4 segment contains port code during the 'Set Release Reason with Deconsolidation Port' routine, when the system updates the cargo release reason field, the system executes logic to ensure that the text 'deconsolidation at ' is concatenated with p4-01-port-cde (first 4 characters) into gccc-release-reason.
Given
The follower manifest has a deconsolidation notice reason code (V9-02-DECON) AND P4 segment contains port code
When
The system updates the cargo release reason field
Then
The text 'DECONSOLIDATION AT ' is concatenated with P4-01-PORT-CDE (first 4 characters) into GCCC-RELEASE-REASON
R-GCX126-cbl-00676 42: Log Cargo Information Message
Action Rules
Business View: Assuming a release message has been built in ws-gcx105-info-msg and the follower cargo ccn is in ws-current-ccn-key during the '42: Log Cargo Information Message' routine, when the system logs the release information, the system executes logic to ensure that a gct1051e log entry is created with current machine date in gcx105-date, current machine time in gcx105-time, follower ccn in gcx105-train-or-us-ccn, cargo type set to ca-cargo, action code set to log-use-input-message, and the release message in gcx105-message.
Given
A release message has been built in WS-GCX105-INFO-MSG AND the follower cargo CCN is in WS-CURRENT-CCN-KEY
When
The system logs the release information
Then
A GCT1051E log entry is created with current machine date in GCX105-DATE, current machine time in GCX105-TIME, follower CCN in GCX105-TRAIN-OR-US-CCN, cargo type set to CA-CARGO, action code set to LOG-USE-INPUT-MESSAGE, and the release message in GCX105-MESSAGE
R-GCX126-cbl-00677 31: Process Associated US Manifest
Action Rules
Business View: Assuming a follower manifest has been released and the cargo record contains equipment car id and waybill number during the '31: Process Associated US Manifest' routine, when the system searches for associated us cargo manifest, the system executes logic to ensure that the system retrieves us cargo from gcsusrt table using equipment car id and waybill number and if a matching us cargo is found that is not deleted and has no train created, a log entry is created with message 'cdn ccn rlsed by edi 350: ' concatenated with the canadian follower ccn.
Given
A follower manifest has been released AND the cargo record contains equipment car ID and waybill number
When
The system searches for associated US cargo manifest
Then
The system retrieves US cargo from GCSUSRT table using equipment car ID and waybill number AND if a matching US cargo is found that is not deleted and has no train created, a log entry is created with message 'CDN CCN RLSED BY EDI 350: ' concatenated with the Canadian follower CCN
R-GCX126-cbl-00678 43: Update Cargo Record
Action Rules
Business View: Assuming all release information has been set in the follower cargo segment (gccc-cargo-report-segment) including release date, time, user, status, type, and reason during the '43: Update Cargo Record' routine, when the system updates the follower cargo record, the system executes logic to ensure that the cargo record is replaced in gcsccrt table using repl operation with the updated cargo segment data.
Given
All release information has been set in the follower cargo segment (GCCC-CARGO-REPORT-SEGMENT) including release date, time, user, status, type, and reason
When
The system updates the follower cargo record
Then
The cargo record is replaced in GCSCCRT table using REPL operation with the updated cargo segment data
R-GCX126-cbl-00679 Increment Array Index J
Process Rules
Business View: Assuming the current follower manifest has been processed (whether successfully or skipped) during the 'Increment Array Index J' routine, when the system prepares to process the next follower manifest, the system executes logic to ensure that the array index j is incremented by 1.
Given
The current follower manifest has been processed (whether successfully or skipped)
When
The system prepares to process the next follower manifest
Then
The array index J is incremented by 1
R-GCX126-cbl-00680 More Followers or Max 100 Reached?
Decision Rules
Business View: Assuming the array index j has been incremented and there is a follower manifest array with potential entries during the 'More Followers or Max 100 Reached?' routine, when the system evaluates whether to continue the processing loop, the system executes logic to ensure that the loop continues if the follower manifest at index j is not spaces or low-values and j is less than or equal to the total number of followers and j does not exceed 100, otherwise the loop terminates.
Given
The array index J has been incremented AND there is a follower manifest array with potential entries
When
The system evaluates whether to continue the processing loop
Then
The loop continues if the follower manifest at index J is not spaces or low-values AND J is less than or equal to the total number of followers AND J does not exceed 100, otherwise the loop terminates
R-GCX126-cbl-00681 End Process Follower Manifests
Process Rules
Business View: Assuming all follower manifests in the array have been processed or the maximum limit of 100 has been reached or no more valid follower ccns exist in the array during the 'End Process Follower Manifests' routine, when the system completes the follower manifest processing loop, the system executes logic to ensure that control returns to the calling procedure and the follower manifest processing section exits.
Given
All follower manifests in the array have been processed OR the maximum limit of 100 has been reached OR no more valid follower CCNs exist in the array
When
The system completes the follower manifest processing loop
Then
Control returns to the calling procedure and the follower manifest processing section exits
R-GCX126-cbl-00888 Lookup Cargo by Follower CCN
Action Rules
Business View: Assuming a follower manifest ccn is available for cargo lookup during the 'Lookup Cargo by Follower CCN' routine, when the system attempts to retrieve the cargo record using the follower ccn as the search key, the system executes logic to ensure that the system retrieves the cargo report segment and secondary segment if the cargo exists, or indicates cargo not found if the ccn does not match any existing cargo record.
Given
A follower manifest CCN is available for cargo lookup
When
The system attempts to retrieve the cargo record using the follower CCN as the search key
Then
The system retrieves the cargo report segment and secondary segment if the cargo exists, or indicates cargo not found if the CCN does not match any existing cargo record
R-GCX126-cbl-00889 Move Follower CCN to Search Key
Process Rules
Business View: Assuming a follower manifest ccn exists in the follower manifest array during the 'Move Follower CCN to Search Key' routine, when the system prepares to search for the cargo record, the system executes logic to ensure that the follower ccn is moved to both the primary cargo search key (ccrt-ssaq) and secondary cargo search key (a2rt-ssaq).
Given
A follower manifest CCN exists in the follower manifest array
When
The system prepares to search for the cargo record
Then
The follower CCN is moved to both the primary cargo search key (CCRT-SSAQ) and secondary cargo search key (A2RT-SSAQ)
R-GCX126-cbl-00890 Call CIMS with GHU Function
Action Rules
Business View: Assuming the cargo search key contains a valid follower ccn during the 'Call CIMS with GHU Function' routine, when the system invokes the database access function with ghu operation, the system executes logic to ensure that the system attempts to retrieve the cargo report segment (gccc-cargo-report-segment) from the cargo database (gccc-pcb) using the qualified search argument.
Given
The cargo search key contains a valid follower CCN
When
The system invokes the database access function with GHU operation
Then
The system attempts to retrieve the cargo report segment (GCCC-CARGO-REPORT-SEGMENT) from the cargo database (GCCC-PCB) using the qualified search argument
R-GCX126-cbl-00893 Read Cargo Secondary Segment
Action Rules
Business View: Assuming the primary cargo report segment has been successfully retrieved during the 'Read Cargo Secondary Segment' routine, when the system attempts to read the cargo secondary segment using ghu function, the system executes logic to ensure that the system retrieves the cargo secondary segment (gcsccs52) from the secondary cargo database (gca2-pcb) using the secondary search key.
Given
The primary cargo report segment has been successfully retrieved
When
The system attempts to read the cargo secondary segment using GHU function
Then
The system retrieves the cargo secondary segment (GCSCCS52) from the secondary cargo database (GCA2-PCB) using the secondary search key
R-GCX126-cbl-00894 Secondary Status = GE?
Validation Rules
Business View: Assuming the secondary segment retrieval operation has completed during the 'Secondary Status = GE?' routine, when the system evaluates the secondary segment database status code, the system executes logic to ensure that if the status code equals 'ge' (segment not found), the secondary segment does not exist; otherwise, the secondary segment is available.
Given
The secondary segment retrieval operation has completed
When
The system evaluates the secondary segment database status code
Then
If the status code equals 'GE' (segment not found), the secondary segment does not exist; otherwise, the secondary segment is available
R-GCX126-cbl-00895 Clear Secondary Segment
Process Rules
Business View: Assuming the secondary segment retrieval returned status code 'ge' indicating no secondary segment exists during the 'Clear Secondary Segment' routine, when the system processes the missing secondary segment condition, the system executes logic to ensure that the secondary segment data structure (gcsccs52) is cleared to spaces to prevent processing of invalid data.
Given
The secondary segment retrieval returned status code 'GE' indicating no secondary segment exists
When
The system processes the missing secondary segment condition
Then
The secondary segment data structure (GCSCCS52) is cleared to spaces to prevent processing of invalid data
R-GCX126-cbl-00902 Initialize US Manifest Search Flags
Process Rules
Business View: Assuming a canadian cargo record has been processed with release or deconsolidation status during the 'Initialize US Manifest Search Flags' routine, when the system begins searching for associated us manifest records, the system executes logic to ensure that the us manifest found flag is set to not found and the end-of-database flag is set to not end of db to enable iterative search.
Given
A Canadian cargo record has been processed with release or deconsolidation status
When
The system begins searching for associated US manifest records
Then
The US manifest found flag is set to NOT FOUND and the end-of-database flag is set to NOT END OF DB to enable iterative search
R-GCX126-cbl-00904 Cargo Status Check
Decision Rules
Business View: <EXCLUSION CRITERIA> If a database retrieval operation has been performed for us cargo, and the database status code is not spaces (indicating record not found or error) occurs during the 'Cargo Status Check' routine, then the system must guarantee that the end-of-database flag is set to true and processing exits the us manifest search without creating any log entries.
EXCLUDING
A database retrieval operation has been performed for US cargo
When
The database status code is not SPACES (indicating record not found or error)
Then
The end-of-database flag is set to TRUE and processing exits the US manifest search without creating any log entries
R-GCX126-cbl-00906 Cargo Deleted or TR Created?
Validation Rules
Business View: Assuming a us cargo record has been retrieved and validated for car id and waybill match during the 'Cargo Deleted or TR Created?' routine, when the system checks the cargo record status, the system executes logic to ensure that if the cargo delete status indicator shows deleted or the train-created-for-it field equals 'y', skip this record and retrieve the next us cargo record; otherwise mark the us manifest as found.
Given
A US cargo record has been retrieved and validated for car ID and waybill match
When
The system checks the cargo record status
Then
If the cargo delete status indicator shows DELETED OR the train-created-for-it field equals 'Y', skip this record and retrieve the next US cargo record; otherwise mark the US manifest as found
R-GCX126-cbl-00908 Set US Manifest Found Flag
Process Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record has been retrieved that matches car id and waybill and is not deleted and does not have train created, and the system validates all conditions are met occurs during the 'Set US Manifest Found Flag' routine, then the system must guarantee that the us manifest found flag is set to true to proceed with logging.
EXCLUDING
A US cargo record has been retrieved that matches car ID and waybill AND is not deleted AND does not have train created
When
The system validates all conditions are met
Then
The US manifest found flag is set to TRUE to proceed with logging
R-GCX126-cbl-00909 Prepare Log Information
Process Rules
Business View: Assuming a valid us manifest has been found during the 'Prepare Log Information' routine, when the system prepares to create a log entry, the system executes logic to ensure that the log input structure is cleared to spaces, the security byte is set to high-value, the sending transaction is set to 'gct1261e', and the acf2 user id is set from the common control area.
Given
A valid US manifest has been found
When
The system prepares to create a log entry
Then
The log input structure is cleared to SPACES, the security byte is set to HIGH-VALUE, the sending transaction is set to 'GCT1261E', and the ACF2 user ID is set from the common control area
R-GCX126-cbl-00912 Set Action Code to Input Message
Definitional Rules
Business View: Assuming the log date and time have been set during the 'Set Action Code to Input Message' routine, when the system assigns the action code, the system executes logic to ensure that the action code is set to the value of log-use-input-message constant.
Given
The log date and time have been set
When
The system assigns the action code
Then
The action code is set to the value of LOG-USE-INPUT-MESSAGE constant
R-GCX126-cbl-00915 Build Message: 'CDN CCN RLSED BY EDI 350' + Canadian CCN
Computation Rules
Business View: Assuming the cargo type has been designated as us cargo during the 'Build Message: 'CDN CCN RLSED BY EDI 350' + Canadian CCN' routine, when the system builds the log message text, the system executes logic to ensure that the message field is populated by concatenating the literal text 'cdn ccn rlsed by edi 350: ' with the canadian cargo ccn key from the saved cargo report segment.
Given
The cargo type has been designated as US cargo
When
The system builds the log message text
Then
The message field is populated by concatenating the literal text 'CDN CCN RLSED BY EDI 350: ' with the Canadian cargo CCN key from the saved cargo report segment
R-GCX126-cbl-00916 Spawn GCT1051E Transaction to Log Message
Action Rules
Business View: Assuming the complete log entry has been built with date, time, action code, us ccn, cargo type, and message text during the 'Spawn GCT1051E Transaction to Log Message' routine, when the system submits the log entry, the system executes logic to ensure that the gct1051e transaction is spawned by calling the z300-spawn-gct1051e routine which validates the message is not blank, replaces spaces with appropriate values in date and time fields, moves the input to the message structure, changes the alternate pcb, calls writmsgl to write the message, and purges the alternate pcb.
Given
The complete log entry has been built with date, time, action code, US CCN, cargo type, and message text
When
The system submits the log entry
Then
The GCT1051E transaction is spawned by calling the Z300-SPAWN-GCT1051E routine which validates the message is not blank, replaces spaces with appropriate values in date and time fields, moves the input to the message structure, changes the alternate PCB, calls WRITMSGL to write the message, and purges the alternate PCB
R-GCX126-cbl-00967 Set Sending Transaction to 'GCT1261E'
Definitional Rules
Business View: Assuming a log entry is being created from the edi 350 processing program during the 'Set Sending Transaction to 'GCT1261E'' routine, when the source transaction identifier needs to be recorded, the system executes logic to ensure that the system shall set the gcx105-sending-transaction field to 'gct1261e' to identify this program as the source of the log entry.
Given
A log entry is being created from the EDI 350 processing program
When
The source transaction identifier needs to be recorded
Then
The system shall set the GCX105-SENDING-TRANSACTION field to 'GCT1261E' to identify this program as the source of the log entry
R-GCX126-cbl-01018 Message Empty?
Validation Rules
Business View: Assuming a cargo information message is ready to be logged during the 'Message Empty?' routine, when the message content (gcx105-message) is either spaces or low-values, the system executes logic to ensure that the system skips the logging process and exits without creating any log entry.
Given
A cargo information message is ready to be logged
When
The message content (GCX105-MESSAGE) is either spaces or low-values
Then
The system skips the logging process and exits without creating any log entry
R-GCX126-cbl-01019 Replace Spaces with Zeroes in Date
Validation Rules
Business View: Assuming a cargo information message with a date field (gcx105-date) is being prepared for logging during the 'Replace Spaces with Zeroes in Date' routine, when the date field contains any space characters, the system executes logic to ensure that the system replaces all spaces in the date field with zeroes to ensure numeric consistency.
Given
A cargo information message with a date field (GCX105-DATE) is being prepared for logging
When
The date field contains any space characters
Then
The system replaces all spaces in the date field with zeroes to ensure numeric consistency
R-GCX126-cbl-01020 Replace Spaces with '1' in Time
Validation Rules
Business View: Assuming a cargo information message with a time field (gcx105-time) is being prepared for logging during the 'Replace Spaces with '1' in Time' routine, when the time field contains any space characters, the system executes logic to ensure that the system replaces all spaces in the time field with the character '1' to ensure valid time format.
Given
A cargo information message with a time field (GCX105-TIME) is being prepared for logging
When
The time field contains any space characters
Then
The system replaces all spaces in the time field with the character '1' to ensure valid time format
R-GCX126-cbl-01021 Move Input to GCT1051E Message
Process Rules
Business View: Assuming a validated cargo information message (gcx105-input) is ready for logging during the 'Move Input to GCT1051E Message' routine, when the message needs to be written to the ims message queue, the system executes logic to ensure that the system moves the input message to the gct1051e message structure (gct1051e-msg).
Given
A validated cargo information message (GCX105-INPUT) is ready for logging
When
The message needs to be written to the IMS message queue
Then
The system moves the input message to the GCT1051E message structure (GCT1051E-MSG)
R-GCX126-cbl-01022 Set Accept Status to Blank
Process Rules
Business View: Assuming a cargo information message is ready to be written to ims during the 'Set Accept Status to Blank' routine, when the system prepares to call ims message services, the system executes logic to ensure that the system sets the accept status (cc-accept-status) to blank (two spaces) to enable standard message processing.
Given
A cargo information message is ready to be written to IMS
When
The system prepares to call IMS message services
Then
The system sets the accept status (CC-ACCEPT-STATUS) to blank (two spaces) to enable standard message processing
R-GCX126-cbl-01023 Call CIMS with CHNG Function
Action Rules
Business View: Assuming a cargo information message is prepared in gct1051e format during the 'Call CIMS with CHNG Function' routine, when the message destination needs to be set in the ims message queue, the system executes logic to ensure that the system calls cims with chng function using the alternate pcb and gct1051e message structure to establish the message destination.
Given
A cargo information message is prepared in GCT1051E format
When
The message destination needs to be set in the IMS message queue
Then
The system calls CIMS with CHNG function using the alternate PCB and GCT1051E message structure to establish the message destination
R-GCX126-cbl-01024 Call WRITMSGL to Write Message Log
Action Rules
Business View: Assuming a cargo information message is formatted in gct1051e structure with destination set during the 'Call WRITMSGL to Write Message Log' routine, when the message needs to be permanently logged, the system executes logic to ensure that the system calls writmsgl with the alternate pcb, message code (gct1051e-msg-code), message content (gct1051e-message), message length (gct1051e-msg-lgth), and module name (gct1051e-mod-name) to write the log entry.
Given
A cargo information message is formatted in GCT1051E structure with destination set
When
The message needs to be permanently logged
Then
The system calls WRITMSGL with the alternate PCB, message code (GCT1051E-MSG-CODE), message content (GCT1051E-MESSAGE), message length (GCT1051E-MSG-LGTH), and module name (GCT1051E-MOD-NAME) to write the log entry
R-GCX126-cbl-01025 Call CIMS with PURG Function
Action Rules
Business View: Assuming a cargo information message has been successfully written to the message log during the 'Call CIMS with PURG Function' routine, when the logging transaction needs to be completed, the system executes logic to ensure that the system calls cims with purg function using the alternate pcb to remove the message from the queue and finalize the transaction.
Given
A cargo information message has been successfully written to the message log
When
The logging transaction needs to be completed
Then
The system calls CIMS with PURG function using the alternate PCB to remove the message from the queue and finalize the transaction
R-GCX126-cbl-00379 Set Line 1: 'Cargo on HOLD for inspection by CBSA - EDI350'
Process Rules
Business View: Assuming a cargo hold notification is being prepared for ccn starting with '6105' during the 'Set Line 1: 'Cargo on HOLD for inspection by CBSA - EDI350'' routine, when the system constructs the notification message, the system executes logic to ensure that set the first detail line to 'cargo on hold for inspection by cbsa - edi350'.
Given
A cargo hold notification is being prepared for CCN starting with '6105'
When
The system constructs the notification message
Then
Set the first detail line to 'Cargo on HOLD for inspection by CBSA - EDI350'
R-GCX126-cbl-00380 Set Line 2: Blank
Process Rules
Business View: Assuming a cargo hold notification message is being constructed during the 'Set Line 2: Blank' routine, when the system formats the notification content, the system executes logic to ensure that set the second detail line to blank space.
Given
A cargo hold notification message is being constructed
When
The system formats the notification content
Then
Set the second detail line to blank space
R-GCX126-cbl-00385 Set Line 7: Manifest Upon Station Name
Process Rules
Business View: Assuming a cargo hold notification is being prepared with manifest station information available during the 'Set Line 7: Manifest Upon Station Name' routine, when the system constructs the notification details, the system executes logic to ensure that set the seventh detail line to 'manifest upon : ' followed by the manifest to station name from the cargo record.
Given
A cargo hold notification is being prepared with manifest station information available
When
The system constructs the notification details
Then
Set the seventh detail line to 'MANIFEST UPON : ' followed by the manifest to station name from the cargo record
R-GCX126-cbl-00386 Set Total Lines to 7
Process Rules
Business View: Assuming a cargo hold notification message has been fully constructed with all detail lines during the 'Set Total Lines to 7' routine, when the system finalizes the notification structure, the system executes logic to ensure that set the line counter to 7 to indicate seven detail lines are included in the notification.
Given
A cargo hold notification message has been fully constructed with all detail lines
When
The system finalizes the notification structure
Then
Set the line counter to 7 to indicate seven detail lines are included in the notification
R-GCX126-cbl-00389 Set Email Subject, Append CCN to Subject
Process Rules
Business View: Assuming a customs error message needs to be sent for a cargo during the 'Set Email Subject, Append CCN to Subject' routine, when the error email preparation process is initiated, the system executes logic to ensure that the email subject is set to 'customs received err msg' concatenated with the cargo ccn key.
Given
A customs error message needs to be sent for a cargo
When
The error email preparation process is initiated
Then
The email subject is set to 'CUSTOMS RECEIVED ERR MSG' concatenated with the cargo CCN key
R-GCX126-cbl-00391 Admin Config Available?, Set Primary Recipient from Admin Config, Set Secondary Recipient from Admin Config
Action Rules
Business View: Assuming the admin segment has been successfully retrieved and the admin segment found indicator is true during the 'Admin Config Available?, Set Primary Recipient from Admin Config, Set Secondary Recipient from Admin Config' routine, when email recipients need to be configured for error notification, the system executes logic to ensure that the first email recipient usercode is set to the primary merlin user id from admin table field ad-dc-p-merlin-1 and the second email recipient usercode is set to the secondary merlin user id from admin table field ad-dc-p-merlin-5.
Given
The admin segment has been successfully retrieved and the admin segment found indicator is true
When
Email recipients need to be configured for error notification
Then
The first email recipient usercode is set to the primary Merlin user ID from admin table field AD-DC-P-MERLIN-1 and the second email recipient usercode is set to the secondary Merlin user ID from admin table field AD-DC-P-MERLIN-5
R-GCX126-cbl-00392 Admin Config Available?, Set Default Recipient OM01247
Action Rules
Business View: <EXCLUSION CRITERIA> If the admin segment was not successfully retrieved or the admin segment found indicator is false, and email recipients need to be configured for error notification occurs during the 'Admin Config Available?, Set Default Recipient OM01247' routine, then the system must guarantee that the first email recipient usercode is set to the default value 'om01247' and the second email recipient usercode is set to spaces.
EXCLUDING
The admin segment was not successfully retrieved or the admin segment found indicator is false
When
Email recipients need to be configured for error notification
Then
The first email recipient usercode is set to the default value 'OM01247' and the second email recipient usercode is set to spaces
R-GCX126-cbl-00393 Set Email Keywords, Keywords Empty?, Cargo Found?, Use Cargo CCN as Keywords
Decision Rules
Business View: Assuming email keywords field is empty or contains low-values and cargo was found in the database with a non-empty ccn key during the 'Set Email Keywords, Keywords Empty?, Cargo Found?, Use Cargo CCN as Keywords' routine, when email keywords need to be assigned, the system executes logic to ensure that the email keywords field is set to the cargo ccn key from the cargo report segment.
Given
Email keywords field is empty or contains low-values and cargo was found in the database with a non-empty CCN key
When
Email keywords need to be assigned
Then
The email keywords field is set to the cargo CCN key from the cargo report segment
R-GCX126-cbl-00397 Set Email Subject to 'BROKER/MANIFEST MISMATCH' with CCN
Action Rules
Business View: Assuming an info email type notification needs to be prepared during the 'Set Email Subject to 'BROKER/MANIFEST MISMATCH' with CCN' routine, when the system is setting up the email subject for a broker/manifest mismatch scenario, the system executes logic to ensure that the email subject is set to 'broker/manifest mismatch ' concatenated with the cargo ccn key.
Given
An info email type notification needs to be prepared
When
The system is setting up the email subject for a broker/manifest mismatch scenario
Then
The email subject is set to 'BROKER/MANIFEST MISMATCH ' concatenated with the cargo CCN key
R-GCX126-cbl-00402 Call EMCSEND2 to Send Email
Action Rules
Business View: Assuming email subject is set to 'broker/manifest mismatch' with ccn and email recipient is set to 'om01247' and destination filename is set to 'in' and email keywords are populated during the 'Call EMCSEND2 to Send Email' routine, when the system calls the email sending service emcsend2, the system executes logic to ensure that the email is sent with from-usercode 'om01247', destination filename 'in', recipient usercode 'om01247', the prepared subject line, keywords, and the 350 report message content.
Given
Email subject is set to 'BROKER/MANIFEST MISMATCH' with CCN AND email recipient is set to 'OM01247' AND destination filename is set to 'IN' AND email keywords are populated
When
The system calls the email sending service EMCSEND2
Then
The email is sent with from-usercode 'OM01247', destination filename 'IN', recipient usercode 'OM01247', the prepared subject line, keywords, and the 350 report message content
R-GCX126-cbl-00403 Reset Email Report Fields
Process Rules
Business View: Assuming an email notification has been successfully sent via emcsend2 during the 'Reset Email Report Fields' routine, when the system performs post-send cleanup, the system executes logic to ensure that the 350 report area is cleared, line counter is reset to zero, email subject is cleared, destination filename is reset to 'in', email keywords are cleared, machine sequence number is incremented by 1, copy usercode is cleared, to usercode is cleared, and recipient usercodes are reset to configured values from admin table or default 'om01247'.
Given
An email notification has been successfully sent via EMCSEND2
When
The system performs post-send cleanup
Then
The 350 report area is cleared, line counter is reset to zero, email subject is cleared, destination filename is reset to 'IN', email keywords are cleared, machine sequence number is incremented by 1, copy usercode is cleared, TO usercode is cleared, and recipient usercodes are reset to configured values from admin table or default 'OM01247'
R-GCX126-cbl-00404 Prepare Release Error Email
Action Rules
Business View: <EXCLUSION CRITERIA> If an edi 350 release message is received with notice reason code indicating released status and the ccn from m10 segment does not exist in the cargo database, and the system attempts to process the release notification occurs during the 'Prepare Release Error Email' routine, then the system must guarantee that prepare email notification with subject 'unknown edi 350 release from cbsa' and message line 1 contains 'unknown edi 350 release from cbsa' followed by the ccn and message line 3 contains 'this ccn was not found.' and message line 4 contains 'release number: ' followed by the cbsa release reference id and ' done by port ' followed by the port code and set message line count to 5 and set destination filename to 'unknown' and set recipient to 'om01247' and route the notification.
EXCLUDING
An EDI 350 release message is received with notice reason code indicating RELEASED status AND the CCN from M10 segment does not exist in the cargo database
When
The system attempts to process the release notification
Then
Prepare email notification with subject 'UNKNOWN EDI 350 RELEASE FROM CBSA' AND message line 1 contains 'UNKNOWN EDI 350 RELEASE FROM CBSA' followed by the CCN AND message line 3 contains 'THIS CCN WAS NOT FOUND.' AND message line 4 contains 'RELEASE NUMBER: ' followed by the CBSA release reference ID and ' DONE BY PORT ' followed by the port code AND set message line count to 5 AND set destination filename to 'UNKNOWN' AND set recipient to 'OM01247' AND route the notification
R-GCX126-cbl-00405 Prepare Deconsolidation Error Email
Action Rules
Business View: <EXCLUSION CRITERIA> If an edi 350 message is received with notice reason code indicating decon status and the ccn from m10 segment does not exist in the cargo database, and the system attempts to process the deconsolidation notification occurs during the 'Prepare Deconsolidation Error Email' routine, then the system must guarantee that prepare email notification with subject 'unknown edi 350 dcon notice' and message line 1 contains 'unknown edi 350 dcon notice' followed by the ccn and message line 3 contains 'this ccn was not found.' and message line 4 contains 'house bill close number' followed by the cbsa release reference id and ' done by port ' followed by the port code and set message line count to 5 and set destination filename to 'unknown' and set recipient to 'om01247' and route the notification.
EXCLUDING
An EDI 350 message is received with notice reason code indicating DECON status AND the CCN from M10 segment does not exist in the cargo database
When
The system attempts to process the deconsolidation notification
Then
Prepare email notification with subject 'UNKNOWN EDI 350 DCON NOTICE' AND message line 1 contains 'UNKNOWN EDI 350 DCON NOTICE' followed by the CCN AND message line 3 contains 'THIS CCN WAS NOT FOUND.' AND message line 4 contains 'HOUSE BILL CLOSE NUMBER' followed by the CBSA release reference ID and ' DONE BY PORT ' followed by the port code AND set message line count to 5 AND set destination filename to 'UNKNOWN' AND set recipient to 'OM01247' AND route the notification
R-GCX126-cbl-00406 Prepare General Entry Error Email
Action Rules
Business View: <EXCLUSION CRITERIA> If an edi 350 message is received with a notice reason code that is not released or decon and the ccn from m10 segment does not exist in the cargo database, and the system attempts to process the notification occurs during the 'Prepare General Entry Error Email' routine, then the system must guarantee that prepare email notification with subject from message line 1 and message line 1 contains 'unknown edi 350 entry from cbsa' followed by the ccn and message line 3 contains 'this ccn was not found.' and message line 4 contains 'notice doc type: ' followed by the notice document type code and ' with reason code ' followed by the notice reason code and set message line count to 5 and set destination filename to 'unknown' and set recipient to 'om01247' and route the notification.
EXCLUDING
An EDI 350 message is received with a notice reason code that is not RELEASED or DECON AND the CCN from M10 segment does not exist in the cargo database
When
The system attempts to process the notification
Then
Prepare email notification with subject from message line 1 AND message line 1 contains 'UNKNOWN EDI 350 ENTRY FROM CBSA' followed by the CCN AND message line 3 contains 'THIS CCN WAS NOT FOUND.' AND message line 4 contains 'NOTICE DOC TYPE: ' followed by the notice document type code and ' WITH REASON CODE ' followed by the notice reason code AND set message line count to 5 AND set destination filename to 'UNKNOWN' AND set recipient to 'OM01247' AND route the notification
R-GCX126-cbl-00407 Check Notice Reason Code
Decision Rules
Business View: <EXCLUSION CRITERIA> If an edi 350 message has been received and the ccn does not exist in the cargo database, and the system evaluates the v9 segment notice reason code occurs during the 'Check Notice Reason Code' routine, then the system must guarantee that if notice reason code indicates released then prepare release error notification or if notice reason code indicates decon then prepare deconsolidation error notification or if notice reason code is any other value then prepare general entry error notification.
EXCLUDING
An EDI 350 message has been received AND the CCN does not exist in the cargo database
When
The system evaluates the V9 segment notice reason code
Then
If notice reason code indicates RELEASED then prepare release error notification OR if notice reason code indicates DECON then prepare deconsolidation error notification OR if notice reason code is any other value then prepare general entry error notification
R-GCX126-cbl-00408 Set Destination Filename: UNKNOWN
Process Rules
Business View: Assuming an unknown cargo notification has been prepared with all message details during the 'Set Destination Filename: UNKNOWN' routine, when the system configures routing parameters, the system executes logic to ensure that set the destination filename to 'unknown' to route the message to the unknown message queue.
Given
An unknown cargo notification has been prepared with all message details
When
The system configures routing parameters
Then
Set the destination filename to 'UNKNOWN' to route the message to the unknown message queue
R-GCX126-cbl-00410 Call Email Send Process
Action Rules
Business View: Assuming an unknown cargo notification has been fully prepared with subject, message lines, destination filename set to 'unknown', and recipient set to 'om01247' during the 'Call Email Send Process' routine, when the system invokes the email send process, the system executes logic to ensure that call the email notification service with all prepared notification parameters to deliver the message to the recipient.
Given
An unknown cargo notification has been fully prepared with subject, message lines, destination filename set to 'UNKNOWN', and recipient set to 'OM01247'
When
The system invokes the email send process
Then
Call the email notification service with all prepared notification parameters to deliver the message to the recipient
R-GCX126-cbl-00411 CCN starts with '6105'?
Decision Rules
Business View: Assuming a cargo record exists with a ccn (cargo control number), equipment id, waybill information (carrier, origin station, waybill number), destination station details (name and state code), and manifest station name during the 'CCN starts with '6105'?' routine, when the cargo status is set to held and the ccn starts with '6105', the system executes logic to ensure that the system prepares a hold notification email with subject 'cbsa cargo hold - [ccn]', body containing cargo on hold message, equipment details, waybill information, ccn, destination station, and manifest upon station, and routes it to recipient om01247 with destination filename cahold.
Given
A cargo record exists with a CCN (Cargo Control Number), equipment ID, waybill information (carrier, origin station, waybill number), destination station details (name and state code), and manifest station name
When
The cargo status is set to HELD and the CCN starts with '6105'
Then
The system prepares a hold notification email with subject 'CBSA CARGO HOLD - [CCN]', body containing cargo on hold message, equipment details, waybill information, CCN, destination station, and manifest upon station, and routes it to recipient OM01247 with destination filename CAHOLD
R-GCX126-cbl-00414 Add Line 1: 'Cargo on HOLD for inspection by CBSA - EDI350'
Process Rules
Business View: Assuming a hold notification email is being prepared during the 'Add Line 1: 'Cargo on HOLD for inspection by CBSA - EDI350'' routine, when the email body content is being constructed, the system executes logic to ensure that the system adds 'cargo on hold for inspection by cbsa - edi350' as the first detail line in the email body.
Given
A hold notification email is being prepared
When
The email body content is being constructed
Then
The system adds 'Cargo on HOLD for inspection by CBSA - EDI350' as the first detail line in the email body
R-GCX126-cbl-00415 Add Line 2: Blank
Process Rules
Business View: Assuming the primary hold message has been added to the email body during the 'Add Line 2: Blank' routine, when the email body content is being constructed, the system executes logic to ensure that the system adds a blank line as the second line in the email body.
Given
The primary hold message has been added to the email body
When
The email body content is being constructed
Then
The system adds a blank line as the second line in the email body
R-GCX126-cbl-00420 Add Line 7: 'MANIFEST UPON: ' + Manifest To Station Name
Process Rules
Business View: Assuming a cargo record with manifest to station name during the 'Add Line 7: 'MANIFEST UPON: ' + Manifest To Station Name' routine, when the email body content is being constructed, the system executes logic to ensure that the system adds a line containing 'manifest upon : ' followed by the manifest to station name as the seventh line in the email body.
Given
A cargo record with manifest to station name
When
The email body content is being constructed
Then
The system adds a line containing 'MANIFEST UPON : ' followed by the manifest to station name as the seventh line in the email body
R-GCX126-cbl-00426 Purge IMS Message Queue
Process Rules
Business View: Assuming an email has been sent successfully through emcsend2 and the return status flag indicates no errors during the 'Purge IMS Message Queue' routine, when the email send operation completes without errors, the system executes logic to ensure that the system calls cims with purg function to purge the alternate pcb message queue.
Given
An email has been sent successfully through EMCSEND2 and the return status flag indicates no errors
When
The email send operation completes without errors
Then
The system calls CIMS with PURG function to purge the alternate PCB message queue
R-GCX126-cbl-00427 Abort: Invalid FROM User
Validation Rules
Business View: <EXCLUSION CRITERIA> If an email send attempt has been made through emcsend2, and the return status flag indicates from user not found occurs during the 'Abort: Invalid FROM User' routine, then the system must guarantee that the system sets error message 'emi - invalid merlin from' and calls cerr to abort the program.
EXCLUDING
An email send attempt has been made through EMCSEND2
When
The return status flag indicates FROM user not found
Then
The system sets error message 'EMI - INVALID MERLIN FROM' and calls CERR to abort the program
R-GCX126-cbl-00428 Abort: Invalid Filename
Validation Rules
Business View: <EXCLUSION CRITERIA> If an email send attempt has been made through emcsend2, and the return status flag indicates filename is invalid occurs during the 'Abort: Invalid Filename' routine, then the system must guarantee that the system sets error message 'emi - invalid merlin filename' and calls cerr to abort the program.
EXCLUDING
An email send attempt has been made through EMCSEND2
When
The return status flag indicates filename is invalid
Then
The system sets error message 'EMI - INVALID MERLIN FILENAME' and calls CERR to abort the program
R-GCX126-cbl-00431 Resend Failed Email to OM01247
Validation Rules
Business View: <EXCLUSION CRITERIA> If an email is being resent to the default user om01247 after initial recipient failure, and the resend operation return status flag indicates to or copy user not found occurs during the 'Resend Failed Email to OM01247' routine, then the system must guarantee that the system sets error message 'emi - invalid merlin to or copy' and calls cerr to abort the program.
EXCLUDING
An email is being resent to the default user OM01247 after initial recipient failure
When
The resend operation return status flag indicates TO or COPY user not found
Then
The system sets error message 'EMI - INVALID MERLIN TO OR COPY' and calls CERR to abort the program
R-GCX126-cbl-00432 Resend Failed Email to OM01247
Validation Rules
Business View: <EXCLUSION CRITERIA> If an email is being resent after initial failure, and the resend operation return status flag indicates from user not found occurs during the 'Resend Failed Email to OM01247' routine, then the system must guarantee that the system sets error message 'emi - invalid merlin from' and calls cerr to abort the program.
EXCLUDING
An email is being resent after initial failure
When
The resend operation return status flag indicates FROM user not found
Then
The system sets error message 'EMI - INVALID MERLIN FROM' and calls CERR to abort the program
R-GCX126-cbl-00433 Resend Failed Email to OM01247
Validation Rules
Business View: <EXCLUSION CRITERIA> If an email is being resent after initial failure, and the resend operation return status flag indicates filename is invalid occurs during the 'Resend Failed Email to OM01247' routine, then the system must guarantee that the system sets error message 'emi - invalid merlin filename' and calls cerr to abort the program.
EXCLUDING
An email is being resent after initial failure
When
The resend operation return status flag indicates filename is invalid
Then
The system sets error message 'EMI - INVALID MERLIN FILENAME' and calls CERR to abort the program
R-GCX126-cbl-00435 Resend Failed Email to OM01247
Process Rules
Business View: Assuming an email has been resent successfully and the return status flag indicates no errors during the 'Resend Failed Email to OM01247' routine, when the resend operation completes without errors, the system executes logic to ensure that the system calls cims with purg function to purge the alternate pcb message queue.
Given
An email has been resent successfully and the return status flag indicates no errors
When
The resend operation completes without errors
Then
The system calls CIMS with PURG function to purge the alternate PCB message queue
R-GCX126-cbl-00436 Resend Failed Email to OM01247
Process Rules
Business View: <EXCLUSION CRITERIA> If an email send attempt has failed because to or copy usercode was not found, and the system determines which recipient was invalid based on message type occurs during the 'Resend Failed Email to OM01247' routine, then the system must guarantee that if message type is unrlse, store the second to usercode as the bad merlin id, otherwise store the first to usercode as the bad merlin id.
EXCLUDING
An email send attempt has failed because TO or COPY usercode was not found
When
The system determines which recipient was invalid based on message type
Then
If message type is UNRLSE, store the second TO usercode as the bad Merlin ID, otherwise store the first TO usercode as the bad Merlin ID
R-GCX126-cbl-00682 Email Sent Successfully
Process Rules
Business View: Assuming an email notification has been prepared with from usercode, destination filename, to usercode, copy usercode, subject, keywords, and report content during the 'Email Sent Successfully' routine, when the emcsend2 service returns emi-no-errors status indicating successful email delivery, the system executes logic to ensure that the system purges the ims alternate pcb message queue and completes the email send process successfully.
Given
An email notification has been prepared with FROM usercode, destination filename, TO usercode, COPY usercode, subject, keywords, and report content
When
The EMCSEND2 service returns EMI-NO-ERRORS status indicating successful email delivery
Then
The system purges the IMS alternate PCB message queue and completes the email send process successfully
R-GCX126-cbl-00683 FROM User Not Found Error
Validation Rules
Business View: <EXCLUSION CRITERIA> If an email notification is being sent with a from usercode, and the emcsend2 service returns emi-from-not-found status indicating the from usercode does not exist in the system occurs during the 'FROM User Not Found Error' routine, then the system must guarantee that the system sets error message 'emi - invalid merlin from' and aborts the program execution.
EXCLUDING
An email notification is being sent with a FROM usercode
When
The EMCSEND2 service returns EMI-FROM-NOT-FOUND status indicating the FROM usercode does not exist in the system
Then
The system sets error message 'EMI - INVALID MERLIN FROM' and aborts the program execution
R-GCX126-cbl-00684 Invalid Filename Error
Validation Rules
Business View: <EXCLUSION CRITERIA> If an email notification is being sent with a destination filename, and the emcsend2 service returns emi-filename-invalid status indicating the destination filename is not valid occurs during the 'Invalid Filename Error' routine, then the system must guarantee that the system sets error message 'emi - invalid merlin filename' and aborts the program execution.
EXCLUDING
An email notification is being sent with a destination filename
When
The EMCSEND2 service returns EMI-FILENAME-INVALID status indicating the destination filename is not valid
Then
The system sets error message 'EMI - INVALID MERLIN FILENAME' and aborts the program execution
R-GCX126-cbl-00686 Resend Email with Reroute Notice
Process Rules
Business View: <EXCLUSION CRITERIA> If an email was successfully rerouted to default user om01247 after initial recipient was not found and the resend returned emi-no-errors status, and the system prepares a new email with subject containing the invalid merlin id and message 'invalid merlin to - report reroute' occurs during the 'Resend Email with Reroute Notice' routine, then the system must guarantee that the system sends the reroute notification email to om01247 with destination filename 'in' and purges the ims message queue upon successful delivery.
EXCLUDING
An email was successfully rerouted to default user OM01247 after initial recipient was not found and the resend returned EMI-NO-ERRORS status
When
The system prepares a new email with subject containing the invalid Merlin ID and message 'INVALID MERLIN TO - REPORT REROUTE'
Then
The system sends the reroute notification email to OM01247 with destination filename 'IN' and purges the IMS message queue upon successful delivery
R-GCX126-cbl-00687 Abort with Invalid TO/COPY Error
Validation Rules
Business View: <EXCLUSION CRITERIA> If an email was rerouted to default user om01247 after initial recipient was not found, and the resend attempt returns emi-to-or-copy-not-found status indicating even the default recipient om01247 is invalid occurs during the 'Abort with Invalid TO/COPY Error' routine, then the system must guarantee that the system sets error message 'emi - invalid merlin to or copy' and aborts the program execution.
EXCLUDING
An email was rerouted to default user OM01247 after initial recipient was not found
When
The resend attempt returns EMI-TO-OR-COPY-NOT-FOUND status indicating even the default recipient OM01247 is invalid
Then
The system sets error message 'EMI - INVALID MERLIN TO OR COPY' and aborts the program execution
R-GCX126-cbl-00688 FROM User Not Found Error
Validation Rules
Business View: <EXCLUSION CRITERIA> If an email is being rerouted to default user om01247 after initial recipient was not found, and the resend attempt returns emi-from-not-found status indicating the from usercode does not exist occurs during the 'FROM User Not Found Error' routine, then the system must guarantee that the system sets error message 'emi - invalid merlin from' and aborts the program execution.
EXCLUDING
An email is being rerouted to default user OM01247 after initial recipient was not found
When
The resend attempt returns EMI-FROM-NOT-FOUND status indicating the FROM usercode does not exist
Then
The system sets error message 'EMI - INVALID MERLIN FROM' and aborts the program execution
R-GCX126-cbl-00689 Invalid Filename Error
Validation Rules
Business View: <EXCLUSION CRITERIA> If an email is being rerouted to default user om01247 after initial recipient was not found, and the resend attempt returns emi-filename-invalid status indicating the destination filename is not valid occurs during the 'Invalid Filename Error' routine, then the system must guarantee that the system sets error message 'emi - invalid merlin filename' and aborts the program execution.
EXCLUDING
An email is being rerouted to default user OM01247 after initial recipient was not found
When
The resend attempt returns EMI-FILENAME-INVALID status indicating the destination filename is not valid
Then
The system sets error message 'EMI - INVALID MERLIN FILENAME' and aborts the program execution
R-GCX126-cbl-00917 Call EMCSEND2 to Send Email
Action Rules
Business View: Assuming email parameters are prepared with from usercode, destination filename, to usercode, copy usercode, subject, keywords, and message report content during the 'Call EMCSEND2 to Send Email' routine, when emcsend2 program is called with these parameters, the system executes logic to ensure that the email is sent through the emcsend2 interface and return status flag is populated.
Given
Email parameters are prepared with FROM usercode, destination filename, TO usercode, COPY usercode, subject, keywords, and message report content
When
EMCSEND2 program is called with these parameters
Then
The email is sent through the EMCSEND2 interface and return status flag is populated
R-GCX126-cbl-00918 Purge IMS Message Queue
Process Rules
Business View: Assuming emcsend2 return status indicates no errors (emi-no-errors) during the 'Purge IMS Message Queue' routine, when email send operation completes successfully, the system executes logic to ensure that ims message queue is purged using purg function against alternate pcb.
Given
EMCSEND2 return status indicates no errors (EMI-NO-ERRORS)
When
Email send operation completes successfully
Then
IMS message queue is purged using PURG function against alternate PCB
R-GCX126-cbl-00919 From User Not Found?
Validation Rules
Business View: <EXCLUSION CRITERIA> If emcsend2 return status is emi-from-not-found, and email send operation fails due to invalid sender usercode occurs during the 'From User Not Found?' routine, then the system must guarantee that system abends with error message 'emi - invalid merlin from'.
EXCLUDING
EMCSEND2 return status is EMI-FROM-NOT-FOUND
When
Email send operation fails due to invalid sender usercode
Then
System abends with error message 'EMI - INVALID MERLIN FROM'
R-GCX126-cbl-00922 Resend Successful?
Process Rules
Business View: Assuming resend operation completed with emi-no-errors status during the 'Resend Successful?' routine, when email was successfully rerouted to default recipient, the system executes logic to ensure that clear subject, build new subject with bad merlin id and message 'invalid merlin to - report reroute', and resend notification.
Given
Resend operation completed with EMI-NO-ERRORS status
When
Email was successfully rerouted to default recipient
Then
Clear subject, build new subject with bad Merlin ID and message 'INVALID MERLIN TO - REPORT REROUTE', and resend notification
R-GCX126-cbl-00923 Filename Invalid?
Validation Rules
Business View: <EXCLUSION CRITERIA> If emcsend2 return status is emi-filename-invalid, and email send operation fails due to invalid destination filename occurs during the 'Filename Invalid?' routine, then the system must guarantee that system abends with error message 'emi - invalid merlin filename'.
EXCLUDING
EMCSEND2 return status is EMI-FILENAME-INVALID
When
Email send operation fails due to invalid destination filename
Then
System abends with error message 'EMI - INVALID MERLIN FILENAME'
R-GCX126-cbl-00970 Call EMCSEND2 with Parameters: From User Code, Destination Filename, To User Code, Copy User Code, Subject, Keywords, Report Content, Return Status Flag, Segment Numbers, Item Type
Action Rules
Business View: Assuming the communication context is established and email parameters are prepared including from user code (emi-from-usercode), destination filename (emi-destination-filename), to user code (emi-to-usercode), copy user code (emi-copy-usercode), subject (emi-subject), keywords (emi-keywords), report content (mrln-350-report), return status flag (emi-return-status-flag), segment numbers (emi-seg-no1, emi-seg-no2), and item type (emi-item-type) during the 'Call EMCSEND2 with Parameters: From User Code, Destination Filename, To User Code, Copy User Code, Subject, Keywords, Report Content, Return Status Flag, Segment Numbers, Item Type' routine, when the system invokes emcsend2 program, the system executes logic to ensure that the email is sent with all specified parameters and the return status flag is populated with the result.
Given
The communication context is established and email parameters are prepared including From User Code (EMI-FROM-USERCODE), Destination Filename (EMI-DESTINATION-FILENAME), To User Code (EMI-TO-USERCODE), Copy User Code (EMI-COPY-USERCODE), Subject (EMI-SUBJECT), Keywords (EMI-KEYWORDS), Report Content (MRLN-350-REPORT), Return Status Flag (EMI-RETURN-STATUS-FLAG), Segment Numbers (EMI-SEG-NO1, EMI-SEG-NO2), and Item Type (EMI-ITEM-TYPE)
When
The system invokes EMCSEND2 program
Then
The email is sent with all specified parameters and the return status flag is populated with the result
R-GCX126-cbl-00972 No Errors: Purge IMS Message Queue
Process Rules
Business View: Assuming the emcsend2 return status flag indicates no errors (emi-no-errors) during the 'No Errors: Purge IMS Message Queue' routine, when the email sending completes successfully, the system executes logic to ensure that the system calls cims program with purg function code and alt-pcb to purge the message from the queue.
Given
The EMCSEND2 return status flag indicates no errors (EMI-NO-ERRORS)
When
The email sending completes successfully
Then
The system calls CIMS program with PURG function code and ALT-PCB to purge the message from the queue
R-GCX126-cbl-00973 From User Not Found: Set Error Message 'EMI - INVALID MERLIN FROM'
Validation Rules
Business View: <EXCLUSION CRITERIA> If the emcsend2 return status flag indicates sender not found (emi-from-not-found), and the email sending fails due to invalid sender user code occurs during the 'From User Not Found: Set Error Message 'EMI - INVALID MERLIN FROM'' routine, then the system must guarantee that the system sets error message to 'emi - invalid merlin from' in cccom error message field and calls cerr program to abort.
EXCLUDING
The EMCSEND2 return status flag indicates sender not found (EMI-FROM-NOT-FOUND)
When
The email sending fails due to invalid sender user code
Then
The system sets error message to 'EMI - INVALID MERLIN FROM' in CCCOM error message field and calls CERR program to abort
R-GCX126-cbl-00974 To/Copy User Not Found: Identify Bad Merlin ID
Decision Rules
Business View: <EXCLUSION CRITERIA> If the emcsend2 return status flag indicates recipient not found (emi-to-or-copy-not-found) and the message type is unrelease (88-z110-mrln-type-is-unrlse), and the email sending fails due to invalid recipient occurs during the 'To/Copy User Not Found: Identify Bad Merlin ID' routine, then the system must guarantee that the system moves emi-to-usercodes(02) to ws-bad-merlin-id, clears emi-to-usercode, sets emi-to-usercodes(01) to 'om01247', sets emi-destination-filename to 'in', and performs z116-resend-merlin.
EXCLUDING
The EMCSEND2 return status flag indicates recipient not found (EMI-TO-OR-COPY-NOT-FOUND) and the message type is unrelease (88-Z110-MRLN-TYPE-IS-UNRLSE)
When
The email sending fails due to invalid recipient
Then
The system moves EMI-TO-USERCODES(02) to WS-BAD-MERLIN-ID, clears EMI-TO-USERCODE, sets EMI-TO-USERCODES(01) to 'OM01247', sets EMI-DESTINATION-FILENAME to 'IN', and performs Z116-RESEND-MERLIN
R-GCX126-cbl-00975 To/Copy User Not Found: Identify Bad Merlin ID
Decision Rules
Business View: <EXCLUSION CRITERIA> If the emcsend2 return status flag indicates recipient not found (emi-to-or-copy-not-found) and the message type is not unrelease, and the email sending fails due to invalid recipient occurs during the 'To/Copy User Not Found: Identify Bad Merlin ID' routine, then the system must guarantee that the system moves emi-to-usercodes(01) to ws-bad-merlin-id, clears emi-to-usercode, sets emi-to-usercodes(01) to 'om01247', sets emi-destination-filename to 'in', and performs z116-resend-merlin.
EXCLUDING
The EMCSEND2 return status flag indicates recipient not found (EMI-TO-OR-COPY-NOT-FOUND) and the message type is not unrelease
When
The email sending fails due to invalid recipient
Then
The system moves EMI-TO-USERCODES(01) to WS-BAD-MERLIN-ID, clears EMI-TO-USERCODE, sets EMI-TO-USERCODES(01) to 'OM01247', sets EMI-DESTINATION-FILENAME to 'IN', and performs Z116-RESEND-MERLIN
R-GCX126-cbl-00976 Resend Failed Email to OM01247 with Reroute Notification
Process Rules
Business View: Assuming the resend operation completed successfully (emi-no-errors after z116-resend-merlin) during the 'Resend Failed Email to OM01247 with Reroute Notification' routine, when the email has been rerouted to default user, the system executes logic to ensure that the system clears emi-subject, builds a new subject message containing ws-bad-merlin-id and text 'invalid merlin to - report reroute', and performs z116-resend-merlin again to send the notification.
Given
The resend operation completed successfully (EMI-NO-ERRORS after Z116-RESEND-MERLIN)
When
The email has been rerouted to default user
Then
The system clears EMI-SUBJECT, builds a new subject message containing WS-BAD-MERLIN-ID and text 'INVALID MERLIN TO - REPORT REROUTE', and performs Z116-RESEND-MERLIN again to send the notification
R-GCX126-cbl-00977 Filename Invalid: Set Error Message 'EMI - INVALID MERLIN FILENAME'
Validation Rules
Business View: <EXCLUSION CRITERIA> If the emcsend2 return status flag indicates invalid filename (emi-filename-invalid), and the email sending fails due to invalid destination filename occurs during the 'Filename Invalid: Set Error Message 'EMI - INVALID MERLIN FILENAME'' routine, then the system must guarantee that the system sets error message to 'emi - invalid merlin filename' in cccom error message field and calls cerr program to abort.
EXCLUDING
The EMCSEND2 return status flag indicates invalid filename (EMI-FILENAME-INVALID)
When
The email sending fails due to invalid destination filename
Then
The system sets error message to 'EMI - INVALID MERLIN FILENAME' in CCCOM error message field and calls CERR program to abort
R-GCX126-cbl-01026 No Errors - Email Sent Successfully
Process Rules
Business View: Assuming an email notification has been processed through emcsend2 during the 'No Errors - Email Sent Successfully' routine, when the return status indicates no errors (emi-no-errors), the system executes logic to ensure that the system purges the alternate message queue to complete the email transaction.
Given
An email notification has been processed through EMCSEND2
When
The return status indicates no errors (EMI-NO-ERRORS)
Then
The system purges the alternate message queue to complete the email transaction
R-GCX126-cbl-01027 From User Not Found Error
Validation Rules
Business View: <EXCLUSION CRITERIA> If an email notification is being sent through emcsend2, and the return status indicates the from user was not found (emi-from-not-found) occurs during the 'From User Not Found Error' routine, then the system must guarantee that the system sets error message 'emi - invalid merlin from' and aborts the program.
EXCLUDING
An email notification is being sent through EMCSEND2
When
The return status indicates the FROM user was not found (EMI-FROM-NOT-FOUND)
Then
The system sets error message 'EMI - INVALID MERLIN FROM' and aborts the program
R-GCX126-cbl-01032 Prepare Reroute Notification Subject
Process Rules
Business View: Assuming an email notification was successfully rerouted to default recipient (emi-no-errors after resend) during the 'Prepare Reroute Notification Subject' routine, when the system prepares the reroute notification, the system executes logic to ensure that the system clears emi-subject and creates a message containing the invalid merlin id (ws-bad-merlin-id) with text 'invalid merlin to - report reroute', then calls z116-resend-merlin again to send this notification.
Given
An email notification was successfully rerouted to default recipient (EMI-NO-ERRORS after resend)
When
The system prepares the reroute notification
Then
The system clears EMI-SUBJECT and creates a message containing the invalid Merlin ID (WS-BAD-MERLIN-ID) with text 'INVALID MERLIN TO - REPORT REROUTE', then calls Z116-RESEND-MERLIN again to send this notification
R-GCX126-cbl-01033 Filename Invalid Error
Validation Rules
Business View: <EXCLUSION CRITERIA> If an email notification is being sent through emcsend2, and the return status indicates the destination filename is invalid (emi-filename-invalid) occurs during the 'Filename Invalid Error' routine, then the system must guarantee that the system sets error message 'emi - invalid merlin filename' and aborts the program.
EXCLUDING
An email notification is being sent through EMCSEND2
When
The return status indicates the destination filename is invalid (EMI-FILENAME-INVALID)
Then
The system sets error message 'EMI - INVALID MERLIN FILENAME' and aborts the program
R-GCX126-cbl-00925 Resend Failed Email to OM01247
Action Rules
Business View: <EXCLUSION CRITERIA> If an email notification has failed to send because the intended recipient usercode was not found in the system, and the system attempts to resend the notification occurs during the 'Resend Failed Email to OM01247' routine, then the system must guarantee that the system clears the to usercode field, sets the to usercode to 'om01247', sets the destination filename to 'in', calls the email sending service (emcsend2) with the original subject, keywords, and message content, and increments the machine sequence number by 1.
EXCLUDING
An email notification has failed to send because the intended recipient usercode was not found in the system
When
The system attempts to resend the notification
Then
The system clears the TO usercode field, sets the TO usercode to 'OM01247', sets the destination filename to 'IN', calls the email sending service (EMCSEND2) with the original subject, keywords, and message content, and increments the machine sequence number by 1
R-GCX126-cbl-00926 Send Successful?
Validation Rules
Business View: Assuming the email resend operation to om01247 has been attempted during the 'Send Successful?' routine, when the email send service returns a status indicating no errors occurred, the system executes logic to ensure that the system purges the ims alternate message queue.
Given
The email resend operation to OM01247 has been attempted
When
The email send service returns a status indicating no errors occurred
Then
The system purges the IMS alternate message queue
R-GCX126-cbl-00927 Abend - Invalid FROM Usercode
Process Rules
Business View: <EXCLUSION CRITERIA> If the email resend operation to om01247 has been attempted, and the email send service returns a status indicating the from usercode was not found occurs during the 'Abend - Invalid FROM Usercode' routine, then the system must guarantee that the system sets the error message to 'emi - invalid merlin from' and terminates processing abnormally.
EXCLUDING
The email resend operation to OM01247 has been attempted
When
The email send service returns a status indicating the FROM usercode was not found
Then
The system sets the error message to 'EMI - INVALID MERLIN FROM' and terminates processing abnormally
R-GCX126-cbl-00928 Abend - Invalid TO/COPY Usercode
Process Rules
Business View: <EXCLUSION CRITERIA> If the email resend operation to om01247 has been attempted, and the email send service returns a status indicating the to or copy usercode was not found occurs during the 'Abend - Invalid TO/COPY Usercode' routine, then the system must guarantee that the system sets the error message to 'emi - invalid merlin to or copy' and terminates processing abnormally.
EXCLUDING
The email resend operation to OM01247 has been attempted
When
The email send service returns a status indicating the TO or COPY usercode was not found
Then
The system sets the error message to 'EMI - INVALID MERLIN TO OR COPY' and terminates processing abnormally
R-GCX126-cbl-00929 Abend - Invalid Filename
Process Rules
Business View: <EXCLUSION CRITERIA> If the email resend operation to om01247 has been attempted, and the email send service returns a status indicating the filename is invalid occurs during the 'Abend - Invalid Filename' routine, then the system must guarantee that the system sets the error message to 'emi - invalid merlin filename' and terminates processing abnormally.
EXCLUDING
The email resend operation to OM01247 has been attempted
When
The email send service returns a status indicating the filename is invalid
Then
The system sets the error message to 'EMI - INVALID MERLIN FILENAME' and terminates processing abnormally
R-GCX126-cbl-00930 Increment Machine Sequence Number
Computation Rules
Business View: Assuming the email notification has been successfully resent to om01247 and the message queue has been purged during the 'Increment Machine Sequence Number' routine, when the resend operation completes, the system executes logic to ensure that the system adds 1 to the formatted machine sequence number.
Given
The email notification has been successfully resent to OM01247 and the message queue has been purged
When
The resend operation completes
Then
The system adds 1 to the formatted machine sequence number
R-GCX126-cbl-00980 Purge IMS Message Queue
Process Rules
Business View: Assuming an email has been successfully resent via emcsend2 with no errors during the 'Purge IMS Message Queue' routine, when the email send operation completes with emi-no-errors status, the system executes logic to ensure that the system calls cims with purg function to purge the alternate pcb message queue.
Given
An email has been successfully resent via EMCSEND2 with no errors
When
The email send operation completes with EMI-NO-ERRORS status
Then
The system calls CIMS with PURG function to purge the alternate PCB message queue
R-GCX126-cbl-00982 Abend: Invalid FROM Usercode
Validation Rules
Business View: Assuming an email resend is attempted via emcsend2 during the 'Abend: Invalid FROM Usercode' routine, when emcsend2 returns emi-from-not-found status, the system executes logic to ensure that the system sets error message to 'emi - invalid merlin from' and performs z900-abend to terminate processing.
Given
An email resend is attempted via EMCSEND2
When
EMCSEND2 returns EMI-FROM-NOT-FOUND status
Then
The system sets error message to 'EMI - INVALID MERLIN FROM' and performs Z900-ABEND to terminate processing
R-GCX126-cbl-00983 Abend: Invalid TO/COPY Usercode
Validation Rules
Business View: Assuming an email resend is attempted via emcsend2 during the 'Abend: Invalid TO/COPY Usercode' routine, when emcsend2 returns emi-to-or-copy-not-found status, the system executes logic to ensure that the system sets error message to 'emi - invalid merlin to or copy' and performs z900-abend to terminate processing.
Given
An email resend is attempted via EMCSEND2
When
EMCSEND2 returns EMI-TO-OR-COPY-NOT-FOUND status
Then
The system sets error message to 'EMI - INVALID MERLIN TO OR COPY' and performs Z900-ABEND to terminate processing
R-GCX126-cbl-00984 Abend: Invalid Filename
Validation Rules
Business View: <EXCLUSION CRITERIA> If an email resend is attempted via emcsend2, and emcsend2 returns emi-filename-invalid status occurs during the 'Abend: Invalid Filename' routine, then the system must guarantee that the system sets error message to 'emi - invalid merlin filename' and performs z900-abend to terminate processing.
EXCLUDING
An email resend is attempted via EMCSEND2
When
EMCSEND2 returns EMI-FILENAME-INVALID status
Then
The system sets error message to 'EMI - INVALID MERLIN FILENAME' and performs Z900-ABEND to terminate processing
R-GCX126-cbl-00988 Call EMCSEND2 with Updated Parameters
Action Rules
Business View: Assuming all resend parameters have been configured (to usercode = om01247, destination = in) during the 'Call EMCSEND2 with Updated Parameters' routine, when ready to resend the email, the system executes logic to ensure that the system calls emcsend2 passing iscom, emi-from-usercode, emi-destination-filename, emi-to-usercode, emi-copy-usercode, emi-subject, emi-keywords, mrln-350-report, emi-return-status-flag, emi-seg-no1, emi-seg-no2, and emi-item-type parameters.
Given
All resend parameters have been configured (TO usercode = OM01247, destination = IN)
When
Ready to resend the email
Then
The system calls EMCSEND2 passing ISCOM, EMI-FROM-USERCODE, EMI-DESTINATION-FILENAME, EMI-TO-USERCODE, EMI-COPY-USERCODE, EMI-SUBJECT, EMI-KEYWORDS, MRLN-350-REPORT, EMI-RETURN-STATUS-FLAG, EMI-SEG-NO1, EMI-SEG-NO2, and EMI-ITEM-TYPE parameters
R-GCX126-cbl-01035 Call EMCSEND2 with Parameters
Action Rules
Business View: Assuming the communication control block is initialized and all email parameters are prepared including from user code, destination filename, to user code, copy user code, subject, keywords, and report content during the 'Call EMCSEND2 with Parameters' routine, when the system executes the email send operation, the system executes logic to ensure that the system calls emcsend2 with iscom, from user code, destination filename, to user code, copy user code, subject, keywords, report content (mrln-350-report), return status flag, segment numbers, and item type to send the email notification.
Given
The communication control block is initialized and all email parameters are prepared including from user code, destination filename, to user code, copy user code, subject, keywords, and report content
When
The system executes the email send operation
Then
The system calls EMCSEND2 with ISCOM, from user code, destination filename, to user code, copy user code, subject, keywords, report content (MRLN-350-REPORT), return status flag, segment numbers, and item type to send the email notification
R-GCX126-cbl-01037 Purge IMS Message Queue
Process Rules
Business View: Assuming the email notification was sent through emcsend2 and the return status flag indicates no errors (emi-no-errors) during the 'Purge IMS Message Queue' routine, when the system evaluates the email send result, the system executes logic to ensure that the system calls cims with cccom, purg function, and alt-pcb to purge the message from the ims queue.
Given
The email notification was sent through EMCSEND2 and the return status flag indicates no errors (EMI-NO-ERRORS)
When
The system evaluates the email send result
Then
The system calls CIMS with CCCOM, PURG function, and ALT-PCB to purge the message from the IMS queue
R-GCX126-cbl-01038 Set Error: Invalid Merlin FROM
Validation Rules
Business View: <EXCLUSION CRITERIA> If the emcsend2 call completed and the return status flag indicates the sender user code was not found (emi-from-not-found), and the system evaluates the email send result occurs during the 'Set Error: Invalid Merlin FROM' routine, then the system must guarantee that the system moves 'emi - invalid merlin from' to the error message field in cccom and performs the abend routine (z900-abend).
EXCLUDING
The EMCSEND2 call completed and the return status flag indicates the sender user code was not found (EMI-FROM-NOT-FOUND)
When
The system evaluates the email send result
Then
The system moves 'EMI - INVALID MERLIN FROM' to the error message field in CCCOM and performs the abend routine (Z900-ABEND)
R-GCX126-cbl-01039 Set Error: Invalid Merlin TO or COPY
Validation Rules
Business View: <EXCLUSION CRITERIA> If the emcsend2 call completed and the return status flag indicates the recipient or copy user code was not found (emi-to-or-copy-not-found), and the system evaluates the email send result occurs during the 'Set Error: Invalid Merlin TO or COPY' routine, then the system must guarantee that the system moves 'emi - invalid merlin to or copy' to the error message field in cccom and performs the abend routine (z900-abend).
EXCLUDING
The EMCSEND2 call completed and the return status flag indicates the recipient or copy user code was not found (EMI-TO-OR-COPY-NOT-FOUND)
When
The system evaluates the email send result
Then
The system moves 'EMI - INVALID MERLIN TO OR COPY' to the error message field in CCCOM and performs the abend routine (Z900-ABEND)
R-GCX126-cbl-01040 Set Error: Invalid Merlin Filename
Validation Rules
Business View: Assuming the emcsend2 call completed and the return status flag indicates the destination filename is invalid (emi-filename-invalid) during the 'Set Error: Invalid Merlin Filename' routine, when the system evaluates the email send result, the system executes logic to ensure that the system moves 'emi - invalid merlin filename' to the error message field in cccom and performs the abend routine (z900-abend).
Given
The EMCSEND2 call completed and the return status flag indicates the destination filename is invalid (EMI-FILENAME-INVALID)
When
The system evaluates the email send result
Then
The system moves 'EMI - INVALID MERLIN FILENAME' to the error message field in CCCOM and performs the abend routine (Z900-ABEND)
R-GCX126-cbl-01042 No Errors - Purge Message Queue
Process Rules
Business View: Assuming an email notification has been sent via emcsend2 during the 'No Errors - Purge Message Queue' routine, when the return status flag indicates emi-no-errors, the system executes logic to ensure that the system purges the message from the alternate pcb message queue and increments the machine sequence number.
Given
An email notification has been sent via EMCSEND2
When
The return status flag indicates EMI-NO-ERRORS
Then
The system purges the message from the alternate PCB message queue and increments the machine sequence number
R-GCX126-cbl-01043 Abort with Error Message: EMI - INVALID MERLIN FROM
Validation Rules
Business View: Assuming an email notification has been attempted via emcsend2 during the 'Abort with Error Message: EMI - INVALID MERLIN FROM' routine, when the return status flag indicates emi-from-not-found, the system executes logic to ensure that the system sets the error message to 'emi - invalid merlin from' and aborts processing.
Given
An email notification has been attempted via EMCSEND2
When
The return status flag indicates EMI-FROM-NOT-FOUND
Then
The system sets the error message to 'EMI - INVALID MERLIN FROM' and aborts processing
R-GCX126-cbl-01044 Save Bad Merlin ID from TO-USERCODES 02
Decision Rules
Business View: Assuming an unrelease type email notification has been attempted via emcsend2 and the message type is unrlse during the 'Save Bad Merlin ID from TO-USERCODES 02' routine, when the return status flag indicates emi-to-or-copy-not-found, the system executes logic to ensure that the system saves the invalid merlin id from to-usercodes position 02 to ws-bad-merlin-id for error reporting.
Given
An unrelease type email notification has been attempted via EMCSEND2 and the message type is UNRLSE
When
The return status flag indicates EMI-TO-OR-COPY-NOT-FOUND
Then
The system saves the invalid Merlin ID from TO-USERCODES position 02 to WS-BAD-MERLIN-ID for error reporting
R-GCX126-cbl-01045 Save Bad Merlin ID from TO-USERCODES 01
Decision Rules
Business View: <EXCLUSION CRITERIA> If a non-unrelease type email notification has been attempted via emcsend2 and the message type is not unrlse, and the return status flag indicates emi-to-or-copy-not-found occurs during the 'Save Bad Merlin ID from TO-USERCODES 01' routine, then the system must guarantee that the system saves the invalid merlin id from to-usercodes position 01 to ws-bad-merlin-id for error reporting.
EXCLUDING
A non-unrelease type email notification has been attempted via EMCSEND2 and the message type is not UNRLSE
When
The return status flag indicates EMI-TO-OR-COPY-NOT-FOUND
Then
The system saves the invalid Merlin ID from TO-USERCODES position 01 to WS-BAD-MERLIN-ID for error reporting
R-GCX126-cbl-01048 Build Reroute Message: Bad Merlin ID + INVALID MERLIN TO - REPORT REROUTE
Process Rules
Business View: Assuming the notification has been successfully resent to the default user om01247 with emi-no-errors status during the 'Build Reroute Message: Bad Merlin ID + INVALID MERLIN TO - REPORT REROUTE' routine, when the resend operation completes successfully, the system executes logic to ensure that the system clears the emi-subject, builds a new subject message containing the bad merlin id concatenated with ' invalid merlin to - report reroute', and sends this notification via emcsend2.
Given
The notification has been successfully resent to the default user OM01247 with EMI-NO-ERRORS status
When
The resend operation completes successfully
Then
The system clears the EMI-SUBJECT, builds a new subject message containing the bad Merlin ID concatenated with ' INVALID MERLIN TO - REPORT REROUTE', and sends this notification via EMCSEND2
R-GCX126-cbl-01049 Abort with Error Message: EMI - INVALID MERLIN TO OR COPY
Validation Rules
Business View: Assuming a notification resend has been attempted with the corrected default user om01247 during the 'Abort with Error Message: EMI - INVALID MERLIN TO OR COPY' routine, when the resend operation fails with a status other than emi-no-errors, the system executes logic to ensure that the system sets the error message to 'emi - invalid merlin to or copy' and aborts processing.
Given
A notification resend has been attempted with the corrected default user OM01247
When
The resend operation fails with a status other than EMI-NO-ERRORS
Then
The system sets the error message to 'EMI - INVALID MERLIN TO OR COPY' and aborts processing
R-GCX126-cbl-01050 Abort with Error Message: EMI - INVALID MERLIN FILENAME
Validation Rules
Business View: <EXCLUSION CRITERIA> If an email notification has been attempted via emcsend2, and the return status flag indicates emi-filename-invalid occurs during the 'Abort with Error Message: EMI - INVALID MERLIN FILENAME' routine, then the system must guarantee that the system sets the error message to 'emi - invalid merlin filename' and aborts processing.
EXCLUDING
An email notification has been attempted via EMCSEND2
When
The return status flag indicates EMI-FILENAME-INVALID
Then
The system sets the error message to 'EMI - INVALID MERLIN FILENAME' and aborts processing
R-GCX126-cbl-00437 Email Send Failed
Action Rules
Business View: <EXCLUSION CRITERIA> If an email send operation has failed with error status emi-to-or-copy-not-found, and the system detects the recipient not found error occurs during the 'Email Send Failed' routine, then the system must guarantee that the system saves the invalid recipient id, clears the to recipient field, sets the to recipient to om01247, sets the destination filename to in, resends the original email, and if successful, sends a reroute notification with subject containing the invalid merlin id and message 'invalid merlin to - report reroute'.
EXCLUDING
An email send operation has failed with error status EMI-TO-OR-COPY-NOT-FOUND
When
The system detects the recipient not found error
Then
The system saves the invalid recipient ID, clears the TO recipient field, sets the TO recipient to OM01247, sets the destination filename to IN, resends the original email, and if successful, sends a reroute notification with subject containing the invalid Merlin ID and message 'INVALID MERLIN TO - REPORT REROUTE'
R-GCX126-cbl-00438 Save Failed Recipient ID
Decision Rules
Business View: <EXCLUSION CRITERIA> If an email send has failed with emi-to-or-copy-not-found error status, and the system needs to identify the invalid recipient occurs during the 'Save Failed Recipient ID' routine, then the system must guarantee that if the message type is unrelease (88-z110-mrln-type-is-unrlse), save emi-to-usercodes(02) as the bad merlin id, otherwise save emi-to-usercodes(01) as the bad merlin id.
EXCLUDING
An email send has failed with EMI-TO-OR-COPY-NOT-FOUND error status
When
The system needs to identify the invalid recipient
Then
If the message type is unrelease (88-Z110-MRLN-TYPE-IS-UNRLSE), save EMI-TO-USERCODES(02) as the bad Merlin ID, otherwise save EMI-TO-USERCODES(01) as the bad Merlin ID
R-GCX126-cbl-00440 Call EMCSEND2 to Resend Email
Action Rules
Business View: Assuming email recipients have been reset with emi-to-usercodes(01) set to om01247 and emi-destination-filename set to in during the 'Call EMCSEND2 to Resend Email' routine, when the system calls the z116-resend-merlin procedure, the system executes logic to ensure that the system invokes emcsend2 program with all email parameters including from usercode, destination filename, to usercode, copy usercode, subject, keywords, report content, return status flag, segment numbers, and item type.
Given
Email recipients have been reset with EMI-TO-USERCODES(01) set to OM01247 and EMI-DESTINATION-FILENAME set to IN
When
The system calls the Z116-RESEND-MERLIN procedure
Then
The system invokes EMCSEND2 program with all email parameters including FROM usercode, destination filename, TO usercode, COPY usercode, subject, keywords, report content, return status flag, segment numbers, and item type
R-GCX126-cbl-00443 Send Reroute Notification Email
Action Rules
Business View: Assuming the reroute notification subject has been built with the invalid merlin id and reroute message during the 'Send Reroute Notification Email' routine, when the system calls the z116-resend-merlin procedure again, the system executes logic to ensure that the system invokes emcsend2 program with the reroute notification subject and all other email parameters to send the notification to om01247.
Given
The reroute notification subject has been built with the invalid Merlin ID and reroute message
When
The system calls the Z116-RESEND-MERLIN procedure again
Then
The system invokes EMCSEND2 program with the reroute notification subject and all other email parameters to send the notification to OM01247
R-GCX126-cbl-00446 Email Successfully Rerouted
Process Rules
Business View: Assuming an email has been successfully sent with emi-no-errors status during the 'Email Successfully Rerouted' routine, when the system completes the email send operation in z116-resend-merlin, the system executes logic to ensure that call cims program with purg function code and alt-pcb to remove the message from the queue.
Given
An email has been successfully sent with EMI-NO-ERRORS status
When
The system completes the email send operation in Z116-RESEND-MERLIN
Then
Call CIMS program with PURG function code and ALT-PCB to remove the message from the queue
R-GCX126-cbl-00447 Abend: Invalid FROM User
Validation Rules
Business View: Assuming the emcsend2 program has returned with emi-from-not-found status during the 'Abend: Invalid FROM User' routine, when the system evaluates the return status in z116-resend-merlin, the system executes logic to ensure that move 'emi - invalid merlin from' to cc-error-message and call cerr program to abend the transaction.
Given
The EMCSEND2 program has returned with EMI-FROM-NOT-FOUND status
When
The system evaluates the return status in Z116-RESEND-MERLIN
Then
Move 'EMI - INVALID MERLIN FROM' to CC-ERROR-MESSAGE and call CERR program to abend the transaction
R-GCX126-cbl-00448 Abend: Invalid TO/COPY User
Validation Rules
Business View: Assuming the emcsend2 program has returned with emi-to-or-copy-not-found status during the 'Abend: Invalid TO/COPY User' routine, when the system evaluates the return status in z116-resend-merlin, the system executes logic to ensure that move 'emi - invalid merlin to or copy' to cc-error-message and call cerr program to abend the transaction.
Given
The EMCSEND2 program has returned with EMI-TO-OR-COPY-NOT-FOUND status
When
The system evaluates the return status in Z116-RESEND-MERLIN
Then
Move 'EMI - INVALID MERLIN TO OR COPY' to CC-ERROR-MESSAGE and call CERR program to abend the transaction
R-GCX126-cbl-00449 Abend: Invalid Filename
Validation Rules
Business View: Assuming the emcsend2 program has returned with emi-filename-invalid status during the 'Abend: Invalid Filename' routine, when the system evaluates the return status in z116-resend-merlin, the system executes logic to ensure that move 'emi - invalid merlin filename' to cc-error-message and call cerr program to abend the transaction.
Given
The EMCSEND2 program has returned with EMI-FILENAME-INVALID status
When
The system evaluates the return status in Z116-RESEND-MERLIN
Then
Move 'EMI - INVALID MERLIN FILENAME' to CC-ERROR-MESSAGE and call CERR program to abend the transaction
R-GCX126-cbl-00450 Initialize Function Code to GU, Clear Key Values and Flags
Process Rules
Business View: Assuming a need to retrieve merlin contact information from the customs table during the 'Initialize Function Code to GU, Clear Key Values and Flags' routine, when the merlin contact fetch process is initiated, the system executes logic to ensure that the function code should be set to 'gu' (get unique), all key values (gcstbrt-key-value, gcstbdp-key-value) should be cleared to spaces, the return flag (gcctbio-return-flag) should be cleared to spaces, the mc segment (gcstbrt-mc-segment) should be cleared to spaces, and both second-pcb-flag and unqual-ssa-flag should be cleared to spaces.
Given
A need to retrieve Merlin contact information from the customs table
When
The Merlin contact fetch process is initiated
Then
The function code should be set to 'GU' (Get Unique), all key values (GCSTBRT-KEY-VALUE, GCSTBDP-KEY-VALUE) should be cleared to spaces, the return flag (GCCTBIO-RETURN-FLAG) should be cleared to spaces, the MC segment (GCSTBRT-MC-SEGMENT) should be cleared to spaces, and both SECOND-PCB-FLAG and UNQUAL-SSA-FLAG should be cleared to spaces
R-GCX126-cbl-00451 Set Table ID to MC Customs Table
Definitional Rules
Business View: Assuming the retrieval parameters have been initialized during the 'Set Table ID to MC Customs Table' routine, when preparing to fetch merlin contact information, the system executes logic to ensure that the table identifier (gcstbrt-key-table-id) should be set to 'mc-table-id' to identify the merlin contact segment in the customs table.
Given
The retrieval parameters have been initialized
When
Preparing to fetch Merlin contact information
Then
The table identifier (GCSTBRT-KEY-TABLE-ID) should be set to 'MC-TABLE-ID' to identify the Merlin contact segment in the customs table
R-GCX126-cbl-00452 Set Sequence ID to Manifest-To Station Name
Process Rules
Business View: Assuming the table identifier has been set to mc and a cargo record with manifest-to station name exists during the 'Set Sequence ID to Manifest-To Station Name' routine, when setting up the search criteria for merlin contact, the system executes logic to ensure that the sequence id (gcstbrt-key-seqid) should be set to the manifest-to station name (gccc-manif-to-station-name) from the cargo record.
Given
The table identifier has been set to MC and a cargo record with manifest-to station name exists
When
Setting up the search criteria for Merlin contact
Then
The sequence ID (GCSTBRT-KEY-SEQID) should be set to the manifest-to station name (GCCC-MANIF-TO-STATION-NAME) from the cargo record
R-GCX126-cbl-00453 Call GCCTBIO to Retrieve MC Segment
Action Rules
Business View: Assuming the function code is 'gu', table id is 'mc', and sequence id is set to manifest-to station name during the 'Call GCCTBIO to Retrieve MC Segment' routine, when the table i/o service is invoked, the system executes logic to ensure that the gcctbio program should be called with parameters: cccom, second-pcb-flag, unqual-ssa-flag, gcctbio-func-code, gcstbrt-lit, gcstbrt-key-value, gcstbdp-key-value, ws-table-segment, and gcctbio-return-flag to retrieve the mc segment.
Given
The function code is 'GU', table ID is 'MC', and sequence ID is set to manifest-to station name
When
The table I/O service is invoked
Then
The GCCTBIO program should be called with parameters: CCCOM, SECOND-PCB-FLAG, UNQUAL-SSA-FLAG, GCCTBIO-FUNC-CODE, GCSTBRT-LIT, GCSTBRT-KEY-VALUE, GCSTBDP-KEY-VALUE, WS-TABLE-SEGMENT, and GCCTBIO-RETURN-FLAG to retrieve the MC segment
R-GCX126-cbl-00454 Move Retrieved Segment to MC Segment Structure, Extract Merlin Email ID from MC Segment
Decision Rules
Business View: Assuming the gcctbio service has been called to retrieve the mc segment during the 'Move Retrieved Segment to MC Segment Structure, Extract Merlin Email ID from MC Segment' routine, when the return flag (gcctbio-return-flag) equals '0' indicating successful retrieval, the system executes logic to ensure that the retrieved segment (ws-table-segment) should be moved to the mc segment structure (gcstbrt-mc-segment), making the merlin email id (gcstbrt-mc-merlin-id) available for use in notification routing.
Given
The GCCTBIO service has been called to retrieve the MC segment
When
The return flag (GCCTBIO-RETURN-FLAG) equals '0' indicating successful retrieval
Then
The retrieved segment (WS-TABLE-SEGMENT) should be moved to the MC segment structure (GCSTBRT-MC-SEGMENT), making the Merlin email ID (GCSTBRT-MC-MERLIN-ID) available for use in notification routing
R-GCX126-cbl-00455 Clear MC Segment Set to Spaces
Decision Rules
Business View: <EXCLUSION CRITERIA> If the gcctbio service has been called to retrieve the mc segment, and the return flag (gcctbio-return-flag) does not equal '0' indicating retrieval failure occurs during the 'Clear MC Segment Set to Spaces' routine, then the system must guarantee that the mc segment structure (gcstbrt-mc-segment) should be cleared to spaces, indicating that no merlin email id is available for the manifest-to station.
EXCLUDING
The GCCTBIO service has been called to retrieve the MC segment
When
The return flag (GCCTBIO-RETURN-FLAG) does not equal '0' indicating retrieval failure
Then
The MC segment structure (GCSTBRT-MC-SEGMENT) should be cleared to spaces, indicating that no Merlin email ID is available for the manifest-to station
R-GCX126-cbl-00456 Prepare Log Information Structure
Process Rules
Business View: Assuming a request to log cargo information message is received during the 'Prepare Log Information Structure' routine, when the log information structure is being prepared, the system executes logic to ensure that the log input structure should be cleared to spaces, security byte should be set to high-value, sending transaction should be set to 'gct1261e', and acf2 user id should be populated from the common control area.
Given
A request to log cargo information message is received
When
The log information structure is being prepared
Then
The log input structure should be cleared to spaces, security byte should be set to HIGH-VALUE, sending transaction should be set to 'GCT1261E', and ACF2 user ID should be populated from the common control area
R-GCX126-cbl-00460 Set Action Code to LOG-USE-INPUT-MESSAGE
Definitional Rules
Business View: Assuming the cargo type has been identified as canadian cargo during the 'Set Action Code to LOG-USE-INPUT-MESSAGE' routine, when the action code is being assigned, the system executes logic to ensure that the action code should be set to log-use-input-message to indicate this is an input message log.
Given
The cargo type has been identified as Canadian cargo
When
The action code is being assigned
Then
The action code should be set to LOG-USE-INPUT-MESSAGE to indicate this is an input message log
R-GCX126-cbl-00461 Set Message Text
Process Rules
Business View: Assuming the action code has been set to log-use-input-message during the 'Set Message Text' routine, when the message text is being populated, the system executes logic to ensure that the information message content should be moved to the log message field.
Given
The action code has been set to LOG-USE-INPUT-MESSAGE
When
The message text is being populated
Then
The information message content should be moved to the log message field
R-GCX126-cbl-00462 Message Text Empty?
Validation Rules
Business View: Assuming the message text has been populated in the log structure during the 'Message Text Empty?' routine, when message text validation is performed, the system executes logic to ensure that if the message text is spaces or low-values, exit without creating a log entry; otherwise, proceed with log creation.
Given
The message text has been populated in the log structure
When
Message text validation is performed
Then
If the message text is spaces or low-values, exit without creating a log entry; otherwise, proceed with log creation
R-GCX126-cbl-00463 Replace Spaces with Zeroes in Date, Replace Spaces with '1' in Time
Validation Rules
Business View: <EXCLUSION CRITERIA> If the message text validation has passed and message is not empty, and date and time normalization is performed occurs during the 'Replace Spaces with Zeroes in Date, Replace Spaces with '1' in Time' routine, then the system must guarantee that all spaces in the date field should be replaced with zeroes, and all spaces in the time field should be replaced with '1'.
EXCLUDING
The message text validation has passed and message is not empty
When
Date and time normalization is performed
Then
All spaces in the date field should be replaced with zeroes, and all spaces in the time field should be replaced with '1'
R-GCX126-cbl-00464 Move Log Input to GCT1051E Message
Process Rules
Business View: Assuming date and time values have been normalized during the 'Move Log Input to GCT1051E Message' routine, when the log data is being transferred to the message structure, the system executes logic to ensure that the complete log input structure should be moved to the gct1051e message field.
Given
Date and time values have been normalized
When
The log data is being transferred to the message structure
Then
The complete log input structure should be moved to the GCT1051E message field
R-GCX126-cbl-00465 Change Alternate PCB Status
Action Rules
Business View: Assuming the log data has been transferred to the gct1051e message structure during the 'Change Alternate PCB Status' routine, when the alternate pcb status is being changed, the system executes logic to ensure that the cims program should be called with chng function for the alternate pcb using the gct1051e message.
Given
The log data has been transferred to the GCT1051E message structure
When
The alternate PCB status is being changed
Then
The CIMS program should be called with CHNG function for the alternate PCB using the GCT1051E message
R-GCX126-cbl-00466 Call WRITMSGL to Write Message
Action Rules
Business View: Assuming the alternate pcb status has been changed successfully during the 'Call WRITMSGL to Write Message' routine, when the message writing is invoked, the system executes logic to ensure that the writmsgl program should be called with the common control area, alternate pcb, message code, message text, message length, and module name parameters.
Given
The alternate PCB status has been changed successfully
When
The message writing is invoked
Then
The WRITMSGL program should be called with the common control area, alternate PCB, message code, message text, message length, and module name parameters
R-GCX126-cbl-00467 Purge Alternate PCB
Action Rules
Business View: Assuming the log message has been written using writmsgl during the 'Purge Alternate PCB' routine, when the alternate pcb is being purged, the system executes logic to ensure that the cims program should be called with purg function for the alternate pcb to complete the logging transaction.
Given
The log message has been written using WRITMSGL
When
The alternate PCB is being purged
Then
The CIMS program should be called with PURG function for the alternate PCB to complete the logging transaction
R-GCX126-cbl-00468 Update Cargo Record - Replace cargo record in database with updated information
Action Rules
Business View: Assuming a cargo record has been retrieved and modified with updated customs status, release information, or other edi 350 message data during the 'Update Cargo Record - Replace cargo record in database with updated information' routine, when the system needs to persist the changes to the cargo database, the system executes logic to ensure that the system clears the status code, sets the accept status to blank, and replaces the cargo record in the gcsccrt cargo database using the ims repl function.
Given
A cargo record has been retrieved and modified with updated customs status, release information, or other EDI 350 message data
When
The system needs to persist the changes to the cargo database
Then
The system clears the status code, sets the accept status to blank, and replaces the cargo record in the GCSCCRT cargo database using the IMS REPL function
R-GCX126-cbl-00471 Call IMS REPL Function
Action Rules
Business View: Assuming the status code is cleared, accept status is set to blank, and the cargo record contains all updated information during the 'Call IMS REPL Function' routine, when the system calls the ims cims program with the repl function, the system executes logic to ensure that the system passes the common communication area, repl function code, cargo pcb, and the cargo report segment to update the gcsccrt cargo database record.
Given
The status code is cleared, accept status is set to blank, and the cargo record contains all updated information
When
The system calls the IMS CIMS program with the REPL function
Then
The system passes the common communication area, REPL function code, cargo PCB, and the cargo report segment to update the GCSCCRT cargo database record
R-GCX126-cbl-00473 Initialize Search with >= Operator, Retrieve First US Cargo Record
Action Rules
Business View: Assuming search parameters are set with car id index, waybill index, and us ccn key initialized to low values during the 'Initialize Search with >= Operator, Retrieve First US Cargo Record' routine, when initiating the us cargo search using the car-waybill index with greater-than-or-equal-to operator, the system executes logic to ensure that the system retrieves the first us cargo record from gcsusrt table matching or exceeding the search criteria.
Given
Search parameters are set with car ID index, waybill index, and US CCN key initialized to low values
When
Initiating the US cargo search using the car-waybill index with greater-than-or-equal-to operator
Then
The system retrieves the first US cargo record from GCSUSRT table matching or exceeding the search criteria
R-GCX126-cbl-00477 Cargo Deleted or TR Created?
Validation Rules
Business View: Assuming a us cargo record has been retrieved with matching car id and waybill number during the 'Cargo Deleted or TR Created?' routine, when evaluating the cargo's deletion status indicator and the train-created-for-it flag, the system executes logic to ensure that if the cargo is marked as deleted or the train-created-for-it flag equals 'y', skip this record and continue searching; if both conditions are false, mark the us manifest as found.
Given
A US cargo record has been retrieved with matching car ID and waybill number
When
Evaluating the cargo's deletion status indicator and the train-created-for-it flag
Then
If the cargo is marked as deleted OR the train-created-for-it flag equals 'Y', skip this record and continue searching; if both conditions are false, mark the US manifest as found
R-GCX126-cbl-00478 Mark US Manifest Found
Process Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record has been retrieved with matching car id and waybill, and the cargo is not deleted and has no train record created, and all validation checks pass successfully occurs during the 'Mark US Manifest Found' routine, then the system must guarantee that the us manifest found flag is set to true and the search process completes successfully.
EXCLUDING
A US cargo record has been retrieved with matching car ID and waybill, and the cargo is not deleted and has no train record created
When
All validation checks pass successfully
Then
The US manifest found flag is set to true and the search process completes successfully
R-GCX126-cbl-00483 Cargo Deleted or TR Created? (from Get Next)
Validation Rules
Business View: Assuming a subsequent us cargo record has been retrieved with matching car id and waybill number during the 'Cargo Deleted or TR Created? (from Get Next)' routine, when evaluating the cargo's deletion status indicator and the train-created-for-it flag, the system executes logic to ensure that if the cargo is marked as deleted or the train-created-for-it flag equals 'y', continue the search loop; if both conditions are false, mark the us manifest as found.
Given
A subsequent US cargo record has been retrieved with matching car ID and waybill number
When
Evaluating the cargo's deletion status indicator and the train-created-for-it flag
Then
If the cargo is marked as deleted OR the train-created-for-it flag equals 'Y', continue the search loop; if both conditions are false, mark the US manifest as found
R-GCX126-cbl-00484 Mark US Manifest Found (from Get Next)
Process Rules
Business View: <EXCLUSION CRITERIA> If a subsequent us cargo record has been retrieved with matching car id and waybill, and the cargo is not deleted and has no train record created, and all validation checks pass successfully on the subsequent record occurs during the 'Mark US Manifest Found (from Get Next)' routine, then the system must guarantee that the us manifest found flag is set to true and the search process completes successfully.
EXCLUDING
A subsequent US cargo record has been retrieved with matching car ID and waybill, and the cargo is not deleted and has no train record created
When
All validation checks pass successfully on the subsequent record
Then
The US manifest found flag is set to true and the search process completes successfully
R-GCX126-cbl-00485 Continue Search?
Decision Rules
Business View: Assuming a us cargo record has been processed and either found valid or skipped during the 'Continue Search?' routine, when the us manifest found flag is false and the end-of-file flag is false, the system executes logic to ensure that continue the search loop to retrieve the next us cargo record; otherwise, exit the search process.
Given
A US cargo record has been processed and either found valid or skipped
When
The US manifest found flag is false AND the end-of-file flag is false
Then
Continue the search loop to retrieve the next US cargo record; otherwise, exit the search process
R-GCX126-cbl-00694 Cargo Deleted?
Validation Rules
Business View: Assuming the us cargo record matches both car id and waybill number criteria during the 'Cargo Deleted?' routine, when the system checks if the us cargo record has a deleted status indicator, the system executes logic to ensure that if the cargo is deleted, continue searching for next record without setting us manifest found flag; if not deleted, proceed to train creation check.
Given
The US cargo record matches both car ID and waybill number criteria
When
The system checks if the US cargo record has a deleted status indicator
Then
If the cargo is deleted, continue searching for next record without setting US manifest found flag; if not deleted, proceed to train creation check
R-GCX126-cbl-00695 TR Created for Cargo?
Validation Rules
Business View: <EXCLUSION CRITERIA> If the us cargo record is not deleted and matches car id and waybill criteria, and the system checks if the train created indicator equals 'y' occurs during the 'TR Created for Cargo?' routine, then the system must guarantee that if train record exists (indicator = 'y'), continue searching for next record without setting us manifest found flag; if no train record exists, set us manifest found flag.
EXCLUDING
The US cargo record is not deleted and matches car ID and waybill criteria
When
The system checks if the train created indicator equals 'Y'
Then
If train record exists (indicator = 'Y'), continue searching for next record without setting US manifest found flag; if no train record exists, set US manifest found flag
R-GCX126-cbl-00696 Set US Manifest Found
Decision Rules
Business View: <EXCLUSION CRITERIA> If the us cargo record matches car id and waybill, is not deleted, and has no existing train record, and all validation criteria are satisfied occurs during the 'Set US Manifest Found' routine, then the system must guarantee that set the us manifest found indicator to true to enable further processing of this us cargo record.
EXCLUDING
The US cargo record matches car ID and waybill, is not deleted, and has no existing train record
When
All validation criteria are satisfied
Then
Set the US manifest found indicator to true to enable further processing of this US cargo record
R-GCX126-cbl-00698 Continue Search
Process Rules
Business View: Assuming the us cargo record matches car id and waybill criteria during the 'Continue Search' routine, when the cargo is either marked as deleted or has a train record already created (indicator = 'y'), the system executes logic to ensure that continue to the next iteration of the search without setting the us manifest found flag.
Given
The US cargo record matches car ID and waybill criteria
When
The cargo is either marked as deleted or has a train record already created (indicator = 'Y')
Then
Continue to the next iteration of the search without setting the US manifest found flag
R-GCX126-cbl-00700 Call Get Next US Cargo by Car and Waybill Index
Action Rules
Business View: Assuming search parameters are configured with car id, waybill index, segment type gcsusrt, function get next, and index type car-waybill during the 'Call Get Next US Cargo by Car and Waybill Index' routine, when the us cargo retrieval function is invoked, the system executes logic to ensure that the system calls gccusio to retrieve the next us cargo record matching the car and waybill criteria.
Given
Search parameters are configured with car ID, waybill index, segment type GCSUSRT, function Get Next, and index type Car-Waybill
When
The US cargo retrieval function is invoked
Then
The system calls GCCUSIO to retrieve the next US cargo record matching the car and waybill criteria
R-GCX126-cbl-00704 Cargo Deleted OR TR Created?
Decision Rules
Business View: Assuming a us cargo record that matches the car id and waybill criteria during the 'Cargo Deleted OR TR Created?' routine, when checking the cargo's deletion status indicator or train creation flag, the system executes logic to ensure that if cargo is marked as deleted or train created flag equals 'y', skip this record and continue search; otherwise, mark as valid us manifest found.
Given
A US cargo record that matches the car ID and waybill criteria
When
Checking the cargo's deletion status indicator or train creation flag
Then
If cargo is marked as deleted OR train created flag equals 'Y', skip this record and continue search; otherwise, mark as valid US manifest found
R-GCX126-cbl-00705 Set US Manifest Found Flag
Process Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record that matches car id and waybill, is not deleted, and has no train created, and all validation checks pass successfully occurs during the 'Set US Manifest Found Flag' routine, then the system must guarantee that set the us manifest found flag to true to indicate a valid match has been located.
EXCLUDING
A US cargo record that matches car ID and waybill, is not deleted, and has no train created
When
All validation checks pass successfully
Then
Set the US manifest found flag to true to indicate a valid match has been located
R-GCX126-cbl-00931 Set Database Status Code to 'GEGB', Set Segment Type to GCSUSRT, Set Function to Get Next - GN, Set Index Type to Car-Waybill, Set Operator to Greater Than
Process Rules
Business View: Assuming a request to retrieve the next us cargo record by car and waybill index during the 'Set Database Status Code to 'GEGB', Set Segment Type to GCSUSRT, Set Function to Get Next - GN, Set Index Type to Car-Waybill, Set Operator to Greater Than' routine, when the system prepares the database call parameters, the system executes logic to ensure that the database status code is set to 'gegb', the segment type is set to gcsusrt, the function is set to get next (gn), the index type is set to car-waybill, and the operator is set to greater than ('>') for sequential retrieval.
Given
A request to retrieve the next US cargo record by car and waybill index
When
The system prepares the database call parameters
Then
The database status code is set to 'GEGB', the segment type is set to GCSUSRT, the function is set to Get Next (GN), the index type is set to Car-Waybill, and the operator is set to greater than ('>') for sequential retrieval
R-GCX126-cbl-00932 Call GCCUSIO to Retrieve Next US Cargo Record
Action Rules
Business View: Assuming database call parameters are configured with status code 'gegb', segment type gcsusrt, function get next, index type car-waybill, and operator greater than during the 'Call GCCUSIO to Retrieve Next US Cargo Record' routine, when the gccusio program is called with the configured parameters and us cargo segment, the system executes logic to ensure that the system retrieves the next us cargo record from the database and returns the database status code.
Given
Database call parameters are configured with status code 'GEGB', segment type GCSUSRT, function Get Next, index type Car-Waybill, and operator greater than
When
The GCCUSIO program is called with the configured parameters and US cargo segment
Then
The system retrieves the next US cargo record from the database and returns the database status code
R-GCX126-cbl-00935 Cargo Deleted or TR Created? - Yes - Skip Record
Decision Rules
Business View: Assuming a us cargo record has been retrieved that matches the current car id and waybill number during the 'Cargo Deleted or TR Created? - Yes - Skip Record' routine, when the cargo record has a deletion status indicator set or the train-created-for-it flag is set to 'y', the system executes logic to ensure that the system continues to the next record without setting the us manifest found flag.
Given
A US cargo record has been retrieved that matches the current car ID and waybill number
When
The cargo record has a deletion status indicator set or the train-created-for-it flag is set to 'Y'
Then
The system continues to the next record without setting the US manifest found flag
R-GCX126-cbl-00936 Cargo Deleted or TR Created? - No - Valid Cargo
Decision Rules
Business View: <EXCLUSION CRITERIA> If a us cargo record has been retrieved that matches the current car id and waybill number, and the cargo record does not have a deletion status indicator set and the train-created-for-it flag is not set to 'y' occurs during the 'Cargo Deleted or TR Created? - No - Valid Cargo' routine, then the system must guarantee that the us manifest found flag is set to true, indicating a valid us cargo record has been located.
EXCLUDING
A US cargo record has been retrieved that matches the current car ID and waybill number
When
The cargo record does not have a deletion status indicator set and the train-created-for-it flag is not set to 'Y'
Then
The US manifest found flag is set to true, indicating a valid US cargo record has been located
R-GCX126-cbl-00494 Verify Train Exists - Retrieve Canadian train information from database using train ID to verify train exists in system
Validation Rules
Business View: Assuming a conventional 350 edi message is being processed and the x4 segment contains entry type code '992' and the x4 segment contains a consist release number (crn) in the related document id field (positions 1-25) during the 'Verify Train Exists - Retrieve Canadian train information from database using train ID to verify train exists in system' routine, when the system attempts to retrieve the train record from the train database using the crn as the search key, the system executes logic to ensure that if the train record is found in the database (indicated by blank status code) then the train is confirmed to exist in the system and processing continues with logging arrival acknowledgment at border else if the train record is not found in the database (indicated by non-blank status code) then the system identifies the train as not existing and generates an unknown train notification message containing the crn with text 'unknown train entry in edi 350' and 'this crn was not found'.
Given
A Conventional 350 EDI message is being processed AND the X4 segment contains entry type code '992' AND the X4 segment contains a Consist Release Number (CRN) in the related document ID field (positions 1-25)
When
The system attempts to retrieve the train record from the train database using the CRN as the search key
Then
IF the train record is found in the database (indicated by blank status code) THEN the train is confirmed to exist in the system and processing continues with logging arrival acknowledgment at border ELSE IF the train record is not found in the database (indicated by non-blank status code) THEN the system identifies the train as not existing and generates an unknown train notification message containing the CRN with text 'UNKNOWN TRAIN ENTRY IN EDI 350' and 'THIS CRN WAS NOT FOUND'
R-GCX126-cbl-00495 Set Train ID as Search Key
Process Rules
Business View: Assuming the x4 segment has been parsed from the edi 350 message and the related document id field contains the consist release number in positions 1-25 during the 'Set Train ID as Search Key' routine, when the system prepares to query the train database, the system executes logic to ensure that the system sets the train database search key (b4-key-value) to the value from x4 related document id positions 1-25 and stores this value as the previous crn (ws-prev-crn) for duplicate checking.
Given
The X4 segment has been parsed from the EDI 350 message AND the related document ID field contains the Consist Release Number in positions 1-25
When
The system prepares to query the train database
Then
The system sets the train database search key (B4-KEY-VALUE) to the value from X4 related document ID positions 1-25 AND stores this value as the previous CRN (WS-PREV-CRN) for duplicate checking
R-GCX126-cbl-00496 Retrieve Train Record from Database
Action Rules
Business View: Assuming the train search key (b4-key-value) has been set to the consist release number from the x4 segment during the 'Retrieve Train Record from Database' routine, when the system executes the database retrieval operation, the system executes logic to ensure that the system performs a gu (get unique) function call to retrieve the train root segment (gcb4r-train-root-segment) from the train database (gcb4-pcb) using the qualified search key (b4rt-ssaq) and the database returns a status code indicating whether the record was found or not found.
Given
The train search key (B4-KEY-VALUE) has been set to the Consist Release Number from the X4 segment
When
The system executes the database retrieval operation
Then
The system performs a GU (Get Unique) function call to retrieve the train root segment (GCB4R-TRAIN-ROOT-SEGMENT) from the train database (GCB4-PCB) using the qualified search key (B4RT-SSAQ) AND the database returns a status code indicating whether the record was found or not found
R-GCX126-cbl-00498 Train Exists in System
Process Rules
Business View: Assuming the train record retrieval returned a blank status code indicating the train exists in the database during the 'Train Exists in System' routine, when the system confirms train existence, the system executes logic to ensure that the system prepares log information with current machine date (cc-machine-century and cc-machine-date-x concatenated into gcx105-date) and current machine time (cc-machine-time-x into gcx105-time) and action code 'zzz' (into gcx105-action-code) and the consist release number from x4 positions 1-25 (into gcx105-train-or-us-ccn) and sets the cargo type indicator to canadian train (gcx105-ca-train) and sets the message text to '350 ack - arrival ack at border' (into gcx105-message) and spawns the gct1051e log entry process.
Given
The train record retrieval returned a blank status code indicating the train exists in the database
When
The system confirms train existence
Then
The system prepares log information with current machine date (CC-MACHINE-CENTURY and CC-MACHINE-DATE-X concatenated into GCX105-DATE) AND current machine time (CC-MACHINE-TIME-X into GCX105-TIME) AND action code 'ZZZ' (into GCX105-ACTION-CODE) AND the Consist Release Number from X4 positions 1-25 (into GCX105-TRAIN-OR-US-CCN) AND sets the cargo type indicator to Canadian train (GCX105-CA-TRAIN) AND sets the message text to '350 ACK - ARRIVAL ACK AT BORDER' (into GCX105-MESSAGE) AND spawns the GCT1051E log entry process
R-GCX126-cbl-00499 Train Not Found
Process Rules
Business View: <EXCLUSION CRITERIA> If the train record retrieval returned a non-blank status code indicating the train does not exist in the database, and the system confirms train non-existence occurs during the 'Train Not Found' routine, then the system must guarantee that the system clears the first detail line (mrln-dtl-line 01 to spaces) and constructs an error message by concatenating 'unknown train entry in edi 350 ' with the consist release number from x4 positions 1-25 into the first detail line and sets the third detail line to 'this crn was not found.' and sets the report line counter (mrln-line) to 4 and sets the message type indicator to unknown (88-z110-mrln-type-is-unknown) and invokes the email send preparation process (z110-prep-emcsend).
EXCLUDING
The train record retrieval returned a non-blank status code indicating the train does not exist in the database
When
The system confirms train non-existence
Then
The system clears the first detail line (MRLN-DTL-LINE 01 to spaces) AND constructs an error message by concatenating 'UNKNOWN TRAIN ENTRY IN EDI 350 ' with the Consist Release Number from X4 positions 1-25 into the first detail line AND sets the third detail line to 'THIS CRN WAS NOT FOUND.' AND sets the report line counter (MRLN-LINE) to 4 AND sets the message type indicator to unknown (88-Z110-MRLN-TYPE-IS-UNKNOWN) AND invokes the email send preparation process (Z110-PREP-EMCSEND)
← Return to Categories