As you say:  your .EXE is on the server and NOT on the CLIENT.

Some terminal emulators (e.g. KEA) once had the feature to launch a LOCAL command triggered by an ESC sequence.
But this requires your .EXE to be already installed on your LOCAL client.

You may need to have a telnet or SSH connection to your client.

Browsers typically don't allow this. But they may run JavaScript (which isn't  your .EXE)

a simple example how it works:

I create a routine %BANNER.int  next in my terminal

%BANNER  ;mnemonic demo
TOP      ;
         write #,%mybanner,!
         quit

next in my terminal

USER>set %mybanner="HI I'm a BANNER"_$c(13,10)_"============="

USER>use $IO::"^%BANNER"  write /TOP,"my first line",!

and that's my screen

HI I'm a BANNER
=============
my first line

 

the DEFAULT function of # for a terminal window emulating a CRT ist hardcoded.

see Terminal I/O WRITE

"Issuing WRITE # to a CRT terminal clears the screen and sends the cursor to the home (0,0) position."

using a Mnemonic Definition you may supply the required escape sequence to cover your needs.

but instead of WRITE #  you may need to use  WRITE /TOP  (just as an example)

For all about Mnemonics see Controlling Devices with Mnemonic Spaces.

Zen Application is the "package" you call from a browser and typically sets a common design.
Zen Pages are the individual web pages that make up your application.
Client Methods is JavaScript executed in your browser.
Server Methods run on the Caché Server and interact with the Zen page using HyperEvents.

I'd suggest you take a tour through the docs for details. 

 

Using Zen      Introduces Zen, the InterSystems framework for web application development.

Developing Zen Applications     
Addresses advanced Zen application programming issues such as security, localization,
client side layout management, and custom components.

you operate not on document object but on zenPage object

see docs:  Client Side Functions, Variables, and Objects  at the beginning >>>

  • Find a Zen component by id value. Returns the object that matches the input id.

  • The zen(id) JavaScript function is equivalent to the following client-side JavaScript method call on the page object:

  • zenPage.getComponentById(id)

  • You can use the zen(id) function wherever JavaScript syntax is appropriate; 

In namespace %SYS you have the utility  ^JRNDUMP  which displays the content of journal files in "readable" text format.
You may need to adapt it to your requirements.

Journal: c:\intersystems\cache\mgr\journal\20190808.004
   Address   Proc ID Op Directory        Global & Value
===============================================================================
    131088      6600 S  c:\intersystems+ %SYS("SERVICE","ECPCluster") = 0
    131152      6600 S  c:\intersystems+ %SYS("LASTSESSIONGUID") = "5ª"_$c(9)_"+
    131224      6600 BT
    131240      6600 ST c:\intersystems+ %SYS("SERVICE","ECPSessionVersion") = 2
    131316      6600 CT
    131644     10960 S  c:\intersystems+ SYS("LastLicenseKey") = "LicenseCapaci+
    132620      2600 S  c:\intersystems+ SYS("Security","UsersD","unknownuser")     132692     10960 K  c:\intersystems+ SYS("CLMANAGER")
    132740     10960 S  c:\intersystems+ SYS("CLMANAGER") = 1
    132792     10960 S  c:\intersystems+ SYS("CLMANAGER",1) = $c(127,0,0,1,15)_+
    132848     10960 S  c:\intersystems+ SYS("CLMANAGER",1,"started") = 1

Depending on your activities in the DB  this may take many many GB !
I'd suggest examining the content first from Mgmt Portal to see if this is what you expect. 

the class documentation has a special warning:

The table for this class should be manipulated only through object access,
the published API's or through the System Management Portal.
It should not be updated through direct SQL access.

As Security is a sensitive subject I think any other approach could cause serious damage or at least a risk.

it doesn't show numbers at end  
if you run it as single line command in a standard Caché terminal supporting $X,$Y.

newline sets $x=0, $i($Y)

USER>f i=1:1:100 w:i#3=0 "Fizz" w:i#5=0 "Buzz" w:'$x i w !
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
Buzz
Fizz
22
23
Fizz
Buzz
26
Fizz
28
29
FizzBuzz
31
32
Fizz
34
Buzz
Fizz
37
38
Fizz
Buzz
41
Fizz
43
44
FizzBuzz
46
47
Fizz
49
Buzz
Fizz
52
53