And just to add. There is a fare code and a booking class. These are often the same, but not always. The fare code determines fare price, the booking class determines availability.
Normally when the fare code is ZABC123 this means that also booking class Z is used.
However when booking a long haul and short haul flight together, the short haul one will usually have the same fare code (e.g ZABC123) but fare class J ( for business) or Y (for economy).
This ensures that when there is a fare available on the long haul sector, there will also be availability on the short haul feeder flights. If the long haul is in discounted Z for example, you can still use any connecting short haul flight this way - even if that short haul flight has no Z availability.