Chapter Contents |
Previous |
Next |
TPUT/TGET |
Portability: | SAS/C extension |
SYNOPSIS | |
DESCRIPTION | |
RETURN VALUE | |
ERRORS AND DIAGNOSTICS | |
CAUTIONS | |
PORTABILITY | |
IMPLEMENTATION | |
SEE ALSO | |
EXAMPLE |
SYNOPSIS |
#include <tput.h> int TPUT(void *buffer, unsigned short bufsiz, unsigned int options); int TPUT_ASID(void *buffer, unsigned short bufsiz, unsigned short asid, unsigned int options); int TPUT_USERID(void *buffer, unsigned short bufsiz, char *userid, unsigned int options); int TGET(void *buffer, unsigned short bufsiz, unsigned int options);
DESCRIPTION |
These functions simulate the OS/390 TPUT
and TGET Assembler macros.
TPUT
sends a line of output to the terminal.
TPUT_ASID
and
TPUT_USERID
can be used for interuser communication.
TGET
reads a line of input from the terminal.
buffer
TPUT
,
TPUT_ASID
, and
TPUT_USERID
) or to the input buffer (
TGET
).
bufsiz
options
<tput.h>
. Table 4.3 on page 4-29 lists the options that can be used in each
macro. Use
0
as the option
argument to specify that all of the defaults should be taken.
asid
userid
char
array that contains the target userid.
The userid must be uppercase, left-adjusted, and padded on the right with
blanks if necessary.
If the macro name
_AMODE31
has been defined prior to including the
<tput.h>
header file, the macros generate
a call to the
_TPUT
function.
RETURN VALUE |
The macros return the value in register 15 after the SVC 93 completes.
ERRORS AND DIAGNOSTICS |
CAUTIONS |
PORTABILITY |
None of the macros are portable.
IMPLEMENTATION |
This function copies output data to a below-the-line
buffer before transmission (for TPUT) or reads input data into a below-the-line
buffer and then copies it to the buffer pointed to by
buffer
(for TGET).
If
_AMODE31
has been defined, the maximum transmission size is 1024 bytes. This
limit can be changed by recompiling L$UTPIO.
SEE ALSO |
See TSO/E Programming Services.
EXAMPLE |
/* Send greetings. Use the default options. */ rc = TPUT("Hello, world!",13,0);
Macros Defined for TPUT and TGET Options shows the macro names defined as option flags for the
TPUT
and
TGET
macros. In the macro columns, a yes entry
indicates that the flag
can be used in the options argument for the macro. A no entry
indicates that the flag cannot be used. An ignored entry indicates that the
flag is ignored if used.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.