According to the CD-ROM book “Freight Cars Illustrated Volume 9 - Freight Car Appliances” that I purchased in 2009, the “Z” looks very similar to the mark for “Zhuzhou Rolling Stock Works, Hunan Province, China.”
Although the “SM” is not listed, there is a company with the same initials called “Scaw Metals Group, Marshaltown, South Africa.” However, since it is octagonal, it may be the same Chinese company as “Z”.
I’ve been looking for a ‘free’ copy or a discussion of standard foundry markings, but have not succeeded so far. Someone with access to a university library would be in a better position.
There is the Zhuzhou Rolling Stock Works that BN7150 mentioned and their castings are apparently approved for the North American market. I imagine the SM stands for Sahagun, Mexico.