1752774 Members
4663 Online
108789 Solutions
New Discussion юеВ

Re: Prefixing

 
SOLVED
Go to solution
Wim Van den Wyngaert
Honored Contributor

Prefixing

I now have in DCL :
$ say = "write sys$output"
$ say "hello"

I would like to have that before "hello" the time is written and this only by modifying the definition of say.

E.g.
say:== write sys$output """''f$cvt()' """ +

but here the time is put in the symbol at definition time and not at "execution of say time".

Wim
Wim
10 REPLIES 10
Karl Rohwedder
Honored Contributor

Re: Prefixing

You could define a symbol SAY with a CALL SUB
e.g.

$ say = "Call SAY "
$ say " test"
$ exit
$ say: subroutine
$ ws F$time()+P1
$ exit
$ endsubroutine


regards Kalle
Wim Van den Wyngaert
Honored Contributor

Re: Prefixing

Kalle,

I thought of that but
1) this is slower
2) then I'm limited to 1 parameter, or even 9
3) constructs with + and - and lexicals could no longer be used without modification

Wim
Wim
Marc Van den Broeck
Trusted Contributor
Solution

Re: Prefixing

Wim,

try this:

a :== write sys$output f$time() + """ """ +

Rgds
Marc
Wim Van den Wyngaert
Honored Contributor

Re: Prefixing

Caught by my simplified use of DCL.
Thanks Marc.

Wim
Wim
Willem Grooters
Honored Contributor

Re: Prefixing

$ call a "whatever"
$ exit
$a: subroutine
$ write sys$output "''f$trnlnm("sys$node")'::''f$time ()' ''p1'"
$ return

Any text you can build up as a string. No "+" nor "-" ;)
Willem Grooters
OpenVMS Developer & System Manager
Ian Miller.
Honored Contributor

Re: Prefixing


$ HELP SET PREFIX

$ SET PREFIX "(!5%T) "
?
____________________
Purely Personal Opinion
Karl Rohwedder
Honored Contributor

Re: Prefixing

Pls. note that SET PREFIX needs verification turned ON.

regards Kalle
Jeroen Hartgers_3
Frequent Advisor

Re: Prefixing

try this one

say := write sys$output

say "''f$cvtime(,"absolute","hour")':''f$cvtime(,"absolute","minute")' hallo"

you get this
15:35 hallo

or

say "''f$cvtime(,"absolute","time")' hallo"

you get this

15:36:03.57 hallo
Jeroen Hartgers_3
Frequent Advisor

Re: Prefixing

this will work to

say = "write sys$output f$cvtime(,,"""time""")"