Operating System - OpenVMS
1745872 Members
4128 Online
108723 Solutions
New Discussion юеВ

Re: DCL INQUIRE and string Case Sensitivity

 
SOLVED
Go to solution
niall oconnor
Advisor

DCL INQUIRE and string Case Sensitivity

Hi Folks,

Not sure if this is possible or not in DCL, Basically I need to enter a string using the DCL INQUIRE command and for the value not automatically be converted to uppercase, is this possible?

eg.
$inquire lower_case "Enter something in lower"
$sh sym lower_case

the symbol will always be in uppercase
8 REPLIES 8
Joseph Huber_1
Honored Contributor

Re: DCL INQUIRE and string Case Sensitivity

Yes, but the user entering the string has to use string-quotes, i.e.
entering lowercase results in LOWERCASE
entering "lowercase" results in lowercase

If the user can't be trained to use DCL quoting, a simple
READ/PROMPT="Enter something in lower" lower_case
will not touch the string casing.
http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor
Solution

Re: DCL INQUIRE and string Case Sensitivity

correction: the full READ command is:

READ/PROMPT="Enter something in lower" SYS$COMMAND lower_case
http://www.mpp.mpg.de/~huber
Volker Halle
Honored Contributor

Re: DCL INQUIRE and string Case Sensitivity

Niall,

instead of using DCL INQUIRE, use DCL READ:

AXPVMS $ read/prompt="Enter mixed-case string: " sys$command x
Enter mixed-case string: xxYY
AXPVMS $ sho sym x
X = "xxYY"

Volker.
Jan van den Ende
Honored Contributor

Re: DCL INQUIRE and string Case Sensitivity

Niall,

Just replace INQUIRE by READ SYS$COMMAND symbolname.
Do realise that that symbol will be a LOCAL symbol; if you need the value at other command levels you will have to assign a global symbol with the value of the just-read local ymbol.
You can use a /PROMPT="prompt string"
You can use a timeout, errorlabel etc.
Full info in HELP READ.
I do not think I have used INQUIRE myself in the last 20-odd years.

hth

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
niall oconnor
Advisor

Re: DCL INQUIRE and string Case Sensitivity

That's perfect Joseph, the Read Prompt is exactly what I was looking for! Many thanks!
Niall.
niall oconnor
Advisor

Re: DCL INQUIRE and string Case Sensitivity

Thanks Volker and Jan too, looks like I should question why I ever used the inquire command at all! Many thanks folks. Niall.
niall oconnor
Advisor

Re: DCL INQUIRE and string Case Sensitivity

By Using the READ DCL command rather than INQUIRE gets over the limitation that I was having.
Fekko Stubbe
Valued Contributor

Re: DCL INQUIRE and string Case Sensitivity

Be aware: With READ you do not have recall capabilities (only the last line)