A train reporting number in Great Britain identifies a particular train service. It consists of:
The train reporting number is often called the headcode, a throwback to when the number was physically displayed at the head of a train.
Headcodes were introduced around 1850 and were shown by oil lamps facing forward on the front of the locomotive. The position of these lamps on the locomotive denoted the class of train, which assisted the signalmen to determine the gaps between trains required in the interval-based signalling system that was used at the time. The lamps were lit at night and were usually painted white to assist with sighting by day. On some lines white discs were used by day in the place of lamps.
With the coming of absolute block signalling, the class-based headcodes allowed signallers to identify and regulate trains properly. However on some busy lines, particularly busy suburban ones, the headcode denoted the route of the train rather than the class of train. In these areas junctions were complex and timetables were intense: it was more important that signallers routed the trains correctly than regulated trains by class. This was prevalent in the south of England, where companies used six headlamp positions to show the route of train.
Some companies had their own code format which led to some confusion where trains from one company ran onto other companies' lines. The Railway Clearing House (RCH) intervened to standardise headcodes, based on four lamp positions, and they were adopted by the majority of lines outside the south of England. At the time of the 1923 Grouping the standard headcodes were simplified so that normally only two lamps were used at any one time, and these codes were adopted by the London Midland and Scottish Railway, the Great Western Railway (GWR) and the London and North Eastern Railway. The Southern Railway retained a route-based headcode system, with up to four lamps in six positions. Notable exceptions were former Glasgow and South Western Railway and the Somerset and Dorset Joint Railway lines, which continued with their own headcodes on internal trains. The Caledonian Railway maintained a completely different route-based headcode system consisting of a pair of semaphore arms mounted on the locomotive - the angle of the two arms and their position (on the buffer beam or smokebox) indicated the routing.