Page 1 of 2

WTO and parameters T / ROUTCDE

PostPosted: Tue Apr 19, 2011 9:38 pm
by michel123
HELLO,

To debug a module assembly, I wanted to use the WTO macro for myself without interfering with the operator. What value then give ROUTCDE?

Also, what is the use of the parameter T?

Thanks.

Re: WTO and parameters T / ROUTCDE

PostPosted: Tue Apr 19, 2011 11:28 pm
by steve-myers
See the manual here. Carefully READ the discussion of the ROUTCDE and DESC parameters. There is no combination of parameters that will absolutely prevent a WTO message from appearing on an operator console, but a careful use of ROUTCDE and DESC can route the message to a non-existent console.

In most environments these days, the operators ignore most messages unless the combination of ROUTCDE and DESC force the message to be retained on the console. This you do not want to do,

Re: WTO and parameters T / ROUTCDE

PostPosted: Wed Apr 20, 2011 1:00 pm
by michel123
So the combination ROUTCDE = (11), DESC = (7) is a good choice for my tests?

Re: WTO and parameters T / ROUTCDE

PostPosted: Wed Apr 20, 2011 1:23 pm
by prino
michel123 wrote:So the combination ROUTCDE = (11), DESC = (7) is a good choice for my tests?

Given the system you are going to use this, I wouldn't worry to much about messages going to the operator. :D

Please post only on one forum...

Re: WTO and parameters T / ROUTCDE

PostPosted: Wed Apr 20, 2011 7:11 pm
by michel123
It then noted.

Exuse me but I did not see the connection between the two forums. I was surprised to find only some pseudos, but without the rapprochement.

Thanks.

Re: WTO and parameters T / ROUTCDE

PostPosted: Thu Apr 21, 2011 8:03 am
by steve-myers
WTO 'message',ROUTCDE=11,DESC=7 is sometimes called WTP (Write To Programmer), though there is no such macro. If there is no requirement to insert variable data into the message this can be a useful, though very clumsy and inefficient debugging tool. It also damages registers (14, 15, 0 and 1) you might be using for other purposes. In my own code I limit it to writing an error message if the program cannot open the usual message dataset.

Re: WTO and parameters T / ROUTCDE

PostPosted: Thu Apr 21, 2011 8:19 am
by steve-myers
I'll even give you a freebie.
         MACRO
&NAME    WTP   &MSG
&NAME    WTO   &MSG,ROUTCDE=11,DESC=7
         MEND

The generated code can be pretty ugly.
                                     14          WTP   'TEST OF WTP MACRO'
00000E 0700                          17+         CNOP  0,4
000010 4510 C02E            0002E    18+         BAL   1,IHB0004A
000014 0015                          19+         DC    AL2(21)
000016 8000                          20+         DC    B'1000000000000000'
000018 E3C5E2E340D6C640              21+         DC    C'TEST OF WTP MACRO'
000029 0200                          22+         DC    B'0000001000000000'
00002B 0020                          23+         DC    B'0000000000100000'
00002E                               24+IHB0004A DS    0H
00002E 0A23                          25+         SVC   35

It's actually a little uglier, but this board cuts off code lines at 80 bytes, so I can't put all of it here.

Re: WTO and parameters T / ROUTCDE

PostPosted: Thu Apr 21, 2011 9:48 pm
by michel123
Thank you for the freebie !

In fact, WTO serves me to trace the various blocks of my program to see where I go in case of problem. And to see the contents of the fields and records, rather a SNAP ..

Re: WTO and parameters T / ROUTCDE

PostPosted: Fri Apr 22, 2011 1:23 am
by steve-myers
michel123 wrote:... In fact, WTO serves me to trace the various blocks of my program to see where I go in case of problem. And to see the contents of the fields and records, rather a SNAP ..

Yes, but you want to build variable data into your message, and that is not so easy.

You're probably better off routing this output to a JES dataset. In a HLL like Cobol it's probably easier, and no one will get angry at you for flooding an operator console with trash.

Re: WTO and parameters T / ROUTCDE

PostPosted: Tue Jan 13, 2015 10:50 am
by hibaaryan
In your macro you define your storage areas X, X1, and X2 as adjacent to each other. Each is a fullword. When you increment the address of X by four bytes, it points to X then points to the location of X1, containing your first square. You increment X1 by four bytes, then it points to the location of X2,

This happens each time through the loop. One way would be to increment by 12 for each. Another way would be to seperate, in the macro definition, X, X1 and X2 so that they are 10 fullwords apart.