• EVE custom commands

    From David Meyer@papa@sdf.org to comp.os.vms on Sat Sep 20 22:15:51 2025
    From Newsgroup: comp.os.vms

    Digging into EVE and DECTPU I've found that you can use the EVE @
    command to run a sequence of EVE commands stored in an .EVE file, and
    the TPU command to run a TPU procedure defined in a .TPU file. You can
    use DEFINE KEY to invoke a "@ ..." or "TPU ..." command with a
    keystroke.

    Is there a way to define a custom EVE command that can be invoked
    directly from the DO prompt without prefixing "@" or "TPU"?
    --
    David Meyer
    Takarazuka, Japan
    papa@sdf.org
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Sep 20 12:02:18 2025
    From Newsgroup: comp.os.vms

    On 9/20/2025 9:15 AM, David Meyer wrote:
    Digging into EVE and DECTPU I've found that you can use the EVE @
    command to run a sequence of EVE commands stored in an .EVE file, and
    the TPU command to run a TPU procedure defined in a .TPU file. You can
    use DEFINE KEY to invoke a "@ ..." or "TPU ..." command with a
    keystroke.

    Is there a way to define a custom EVE command that can be invoked
    directly from the DO prompt without prefixing "@" or "TPU"?

    You can define EVE commands in your TPU$COMMAND file.

    Example:

    procedure eve_foo_bar
    message("Hi from eve_foo_bar!");
    endprocedure;
    !
    procedure eve_count(n)
    local
    msg, i;
    msg := "Counting:";
    i := 1;
    loop
    exitif i > int(n);
    msg := msg + " " + str(i);
    i := i + 1;
    endloop;
    message(msg);
    endprocedure;

    DO + foo bar

    DO + count 3

    (the examples only output a message, but they can obviously do anything)

    Disclaimer: they seem to work, but I am a bit rusty in TPU - I have done
    very little TPU in this century.

    Arne





    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Sep 20 12:14:44 2025
    From Newsgroup: comp.os.vms

    On 9/20/2025 12:02 PM, Arne Vajh|+j wrote:
    On 9/20/2025 9:15 AM, David Meyer wrote:
    Digging into EVE and DECTPU I've found that you can use the EVE @
    command to run a sequence of EVE commands stored in an .EVE file, and
    the TPU command to run a TPU procedure defined in a .TPU file. You can
    use DEFINE KEY to invoke a "@ ..." or "TPU ..." command with a
    keystroke.

    Is there a way to define a custom EVE command that can be invoked
    directly from the DO prompt without prefixing "@" or "TPU"?

    You can define EVE commands in your TPU$COMMAND file.

    Example:

    procedure eve_foo_bar
    -a-a-a message("Hi from eve_foo_bar!");
    endprocedure;
    !
    procedure eve_count(n)
    -a-a-a local
    -a-a-a-a-a-a-a msg, i;
    -a-a-a msg := "Counting:";
    -a-a-a i := 1;
    -a-a-a loop
    -a-a-a-a-a-a-a exitif i > int(n);
    -a-a-a-a-a-a-a msg := msg + " " + str(i);
    -a-a-a-a-a-a-a i := i + 1;
    -a-a-a endloop;
    -a-a-a message(msg);
    endprocedure;

    DO + foo bar

    DO + count 3

    (the examples only output a message, but they can obviously do anything)

    Disclaimer: they seem to work, but I am a bit rusty in TPU - I have done
    very little TPU in this century.

    A few more explanations.

    procedure eve_xxx_yyy_zzz(a1, a2, a3)

    becomes the command:

    xxx yyy zzz a1 a2 a3

    The TPU$COMMAND file (known as TPUINI file by 4.x people) are
    specified as:

    1) $ EDIT/TPU/COMMAND=file ...
    2) $ DEFINE/NOLOG TPU$COMMAND file
    3) TPU$COMMAND.TPU in current directory

    Arne

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Meyer@papa@sdf.org to comp.os.vms on Sun Sep 21 08:21:57 2025
    From Newsgroup: comp.os.vms

    Thank you! That's the trick I was looking for.
    --
    David Meyer
    Takarazuka, Japan
    papa@sdf.org
    --- Synchronet 3.21a-Linux NewsLink 1.2