Question
· Feb 6

Track the global set location

Hello Community,

Is it possible to track or determine where the global variable was set (routine or class) in a form of like label+offset^routine?

Regards,

Ashok

Product version: IRIS 2024.1
$ZV: IRIS for Windows (x86-64) 2024.1.1
Discussion (9)1
Log in or sign up to continue

Most likely more context on what you are trying to look up would be helpful to understand how best to approach this request. What occurs to me immediately is this might be a good case for involving the WRC to help investigate.

If you want to look into it yourself I think you would want to read through the journals to find the global set in question and what is being done around that set, then tracking from the process to what else it was doing at the time. You may need to have a SystemCheck / irisstat running in order to correlate the process to whatever routine it was running.

Hello @Vic Sun

To summarize the situation, when executing a program, it calls various routines and classes, the expected global values is set somewhere in between the flow. I need to determine where a specific global was set.

The journal contains details like process ID, database values (old and new), and more. So, Maybe If the journal includes an additional entry in the format of label+offset^routine indicating where the global was set it's easy to track for my case.

The journal does not contain the line of code (imagine needing to log that information for every single global modification), so to find the relevant code would require the type of cross referencing I suggested. The other option I would suggest would be to go through the program in the debugger. Especially if you have a general sense of where the relevant change would be made. But again, maybe the best option depends on why you are looking for this specific global set.

Yes, the journal doesn't contain that information and maybe it's operational overhead to hold this additional information. As always using the program debugger and verify the routine. 

This is a general question, as I mentioned earlier there are multiple is routines and classes executed and the global are set via indirection, Xecute the predefined code and usual direct set. 

Thanks for your response @Vic Sun 

Sets to a global with or without PC, single of multiple on 1 set command or using execute are relatively easy to find. The issue comes with indirections (@) - for that I recommend writing code that will do the searches (a real cross referencing). Over time, this code can be improved.

Another option is using visual studio code where you have an option to search with regex. which will let you find most of the easy places.