Written by

Technical Specialist at InterSystems France
Question Stephane Devin · Feb 15, 2024

Can we use the READ command to make password prompt

Hi, I need to make a prompt for a password and to not display what the user is typing in a CMD. I want to use the read command but i'm not sure if it is possible with it.

Product version: IRIS 2023.3

Comments

Tim Huggins · Feb 15, 2024

Look at the parameters you can pass to the use command - the below will do what you want

u $i:(:"+S")

read password

or  if doing directly at the command line instead of from a called routine

u $i:(:"+S") read password 

0
Robert Cemper · Feb 15, 2024

same using USE 0:(:"/ECHO=0"")   and  USE 0:(:"/ECHO=1"") 
or
Use 0:(":"S") and Use 0:(:"N")   for "silent" and "normal"
more docs

0
Stephane Devin  Feb 15, 2024 to Robert Cemper

Thanks!
I figured I should revert to the normal read thanks to you

     use0:(:"S")// set read to silent mode to hide password
     read!,"Please enter your password: ", password
     use0:(:"N")// set read to normal mode for not screwing other input
0