Functions and CALL Routines under OpenVMS |
Category: | Terminal-Access |
OpenVMS specifics: | All aspects are host-specific |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
TTCONTRL(control-specification,channel) |
is the control string as described for the TTOPEN function. The syntax for control-specification is the same as for TTOPEN, except that the DEVICE= attribute cannot be changed. The new characteristics take effect on the next I/O operation.
is the channel variable that was returned from the TTOPEN function.
Details |
If the TTCONTRL function executes successfully, the return value is 0. Otherwise, the return value is the OpenVMS error code that indicates why it failed.
Example |
The following example prompts the user for the password, reads the password (without echoing it to the terminal), and then writes out the password. The last step closes the channel:
length string $ 80; input=' '; chan=0; rc=ttopen("device=tt echo",chan); rc=ttwrite(chan,"0D0A"X||"Enter password: "); rc=ttcontrl("noecho",chan); rc=ttread(chan,input); rc=ttcontrl("echo",chan); rc=ttwrite(chan,"0D0A"X||"Password was: "||input); rc=ttclose(chan);
See Also |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.