[Info-vax] /END=label
Marc Van Dyck
marc.gr.vandyck at invalid.skynet.be
Fri Aug 31 11:45:42 EDT 2018
Tim Sneddon explained on 28/08/2018 :
> Okay, so I will out myself...I've done this before and it does work. I
> rummaged and found the test I wrote some years ago to test it.
>
> Here is the DCL:
>
> bender_VTA32> type goto_test.com
> $ set verify
> $ set noon
> $
> $ go_to == "$sys$disk:[]go_to"
> $
> $ go_to works
> $
> $doesnt_work:
> $ say "This does not work"
> $ goto bail_out
> $
> $works:
> $ say "This does work"
> $ goto bail_out
> $
> $bail_out:
> $ set noverify
>
> Here is the PL/I program:
>
> bender_VTA32> type go_to.pli
> go_to: proc options(main);
> %include $libdef;
> %include $stsdef;
> %include lib$do_command;
> %include lib$get_foreign;
> %include lib$signal;
>
> dcl label var char(32);
>
> sts$value = lib$get_foreign(label);
> if (sts$success) then
> sts$value = lib$do_command('GOTO ' || label);
>
> call lib$signal(sts$value);
> end;
>
> And the evidence that such a crime is possible:
>
> bender_VTA32> pli go_to
> bender_VTA32> @goto_test
> $ set noon
> $
> $ go_to == "$sys$disk:[]go_to"
> $
> $ go_to works
> $works:
> $ say "This does work"
> This does work
> $ goto bail_out
> $bail_out:
> $ set noverify
>
> So, there you have it :-)
>
> Regards, Tim.
Perfect, you've confirmed for me that it works. V1.4 of my package will
be on the way very soon. Thank you very much !
--
Marc Van Dyck
More information about the Info-vax
mailing list