Giorgio,
yes, a job
can change its name, if it is prepared to do so. Some programs change the job name to the file that is being worked on - QD, for example will display the file being edited as part of the job name. It is, however, close to impossible to change a jobs name "from the outside", because it is only the programmer of the job that knows how much space he reserved for the name (which lives inside the job's memory), and by far the most executable programs assume a constant string and a constant length for the name - So, normally, there's just no room in the job to patch the name (and it is actually a bit complex to get the address of a job's name).
Distinguishing jobs by their name is also not a very good method - there is no guarantee at all that a job's name is unique - What's unique in the system ist its job ID.
What you can do easily, however, is to use FEX (which returns the job ID of the newly started job) instead of EX to start a job and remember the job IDs in BASIC variables (or wherever else you prefer, on a file in a ram disk, for example):
Code: Select all
100 a = FEX ("win1_progs_qd")
1000 REM Lots of program lines.....
2000 RJOB a MOD $10000,a DIV $10000,0
will do the same as
but save the job ID of the executable job in a and kill the job using its job ID and tag in line 2000.
Note all of this will only work on newer SMSQ/Es
Tobias