IBM has made just about everything in free-format RPG truly free-format…except O-specs. But you can print without needing an externally defined printer file.
By Sam Lennon
Instead of adding free-format support for O-specs, IBM expects you to use an externally defined printer file, which can do everything O-specs can. But recently, I wanted to print a simple report and didn't want to create a separate printer file. I remembered reading somewhere about writing to a program describer printer file from a data structure. It turns out to be easy in free-form RPG, with code like this: