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 |
Line number in the parent IMOD responsible for invoking the currently executing IMOD. |
|
imodname |
Name of the parent IMOD. |
The $WHEREFROM() function produces these return codes:
|
120 |
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 © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |