EasyManuals Logo
Home>HP>Software>TACL

HP TACL User Manual

HP TACL
235 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #48 background imageLoading...
Page #48 background image
Accessing Terminals
Developing TACL Programs
2–28 107365 Tandem Computers Incorporated
Use the macro in Figure 2-13, lock, to lock a terminal until the user types the
password.
Figure 2-13. Locking a Terminal
?SECTION lock MACRO
#FRAME
#PUSH pw == password
#PUSH prompt == prompt variable
#PUSH rslt == result of #CHANGEUSER call
#PUSH userinfo == result of USERS call
#PUSH line
#SET rslt 0
== Define the clear screen escape sequence
[#DEF ascii STRUCT == Clear the screen
BEGIN
BYTE byt0 (0:1) VALUE 27 73; == decimal escape-I
CHAR clear (0:1) REDEFINES byt0;
END;
]
#OUTPUT [ascii:clear(0:1)]
== Disable break mode
#SET #BREAKMODE DISABLE
== Obtain information about the current user
USERS /OUTV userinfo/
#EXTRACTV userinfo line
#EXTRACTV userinfo line
[#SET prompt Password for [#USERNAME
[#CHARGET userinfo 22 FOR 8]]: ]
== Read a password (no echo) and attempt to log on:
[#LOOP |DO|
#INPUTV /NOECHO/ pw prompt
#SET rslt [#CHANGEUSER [#USERNAME [#CHARGET userinfo &
22 FOR 8]] [pw]]
[#IF NOT [rslt] |THEN| == An error occurred
#OUTPUT Invalid password!
]
|UNTIL| rslt
]
== After a successful logon, enable break mode and exit the
== macro:
#SET #BREAKMODE ENABLE
#UNFRAME

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP TACL and is the answer not in the manual?

HP TACL Specifications

General IconGeneral
BrandHP
ModelTACL
CategorySoftware
LanguageEnglish

Related product manuals