openvmsdcl

How to enable case sensitive in HP openVMS DCL?


My DCL as below (TEST.EXE just print the input )

$ DEFINE DCL$PATH SYS$DISK:[],SYS$LOGIN:,SYS$SYSTEM:
$ PIPE TEST.EXE abc | DEFINE/JOB RET_VALUE @SYS$PIPE
$ x = f$logical("RET_VALUE")
$ WRITE SYS$OUTPUT x

I want to let this DCL show the result is "abc". But this DCL result will show "ABC".

I try add "SET PROCESS/CASE_LOOKUP=SENSITIVE" in DCL, but not workable.

Does anyone have any suggestion or tips? Thanks a lot.


Solution

  • Did you check whether the accepted answer in How to store a result to a variable in HP OpenVMS DCL? helps with this question?

    Your DEFINE command in the pipe is DEFINE/JOB RET_VALUE abc, which by DCL is changed to DEFINE/JOB RET_VALUE ABC. DCL doesn't change to UPPERCASE, when the equivalence-name is quoted, which would be a DEFINE/JOB RET_VALUE "abc". However, when you write "@SYS$PIPE", you have the string @SYS$PIPE as equivalence-name. In other words, within a string the redirector @ no longer works. So you have to get the string from SYS$PIPE as is, for example with a READ, as illustrated in the linked answer.

    PS: ... and you probably want the remove the .exe from test.exe in your pipe command.