This is SQL 7/2000 thread. Is that the version you actually have in your environment?
This script appears that it will work.
I do not know how many servers you have in your environment, but it looks like you are using linked servers to run this. I would not be able to test this because of that fact.
I have 120 servers across all my environments. Creating a linked server is not practical here, and, there are other things to consider such as the security.
I'm guessing that a single account being used is a sysadmin on every server. That would violate the various rules we have in place, and if that account is compromised, then all of your servers are exposed.
It's not clear what you need to do. If you simply want to monitor servers and find out if a job is running, there are free tools that do this. although they probably do not run on SQL 7/2000
If you are actually using a higher version of SQL this may be a good choice
If you want to monitor jobs and perform some action based upon some logic, then you may be able to leverage DBATools PowerShell scripts
Again, I suggested creating a new thread in the appropriate forum.