![]() Chapter Contents |
![]() Previous |
![]() Next |
| waitrd |
| Portability: | SAS/C extension |
| SYNOPSIS | |
| DESCRIPTION | |
| RETURN VALUE | |
| CAUTION | |
| ERRORS AND DIAGNOSTICS | |
| PORTABILITY | |
| IMPLEMENTATION | |
| EXAMPLE | |
| SEE ALSO |
| SYNOPSIS |
#include <wrterm.h>
int waitrd(char *inbuf, short inbufsz, char code1, char code2,
char *pbuf, int pbufsz, int *inlen);
| DESCRIPTION |
waitrd
invokes the CMS WAITRD function to read a line of input from
the program stack or terminal input buffer. The
waitrd
macro creates a WAITRD parameter list and generates an inline
SVC 202. A description of each of the arguments follows:
inbuf
inbufsz
code1
<wrterm.h>
contains definitions for a number of macros, each of
which corresponds to a WAITRD function code1 parameter. Macros Defined for the waitrd code 1 Argument lists the macro names
and the associated code1 values.
code2
<wrterm.h>
contains definitions
for a number of macros, each of which corresponds to a WAITRD function code2
parameter. Macros Defined for the waitrd code 2 Argument lists the macro names and the associated code2 values. For an explanation
of each of the code1 and code2 values, refer to Chapter 1 in VM/SP Command
and Macro Reference appropriate for your release.
pbuf
code2
is PROMPT_NO, this argument
is ignored.
pbufsz
code2
is PROMPT_NO, this argument
is ignored.
inlen
int
where the length of the input string is stored.
| RETURN VALUE |
waitrd
returns the value in register 15 when the WAITRD function returns.
| CAUTION |
In XA CMS or ESA,
waitrd
can only be used in 24-bit addressing
mode.
| ERRORS AND DIAGNOSTICS |
| PORTABILITY |
waitrd
is not portable.
| IMPLEMENTATION |
The
waitrd
macro creates a WAITRD parameter list in the CRABTAUT work area.
(See the SAS/C Compiler and Library User's Guide for more information
about CRABTAUT.)
| EXAMPLE |
/* Read an input line of at most 25 characters */
/* from the terminal. */
char *name[25] ;
char *prompt = "Please enter your name."
int rc;
int inlen;
/* Ask for the input to be */
/* translated to uppercase. */
rc = waitrd(name,sizeof(name),STACK_UPCASE,PROMPT_YES,
prompt, strlen (prompt),&inlen);
| SEE ALSO |
See VM/SP CMS Command Reference.
| Macro Name | Corresponding Value |
|---|---|
| PROMPT_DIRECT | B |
| TYPE_DIRECT | D |
| PROMPT_YES | P |
| PROMPT_NO | 0 |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.