Page 1 of 1

MVC WTO11+8(10),A (explanation)

PostPosted: Thu Jun 21, 2012 3:49 pm
by utpalpal07
Hi,

           MVC WTO11+8(10),A                               
           MVC WTO11+20(2),B                                 
           MVC WTO11+24(4),C                                 
WTO11      WTO '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'               


please explain me the usage of the above code and its working.

Regards,

Utpal

Re: MVC WTO11+8(10),A (explanation)

PostPosted: Thu Jun 21, 2012 7:25 pm
by steve-myers
You have not told us what the contents of A, B and C are.

Why not write a small program that implements these instructions and find out for yourself?

Re: MVC WTO11+8(10),A (explanation)

PostPosted: Sun Jul 01, 2012 10:09 am
by steve-myers
Assemble and run this -
TEST     CSECT
         USING *,12
         SAVE  (14,12),,*
         LR    12,15
           MVC WTO11+8(10),A
           MVC WTO11+20(2),B
           MVC WTO11+24(4),C
WTO11      WTO '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
         RETURN (14,12),T,RC=0
A        DC    0CL10' ',10C'A'
B        DC    0CL2' ',2C'B'
C        DC    0CL4' ',4C'C'
         END   TEST

Re: MVC WTO11+8(10),A (explanation)

PostPosted: Thu Nov 01, 2012 2:32 pm
by Adom_swar
WTO11+8(10) stands variable WTO11's 9th byte to 17th bytes, MVC WTO11+8(10),A setting WTO11+8(10) to a.
i didn't test this code, i think it will display a message like %%%%%%%%AAAAAAAAAA%%BB%%CCCC%%%%%%%%%% in your JESMSG.

Re: MVC WTO11+8(10),A (explanation)

PostPosted: Thu Nov 01, 2012 2:47 pm
by Adom_swar
i tested it, message like this:

03.15.03 JOB05369 +AAAAAAAAAA%%BB%%CCCC%%%%%%%%%%%%%%%%%%

it looks like command wto occupy the first 10 bytes of wto11. wto11 point to the head address of that line.

Re: MVC WTO11+8(10),A (explanation)

PostPosted: Thu Nov 08, 2012 12:40 am
by steve-myers
You have the right idea, but are far wrong about the details.

WTO is a macro. It is not a command. An Assembler macro definition is a skeleton that causes the Assembler to generate code. SYS1.MACLIB(WTO) is the macro definition. You might want to look at it, though don't try to understand it; it is quite involved, and it represents more than 40 years of patches. If its original author is still alive, he would almost certainly not recognize it, possibly have trouble finding anything he wrote.

it looks like command wto occupy the first 10 bytes of wto11. wto11 point to the head address of that line.

It would appear you did not bother to look at the macro expansion (the code generated by the macro) in the program listing. There is no command there!