[Info-vax] %PCSIUI-E-PRIVCLASS1 when using PRODUCT with PIPE
VAXman- at SendSpamHere.ORG
VAXman- at SendSpamHere.ORG
Wed Dec 12 07:23:48 EST 2018
In article <pupbbr$m32$1 at dont-email.me>, Chris Scheers <chris at applied-synergy.com> writes:
>Tim Sneddon wrote:
>> Jairo Alves <jairo.ptbr at gmail.com> wrote:
>>>> That is a DCL command procedure invocation. That command procedure
>>>> specifies the input be from the TT device. That then creates the DCL
>>>> equivalent of a subshell. And the output from DCL procedure
>>>> invocations can be redirected.
>>>>
>>> I see. It's a subshell, not a "pseudo-command file". I tried out of
>>> curiosity to run a loop in that command, and sure enough, DCL throws an
>>> exception, precisely because it is not emulating a command file, but
>>> instead a sub shell, where loops are forbidden.
>>>
>>> I> @TT:
>>> _I> n = 0
>>> _I> loop:
>>> %DCL-W-NOLBLS, label ignored - use only within command procedures
>>> \LOOP:\
>>> _I> wr sys$output n
>>> 0
>>> _> Exit
>>>
>>
>> It is being treated as a command procedure. Years ago I investigated
>> this as I was trying to figure a way to provide a better implementation
>> of $(SHELL ...) for MMK. DCL actually checks to see if the command
>> procedure is disk based or not. If it is disk based, then certain
>> constructs become possible, like multi-line IF-THEN-ELSE-ENDIF, loops,
>> etc. If not, then you get single-line DCL.
>>
>> If I had more time I'd dig out the specific place in the listings
>> where this is checked. Maybe VAXman (a.k.a Brian) has it memorised,
>> he has done quite of bit in the DCL space over the years.
>>
>> Regards, Tim.
>
>IIRC, DCL records the RFA for labels and ELSE/ENDIFs statement so that
>they can be directly skipped to.
Correct! If DCL encounters <label>: when processing the procedure, a
symbol is created, a label symbol, of name <label> and the RFa of the
source where it was encountered is the symbol's value. If a control
command uses <label> as a target, DCL can immediately transfer to the
record identified by the RFA. If the label specified in the control
command has not yet been encountered, (ie, there's no label symol) a
scan of the file ensues to locate <label>: and create the label symbol
before the transfer of control.
>If it is not an RMS disk file, records don't have an RFA.
Yup. It has to be a random access device.
>Another way to put it: The statements are not recorded and you can't
>rewind a terminal.
A terminal is not a random access device.
To answer Tim's assertion, I believe this is checked for in the module
INDIRECT.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG
I speak to machines with the voice of humanity.
More information about the Info-vax
mailing list