American Association of Railroads (AAR)
/
Train Sheet
  • Specification
  • EDI Inspector
Stedi maintains this guide based on public documentation from American Association of Railroads (AAR). Contact American Association of Railroads (AAR) for official EDI specifications. To report any errors in this guide, please contact us.
Go to Stedi Network
American Association of Railroads (AAR) logo

X12 161 Train Sheet

X12 Release 8010
Delimiters
  • ~ Segment
  • * Element
  • > Component
  • ^ Repetition
EDI samples
  • Sample 1 (CCT)
View the latest version of this implementation guide as an interactive webpage
https://www.stedi.com/app/guides/view/aar/train-sheet/01HK5EB5YRVJA4CY865KQY859X
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
BTS
0200
Beginning Segment for Train Sheets
Max use 1
Required
V9
0230
Event Detail Anticipated Pickup
Max use 1
Required
V9
0230
Event Detail Anticipated Set-out
Max use 1
Required
V9
0230
Event Detail Crew Call
Max use 1
Required
V9
0230
Event Detail Estimated Departure Date
Max use 1
Required
V9
0230
Event Detail Mutually Defined
Max use 1
Required
V9
0230
Event Detail Scheduled Departure Date
Max use 100
Required
V9
0230
Event Detail Train Annulment
Max use 1
Required
V9
0230
Event Detail Train Move Departure
Max use 1
Required
V9
0230
Event Detail Train Reported Passing
Max use 1
Required
H3
0270
Special Handling Instructions
Max use 5
Optional
FAC
0300
Facing Direction
Max use 25
Optional
NM1 Loop
SE
0700
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)
00801
00801 Standards Approved for Publication by ASC X12 Procedures Review Board through December 2019
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)
TR
Train Sheet (161)
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)
008010
008010 Standards Approved for Publication by ASC X12 Procedures Review Board through December 2019

Heading

ST
0100
Heading > ST

Transaction Set Header

RequiredMax use 1
Example
ST-01
143
Transaction Set Identifier Code
Required
Identifier (ID)
161
Train Sheet
ST-02
329
Transaction Set Control Number
Required
Numeric (N)
Min 4Max 9
BTS
0200
Heading > BTS

Beginning Segment for Train Sheets

RequiredMax use 1
Example
If either Total Equipment (BTS-02) or Equipment Status Code (BTS-03) is present, then the other is required
If either Total Equipment (BTS-04) or Equipment Status Code (BTS-05) is present, then the other is required
BTS-01
41
Interchange Train Identification
Required
String (AN)
Min 1Max 10
BTS-02
86
Total Equipment
Optional
Numeric (N0)
Min 1Max 3
BTS-03
578
Equipment Status Code
Optional
Identifier (ID)
L
Load
BTS-04
86
Total Equipment
Optional
Numeric (N0)
Min 1Max 3
BTS-05
578
Equipment Status Code
Optional
Identifier (ID)
E
Empty
BTS-06
81
Weight
Optional
Decimal number (R)
Min 1Max 10
BTS-07
82
Length
Optional
Decimal number (R)
Min 1Max 8
BTS-08
1272
Horsepower
Optional
Numeric (N0)
Min 1Max 15
BTS-09
140
Standard Carrier Alpha Code
Required
Identifier (ID)
Min 2Max 4
BTS-10
353
Transaction Set Purpose Code
Required
Identifier (ID)
00
Original
BTS-11
284
Service Level Code
Required
Identifier (ID)
Min 2Max 2
BTS-12
1073
Yes/No Condition or Response Code
Optional
Identifier (ID)
N
No
Y
Yes
Required
Date (DT)
CCYYMMDD format
BTS-14
41
Interchange Train Identification
Optional
String (AN)
Min 1Max 10
Optional
Numeric (N0)
Min 1Max 9
V9
0230
Heading > V9

Event Detail Anticipated Pickup

RequiredMax use 1
Usage notes
Example
Variants (one may be used)
V9Event Detail Anticipated Set-outV9Event Detail Crew CallV9Event Detail Estimated Departure DateV9Event Detail Mutually DefinedV9Event Detail Scheduled Departure DateV9Event Detail Train AnnulmentV9Event Detail Train Move DepartureV9Event Detail Train Reported Passing
If State or Province Code (V9-06) is present, then City Name (V9-05) is required
V9-01
304
Event Code
Required
Identifier (ID)
APU
Anticipated Pickup
Required
Date (DT)
CCYYMMDD format
Required
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
V9-05
19
City Name
Optional
String (AN)
Min 2Max 30
V9-06
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
V9-07
26
Country Code
Optional
Identifier (ID)
Min 2Max 3
V9-09
154
Standard Point Location Code
Required
Identifier (ID)
Min 6Max 9
V9-13
623
Time Code
Required
Identifier (ID)
Min 2Max 2
V9-16
86
Total Equipment
Required
Numeric (N0)
Min 1Max 3
V9-17
86
Total Equipment
Optional
Numeric (N0)
Min 1Max 3
V9-18
86
Total Equipment
Optional
Numeric (N0)
Min 1Max 3
V9-19
81
Weight
Required
Decimal number (R)
Min 1Max 10
V9-20
82
Length
Required
Decimal number (R)
Min 1Max 8
V9
0230
Heading > V9

Event Detail Anticipated Set-out

RequiredMax use 1
Usage notes
Example
If State or Province Code (V9-06) is present, then City Name (V9-05) is required
V9-01
304
Event Code
Required
Identifier (ID)
ASO
Anticipated Set-out
Required
Date (DT)
CCYYMMDD format
Required
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
V9-05
19
City Name
Optional
String (AN)
Min 2Max 30
V9-06
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
V9-07
26
Country Code
Optional
Identifier (ID)
Min 2Max 3
V9-09
154
Standard Point Location Code
Required
Identifier (ID)
Min 6Max 9
V9-13
623
Time Code
Required
Identifier (ID)
Min 2Max 2
V9-16
86
Total Equipment
Required
Numeric (N0)
Min 1Max 3
V9-17
86
Total Equipment
Optional
Numeric (N0)
Min 1Max 3
V9-18
86
Total Equipment
Optional
Numeric (N0)
Min 1Max 3
V9-19
81
Weight
Required
Decimal number (R)
Min 1Max 10
V9-20
82
Length
Required
Decimal number (R)
Min 1Max 8
V9-01
304
Event Code
Required
Identifier (ID)
CCT
Crew Call
Required
Date (DT)
CCYYMMDD format
Required
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
V9-05
19
City Name
Optional
String (AN)
Min 2Max 30
V9-06
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
V9-07
26
Country Code
Optional
Identifier (ID)
Min 2Max 3
V9-09
154
Standard Point Location Code
Required
Identifier (ID)
Min 6Max 9
V9-13
623
Time Code
Required
Identifier (ID)
Min 2Max 2
V9
0230
Heading > V9

Event Detail Estimated Departure Date

RequiredMax use 1
Usage notes
Example
If State or Province Code (V9-06) is present, then City Name (V9-05) is required
V9-01
304
Event Code
Required
Identifier (ID)
EDD
Estimated Departure Date
Required
Date (DT)
CCYYMMDD format
Required
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
V9-05
19
City Name
Optional
String (AN)
Min 2Max 30
V9-06
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
V9-07
26
Country Code
Optional
Identifier (ID)
Min 2Max 3
V9-09
154
Standard Point Location Code
Required
Identifier (ID)
Min 6Max 9
V9-13
623
Time Code
Required
Identifier (ID)
Min 2Max 2
V9
0230
Heading > V9

Event Detail Mutually Defined

RequiredMax use 1
Usage notes
Example
If State or Province Code (V9-06) is present, then City Name (V9-05) is required
V9-01
304
Event Code
Required
Identifier (ID)
ZZZ
Mutually Defined
Required
Date (DT)
CCYYMMDD format
Required
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
V9-05
19
City Name
Optional
String (AN)
Min 2Max 30
V9-06
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
V9-07
26
Country Code
Optional
Identifier (ID)
Min 2Max 3
V9-09
154
Standard Point Location Code
Required
Identifier (ID)
Min 6Max 9
V9-13
623
Time Code
Required
Identifier (ID)
Min 2Max 2
V9
0230
Heading > V9

Event Detail Scheduled Departure Date

RequiredMax use 100
Usage notes
Example
If State or Province Code (V9-06) is present, then City Name (V9-05) is required
V9-01
304
Event Code
Required
Identifier (ID)
SDD
Scheduled Departure Date
Required
Date (DT)
CCYYMMDD format
Required
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
V9-05
19
City Name
Optional
String (AN)
Min 2Max 30
V9-06
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
V9-07
26
Country Code
Optional
Identifier (ID)
Min 2Max 3
V9-09
154
Standard Point Location Code
Required
Identifier (ID)
Min 6Max 9
V9-13
623
Time Code
Required
Identifier (ID)
Min 2Max 2
V9-15
154
Standard Point Location Code
Required
Identifier (ID)
Min 6Max 9
V9
0230
Heading > V9

Event Detail Train Annulment

RequiredMax use 1
Usage notes
Example
If State or Province Code (V9-06) is present, then City Name (V9-05) is required
If Time Code (V9-13) is present, then Time (V9-04) is required
V9-01
304
Event Code
Required
Identifier (ID)
ANL
Train Annulment
Optional
Date (DT)
CCYYMMDD format
Optional
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
V9-05
19
City Name
Optional
String (AN)
Min 2Max 30
V9-06
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
V9-07
26
Country Code
Optional
Identifier (ID)
Min 2Max 3
V9-09
154
Standard Point Location Code
Required
Identifier (ID)
Min 6Max 9
V9-13
623
Time Code
Required
Identifier (ID)
Min 2Max 2
V9-15
154
Standard Point Location Code
Optional
Identifier (ID)
Min 6Max 9
V9
0230
Heading > V9

Event Detail Train Move Departure

RequiredMax use 1
Usage notes
Example
If State or Province Code (V9-06) is present, then City Name (V9-05) is required
V9-01
304
Event Code
Required
Identifier (ID)
TMD
Train Move Departure
Required
Date (DT)
CCYYMMDD format
Required
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
V9-05
19
City Name
Optional
String (AN)
Min 2Max 30
V9-06
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
V9-07
26
Country Code
Optional
Identifier (ID)
Min 2Max 3
V9-09
154
Standard Point Location Code
Required
Identifier (ID)
Min 6Max 9
V9-13
623
Time Code
Required
Identifier (ID)
Min 2Max 2
V9
0230
Heading > V9

Event Detail Train Reported Passing

RequiredMax use 1
Usage notes
Example
If State or Province Code (V9-06) is present, then City Name (V9-05) is required
V9-01
304
Event Code
Required
Identifier (ID)
TRP
Train Reported Passing
Required
Date (DT)
CCYYMMDD format
Required
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
V9-05
19
City Name
Optional
String (AN)
Min 2Max 30
V9-06
156
State or Province Code
Optional
Identifier (ID)
Min 2Max 2
V9-07
26
Country Code
Optional
Identifier (ID)
Min 2Max 3
V9-09
154
Standard Point Location Code
Required
Identifier (ID)
Min 6Max 9
V9-13
623
Time Code
Required
Identifier (ID)
Min 2Max 2
H3
0270
Heading > H3

Special Handling Instructions

OptionalMax use 5
Usage notes
Example
H3-01
152
Special Handling Code
Optional
Identifier (ID)
Min 2Max 3
FAC
0300
Heading > FAC

Facing Direction

OptionalMax use 25
Usage notes
Example
FAC-01
206
Equipment Initial
Required
String (AN)
Min 1Max 4
FAC-02
207
Equipment Number
Required
String (AN)
Min 1Max 15
FAC-03
40
Equipment Description Code
Required
Identifier (ID)
Min 2Max 2
FAC-04
1273
Direction Facing Code
Required
Identifier (ID)
B
Backward
F
Forward
U
Unknown
FAC-05
578
Equipment Status Code
Required
Identifier (ID)
AK
Out of Service
D
Deadhead Locomotive or Caboose
O
Operating Locomotive or Caboose
FAC-06
1073
Yes/No Condition or Response Code
Optional
Identifier (ID)
N
No
Y
Yes
NM1 Loop
OptionalMax >1
Usage notes
NM1
0500
Heading > NM1 Loop > NM1

Individual or Organizational Name

RequiredMax use 1
Example
NM1-01
98
Entity Identifier Code
Required
Identifier (ID)
86
Conductor
BM
Brakeman
C0
Assistant Conductor
E0
Assistant Engineer
EG
Engineer
Q1
Conductor Pilot
Q2
Engineer Pilot
NM1-02
1065
Entity Type Qualifier
Required
Identifier (ID)
1
Person
NM1-03
1035
Name Last or Organization Name
Required
String (AN)
Min 1Max 80
NM1-04
1036
Name First
Required
String (AN)
Min 1Max 35
NM1-05
1037
Name Middle
Optional
String (AN)
Min 1Max 25
NM1-08
66
Identification Code Qualifier
Required
Identifier (ID)
2
Standard Carrier Alpha Code (SCAC)
NM1-09
67
Identification Code
Required
String (AN)
Min 2Max 80
DTM
0600
Heading > NM1 Loop > DTM

Date/Time Reference

RequiredMax use 3
Usage notes
Example
DTM-01
374
Date/Time Qualifier
Required
Identifier (ID)
036
Off Duty
150
On Duty
Required
Date (DT)
CCYYMMDD format
Required
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
DTM-04
623
Time Code
Required
Identifier (ID)
Min 2Max 2
NM1 Loop end
SE
0700
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 (CCT)

ISA*04*SWEDI 161 *00* *02*BNSF *02*TOIX *200718*0131*U*00602*004113896*0*P*~
GS*TR*BNSF*UP*20200718*0131*004113896*X*008010
ST*EDI 161*138960001
BTS*HGALMAD118******147*8700*BNSF*00*R5*N*20200718* QWJTRJ 18*1*20200718
V9*CCT**20200718*0430*****385930****CT
FAC*BNSF*7527*LO*B*O*Y
FAC*UP*8741*LO*F*O*N
NM1*86*1*ANDREWS*J*R***2*BNSF
DTM*150*20200718*0430*CT
DTM*036*20200718*1630*CT
NM1*EG*1*HANCE*B*J***2*BNSF
DTM*150*20200718*0430*CT
DTM*036*20200718*1630*CT
SE*12*138960001
GE*1*004113896
IEA*1*004113896

Sample 2 (TRP)

ISA*04*SWEDI 161 *00* *02*BNSF *02*TOIX *200718*0131*U*00602*004113896*0*P*~
GS*TR*BNSF*UP*20200718*0021*148757264*X*008010
ST*EDI 161*572640001
BTS* IG4SE 13********UP*00*R5*N*20200713*FIG4SE0113*1*20200713
V9*TRP**20200717*2221*****846179****PT
FAC*UP*8752*LO*F*O*Y
FAC*UP*8455*LO*B*O*Y
FAC*UP*5340*LO*B*O*Y
FAC*UP*5445*LO*B*O*Y
FAC*UPRQ*64363*ET*F*O*N
SE*9*572640001
GE*1*148757264
IEA*1*004113896

Sample 3 (ANL)

ISA*04*SWEDI 161 *00* *02*BNSF *02*TOIX *200718*0131*U*00602*004113896*0*P*~
GS*TR*BNSF*UP*20200718*0806*148763830*X*008010
ST*EDI 161*638300001
BTS*XOKCBRD917******146*8800*BNSF*00*03*N*20200717*4GPDLSJ 18*4*20200717
V9*ANL**20200718*0806*****585984****CT
FAC*BNSF*4090*LO*F*O*Y
FAC*BNSF*5257*LO*B*O*Y
SE*6*638300001
GE*1*148763830
IEA*1*004113896

Sample 4 (SDD)

ISA*04*SWEDI 161 *00* *02*BNSF *02*TOIX *200718*0131*U*00602*004113896*0*P*~
GS*TR*BNSF*UP*20200718*0003*148756726*X*008010
ST*EDI 161*567260001
BTS*QCHIROB616*65*L***4699*6445*8700*BNSF*00*R3*N*20200716*ALGROT3*1*20200716
V9*SDD**20200719*0917*****686147****CT**689225
FAC*BNSF*5190*LO*F*O*Y
FAC*KCS*4019*LO*B*O*Y
FAC*BNQ*47769*ET*F*O*N
SE*7*567260001
GE*1*148756726
IEA*1*004113896

Sample 5 (EDD)

ISA*04*SWEDI 161 *00* *02*BNSF *02*TOIX *200718*0131*U*00602*004113896*0*P*~
GS*TR*BNSF*UP*20200718*0003*148756724*X*008010
ST*EDI 161*567240001
BTS*CBKMDON025*124*L***17735*6877*17300*BNSF*00*R5*N*20200715*2CSLUNJ 16*2*20200715
V9*EDD**20200718*1124*****741680****MT
FAC*BNSF*9009*LO*F*O*Y
FAC*BNSF*6014*LO*B*O*Y
FAC*BNSF*9011*2R*B*O*Y
FAC*BNSF*9262*2R*B*O*Y
SE*8*567240001
GE*1*148756724
IEA*1*004113896

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.