The IBM System/38 or just S/38 was an IBM mini-computer launched in 1978. I don't know when IBM stopped marketing it but their AS/400 was released in 1988 and it was very easy to switch from the S/38 to the AS/400 so the S/38 will have died out quite rapidly.
The AS/400 has changed its name and its technology several times since, e.g. CISC to RISC, but it still lives on as the IBM i. IBM i is actually the latest O/S, there is no longer any unique hardware for it and it runs on the same hardware as Aix (IBM Unix).
A feature of these systems is technology independance. The compilers are two stage: high level language to intermediate code followed by intermediate code to machine code. This is common but what is not so common is that the intermediate code is stored in the generated object. This allows a program to be restored to and run on a later machine with different hardware. The machine code is discarded and the second stage compile is run again. This is possible even if the HLL compiler is not available. The second stage compiler is in the base operating system.
I have done this many times over the years e.g. S/38 to AS/400 and CISC AS/400 to RISC AS/400. However, I have not tried the extreme of the long obsolete S/38 to a current IBM i.
Edit. I see that my question is answered within the S/38 Wikipedia article that I linked.
As a result, it is possible for a program originally developed on a System/38 to run on current IBM i hardware without ever being recompiled.
But I think that this is just an expectation, as I have myself, rather than actual confirmation. It is also technically incorrect as IBM i is an operating system and not the hardware. The current hardware is IBM Power System which can also run other operating systems.