
Writing to the console in MVS systems
On Mon, 4 Mar 91 23:27:00 CST,
Quote:
>...
> My circumvention is to keep some WTO MF=L boiler-plate handy. It doesn't
> follow good programming practice in that there is no macro expansion,
> but my excuse is that there are far too many WTOs in the universe for
> IBM to alter the basic format. I shun MCSFLAGS and their ilk, and so
> avoid some of the potential difficulties.
There's no perfectly legal way of doing this, but there is a way that
still uses the macro expansion to do some of the work. Code
WTO1 WTO ' ',MF=L,whatever_other_operands_you_need
WTO1L EQU *-WTO1
Now you still have to account somewhat for the format of the
expansion (remember PRINT GEN!). Use code like this:
MVC WTOAREA+2(2),WTO1+2 copy flag bytes
MVC WTOAREA+4(???),message_text could be an EXecuted MVC
LA R15,4+length_of_message_text
STH R15,WTOAREA+4
LA R15,WTOAREA(R15) -> message text
MVC 0(WTO1L-4-1),WTO1+4+1 copy other stuff like MCSFLAG
This may be ugly, but it's much preferable to hand expanding ROUTCDE,
DESC, MCSFLAG, etc.
/Leonard