What does the second code on transistors mean?
The numeric part is probably a date code. 

The part before that is useful- it is the beta bin which indicates a range for hFE. 

For example, for the Japanese 2SC1815: 

hFE VCE=6.0V, IC=2.0mA (2SC1815) 70 700
hFE VCE=6.0V, IC=2.0mA (2SC1815-O) 70 140
hFE VCE=6.0V, IC=2.0mA (2SC1815-Y) 120 240
hFE VCE=6.0V, IC=2.0mA (2SC1815-GR) 200 400
hFE VCE=6.0V, IC=2.0mA (2SC1815-BL) 350 700 


The one you have has an hFE between 200 and 400 with Vce = 6V and Ic = 2mA. 

Having a relatively narrow 2:1 range for hFE can allow more optimized designs,
especially for non-trivial analog circuits, such as amplifiers and RF circuits. 

You will probably find similar codes on the datasheets for the MPSA42 and the 2N3904. Also note that I'm supplying a missing prefix on two of the three transistors.