– Create the display file with WAITRCD(300) as a parameter – for 5 minutes.
– Don’t use EXFMT in the RPG. Use WRITE followed by READ. When the read is encountered it will wait for the specified 300 seconds then return control to the RPG. In the RPG you will also need to code an INFDS for the workstation file, e.g. INFDS(IOFEED) . The data structure (IOFEED) should include a field with *STATUS as the buffer location, i.e. I STATUS *STATUS
When control returns, following the read, STATUS will be set to 1331 to indicate that the workstation wait interval was exceeded.