Canadian National Railway (CN Rail)
/
Rail Carrier Waybill Interchange (8030)
  • Specification
  • EDI Inspector
Import guide into your account
Stedi maintains this guide based on public documentation from Canadian National Railway (CN Rail). Contact Canadian National Railway (CN Rail) for official EDI specifications. To report any errors in this guide, please contact us.
Go to Stedi Network
Canadian National Railway (CN Rail) logo

X12 417 Rail Carrier Waybill Interchange (8030)

X12 Release 8030

This X12 Transaction Set contains the format and establishes the data contents of the Rail Carrier Waybill Interchange Transaction Set (417) for use within the context of an Electronic Data Interchange (EDI) environment. The transaction set can be used to provide the rail carrier with detailed movement instructions pertinent to a rail carrier shipment and is used by all Class I rail carriers in the United States and Canada.

Delimiters
  • ~ Segment
  • * Element
  • > Component
  • ^ Repetition
EDI sample
  • sample 1
View the latest version of this implementation guide as an interactive webpage
https://www.stedi.com/app/guides/view/canadian-national-railway/rail-carrier-waybill-interchange-8030/01HP24RCTKSG6M1RVXWNWPN5D1
Powered by
Build EDI implementation guides at stedi.com
Overview
ISA
-
Interchange Control Header
Max use 1
Required
GS
-
Functional Group Header
Max use 1
Required
heading
ST
0100
Transaction Set Header
Max use 1
Required
ZC1
0200
Beginning Segment for Data Correction or Change
Max use 1
Optional
BX
0300
General Shipment Information
Max use 1
Optional
BNX
0400
Rail Shipment Information
Max use 1
Optional
N9
0500
Extended Reference Information
Max use 30
Optional
DTM
0700
Date/Time Reference
Max use 5
Optional
N7 Loop
N8
1800
Waybill Reference
Max use 499
Required
F9
2000
Origin Station
Max use 1
Required
D9
2100
Destination Station
Max use 1
Required
R2
4700
Route Information
Max use 13
Required
LX Loop
LX
5400
Transaction Set Line Number
Max use 1
Required
L5
5500
Description, Marks and Numbers
Max use 15
Required
L0 Loop
SE
8100
Transaction Set Trailer
Max use 1
Required
GE
-
Functional Group Trailer
Max use 1
Required
IEA
-
Interchange Control Trailer
Max use 1
Required
ISA

Interchange Control Header

RequiredMax use 1

To start and identify an interchange of zero or more functional groups and interchange-related control segments

Example
ISA-01
I01
Authorization Information Qualifier
Required
Identifier (ID)

Code identifying the type of information in the Authorization Information

00
No Authorization Information Present (No Meaningful Information in I02)
ISA-02
I02
Authorization Information
Required
String (AN)
Min 10Max 10

Information used for additional identification or authorization of the interchange sender or the data in the interchange; the type of information is set by the Authorization Information Qualifier (I01)

ISA-03
I03
Security Information Qualifier
Required
Identifier (ID)

Code identifying the type of information in the Security Information

00
No Security Information Present (No Meaningful Information in I04)
ISA-04
I04
Security Information
Required
String (AN)
Min 10Max 10

This is used for identifying the security information about the interchange sender or the data in the interchange; the type of information is set by the Security Information Qualifier (I03)

ISA-05
I05
Interchange ID Qualifier
Required
Identifier (ID)
Min 2Max 2

Code indicating the system/method of code structure used to designate the sender or receiver ID element being qualified

Codes
ISA-06
I06
Interchange Sender ID
Required
String (AN)
Min 15Max 15

Identification code published by the sender for other parties to use as the receiver ID to route data to them; the sender always codes this value in the sender ID element

ISA-07
I05
Interchange ID Qualifier
Required
Identifier (ID)
Min 2Max 2

Code indicating the system/method of code structure used to designate the sender or receiver ID element being qualified

Codes
ISA-08
I07
Interchange Receiver ID
Required
String (AN)
Min 15Max 15

Identification code published by the receiver of the data; When sending, it is used by the sender as their sending ID, thus other parties sending to them will use this as a receiving ID to route data to them

ISA-09
I08
Interchange Date
Required
Date (DT)
YYMMDD format

Date of the interchange

ISA-10
I09
Interchange Time
Required
Time (TM)
HHMM format

Time of the interchange

ISA-11
I65
Repetition Separator
Required
String (AN)
Min 1Max 1

Type is not applicable; the repetition separator is a delimiter and not a data element; this field provides the delimiter used to separate repeated occurrences of a simple data element or a composite data structure; this value must be different than the data element separator, component element separator, and the segment terminator

^
Repetition Separator
ISA-12
I11
Interchange Control Version Number Code
Required
Identifier (ID)

Code specifying the version number of the interchange control segments, the version of the data elements within the control segments, and the code values within those data elements.

00803
00803 Standards Approved for Publication by ASC X12 Procedures Review Board through December 2021
ISA-13
I12
Interchange Control Number
Required
Numeric (N0)
Min 9Max 9

A control number assigned by the interchange sender

ISA-14
I13
Acknowledgment Requested Code
Required
Identifier (ID)
Min 1Max 1

Code indicating sender's request for an interchange acknowledgment

0
No Interchange Acknowledgment Requested
1
Interchange Acknowledgment Requested (TA1)
2
Interchange Acknowledgment Requested only when Interchange is "Rejected Because Of Errors"
3
Interchange Acknowledgment Requested only when Interchange is "Rejected Because Of Errors" or "Accepted but Errors are Noted"
ISA-15
I14
Interchange Usage Indicator Code
Required
Identifier (ID)
Min 1Max 1

Code indicating whether data enclosed by this interchange envelope is test, production or information

I
Information
P
Production Data
T
Test Data
ISA-16
I15
Component Data Element Separator
Required
String (AN)
Min 1Max 1

Type is not applicable; the component data element separator is a delimiter and not a data element; this field provides the delimiter used to separate component data elements within a composite data structure; this value must be different than the data element separator and the segment terminator

>
Component Element Separator

Functional Group Header

RequiredMax use 1

To indicate the beginning of a functional group and to provide control information

Example
GS-01
479
Functional Identifier Code
Required
Identifier (ID)

Code identifying a group of application related transaction sets

WB
Rail Carrier Waybill Interchange (417)
GS-02
142
Application Sender's Code
Required
String (AN)
Min 2Max 15

Code identifying party sending transmission; codes agreed to by trading partners

GS-03
124
Application Receiver's Code
Required
String (AN)
Min 2Max 15

Code identifying party receiving transmission; codes agreed to by trading partners

GS-04
373
Date
Required
Date (DT)
CCYYMMDD format

Date expressed as CCYYMMDD where CC represents the first two digits of the calendar year

GS-05
337
Time
Required
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format

Time expressed in 24-hour clock time as follows: HHMM, or HHMMSS, or HHMMSSD, or HHMMSSDD, where H = hours (00-23), M = minutes (00-59), S = integer seconds (00-59) and DD = decimal seconds; decimal seconds are expressed as follows: D = tenths (0-9) and DD = hundredths (00-99)

GS-06
28
Group Control Number
Required
Numeric (N0)
Min 1Max 9

Assigned number originated and maintained by the sender

GS-07
455
Responsible Agency Code
Required
Identifier (ID)
Min 1Max 2

Code identifying the issuer of the standard; this code is used in conjunction with Data Element 480

T
Transportation Data Coordinating Committee (TDCC)
X
Accredited Standards Committee X12
GS-08
480
Version / Release / Industry Identifier Code
Required
String (AN)

Code indicating the version, release, subrelease, and industry identifier of the EDI standard being used, including the GS and GE segments; if code in DE455 in GS segment is X, then in DE 480 positions 1-3 are the version number; positions 4-6 are the release and subrelease, level of the version; and positions 7-12 are the industry or trade association identifiers (optionally assigned by user); if code in DE455 in GS segment is T, then other formats are allowed

008030
008030 Standards Approved for Publication by ASC X12 Procedures Review Board through December 2021

Heading

ST
0100
Heading > ST

Transaction Set Header

RequiredMax use 1

To indicate the start of a transaction set and to assign a control number

Example
ST-01
143
Transaction Set Identifier Code
Required
Identifier (ID)

Code identifying a Transaction Set

  • The transaction set identifier (ST01) is used by the translation routines of the interchange partners to select the appropriate transaction set definition (e.g., 810 selects the Invoice Transaction Set).
417
Rail Carrier Waybill Interchange
ST-02
329
Transaction Set Control Number
Required
Numeric (N)
Min 4Max 9

Identifying control number that must be unique within the transaction set functional group assigned by the originator for a transaction set

ZC1
0200
Heading > ZC1

Beginning Segment for Data Correction or Change

OptionalMax use 1

To transmit identifying numbers, dates, and other basic data relating to the transaction set

Usage notes

Example: ZC11257CN12345611111120230710COCNR

Example
ZC1-01
145
Shipment Identification Number
Optional
String (AN)
Min 1Max 30

Identification number assigned to the shipment by the shipper that uniquely identifies the shipment from origin to ultimate destination and is not subject to modification; (Does not contain blanks or special characters)

ZC1-02
206
Equipment Initial
Optional
String (AN)
Min 1Max 4

Prefix or alphabetic part of an equipment unit's identifying number

  • For any rail shipment, ZC102 is required.
Usage notes

Must be identical to the previous shipping instructions.

ZC1-03
207
Equipment Number
Required
String (AN)
Min 1Max 15

Sequencing or serial part of an equipment unit's identifying number (pure numeric form for equipment number is preferred)

Usage notes

Must be identical to the previous shipping instructions.

ZC1-04
244
Transaction Reference Number
Required
String (AN)
Min 1Max 50

Sender's assigned number for referenced transaction set

Usage notes

Waybill number.

ZC1-05
243
Transaction Reference Date
Required
Date (DT)
CCYYMMDD format

Date of referenced transaction set expressed in format CCYYMMDD where CC represents the first two digits of the calendar year

ZC1-06
202
Correction Indicator Code
Required
Identifier (ID)

Code indicating that the transaction set contains information which corrects previous information

CA
Cancelled Bill
CO
Correction
D1
Diversion or Reconsignment
ZC1-07
140
Standard Carrier Alpha Code
Required
Identifier (ID)
Min 2Max 4

Code identifying the Standard Carrier Alpha Code

Usage notes

SCAC of origin roadhaul carrier.

ZC1-08
91
Transportation Method/Type Code
Required
Identifier (ID)

Code specifying the method or type of transportation for the shipment

  • If ZC108 is "R" (Rail), then ZC102 is required.
R
Rail
X
Intermodal (Piggyback)
BX
0300
Heading > BX

General Shipment Information

OptionalMax use 1

To transmit identification numbers and other basic shipment data

  • BX05 contains the Standard Carrier Alpha Code (SCAC) of the original roadhaul carrier receiving the shipment.
Usage notes

Example: BX00RPP1257CNLBN****N

Example
BX-01
353
Transaction Set Purpose Code
Required
Identifier (ID)

Code identifying purpose of transaction set

00
Original
BX-02
91
Transportation Method/Type Code
Required
Identifier (ID)

Code specifying the method or type of transportation for the shipment

R
Rail
BX-03
146
Shipment Method of Payment Code
Required
Identifier (ID)

Code identifying payment terms for transportation charges

CC
Collect
PP
Prepaid (by Seller)
BX-04
145
Shipment Identification Number
Optional
String (AN)
Min 1Max 30

Identification number assigned to the shipment by the shipper that uniquely identifies the shipment from origin to ultimate destination and is not subject to modification; (Does not contain blanks or special characters)

BX-05
140
Standard Carrier Alpha Code
Optional
Identifier (ID)

Code identifying the Standard Carrier Alpha Code

CN
CN Rail
BX-06
188
Weight Unit Code
Optional
Identifier (ID)

Code specifying the weight unit

K
Kilograms
L
Pounds
BX-07
147
Shipment Qualifier
Optional
Identifier (ID)

Code specifying relationship of this shipment with respect to other shipments given to the carrier at the same time

B
Bill of Lading for Individual Shipment
BX-08
226
Section Seven Code
Optional
Identifier (ID)

Code indicating applicability of section seven option (if not transmitted assume not in effect)

N
Not in Effect
S
In Effect
BX-12
199
Confidential Billing Request Code
Optional
Identifier (ID)

Code indicating that the the shipper requests that the carrier inhibit origin identification information from the invoice transaction sets and/or rate and charges from waybill documents and transaction sets when shipment moves under confidential contract rates

N
Not Applicable
BNX
0400
Heading > BNX

Rail Shipment Information

OptionalMax use 1

To transmit rail-specific shipment data

Usage notes

Example: BNX*R**S

Example
BNX-01
460
Shipment Weight Code
Optional
Identifier (ID)

Code indicating the way by which weights are obtained for a particular shipment

A
Shipper's Weight Agreement
N
No Wt. Req., Ship. Moving on Contract or per car rate
R
Carrier Scale Weight
BNX-03
11
Billing Code
Optional
Identifier (ID)

Code indicating type of Bill

S
Single Shipment Billing
N9
0500
Heading > N9

Extended Reference Information

OptionalMax use 30

To transmit identifying information as specified by the Reference Identification Qualifier

Usage notes

At least one N9 containing a Bill of Lading number must be included. This number will be included on all other documents such as Freight Invoice and Remittance/Payment.

Example: N9BM1257*202307101336*ET

Example
If Time Code (N9-06) is present, then Time (N9-05) is required
N9-01
128
Reference Identification Qualifier
Required
Identifier (ID)

Code identifying the Reference Identification

BM
Bill of Lading Number
N9-02
127
Reference Identification
Required
String (AN)
Min 1Max 15

Reference information as defined for a particular Transaction Set or as specified by the Reference Identification Qualifier

N9-04
373
Date
Optional
Date (DT)
CCYYMMDD format

Date expressed as CCYYMMDD where CC represents the first two digits of the calendar year

N9-05
337
Time
Optional
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format

Time expressed in 24-hour clock time as follows: HHMM, or HHMMSS, or HHMMSSD, or HHMMSSDD, where H = hours (00-23), M = minutes (00-59), S = integer seconds (00-59) and DD = decimal seconds; decimal seconds are expressed as follows: D = tenths (0-9) and DD = hundredths (00-99)

N9-06
623
Time Code
Optional
Identifier (ID)

Code identifying the time. In accordance with International Standards Organization standard 8601, time can be specified by a + or - and an indication in hours in relation to Universal Time Coordinate (UTC) time; since + is a restricted character, + and - are substituted by P and M in the codes that follow

  • N906 reflects the time zone which the time reflects.
AT
Atlantic Time
CT
Central Time
ET
Eastern Time
MT
Mountain Time
PT
Pacific Time
DTM
0700
Heading > DTM

Date/Time Reference

OptionalMax use 5

To specify pertinent dates and times

Usage notes

Example: DTM168202307101336ET

Example
If Time Code (DTM-04) is present, then Time (DTM-03) is required
DTM-01
374
Date/Time Qualifier
Required
Identifier (ID)

Code specifying type of date or time, or both date and time

168
Release
DTM-02
373
Date
Required
Date (DT)
CCYYMMDD format

Date expressed as CCYYMMDD where CC represents the first two digits of the calendar year

DTM-03
337
Time
Optional
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format

Time expressed in 24-hour clock time as follows: HHMM, or HHMMSS, or HHMMSSD, or HHMMSSDD, where H = hours (00-23), M = minutes (00-59), S = integer seconds (00-59) and DD = decimal seconds; decimal seconds are expressed as follows: D = tenths (0-9) and DD = hundredths (00-99)

DTM-04
623
Time Code
Optional
Identifier (ID)

Code identifying the time. In accordance with International Standards Organization standard 8601, time can be specified by a + or - and an indication in hours in relation to Universal Time Coordinate (UTC) time; since + is a restricted character, + and - are substituted by P and M in the codes that follow

AT
Atlantic Time
CT
Central Time
ET
Eastern Time
MT
Mountain Time
PT
Pacific Time
N7 Loop
RequiredMax >1
N7
0800
Heading > N7 Loop > N7

Equipment Details

RequiredMax use 1

To identify the equipment

Usage notes

Example: N7CN123456213360N66700*RR6711M186128*C214

Example
If either Weight (N7-03) or Weight Qualifier (N7-04) is present, then the other is required
If either Tare Weight (N7-05) or Tare Qualifier Code (N7-16) is present, then the other is required
N7-01
206
Equipment Initial
Optional
String (AN)
Min 1Max 4

Prefix or alphabetic part of an equipment unit's identifying number

  • N701 is mandatory for rail transactions.
N7-02
207
Equipment Number
Required
String (AN)
Min 1Max 15

Sequencing or serial part of an equipment unit's identifying number (pure numeric form for equipment number is preferred)

N7-03
81
Weight
Optional
Decimal number (R)
Min 1Max 10

Numeric value of weight

N7-04
187
Weight Qualifier
Optional
Identifier (ID)

Code specifying the type of weight

E
Estimated Net Weight
N
Actual Net Weight
N7-05
167
Tare Weight
Optional
Numeric (N0)
Min 3Max 8

Weight of the equipment

N7-11
40
Equipment Description Code
Optional
Identifier (ID)

Code identifying type of equipment used for shipment

RR
Rail Car
N7-15
567
Equipment Length
Optional
Numeric (N0)
Min 4Max 5

Length (in feet and inches) of equipment ordered or used to transport shipment (The format is FFFII where FFF is feet and II is inches; the range for II is 00 through 11)

N7-16
571
Tare Qualifier Code
Optional
Identifier (ID)

Code identifying the type of tare

A
Actual
M
Marked
N7-20
65
Height
Optional
Decimal number (R)
Min 1Max 8

Vertical dimension of an object measured when the object is in the upright position

  • N720 and N721 are expressed in inches.
N7-21
189
Width
Optional
Decimal number (R)
Min 1Max 8

Shorter measurement of the two horizontal dimensions measured with the object in the upright position

N7-22
24
Equipment Type Code
Optional
Identifier (ID)
Min 4Max 4

Code identifying equipment type

N7-24
301
Car Type Code
Optional
Identifier (ID)
Min 1Max 4

Code specifying type of rail car or intermodal equipment type and its general characteristics

Usage notes

AAR Equipment Type code.

M7
1400
Heading > N7 Loop > M7

Seal Numbers

OptionalMax use 5

To record seal numbers used and the organization that applied the seals

Usage notes

Example: M7*12345

Example
M7-01
225
Seal Number
Required
String (AN)
Min 1Max 15

Unique number on seal used to close a shipment

N7 Loop end
N8
1800
Heading > N8

Waybill Reference

RequiredMax use 499

To identify the waybill and to specify the equipment used and the destination details

Usage notes

Example: N811111120230710

Example
N8-01
186
Waybill Number
Required
Numeric (N0)
Min 1Max 6

Carrier accounting number of the waybill for the inbound movement

N8-02
373
Date
Required
Date (DT)
CCYYMMDD format

Date expressed as CCYYMMDD where CC represents the first two digits of the calendar year

  • N802 is the waybill date.
F9
2000
Heading > F9

Origin Station

RequiredMax use 1

To identify the rail origin of the shipment

Usage notes

Indicates the origin of the shipment, the point from which it is shipped. The spelling should be in accordance with that listed in the Standard Point Location Code (SPLC) standard available from the National Motor Freight Tariff Association (USA) or the National Transportation Agency (Canada). CN can provide spellings for your stations.

Example: F9070112WATSONSK*****071511S0K4V0

Example
F9-01
573
Freight Station Accounting Code
Optional
Identifier (ID)
Min 1Max 5

Code specifying the Freight Station Accounting code assigned for AAR Managed Codes for Locations

F9-02
19
City Name
Required
String (AN)
Min 2Max 30

Free-form text for city name

  • F902 is the origin station for movement.
F9-03
156
State or Province Code
Required
Identifier (ID)
Min 2Max 2

Code specifying the Standard State/Province as defined by appropriate government agency

F9-08
154
Standard Point Location Code
Optional
Identifier (ID)
Min 6Max 9

Code specifying the Standard Point Location code defined by National Motor Freight Tariff Association (NMFTA) or the Canadian Transportation Agency (CTA) point development group as the official code assigned to a city or point (for ratemaking purposes) within a city

  • F908 is the Standard Point Location Code (SPLC) for the city named in the F902.
F9-09
116
Postal Code
Optional
Identifier (ID)
Min 3Max 15

Code specifying international postal zone code excluding punctuation and blanks (zip code for United States)

  • F909 is the postal code for the city named in the F902.
D9
2100
Heading > D9

Destination Station

RequiredMax use 1

To identify the rail destination of the shipment

Usage notes

Indicates the destination of the shipment, the point at which it will be unloaded or where the transportation responsibility reverts to the consignee. The spelling should be in accordance with that listed in the Standard Point Location Code (SPLC) standard available from the National Motor Freight Tariff Association (USA) or the National Transportation Agency (Canada). CN can provide spellings for your stations.

Example: D9093390VANCOUVERBC*****0093900V5T1E1

Example
D9-01
573
Freight Station Accounting Code
Optional
Identifier (ID)
Min 1Max 5

Code specifying the Freight Station Accounting code assigned for AAR Managed Codes for Locations

D9-02
19
City Name
Required
String (AN)
Min 2Max 30

Free-form text for city name

  • D902 is the destination station of movement.
D9-03
156
State or Province Code
Required
Identifier (ID)
Min 2Max 2

Code specifying the Standard State/Province as defined by appropriate government agency

D9-08
154
Standard Point Location Code
Optional
Identifier (ID)
Min 6Max 9

Code specifying the Standard Point Location code defined by National Motor Freight Tariff Association (NMFTA) or the Canadian Transportation Agency (CTA) point development group as the official code assigned to a city or point (for ratemaking purposes) within a city

  • D908 is the Standard Point Location Code (SPLC) for the city named in the D902.
D9-09
116
Postal Code
Optional
Identifier (ID)
Min 3Max 15

Code specifying international postal zone code excluding punctuation and blanks (zip code for United States)

  • D909 is the postal code for the city names in the D902.
N1 Loop
RequiredMax >1
N1
2200
Heading > N1 Loop > N1

Party Identification

RequiredMax use 1

To identify a party by type of organization, name, and code

Usage notes

Associated to the N3 and N4 segments below. N1, N3 and N4 segments are required for the Consignee and any other Additional Parties to the shipment.

Examples:
N1SHGENERIC CARLOAD INCC51111111111111
N3123 FIRST ROAD
N4
WATSONSKS0K 4V0CA
N1
CNGENERIC CONSIGNEE COC52222222222222
N3
12 SMITH STREET
N4VANCOUVERBCV5K 1P7CA
N1PFGENERIC CARLOAD INCC51111111111111
N3123 FIRST ROAD
N4
WATSONSKS0K 4V0*CA

Example
At least one of Name (N1-02) or Identification Code Qualifier (N1-03) is required
If either Identification Code Qualifier (N1-03) or Identification Code (N1-04) is present, then the other is required
N1-01
98
Entity Identifier Code
Required
Identifier (ID)

Code identifying an organizational entity, a physical location, property or an individual

C1
In Care Of Party no. 1
CN
Consignee
PF
Party to Receive Freight Bill
SH
Shipper
N1-02
93
Name
Optional
String (AN)
Min 1Max 60

Free-form name

N1-03
66
Identification Code Qualifier
Optional
Identifier (ID)

Code specifying the system/method of code structure used for Identification Code (67)

C5
Customer Identification File
N1-04
67
Identification Code
Optional
String (AN)
Min 2Max 80

Code identifying a party or other code

  • This segment, used alone, provides the most efficient method of providing organizational identification. To obtain this efficiency the "ID Code" (N104) must provide a key to the table maintained by the transaction processing party.
Usage notes

This field should contain the full 13-character CIF format including leading zeros.

N3
2300
Heading > N1 Loop > N3

Party Location

OptionalMax use 2

To specify the location of the named party

Example
N3-01
166
Address Information
Required
String (AN)
Min 1Max 55

Address information

N3-02
166
Address Information
Optional
String (AN)
Min 1Max 55

Address information

N4
2400
Heading > N1 Loop > N4

Geographic Location

OptionalMax use 1

To specify the geographic place of the named party

Example
N4-01
19
City Name
Optional
String (AN)
Min 2Max 30

Free-form text for city name

  • A combination of either N401 through N404, or N405 and N406 may be adequate to specify a location.
N4-02
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2

Code specifying the Standard State/Province as defined by appropriate government agency

N4-03
116
Postal Code
Optional
Identifier (ID)
Min 3Max 15

Code specifying international postal zone code excluding punctuation and blanks (zip code for United States)

  • N403 contains the postal code in an unstructured format. N408 contains the postal code in a structured format. When a postal code data field is used, the parties shall agree as to which data element (N403 or N408) shall be used in the transaction set.
N4-04
26
Country Code
Optional
Identifier (ID)

Code identifying the country

CA
Canada
PER
2500
Heading > N1 Loop > PER

Administrative Communications Contact

OptionalMax use 2

To identify a person or office to whom administrative communications should be directed

Usage notes

Example: PERICCONTACT NAMETE123-123-1234

Example
If either Communication Number Qualifier (PER-03) or Communication Number (PER-04) is present, then the other is required
PER-01
366
Contact Function Code
Required
Identifier (ID)

Code identifying the major duty or responsibility of the person or group named

IC
Information Contact
PER-02
93
Name
Optional
String (AN)
Min 1Max 60

Free-form name

PER-03
365
Communication Number Qualifier
Optional
Identifier (ID)

Code identifying the type of communication number

EM
Electronic Mail
TE
Telephone
PER-04
364
Communication Number
Optional
String (AN)
Min 1Max 2048

Complete communications number including country or area code when applicable

N1 Loop end
R2
4700
Heading > R2

Route Information

RequiredMax use 13

To specify carrier and routing sequences and details

Usage notes

One R2 segment for each railroad in the route. CN can provide route information for your shipments. (i.e.: Railroad SCAC's and junctions)

Example: R2CNS****R

Example
R2-01
140
Standard Carrier Alpha Code
Required
Identifier (ID)

Code identifying the Standard Carrier Alpha Code

CN
Canadian National etc.
R2-02
133
Routing Sequence Code
Required
Identifier (ID)

Code specifying the relationship of a carrier to a specific shipment movement

S
Origin Carrier, Shipper's Routing (Rail)
R2-06
91
Transportation Method/Type Code
Optional
Identifier (ID)

Code specifying the method or type of transportation for the shipment

R
Rail
LX Loop
RequiredMax >1
LX
5400
Heading > LX Loop > LX

Transaction Set Line Number

RequiredMax use 1

To reference a line number in a transaction set

Usage notes

Example: LX*1

Example
LX-01
554
Assigned Number
Required
Numeric (N0)
Min 1Max 9

Number assigned for differentiation within a transaction set

L5
5500
Heading > LX Loop > L5

Description, Marks and Numbers

RequiredMax use 15

To specify the line item in terms of description, quantity, packaging, and marks and numbers

Usage notes

CN can provide Standard Transportation Commodity Codes (STCC) for your commodities. The commodity code is required only on the first L5 segment. Additional L5 segments can be used to provide additional description of lading.

Example: L51WALLBOARD3275440T

Example
If either Commodity Code (L5-03) or Commodity Code Qualifier (L5-04) is present, then the other is required
L5-01
213
Lading Line Item Number
Optional
Numeric (N0)
Min 1Max 6

Sequential line number for a lading item

L5-02
79
Lading Description
Optional
String (AN)
Min 1Max 50

Description of an item as required for rating and billing purposes

  • L502 may be used to send quantity information as part of the product description.
L5-03
22
Commodity Code
Optional
String (AN)
Min 1Max 7

Code describing a commodity or group of commodities

Usage notes

7-digit Standard Transportation Commodity Code (STCC).

L5-04
23
Commodity Code Qualifier
Optional
Identifier (ID)

Code identifying the commodity coding system used for Commodity Code

T
Standard Transportation Commodity Code (STCC)
L0 Loop
OptionalMax >1
L0
5700
Heading > LX Loop > L0 Loop > L0

Line Item - Quantity and Weight

RequiredMax use 1

To specify quantity, weight, volume, and type of service for a line item including applicable "quantity/rate-as" data

Usage notes

Example: L01213360N1*CLD

Example
If either Weight (L0-04) or Weight Qualifier (L0-05) is present, then the other is required
If either Lading Quantity (L0-08) or Packaging Form Code (L0-09) is present, then the other is required
L0-01
213
Lading Line Item Number
Optional
Numeric (N0)
Min 1Max 6

Sequential line number for a lading item

L0-04
81
Weight
Optional
Decimal number (R)
Min 1Max 10

Numeric value of weight

L0-05
187
Weight Qualifier
Optional
Identifier (ID)

Code specifying the type of weight

E
Estimated Net Weight
N
Actual Net Weight
L0-08
80
Lading Quantity
Optional
Numeric (N0)
Min 1Max 7

Number of units (pieces) of the lading commodity

  • L008 is the number of handling units of the line item tendered to the carrier.
L0-09
211
Packaging Form Code
Optional
Identifier (ID)

Code specifying the packaging form of the lading quantity

CLD
Car Load, Rail
L0 Loop end
LX Loop end
SE
8100
Heading > SE

Transaction Set Trailer

RequiredMax use 1

To indicate the end of the transaction set and provide the count of the transmitted segments (including the beginning (ST) and ending (SE) segments)

Example
SE-01
96
Number of Included Segments
Required
Numeric (N0)
Min 1Max 10

Total number of segments included in a transaction set including ST and SE segments

SE-02
329
Transaction Set Control Number
Required
Numeric (N)
Min 4Max 9

Identifying control number that must be unique within the transaction set functional group assigned by the originator for a transaction set

Heading end

Functional Group Trailer

RequiredMax use 1

To indicate the end of a functional group and to provide control information

Example
GE-01
97
Number of Transaction Sets Included
Required
Numeric (N0)
Min 1Max 6

Total number of transaction sets included in the functional group or interchange (transmission) group terminated by the trailer containing this data element

GE-02
28
Group Control Number
Required
Numeric (N0)
Min 1Max 9

Assigned number originated and maintained by the sender

Interchange Control Trailer

RequiredMax use 1

To define the end of an interchange of zero or more functional groups and interchange-related control segments

Example
IEA-01
I16
Number of Included Functional Groups
Required
Numeric (N0)
Min 1Max 5

A count of the number of functional groups included in an interchange

IEA-02
I12
Interchange Control Number
Required
Numeric (N0)
Min 9Max 9

A control number assigned by the interchange sender

EDI Samples

sample 1

ISA*00* *00* *02*CN *ZZ*GENERIC *230710*1339*U*00803*006298413*0*P*>
GS*WB*CN*GENERIC*20230710*1336*98826*X*008030
ST*417*988260001
ZC1*1257*CN*123456*111111*20230710*CO*CN*R
BX*00*R*PP*1257*CN*L*B*N****N
BNX*R**S
N9*BM*1257**20230710*1336*ET
DTM*168*20230710*1336*ET
N7*CN*123456*213360*N*66700******RR****6711*M****186*128***C214
M7*12345
N8*111111*20230710
F9*70112*WATSON*SK*****071511*S0K4V0
D9*93390*VANCOUVER*BC*****0093900*V5T1E1
N1*SH*GENERIC CARLOAD INC*C5*1111111111111
N3*123 FIRST ROAD
N4*WATSON*SK*S0K 4V0*CA
PER*IC*CONTACT NAME*TE*123-123-1234
N1*CN*GENERIC CONSIGNEE CO*C5*2222222222222
N3*12 SMITH STREET
N4*VANCOUVER*BC*V5K 1P7*CA
N1*PF*GENERIC CARLOAD INC*C5*1111111111111
N3*123 FIRST ROAD
N4*WATSON*SK*S0K 4V0*CA
R2*CN*S****R
LX*1
L5*1*WALLBOARD*3275440*T
L0*1***213360*N***1*CLD
SE*26*988260001
GE*1*98826
IEA*1*006298413

Stedi is a registered trademark of Stedi, Inc. All names, logos, and brands of third parties listed on this page are trademarks of their respective owners (including “X12”, which is a trademark of X12 Incorporated). Stedi, Inc. and its products and services are not endorsed by, sponsored by, or affiliated with these third parties. Use of these names, logos, and brands is for identification purposes only, and does not imply any such endorsement, sponsorship, or affiliation.