I’m in favor of wiring up the chairs!
Wiring chairs gets expensive, especially the programming to control the circuits.
I can imagine possible uses of the DSM APIs, as well as uses of WRITE … AFTER ROLLING in COBOL (which can give some very nice data entry effects as well as rolling log or status file displays).
Maybe something like this could be useful:<pre>
/* CRTCMD CMD( QGPL/DSPLNGTXT ) +
PGM( QSYS/QUILNGTX ) +
SRCFILE( mylib/QCMDSRC ) +
ALLOW( *IMOD *IPGM *EXEC *INTERACT ) +
DSPLNGTXT: CMD PROMPT(‘Display long text’) /* QUILNGTX */
PARM KWD(TXT) TYPE(*CHAR) LEN(3000) MIN(1) +
EXPR(*YES) CASE(*MIXED) CHOICE(‘*char +
3000’) PROMPT(‘Text to display’)
PARM KWD(TXTLEN) TYPE(*INT4) MIN(1) CHOICE(‘*dec +
(5 0)’) PROMPT(‘Length of text’)
PARM KWD(MSGID) TYPE(*CHAR) LEN(7) +
/* MSGF: The qualified name of the *msgf to get message from… */
PARM KWD(MSGF) TYPE(MSGFNAM) PROMPT(‘Qualified +
message file name’)
MSGFNAM: QUAL TYPE(*NAME) LEN(10) DFT(QCPFMSG)
QUAL TYPE(*NAME) LEN(10) DFT(*LIBL) +
SPCVAL((*LIBL)) PROMPT(‘Message file +
/* ERRCOD: Required ERRCODE definition minimum… */
PARM KWD(ERRCOD) TYPE(*INT4) CONSTANT(0)</pre>
I had the most difficulty in coming up with an example to show how it might be used. This <b>should</b> copy/paste directly into a SEU display for any kind of CL program:<pre>
DSPLNGTXT TXT(‘– w w h h ooo aa +
— w w w h h o o a a +
— w w w w hhhhh o o +
— w w h h ooo a a !!’) TXTLEN(265)
That’s hardly a great example. I just fiddled around for a few minutes trying to cause something readable to display. I’m sure a real display designer could come up with something better.
The *CMD is mostly to make the API (QUILNGTX) easily accessible in CL. A direct prototyping of the API into a procedure that could be called at any time would be more useful. The *CMD should help to grasp what the API does and how it works. The word-wrapping makes my example harder than the API actually is.