Products Resources Support About Us

SUBR function to call local subroutine

in UV it seems it is not possible to use the SUBR function for a local subroutine. Are there plans to implement this?

I would like to do something like below. Unfortunately this will not work. It give below run time errors.

Program “XXX”: Line 2, Unable to open the operating system file “/ZZZ/BP.O/LOCAL.SUBROUTINE”.
[ENOENT] No such file or directory
Program “XXX”: Line 2, Unable to load file “LOCAL.SUBROUTINE”.
Program “XXX”: Line 2, Unable to load subroutine.

IN.DATA = 2
RESULT = SUBR(‘LOCAL.SUBROUTINE’,IN.DATA)
CRT RESULT
STOP
END
*
SUBROUTINE LOCAL.SUBROUTINE(RESULT,IN.DATA)
RESULT = IN.DATA * 100
RETURN
END

Not sure if you are trying a local subroutine call, or calling a locally cataloged subroutine.

If this is all one program, and you are trying to call a local subroutine, you will have to remove the END statement after the STOP, the END statement causes the lines after the END to be ignored.

If this is two programs, then the message you are getting is stating that the LOCAL.SUBROUTINE object code can not be found. Can you try re-compiling and re-cataloging LOCAL.SUBROUTINE program and try running the XXX program again?

Mike