Need to track which server in an agent group / VIP executed a job

Document ID : KB000102988
Last Modified Date : 02/07/2018
Show Technical Document Details
Introduction:
Need a method to write to the spool file, which server within a cluster a job actually executed on. 
Question:
Need a method to write to the spool file, which server within a cluster a job actually executed on. For example if we direct a distributed job to agent SERVER_AB, which points to a DNS containing both SERVER_A and SERVER_B, is it possible to see from the spool file (via the WSF command in CSF) whether the job actually ran on SERVER_A or SERVER_B? 
Answer:
While the job is running the actual node will be displayed in the “Job Status” field. 
It will not be in the spool file unless they add it to the script. This could be done by echoing HOSTNAME. This would be different depending on whether this is Windows or a flavor of UNIX. 

Also if you look at the ESP Auditlog the messages for the WOB will display the Agent name and the host where the job runs. See example I just ran below to my laptop. 

rbwin11sp7 TESTJOBS22/RBWIN11A.793/MAIN State EXEC SetStart Status(Executing at rbwin11sp7) 
Jobno(1356) JobLogId(81B16E062ECD4F356867EF94764C50B52591FCC0) User(rbwin11sp7) Host(BABRI02-222) 

Host should be server where it executed. 

Also 
In the AgentParm.txt the following parameter can be added. 
oscomponent.dumpenvironment=true 
Does the equivalent of an env command and sends it to the spool file. 
The HOSTNAME is in there… This will add extra data to the spool file entry.