Use the $WHEREFROM() function to determine the IMOD and statement number responsible for calling the current IMOD. This is useful in debugging invalid calls to common routines.
The $WHEREFROM() function has this syntax:
line imodname = $WHEREFROM()
The $WHEREFROM() function takes these arguments:
Line number in the parent IMOD responsible for invoking the currently executing IMOD.
Name of the parent IMOD.
The $WHEREFROM() function produces these return codes:
NOT CALLED FROM IMOD
Example
signal on syntax /* set trap */ parse arg w1 w2 w3 . /* begin processing */ ... ... syntax: /* trap code */ say 'Error' rc 'on line' sigl /* show location of error */ say 'IMOD called from $wherefrom() /* show source of call */ return
| Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |