Canadian National Railway (CN Rail)
/
Rail Carrier Waybill Interchange (8030)
  • Specification
  • EDI Inspector
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
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
Example
ISA-01
I01
Authorization Information Qualifier
Required
Identifier (ID)
00
No Authorization Information Present (No Meaningful Information in I02)
ISA-02
I02
Authorization Information
Required
String (AN)
Min 10Max 10
ISA-03
I03
Security Information Qualifier
Required
Identifier (ID)
00
No Security Information Present (No Meaningful Information in I04)
ISA-04
I04
Security Information
Required
String (AN)
Min 10Max 10
ISA-05
I05
Interchange ID Qualifier
Required
Identifier (ID)
Min 2Max 2
Codes
ISA-06
I06
Interchange Sender ID
Required
String (AN)
Min 15Max 15
ISA-07
I05
Interchange ID Qualifier
Required
Identifier (ID)
Min 2Max 2
Codes
ISA-08
I07
Interchange Receiver ID
Required
String (AN)
Min 15Max 15
ISA-09
I08
Interchange Date
Required
Date (DT)
YYMMDD format
ISA-10
I09
Interchange Time
Required
Time (TM)
HHMM format
ISA-11
I65
Repetition Separator
Required
String (AN)
Min 1Max 1
^
Repetition Separator
ISA-12
I11
Interchange Control Version Number Code
Required
Identifier (ID)
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
ISA-14
I13
Acknowledgment Requested Code
Required
Identifier (ID)
Min 1Max 1
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
I
Information
P
Production Data
T
Test Data
ISA-16
I15
Component Data Element Separator
Required
String (AN)
Min 1Max 1
>
Component Element Separator

Functional Group Header

RequiredMax use 1
Example
GS-01
479
Functional Identifier Code
Required
Identifier (ID)
WB
Rail Carrier Waybill Interchange (417)
GS-02
142
Application Sender's Code
Required
String (AN)
Min 2Max 15
GS-03
124
Application Receiver's Code
Required
String (AN)
Min 2Max 15
Required
Date (DT)
CCYYMMDD format
Required
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
GS-06
28
Group Control Number
Required
Numeric (N0)
Min 1Max 9
GS-07
455
Responsible Agency Code
Required
Identifier (ID)
Min 1Max 2
T
Transportation Data Coordinating Committee (TDCC)
X
Accredited Standards Committee X12
GS-08
480
Version / Release / Industry Identifier Code
Required
String (AN)
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
Example
ST-01
143
Transaction Set Identifier Code
Required
Identifier (ID)
417
Rail Carrier Waybill Interchange
ST-02
329
Transaction Set Control Number
Required
Numeric (N)
Min 4Max 9
ZC1
0200
Heading > ZC1

Beginning Segment for Data Correction or Change

OptionalMax use 1
Usage notes
Example
ZC1-01
145
Shipment Identification Number
Optional
String (AN)
Min 1Max 30
ZC1-02
206
Equipment Initial
Optional
String (AN)
Min 1Max 4
Usage notes
ZC1-03
207
Equipment Number
Required
String (AN)
Min 1Max 15
Usage notes
ZC1-04
244
Transaction Reference Number
Required
String (AN)
Min 1Max 50
Usage notes
ZC1-05
243
Transaction Reference Date
Required
Date (DT)
CCYYMMDD format
ZC1-06
202
Correction Indicator Code
Required
Identifier (ID)
CA
Cancelled Bill
CO
Correction
D1
Diversion or Reconsignment
ZC1-07
140
Standard Carrier Alpha Code
Required
Identifier (ID)
Min 2Max 4
Usage notes
ZC1-08
91
Transportation Method/Type Code
Required
Identifier (ID)
R
Rail
X
Intermodal (Piggyback)
BX
0300
Heading > BX

General Shipment Information

OptionalMax use 1
Usage notes
Example
BX-01
353
Transaction Set Purpose Code
Required
Identifier (ID)
00
Original
BX-02
91
Transportation Method/Type Code
Required
Identifier (ID)
R
Rail
BX-03
146
Shipment Method of Payment Code
Required
Identifier (ID)
CC
Collect
PP
Prepaid (by Seller)
BX-04
145
Shipment Identification Number
Optional
String (AN)
Min 1Max 30
BX-05
140
Standard Carrier Alpha Code
Optional
Identifier (ID)
CN
CN Rail
BX-06
188
Weight Unit Code
Optional
Identifier (ID)
K
Kilograms
L
Pounds
BX-07
147
Shipment Qualifier
Optional
Identifier (ID)
B
Bill of Lading for Individual Shipment
BX-08
226
Section Seven Code
Optional
Identifier (ID)
N
Not in Effect
S
In Effect
BX-12
199
Confidential Billing Request Code
Optional
Identifier (ID)
N
Not Applicable
BNX
0400
Heading > BNX

Rail Shipment Information

OptionalMax use 1
Usage notes
Example
BNX-01
460
Shipment Weight Code
Optional
Identifier (ID)
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)
S
Single Shipment Billing
N9
0500
Heading > N9

Extended Reference Information

OptionalMax use 30
Usage notes
Example
If Time Code (N9-06) is present, then Time (N9-05) is required
N9-01
128
Reference Identification Qualifier
Required
Identifier (ID)
BM
Bill of Lading Number
N9-02
127
Reference Identification
Required
String (AN)
Min 1Max 15
Optional
Date (DT)
CCYYMMDD format
Optional
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
N9-06
623
Time Code
Optional
Identifier (ID)
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
Usage notes
Example
If Time Code (DTM-04) is present, then Time (DTM-03) is required
DTM-01
374
Date/Time Qualifier
Required
Identifier (ID)
168
Release
Required
Date (DT)
CCYYMMDD format
Optional
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
DTM-04
623
Time Code
Optional
Identifier (ID)
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
Usage notes
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
N7-02
207
Equipment Number
Required
String (AN)
Min 1Max 15
N7-03
81
Weight
Optional
Decimal number (R)
Min 1Max 10
N7-04
187
Weight Qualifier
Optional
Identifier (ID)
E
Estimated Net Weight
N
Actual Net Weight
N7-05
167
Tare Weight
Optional
Numeric (N0)
Min 3Max 8
N7-11
40
Equipment Description Code
Optional
Identifier (ID)
RR
Rail Car
N7-15
567
Equipment Length
Optional
Numeric (N0)
Min 4Max 5
N7-16
571
Tare Qualifier Code
Optional
Identifier (ID)
A
Actual
M
Marked
N7-20
65
Height
Optional
Decimal number (R)
Min 1Max 8
Optional
Decimal number (R)
Min 1Max 8
N7-22
24
Equipment Type Code
Optional
Identifier (ID)
Min 4Max 4
N7-24
301
Car Type Code
Optional
Identifier (ID)
Min 1Max 4
Usage notes
M7
1400
Heading > N7 Loop > M7

Seal Numbers

OptionalMax use 5
Usage notes
Example
M7-01
225
Seal Number
Required
String (AN)
Min 1Max 15
N7 Loop end
N8
1800
Heading > N8

Waybill Reference

RequiredMax use 499
Usage notes
Example
N8-01
186
Waybill Number
Required
Numeric (N0)
Min 1Max 6
Required
Date (DT)
CCYYMMDD format
F9
2000
Heading > F9

Origin Station

RequiredMax use 1
Usage notes
Example
F9-01
573
Freight Station Accounting Code
Optional
Identifier (ID)
Min 1Max 5
F9-02
19
City Name
Required
String (AN)
Min 2Max 30
F9-03
156
State or Province Code
Required
Identifier (ID)
Min 2Max 2
F9-08
154
Standard Point Location Code
Optional
Identifier (ID)
Min 6Max 9
F9-09
116
Postal Code
Optional
Identifier (ID)
Min 3Max 15
D9
2100
Heading > D9

Destination Station

RequiredMax use 1
Usage notes
Example
D9-01
573
Freight Station Accounting Code
Optional
Identifier (ID)
Min 1Max 5
D9-02
19
City Name
Required
String (AN)
Min 2Max 30
D9-03
156
State or Province Code
Required
Identifier (ID)
Min 2Max 2
D9-08
154
Standard Point Location Code
Optional
Identifier (ID)
Min 6Max 9
D9-09
116
Postal Code
Optional
Identifier (ID)
Min 3Max 15
N1 Loop
RequiredMax >1
N1
2200
Heading > N1 Loop > N1

Party Identification

RequiredMax use 1
Usage notes
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)
C1
In Care Of Party no. 1
CN
Consignee
PF
Party to Receive Freight Bill
SH
Shipper
Optional
String (AN)
Min 1Max 60
N1-03
66
Identification Code Qualifier
Optional
Identifier (ID)
C5
Customer Identification File
N1-04
67
Identification Code
Optional
String (AN)
Min 2Max 80
Usage notes
N3
2300
Heading > N1 Loop > N3

Party Location

OptionalMax use 2
Example
N3-01
166
Address Information
Required
String (AN)
Min 1Max 55
N3-02
166
Address Information
Optional
String (AN)
Min 1Max 55
N4
2400
Heading > N1 Loop > N4

Geographic Location

OptionalMax use 1
Example
N4-01
19
City Name
Optional
String (AN)
Min 2Max 30
N4-02
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
N4-03
116
Postal Code
Optional
Identifier (ID)
Min 3Max 15
N4-04
26
Country Code
Optional
Identifier (ID)
CA
Canada
PER
2500
Heading > N1 Loop > PER

Administrative Communications Contact

OptionalMax use 2
Usage notes
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)
IC
Information Contact
Optional
String (AN)
Min 1Max 60
PER-03
365
Communication Number Qualifier
Optional
Identifier (ID)
EM
Electronic Mail
TE
Telephone
PER-04
364
Communication Number
Optional
String (AN)
Min 1Max 2048
N1 Loop end
R2
4700
Heading > R2

Route Information

RequiredMax use 13
Usage notes
Example
R2-01
140
Standard Carrier Alpha Code
Required
Identifier (ID)
CN
Canadian National etc.
R2-02
133
Routing Sequence Code
Required
Identifier (ID)
S
Origin Carrier, Shipper's Routing (Rail)
R2-06
91
Transportation Method/Type Code
Optional
Identifier (ID)
R
Rail
LX Loop
RequiredMax >1
LX
5400
Heading > LX Loop > LX

Transaction Set Line Number

RequiredMax use 1
Usage notes
Example
LX-01
554
Assigned Number
Required
Numeric (N0)
Min 1Max 9
L5
5500
Heading > LX Loop > L5

Description, Marks and Numbers

RequiredMax use 15
Usage notes
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
L5-02
79
Lading Description
Optional
String (AN)
Min 1Max 50
L5-03
22
Commodity Code
Optional
String (AN)
Min 1Max 7
Usage notes
L5-04
23
Commodity Code Qualifier
Optional
Identifier (ID)
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
Usage notes
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
L0-04
81
Weight
Optional
Decimal number (R)
Min 1Max 10
L0-05
187
Weight Qualifier
Optional
Identifier (ID)
E
Estimated Net Weight
N
Actual Net Weight
L0-08
80
Lading Quantity
Optional
Numeric (N0)
Min 1Max 7
L0-09
211
Packaging Form Code
Optional
Identifier (ID)
CLD
Car Load, Rail
L0 Loop end
LX Loop end
SE
8100
Heading > SE

Transaction Set Trailer

RequiredMax use 1
Example
SE-01
96
Number of Included Segments
Required
Numeric (N0)
Min 1Max 10
SE-02
329
Transaction Set Control Number
Required
Numeric (N)
Min 4Max 9
Heading end

Functional Group Trailer

RequiredMax use 1
Example
GE-01
97
Number of Transaction Sets Included
Required
Numeric (N0)
Min 1Max 6
GE-02
28
Group Control Number
Required
Numeric (N0)
Min 1Max 9

Interchange Control Trailer

RequiredMax use 1
Example
IEA-01
I16
Number of Included Functional Groups
Required
Numeric (N0)
Min 1Max 5
IEA-02
I12
Interchange Control Number
Required
Numeric (N0)
Min 9Max 9
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.