Canadian National Railway (CN Rail)
/
Rail Carrier Waybill Interchange
  • 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

X12 Release 7030
Delimiters
  • ~ Segment
  • * Element
  • > Component
  • ^ Repetition
EDI sample
  • Sample
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/01H5N6BMJS9RSMGS5WB2ZXYN44
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
BX
0300
General Shipment Information
Max use 1
Optional
BNX
0400
Rail Shipment Information
Max use 1
Optional
N9
0500
Bill of Lading Number
Max use 30
Required
N9
0500
Purchase Order Number
Max use 30
Optional
N9
0500
Weight Agreement Number
Max use 30
Optional
N7 Loop
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)
00703
Standards Approved for Publication by ASC X12 Procedures Review Board through October 2014
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 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)
007030
Standards Approved for Publication by ASC X12 Procedures Review Board through October 2015

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
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-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
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

Bill of Lading Number

RequiredMax use 30
Usage notes
Example
Variants (all may be used)
N9Purchase Order NumberN9Weight Agreement Number
N9-01
128
Reference Identification Qualifier
Required
Identifier (ID)
BM
Bill of Lading Number
N9-02
127
Reference Identification
Optional
String (AN)
Min 1Max 15
Required
Date (DT)
CCYYMMDD format
Optional
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
N9
0500
Heading > N9

Purchase Order Number

OptionalMax use 30
Example
N9-01
128
Reference Identification Qualifier
Required
Identifier (ID)
PO
Purchase Order Number
N9-02
127
Reference Identification
Optional
String (AN)
Min 1Max 80
Optional
Date (DT)
CCYYMMDD format
Optional
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
N9
0500
Heading > N9

Weight Agreement Number

OptionalMax use 30
Example
N9-01
128
Reference Identification Qualifier
Required
Identifier (ID)
WM
Weight Agreement Number
N9-02
127
Reference Identification
Optional
String (AN)
Min 1Max 80
Optional
Date (DT)
CCYYMMDD format
Optional
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
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
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-11
40
Equipment Description Code
Optional
Identifier (ID)
RR
Rail Car
N7 Loop end
F9
2000
Heading > F9

Origin Station

RequiredMax use 1
Usage notes
Example
F9-02
19
City Name
Required
String (AN)
Min 2Max 30
F9-03
156
State or Province Code
Required
Identifier (ID)
Min 2Max 2
D9
2100
Heading > D9

Destination Station

RequiredMax use 1
Usage notes
Example
D9-02
19
City Name
Required
String (AN)
Min 2Max 30
D9-03
156
State or Province Code
Required
Identifier (ID)
Min 2Max 2
N1 Loop
RequiredMax >1
Usage notes
N1
2200
Heading > N1 Loop > N1

Party Identification

RequiredMax use 1
Usage notes
Example
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
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
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)
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 Railway
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 6
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 7Max 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

ISA*00* *00* *ZZ*SENDER *ZZ*RECEIVER *231102*0333*^*00703*000000001*0*T*>
GS*WB*SENDERGS*RECEIVERGS*20231102*033354*000000001*X*007030
ST*417*988260001
BX*00*R*PP**CN*L*B
BNX*R**S
N9*BM*1257**20180710*1336
N7*CN*123456*213360*N*******RR
F9**WATSON*SK
D9**VANCOUVER*BC
N1*SH*GENERIC CARLOAD INC
N3*123 ROAD
N4*WATSON*SK*S0K 4V0
PER*IC*CONTACT NAME*TE*123-123-1234
N1*CN*GENERIC CONSIGNEE CO
N3*12 SMITH STREET
N4*VANCOUVER*BC*V5K 1P7
N1*PF*GENERIC CARLOAD INC
N3*123 ROAD
N4*WATSON*SK*S0K 4V0
R2*CN*S****R
LX*1
L5*1*WALLBOARD*3275440*T
L0*1***213360*N***1*CLD
SE*22*988260001
GE*1*000000001
IEA*1*000000001

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.