🚀 Synthesized 3 highly-detailed Agile User Stories covering 3 EDI-active COBOL programs in GCCE358.
🔍

Module: GCCE358 1 Consolidated Epic Story

Epic: GCCE358 Complete EDI Specification Extracted from Legacy
Contains 88 distinct extracted legacy rules
EDI Epic Specification
As an EDI Gateway Service,
I want to orchestrate and execute all GCCE358 EDI data mapping and validation logic,
So that I can ensure strict compliance with US Customs (P140) automated payload constraints in a single consolidated service.
Prerequisites & Setup
  • [Initialize Root Segment Structure]
    The root segment creation process begins → The A9RT transmission segment structure is initialized to empty values
  • [Initialize Root Segment with Transmission Number and Transaction Set '358']
    The system initializes the root segment → The transmission number is set from machine time, transaction set is set to '358', and the root segment is prepared for insertion
  • [Initialize M10 Segment Structure]
    M10 manifest processing begins → The M10 segment structure is initialized to clear any previous data
  • [Initialize P4 Segment Structure]
    P4 segment processing begins → The P4 segment structure is initialized and the identifier is set to 'P4'
  • [Initialize VID Segment Structure]
    The system starts processing equipment data → The VID segment structure is initialized and the identifier is set to 'VID'
  • [Initialize MBL Segment]
    The system begins MBL processing for the equipment → A new MBL segment structure is initialized and the MBL identifier is set to 'MBL'
  • [Initialize MBL Segment Structure]
    The system begins MBL segment creation → The MBL segment structure is initialized to clear any previous data
  • [Initialize Security Parameters]
    Security parameters are being configured → The system sets the security byte to HIGH-VALUES for secure transmission
  • [Initialize Message as Empty]
    No specific message content is required → The system initializes the message field to spaces
Core Acceptance Criteria
  • [2:Generate Transmission Number]
    Generating transmission number → Use prefix 106 for FOREGROUND mode or prefix 110 for BACKGROUND mode, combined with machine time
  • [10:Create VID Equipment Segment]
    Creating VID equipment segment → Populate VID segment with equipment type, initial, processed equipment number, and determined load status
  • [11:Process Bill of Lading Records]
    Processing bill of lading records → Extract SCAC and BOL/Waybill information from equipment data for MBL segment creation
  • [14:Create MBL Bill Segment]
    Creating MBL bill segment → Populate MBL segment with SCAC, BOL/Waybill number, and determined response code
  • [15:Start EDI Send Function]
    Starting EDI send function → Invoke EDI send function with transmission number and high-values security setting
  • [16:Start Log Update Function]
    Starting log update function → If FOREGROUND mode use foreground action code and transaction name, if BACKGROUND mode use background action code and transaction name, include user ID, current date and time
  • [Check Processing Mode]
    The system checks the processing mode indicator → If the mode is foreground, set transmission prefix to 106, otherwise if the mode is background, set transmission prefix to 110
  • [Get Current Machine Time]
    The system needs to create a transmission number → Retrieve the current machine time and use it as the base transmission number
  • [Combine Prefix + Machine Time to Create Transmission Number]
    The system creates the transmission number → Combine the prefix with the machine time to form the complete transmission number
  • [Set Transmission Number from Generated Value]
    Creating the EDI root segment → The transmission number is assigned to the A9RT transmission number field
  • [Set Transaction Set to '358']
    Setting the transaction set identifier → The transaction set code is set to '358'
  • [Attempt to Insert Root Segment into EDI Database]
    Inserting the segment into the EDI database → The system attempts to insert the A9RT segment using database insert operation
  • [Increment Transmission Number by 1]
    Resolving the transmission number collision → The transmission number is incremented by 1 and assigned to the root segment
  • [Root Segment Successfully Created]
    Attempting to insert the root segment again → The system continues the insertion retry loop until the status code is blank indicating success
  • [Attempt to Insert Root Segment into EDI Database]
    The system attempts to insert the root segment into the EDI database → The insertion is attempted and the result status is captured for evaluation
  • [Insert Successful?]
    The insertion fails due to duplicate transmission number → The system detects the failure and initiates the duplicate resolution process
  • [Increment Transmission Number by 1]
    The system needs to resolve the conflict → The transmission number is incremented by 1 and the insertion process is retried
  • [Set M10 Identifier]
    The segment identifier needs to be set → The identifier is set to 'M10'
  • [Set SCAC Code to 'CPRS']
    The SCAC code needs to be assigned → The SCAC code is set to 'CPRS' for Canadian Pacific Railway
  • [Set Transport Type Code to 'R' for Rail]
    The transport type code needs to be assigned → The transport type code is set to 'R' to indicate rail transport
  • [Set Country Code to 'CA' for Canada]
    The country code needs to be assigned → The country code is set to 'CA' for Canada
  • [Set Vessel Name from Train ID]
    The vessel name needs to be assigned → The vessel name is set to the customer train ID from the train list
  • [Set Voyage Number from Train Creation Date]
    The voyage number needs to be assigned → The voyage number is set to the train creation date from the train list
  • [Set Quantity from Bill of Lading Count]
    The quantity needs to be assigned → The quantity is set to the total count of bills of lading
  • [Set Manifest Type Code to 'S' for Standard]
    The manifest type code needs to be assigned → The manifest type code is set to 'S' for standard manifest
  • [Set Conditional Response Code to 'Y']
    The conditional response code needs to be assigned → The conditional response code is set to 'Y' to indicate response is required
  • [Set Record Type to 'TRAIN']
    The record type needs to be assigned → The record type is set to 'TRAIN'
  • [Set Record Number from Train ID]
    The record number needs to be assigned → The record number is set to the customer train ID from the train list
  • [Insert M10 Segment into EDI Database]
    The segment needs to be stored for EDI transmission → The M10 segment is inserted into the EDI database with proper sequence numbering
  • [Set Departure Location ID from Train Data]
    P4 segment is being populated with location details → The departure location ID is set from the train's origin service center
  • [Extract Estimated Departure Date]
    P4 segment requires departure date information → The estimated departure date is extracted and moved to temporary date field for processing
  • [Set Quantity from Bill of Lading Count]
    P4 segment quantity field needs to be populated → The quantity is set to the bill of lading count value
  • [Set Estimated Time of Arrival]
    P4 segment time field needs to be populated → The time field is set from the train's estimated time of arrival
  • [Set FIRMS Code from Train Data]
    P4 segment ID code field needs to be populated → The ID code field is set from the train's FIRMS code
  • [Insert P4 Segment into EDI Database]
    P4 segment is ready for EDI transmission → The P4 segment is inserted into the EDI transmission database with proper sequence numbering
  • [Equipment ID Different from Last Processed?]
    The system compares the current equipment ID with the last processed equipment ID → If the equipment IDs are different, the system should proceed to create a new VID segment, otherwise skip VID creation for this equipment
  • [Set Equipment Description Code]
    The equipment description code needs to be populated → The system should copy the equipment type from the train list equipment data to the VID equipment description code field
  • [Set Equipment Initial]
    The equipment initial needs to be populated → The system should copy the equipment initial from the train list equipment data to the VID equipment initial field
  • [Is Equipment CP or Has No Car Number?]
    The system needs to determine the equipment number for the VID segment → If the US-CCN-KEY starts with 'CPRS' OR the cargo car number is spaces, then use the train list equipment number, otherwise use the cargo database car number
  • [Insert VID Segment to EDI Data]
    The segment needs to be added to the EDI transmission → The system should insert the VID segment into the transmission data with an incremented sequence number
  • [Status Code = 'H'?]
    The equipment load/empty status code is 'H' (Hold) → The status code should be converted to 'E' (Empty) for the EDI transmission
  • [Set Database Access Parameters]
    The system prepares to access the cargo database → The system sets segment type to GCSUSRT, function type to GU (Get Unique), and index usage to not used
  • [Set Equipment Description Code from Train List]
    The system processes VID segment creation → The equipment description code is set from the train list VID01 equipment type field
  • [Set Equipment Initial from Train List]
    The system processes VID segment creation → The equipment initial is set from the train list VID02 equipment initial field
  • [Is Equipment CP-owned or No Foreign Car Number?]
    The system needs to determine the equipment number source → If the US-CCN-KEY starts with 'CPRS' OR the 350-CAR-NUMBER is spaces, use equipment number from train list, otherwise use the foreign car number from cargo database
  • [Use Equipment Number from Train List]
    The system sets the equipment number in VID segment → The equipment number is set from the train list VID03 equipment number field
  • [Use Foreign Car Number from Cargo Database]
    The system sets the equipment number in VID segment → The equipment number is set from the cargo database 350-CAR-NUMBER field
  • [Insert VID Segment into EDI Data]
    The system completes VID segment creation → The VID segment is moved to transmission data and inserted into the EDI data structure
  • [Extract Carrier SCAC Code from Equipment]
    Processing MBL segment creation → The carrier SCAC code is extracted from the equipment's MBL01-M1309-US-CCN-SCAC field and assigned to MBL-01-SCAC
  • [Extract Bill of Lading Number from Equipment]
    Processing MBL segment creation → The bill of lading number is extracted from the equipment's MBL02-M1304-US-CCN-ID field and assigned to MBL-02-BOL-WAYBILL
  • [Insert MBL Segment into EDI Data]
    All MBL processing is complete → The MBL segment is moved to the transmission data structure and inserted into the EDI data stream
  • [Retrieve SS Segment Data]
    The system processes the lookup result → The SS segment data should be moved from the table buffer to the working storage area
  • [Automated Carrier Flag = 'Y'?]
    The system checks the automated carrier flag → If the automated carrier flag equals 'Y', the carrier supports automation; otherwise, it does not
  • [Clear SS Segment Data]
    The system handles the lookup failure → The SS segment data area should be cleared to spaces to indicate no data available
  • [Set MBL Identifier to 'MBL']
    The segment identifier needs to be set → The identifier is set to 'MBL' to indicate this is a Master Bill of Lading segment
  • [Extract SCAC Code from Equipment Record]
    The SCAC code is needed for the MBL segment → The SCAC code is extracted from the equipment record's CCN SCAC field
  • [Extract Bill of Lading Number from Equipment Record]
    The bill of lading number is needed for the MBL segment → The bill of lading number is extracted from the equipment record's CCN ID field
  • [Is SCAC Code 'CPRS'?]
    The SCAC code equals 'CPRS' → The response code is set to 'Y' indicating automated processing for CP Rail
  • [Look up SCAC in SS Table for Port]
    The SCAC code is not 'CPRS' → The system performs a table lookup using table ID 'SS', the SCAC code, and the origin port to determine carrier automation status
  • [Is Equipment Empty with Bill Type 23?]
    The equipment load/empty status is 'E' AND the CCN key is not spaces AND the bill type code is 23 → The response code is overridden to 'Y' for special ER processing requirements
  • [Insert MBL Segment into EDI Data]
    The segment is ready for transmission → The MBL segment is inserted into the EDI transmission data structure
  • [Set EDI Send Function Name]
    The EDI send process is started → The system sets the EDI send function name flag to true to identify the correct processing function
  • [Set Security Authorization]
    Security authorization is being configured → The system sets the security byte to high-values to enforce maximum security protection
  • [Add Transmission Number to Message]
    The EDI message is being prepared → The system adds the transmission number to the message structure for identification
  • [Prepare EDI Message for Transmission]
    The message preparation process is executed → The system moves the complete input structure to the message output text for transmission
  • [Send Message to EDI Queue]
    The message is being sent to the EDI queue → The system sets the EDI send function length flag to ensure proper message sizing
  • [Send Message to EDI Queue]
    The message insertion process is initiated → The system performs the insert purge message operation to queue the message for transmission
  • [Set Log Update Function Name]
    The log update process is initiated → The system sets the function name to LOG-UPDT-FUNC-NAME to identify the logging service
  • [Set Train ID from Train List]
    Train identification is required for the log → The system sets the train identifier using the US customer train ID from the train list
  • [Processing Mode?]
    The processing mode is background → The system uses the background action code
  • [Set Foreground Action Code and Transaction Name / Set Background Action Code and Transaction Name]
    The processing mode is background → The system uses the background transaction name
  • [Set User ID from System]
    User identification is required for audit purposes → The system captures and records the ACF2 user ID from the system
  • [Set Current Date from System]
    The current date needs to be recorded → The system concatenates the machine century and machine date to create a complete date stamp
  • [Set Current Time from System]
    The current time needs to be recorded → The system records the machine time from the system
Structural Validations
  • [1:Validate Processing Mode]
    The processing mode is checked → Processing continues only if mode is FOREGROUND or BACKGROUND, otherwise sets wrong mode indicator
  • [3:Insert EDI Root Segment]
    Attempting to insert EDI root segment → If transmission number already exists, increment by 1 and retry until unique number is found
  • [Transmission Number Generated]
    The system attempts to create a transmission record → If the transmission number already exists, increment the number by 1 and retry until a unique number is found
  • [Insert Successful?]
    The database insert operation completes → If the status code is not blank, the insertion failed due to duplicate transmission number
  • [Root Segment Successfully Inserted]
    The insertion is successful without conflicts → The root segment is successfully stored in the EDI database and the process continues