get ClassMethod
how can I get the classMethod name ?
like we get class name using "$CLASSNAME($THIS)", same way I need class Method ?
Discussion (0)0
Comments
You can use the $STACK system function:
Write$STACK($STACK(-1),"PLACE")Note that this will only work if $ECODE is clear (the empty string).
Thank you
You can use $$$CurrentMethod from Ensemble.inc used to get the current classmethod in your methods.
Thank you
Is there a way to get the calling method name ?
If a methodB() is invoked in MethodA() ;
In MethodB() , I would like to print the calling method name i.e., MethodA()
You can use the $STACK to get the previous stack call information by using the level and code string. Try the below code in your method "B". it returns the previous call stack information.
$STACK($STACK(-1)-1,"PLACE")