I am trying to use the WTO instruction with help in Metal C to print "Hello World" in my work log. This is based on the example in section 1.2.3.5 of the Z / OS V1R10.0 Metal C Programming Guide and Help. Appears when I use the WTO. I am having problems with my buffer containing 0 or ASCII for EBCDIC conversion. Ive inserted the appropriate section of my work log below, then my code, and then the code from the IBM example, which I could not compile. Work log
01/09/56 J0686275 IEF403I IMIJWS0G - STARTED - TIME = 09/09/56
01/09/56 J0686275 + ... 0 .......
01/09/56 J0686275 - --TIMINGS (MINS.) - ---- PAGING COUNTS ---
01.09.56 J0686275 -IMIJWS0G GO 00 6 .00 .00 .00 1292 0 0 0 0 0 1
01/09/56 J0686275 IEF404I IMIJWS0G - ENDED - TIME = 09/09/56
My code
#include #include #include int main () {struct WTO_PARM {unsigned short len; unsigned short code; char * text; } wto_buff = {4 + 11, 0, "hello world"}; __asm ("WTO MF = (E, (% 0))":: "r" (& wto_buff)); } IBM Code
int main () {
struct WTO_PARM {
unsigned short len;
unsigned short code;
char text [80]; } wto_buff = {4 + 11, 0, "hello world"}; __asm ("WTO MF = (E, (% 0))":: "r" (& wto_buff));
return 0;
}
Jared source share