The ability to use a compiled and linked 3GL subroutine is dependent on its being used in-line within a COMPUTE or DEFINE of a 4GL request or within a Dialogue Manager calculation. Unlike a 3GL stored procedure that returns data sets of data, a subroutine is used for an individual calculation.
For example, in the following Dialogue Manager procedure, the second -SET command calls the MTHNAME subroutine, which takes a number as an argument and does a lookup call for the corresponding month name:
-SET &MTHNUMBER = 1 ; -SET &MTHNAME = MTHNAME(&MTHNUMBER,'A13') ; -TYPE Month &MTHNUMBER is &MTHNAME
In the following sample, a COMPUTE command in a TABLE request calls the MTHNAME subroutine, which takes a number as an argument and does a lookup call for the corresponding month name:
TABLE FILE ... COMPUTE MTHNAME = MTHNAME(MTHNUMBER,'A13') ; END
WebFOCUS | |
Feedback |