Sujet : Re: VMS x86-64 database server
De : arne (at) *nospam* vajhoej.dk (Arne Vajhøj)
Groupes : comp.os.vmsDate : 09. Jul 2025, 18:39:41
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <104m9gt$beqs$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
User-Agent : Mozilla Thunderbird
On 7/9/2025 12:51 PM, hb0815 wrote:
On 7/9/25 16:13, Arne Vajhøj wrote:
...
$ duo 1.txt/q,2.txt,3.txt/q
Q=notpresent
1.txt Q=present
2.txt Q=notpresent
3.txt Q=present
$ duo/q 1.txt/q,2.txt,3.txt/q
Q=present
1.txt Q=present
2.txt Q=present
3.txt Q=present
>
Where:
2.txt Q=present
is not what was intended.
If you look at the return code and not only check for success, you get the information that a qualifier is global or local With a small C program, I get
$ duo/q 1.txt/q,2.txt,3.txt/q
Q=global
1.txt:Q=local
2.txt:Q=global
3.txt:Q=local
Ah. There is a way. Not using path but via return status.
$ type duo.cld
define verb duo
image "sys$disk:[]duo"
parameter p1, value(type=$file, list, required)
qualifier q, placement=positional
$ type duo.pas
[inherit('sys$library:pascal$cli_routines','sys$library:starlet')]
program duo(input,output);
type
pstr = varying [255] of char;
var
fnm, a, b : pstr;
begin
if cli$present('Q') = CLI$_PRESENT then begin
writeln('Q=present')
end else begin
writeln('Q=notpresent')
end;
while odd(cli$get_value('P1', fnm.body, fnm.length)) do begin
write(fnm);
if cli$present('Q') = CLI$_LOCPRES then begin
write(' Q=present')
end else begin
write(' Q=notpresent')
end;
writeln;
end;
end.
$ set command duo
$ pas duo
$ link duo
$ duo 1.txt/q,2.txt,3.txt/q
Q=notpresent
1.txt Q=present
2.txt Q=notpresent
3.txt Q=present
$ duo/q 1.txt/q,2.txt,3.txt/q
Q=present
1.txt Q=present
2.txt Q=notpresent
3.txt Q=present
I am still not keen on the approach of the same
qualifier having different meaning for verb and
parameters though.
Arne