The biggest issue you will face, is not the TELNET/TN3270 part itself, but rather interpreting the 3270 data stream. Anyway, here are some options for you:
- efglobe.com provides a public access z/OS system for personal use only. Ask them
on their forum about the kind of testing you intend to perform, to see whether they are
okay with it.
- With MVS Turnkey, you can install MVS 3.8J (for which IBM apparently does not
claim copyright) under Hercules emulation. This dates to 1981, so likely lacks newer
protocol innovations since then, but could help you get the basics of the 3270 protocol
right. (MVS 3.8J lacks a TCP/IP stack, so it doesn't directly support TN3270, but
Hercules accepts TN3270 connections and makes them appear as a physical 3270 to MVS.)
- IBM will sell you a mainframe emulator running latest IBM mainframe operating
systems on x86 hardware. It will cost you several thousand dollars a year though.
Many institutions used to offer public TN3270 access to library catalogues, but as most libraries have moved off the mainframe, most or all of those seem to have disappeared. In any case, using someone else's system for testing without their knowledge/permission could be ethically and/or legally questionable. You'll still find various organizations have non-public 3270 systems exposed to the Internet, but you won't get past the login screen, and the same comment about legality/ethics applies.