[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here D.7 PTD$WRITE — Write Data to Pseudoterminal
HP OpenVMS I/O User’s Reference Manual: OpenVMS Version 8.4 > Appendix D Control Connection Routines

D.7 PTD$WRITE — Write Data to Pseudoterminal

Inputs data to the pseudoterminal and reads any immediately echoed characters.

D.7.1 Format

PTD$WRITE chan [.astadr] [,astprm] wrtbuf, wrtbuf_len [,echobuf]
           [,echobuf_len]

D.7.2 Returns

OpenVMS usage:

longword (unsigned)

type:

write only

access:

by value

D.7.3 Arguments

chan

OpenVMS usage:

channel

type:

word (unsigned)

access:

read only

mechanism:

by value

Number of the I/O channel assigned to the new pseudoterminal. This channel is only intended to be used for PTD$XXX operations.

astadr

OpenVMS usage:

ast_procedure

type:

procedure value

access:

call without stack unwinding

mechanism:

by reference

AST service routine to be executed when PTD$READ completes. If you specify astadr, the AST routine executes at the same access mode as the caller of the PTD$WRITE routine.

astprm

OpenVMS usage:

user_arg

type:

longword (unsigned)

access:

read only

mechanism:

by value

AST parameter to be passed to the AST service routine specified by the astadr argument.

wrtbuf

OpenVMS usage:

char_string

type:

character coded text string

access:

write only

mechanism:

by reference

Address of the read I/O status longword. The first character position in an I/O buffer to receive all output is this address plus 4. The wrtbuf argument must be in the range specified in the inadr argument of the PTD$CREATE routine; otherwise, an SS$_ACCVIO status is returned.

wrtbuf_len

OpenVMS usage:

word_unsigned

type:

word (unsigned)

access:

read only

mechanism:

by value

Number of characters to be written to the pseudoterminal. These characters appear as input to the terminal side of the pseudoterminal.

echobuf

OpenVMS usage:

char_string

type:

character coded text string

access:

write only

mechanism:

by reference

Address of the echo I/O status longword. The first character position in an I/O buffer to receive all output is this address plus 4. The echobuf must be in the range specified by the inadr argument of the PTD$CREATE routine; otherwise an SS$_ACCVIO status is returned.

echobuf_len

OpenVMS usage:

word_unsigned

type:

word (unsigned)

access:

read only

mechanism:

by value

Number of characters that can be read from the pseudoterminal. If an echo buffer is specified, up to echobuf_len characters can be stored in it.

D.7.4 Description

PTD$WRITE inputs data to the pseudoterminal and reads any immediately echoed characters. PTD$WRITE allows you to specify a buffer to receive any output generated by the write; you do not need to issue a separate read request to read this data.

D.7.5 Return Values

SS$_NORMAL

Normal successful completion.
SS$_ACCVIOUnable to read an argument, or invalid read buffer address.

SS$_DATALOST

The terminal driver type-ahead buffer is full and character written was lost.
SS$_DATEAOVERUNThe terminal type-ahead buffer is getting full; attempts to send more data might result in loss of characters.
SS$_DEVOFFLINEDevice is off line and request cannot proceed.
SS$_EXASTLMInsufficient AST quota for notification AST.

SS$_INFMEM

Insufficient memory.
SS$_IVBUFLENBuffer size supplied is illegal.

SS$_IVCHAN

Illegal channel.
SS$_NOPRIVInsufficient privilege to perform request.