使用WTO通过C语言通过__asm__来编写多行消息
我已经使用C语言程序中的__asm __成功编写了单行WTO消息,因此: -
typedef struct WTO_Parm
{
short int len; /* Total length of structure */
short int mcsflags;
unsigned char message[126];
} WTOPARM;
:
pWtoParm = (WTOPARM *)__malloc31(sizeof(WTOPARM));
:
__asm__(" WTO MF=(E,(%[text]))\n"
:
:[text] "r"(pWtoParm)
:"r0","r1","r14","r15");
我正在努力的是如何以相同的方式编写多行WTO。
- 对于多行消息,如果从授权程序发行WTO,则必须在第一次WTO发行上清除注册0。对于从问题程序发出的WTO,寄存器0中的任何数据都被忽略。
我不是授权的程序, - 如果您代码linkage = svc ...
这是默认的
,并且您代码connect参数,您需要使用PSW密钥0-7或APF授权对主管国家的最低授权。
我不是授权程序 - 您必须在发出多行WTO之前清除注册0。唯一的例外是,当您使用寄存器0传递消息标识符以连接多线消息时。但是,在这种情况下,IBM®建议您使用连接参数而不是寄存器0。
i不能编码连接参数,因为我不是授权的程序,因此必须使用寄存器0,而是寄存器中的任何数据 忽略了0
从问题程序中
__asm__(" WTO MF=(E,(%[text]))\n"
" ST 1,%[wtoconn]\n"
:[wtoconn] "=m"(ConnID)
:[text] "r"(pWtoParm)
:"r0","r1","r14","r15");
。 connid
返回并使用WTO使用它。我尝试了寄存器0并连接=(即使上述项目符号列表表明既行之有效),但似乎被忽略了。我尝试使用用硬编码的数字(1234)放入connid
,但在R15中仍然没有任何错误,也表明它被忽略了,因为我应该得到RC = 08 。
我相信问题状态程序可以编写多行WTO,但也许不是通过使用连接。编写多行WTO的替代方法是什么,任何人都可以确认问题状态程序可以或不能使用连接/注册0。
I have successfully written out single line WTO messages using __asm__ from a C language program, thus:-
typedef struct WTO_Parm
{
short int len; /* Total length of structure */
short int mcsflags;
unsigned char message[126];
} WTOPARM;
:
pWtoParm = (WTOPARM *)__malloc31(sizeof(WTOPARM));
:
__asm__(" WTO MF=(E,(%[text]))\n"
:
:[text] "r"(pWtoParm)
:"r0","r1","r14","r15");
What I'm struggling with is how to write a Multi-line WTO in the same fashion.
The description of WTO - Write to operator says:-
- For a multiple-line message, you must clear register 0 on the first WTO issuance if the WTO is being issued from an authorized program. For WTOs issued from problem programs, any data in register 0 is ignored.
I am not an authorized program - If you code LINKAGE=SVC ...
which is the default
and you code the CONNECT parameter, you need a minimum authorization of either supervisor state with PSW key 0-7 or APF-authorized.
I am not an authorized program - You must clear register 0 before issuing a multiple-line WTO. The only exception is when you are using register 0 to pass a message identifier to connect multiple-line messages. However, in this case, IBM® suggests you use the CONNECT parameter rather than register 0.
I cannot code the CONNECT parameter as I am not an authorized program, so must use register 0, but any data in register 0 is ignored from problem programs.
I have been able to retrieve the message identification number used to connect WTO messages, on return from a successful WTO, with the following invocation:-
__asm__(" WTO MF=(E,(%[text]))\n"
" ST 1,%[wtoconn]\n"
:[wtoconn] "=m"(ConnID)
:[text] "r"(pWtoParm)
:"r0","r1","r14","r15");
But I have not been able to pass the ConnID
back in and have WTO make use of it. I have tried register 0 and CONNECT= (even though the above bulleted list suggests neither will work) but it seems to be ignored. I have tried putting in a ConnID
with a hard-coded number (1234) and still didn't get any error back in R15, also suggesting that it is being ignored as I should have got RC=08.
I am sure that problem state programs can write multi-line WTOs but perhaps not by using CONNECT. What are the alternative ways to write a multi-line WTO and can anyone confirm that problem state programs can or cannot use CONNECT/register 0.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于您的程序是不是授权的,因此您应该在手册的未授权版本中阅读WTO描述。参见 Z/OS MVS编程:汇编服务指南和
connect =,linkage =等是授权程序的参数。
未授权的程序只能用单一调用WTO 编写多达10行的多行WTO。没有连接。
Since your program is not an authorized one, you ought to read the WTO description in the non-authorized version of the manuals. See z/OS MVS Programming: Assembler Services Guide, and z/OS MVS Programming: Assembler Services Reference IAR-XCT
CONNECT=, LINKAGE=, etc. are parameters for authorized programs, only.
Unauthorzied programs can only write multi-line WTOs of up to 10 lines with a single call to WTO. No CONNECT.