Chapter Contents |
Previous |
Next |
WTOR |
Portability: | SAS/C extension |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
IMPLEMENTATION | |
EXAMPLE | |
RELATED FUNCTIONS |
SYNOPSIS |
#include <oswto.h> int WTOR(char *msg, ...);
DESCRIPTION |
The
WTOR
function implements the functionality of the OS/390 assembler
WTOR
macro. The
msg
argument is
the address of a null-terminated string. The remainder of the argument list
is a list of keywords followed, in most cases, by an argument specifying a
value for the keyword. The list is terminated by the
_Wend
keyword. The supported keywords and their associated data are
as listed under the
WTO
function with the
addition of the following:
_Wreplyadr
keyword is used to pass back the operator reply. The next argument should
be the address of an area which will be filled in after the
WTOR
completes. This area can be from 1 to 119 bytes in length.
_Wreplylen
keyword is used to indicate the length of the
_Wreplyadr
area. The next argument should be an unsigned character
variable containing an integer in the range of 1 to 119.
_Wecb
keyword
is used to identify an ECB to be
POST
ed
when the
WTOR
has received a response.
The next argument should be a pointer to a fullword, which is the ECB to be
POST
ed.
_Wreplycon
keyword is equivalent to the Assembler
RPLYISUR
keyword. The next argument should be the address of a 12-byte field
where the system will place the 8-byte console name and the 4-byte console
id of the console through which the operator replies to this message.
RETURN VALUE |
WTOR
returns
0
if the
WTOR
macro was successful. If the
WTOR
macro fails, it returns the return code from the macro, which will
be a positive value.
WTOR
may also return
-1
to indicate an unknown or invalid keyword
combination, or
-2
if there was not enough
memory to perform the
WTOR
.
IMPLEMENTATION |
The
WTOR
function is implemented by the source module
L$UWTO
.
EXAMPLE |
This example uses the
WTOR
to request some information from the operator. The program then
waits for a response and then writes the response back to the operator console.
#include <oswto.h> #include <ostask.h> int msgid; unsigned int uiEcb; unsigned char ucConsoleName[13] = " "; unsigned char ucOperatorReply[71]; memset(ucOperatorReply, ' ', 70); WTOR("Enter password:", _Wreplyadr, ucOperatorReply, _Wreplylen, 70, _Wecb, &uiEcb, _Wreplycon, ucConsoleName, _Wtoken, 12345, _Wend); ucOperatorReply[70] = 0; ucConsoleName[8] = 0; WAIT1(&uiEcb); WTO(0, _Wctext, "XXX99999", _Wtext, "Operator at console:", _Wtext, ucConsoleName, _Wtext, "replied:", _Wtext, ucOperatorReply, _Wroutcde, 11, _Wdesc, 7, _Wend);
RELATED FUNCTIONS |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.