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

Your terminal prompt can be configured to display the instance. 

see TerminalPrompt  eg.  config>namespace>

[Startup]    TerminalPrompt="3,2"

and you name your config  "SMP<portnumber>"    which should be valid.
eventually only "<portnumber> " might do it as well.

On the page System Administration > Configuration > Additional Settings > Startup, in the TerminalPrompt row, select Edit.

ENSEMBLE may have some signal mechanic.

BUT at Caché level you still have Special Variable $HALT as the last chance handler.
all details https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_vhalt

Most important: 

If you have $HALT set and also have code defined for ^%ZSTOP when a HALT is issued, the $HALT is executed first. $HALT can prevent the termination of the process, if its halt trap routine does not contain a HALT command.   !!!!

the popular use of is INTERACTIVE.

But there is a BATCH option:   

SAMPLES>zn "%SYS"
 
%SYS>d BATCH^GBLOCKCOPY
 
1) Manage Batches
2) Run a Batch
3) Restart a Batch
4) Add Processes to a running Batch
5) Stop a Running batch
6) Monitor Running Batch
7) Batch Report
8) Exit
 
Option? 1
 
1) Create a Batch
2) Edit a Batch
3) List Batches
4) Delete a Batch
5) Exit
 
Option?

I never used it myself.

it seems to me you should find it in  ^%SYS("GBLOCKCOPY")

But the source code is open in %SYS and easy to read:

BATCH
 !
 !,"1) Manage Batches"
 !,"2) Run a Batch"
 !,"3) Restart a Batch"
 !,"4) Add Processes to a running Batch"
 !,"5) Stop a Running batch"
 !,"6) Monitor Running Batch"
 !,"7) Batch Report"
 !,"8) Exit"
 !
 Option=$$OPTION("Option? ",8,8)
 Option=1 BATCHMANAGE BATCH
 Option=2 BATCHRUN BATCH
 Option=3 BATCHRESTART BATCH
 Option=4 BATCHADDPROCESSES BATCH
 Option=5 BATCHSTOP BATCH
 Option=6 BATCHMONITOR BATCH
 Option=7 BATCHREPORT BATCH
 q
BATCHMANAGE
 !
 !,"1) Create a Batch"
 !,"2) Edit a Batch"
 !,"3) List Batches"
 !,"4) Delete a Batch"
 !,"5) Exit"
 !
 Option=$$OPTION("Option? ",5,5)
 Option=1 BATCHCREATE BATCHMANAGE
 Option=2 BATCHEDIT BATCHMANAGE
 Option=3 BATCHLIST BATCHMANAGE
 Option=4 BATCHDELETE BATCHMANAGE
 q
BATCHCREATE $zt="BATCHE"
 Name=$$GETNAME("Batch name to create? ",0,0) q:POP
 f  !!,"Adding to batch: "_Name BATCHSETUP q:POP
 BATCHCREATE
BATCHEDIT   $zt="BATCHE"
 Name=$$GETNAME("Batch name to edit? ",1,0) q:POP
 Status=$$GETSTATUS(Name,1)
 $p(Status,"~",4)'="Queue" !,"Batch "_Name_" has been run, please re-enter" BATCHEDIT
 $$YN("Do you want to add to the batch","Y")="Y" f  !!,"Adding to batch: "_Name BATCHSETUP q:POP
 $$YN("Do you want to delete entries from batch "_Name,"N")="N" BATCHEDIT
BATCHEDIT1
 SUMMARYREPORT(Name,0)
 Option=$$OPTION("Delete which entry? ",0,+$o(^|"^^"_$zu(12)|%SYS("GBLOCKCOPY",Name,""),-1))
 Option=0 BATCHEDIT
. . . . . . . .

HTH,

to count the number of changes you may use this approach

 Set ^Data("Cambridge") = "1" if  $increment(change("Cambridge"))
 Set ^Data("New York") = "2" if  $increment(change("New York"))
 Set ^Data("Boston") = "3" if  $increment(change("Boston"))
 Set ^Data("London") = "4" if  $increment(change("London"))
 Set ^Data("Athens") = "5" if  $increment(change("Athens"))
 Set ^Data("Athens") = "6" if  $increment(change("Athens"))
 Set ^Data("Athens") = "7" if  $increment(change("Athens"))

zw change

change("Athens")=3
change("Boston")=1
change("Cambridge")=1 
change("London")=1 
change("New York")=1

This is a rather common misunderstanding.
The naming GLOBAL was created in the 60ties.
Long before any other programming language even had anything named Global or similar.

GLOBAL in Caché is a persistent storage component that builds the backbone of (SQL) Tables and Persistent Objects.

see this documentation: Using Caché Globals