Chapter Contents

Previous

Next
WTOR

WTOR



Write to Operator with Reply

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:


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

DOM , DOM_TOK , WTO


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.