Sujet : Re: Capturing DCL output in symbol
De : arne (at) *nospam* vajhoej.dk (Arne Vajhøj)
Groupes : comp.os.vmsDate : 14. May 2025, 14:20:47
Autres entêtes
Organisation : SunSITE.dk - Supporting Open source
Message-ID : <682498af$0$705$14726298@news.sunsite.dk>
References : 1 2 3 4
User-Agent : Mozilla Thunderbird
On 5/14/2025 9:08 AM, Arne Vajhøj wrote:
On 5/14/2025 5:31 AM, Lawrence D'Oliveiro wrote:
On Sat, 10 May 2025 13:40:45 +0200, hb0815 wrote:
There are limitations. This can only work if the equivalence string of
the logical name is valid, does not exceed a limit, etc.
>
You have to choose a logical name that won’t clash with any other use in
any other process in the same job, you have to remember to delete it
afterwards to avoid clutter ...
That is not so hard.
$ vf='f$verify(0)'
$ reslog = "RES_" + f$unique()
$ pipe 'p1' | -
(read sys$pipe lin ; qlin=""""+lin+"""" ; def/job/nolog 'reslog' &qlin) ; -
'p2'==f$trnlnm(reslog)
$ deas/job 'reslog'
$ if vf then exit f$verify(1)+1
$ exit 1
Going from the surgeon approach to the caveman approach:
$ vf='f$verify(0)'
$ tmpfnm = f$unique() + ".out"
$ define/nolog sys$output 'tmpfnm'
$ 'p1'
$ deas sys$output
$ ix = 0
$ open/read f 'tmpfnm'
$ loop:
$ read/end=endloop f line
$ ix = ix + 1
$ 'p2'_line_'ix' == line
$ goto loop
$ endloop:
$ close f
$ 'p2'_count == ix
$ if vf then exit f$verify(1)+1
$ exit 1
and:
$ @cmd2msym "show time" t
$ sh symb t_*
T_COUNT == 1 Hex = 00000001 Octal = 00000000001
T_LINE_1 == " 14-MAY-2025 09:15:57"
$ @cmd2msym "type z.txt" t
$ sh symb t_*
T_COUNT == 3 Hex = 00000003 Octal = 00000000003
T_LINE_1 == "A"
T_LINE_2 == "B"
T_LINE_3 == "C"
Arne