>>>Try PROGRAM() or ASTACKINFO()
>
>Only SWAG: as I did not measure time needed for duplicate call in program(program(-1)-1) vs. astackinfo() filling array plus array access. I'd guess program(program(-1)-1) to be faster and to show less variation of runtime depending on stack level. When debugging or logging program state in depth: after astackinfo() you can obtain more info with ease as structure has been filled - but if you are after simple "who called me" info mentioned in yourOP to log semi automatically always hooked into your SQL operations I'd opt for function(s) call I guess to fulfill needs more KISS than others, here program(program(-1)-1).
>
>my 0.02 €
>thomas
A follow-up question please. So far, my test shows that program(program(-1)-1) will give what I am looking for.
Since I write this value to a log file, I want to be sure that it is always a string, not a numeric value. Can you think of a case where program(program(-1)-1) will give a numeric value?
Thanks.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham