moggy 240, please be careful - you have been given some misleading information........
You asked "what is the difference between a Fairlady Z 240 and a Datsun 240Z UK spec and what is a ZG?" I think?
The answers you got all stated that the Fairlady Z got the 2 litre engine ( the L20 ) which is correct, but you did not ask about that model did you?
When the S30-series Fairlady range was launched in Japan in 1969, it is true that only 2 Litre engines were available ( because of the strict Japanese taxation laws, it was decided to restrict initial sales to this capacity ):
*Fairlady Z and Fairlady Z-L ( S30 and S30-S ) = L20 engine.
*Fairlady Z432 and Z432-R ( PS30 and PS30-SB ) = S20 engine.
Then in October 1971 the "Fairlady 240Z" models were launched in Japan:
*Fairlady 240Z and Fairlady 240Z-L ( HS30 and HS30-S ) = L24 engine ( exactly same as UK market spec. ).
*Fairlady 240ZG ( HS30-H ) = L24 engine.
The ZG was a homologation special. By selling a certain amount of cars equipped with the aerodynamic panel and Overfender package to the general public, it allowed Nissan to legally race similarly equipped cars in the Group 4 class.
Please note that in October 1971 the Japanese market could finally get the L24-engined models - but STILL had the choice of the 2 litre models too. In fact, this meant that ( when trim and engine type packages are taken into account ) the Japanese home market buyer had a very wide range to choose from - at least eight different models.
Some people don't understand that the Japanese home market ALWAYS had the option of the 5-speed transmissions and the rear anti-roll bar. Contrast this with the USA market cars ( the USA - like most other markets - only had one basic model to choose colour and trim for, and decide on Auto or 4-speed ).
I notice the www6.shizuokanet website page linked in a previous reply above does not include data on the Japanese market HS30 and HS30-S "Fairlady 240Z" models ( unless I missed it ) and is therefore incomplete.
Good luck with your search for information,
Albrecht.