| System Functions |
|
| Formats | PGM(lineno[,prog_level][,ERR=stmtref]) Where:
|
|||||||
| Returns | String, compiled format of statement. | |||||||
| Description | The
PGM( ) function returns a string
containing the internal (compiled) format of a given
program statement number. If the line number is -1, the
main (level 1) program name is returned; -2 returns the
current program name and -3 returns the complete name of
the program as specified on the CALL/LOAD/PERFORM
or RUN. If the statement number does not exist, and an ERR= option is specified, ProvideX returns Error #21: Statement number is invalid and transfers control to stmtref. If the statement number does not exist, and the ERR= option is omitted, ProvideX returns the next higher statement. A typical occasion to use the prog_level would be to obtain lines from programs higher in the call stack such as X$ = LST(PGM(1, TCB(12) - 1)) which would return the first line of the calling program. |
|||||||
| Examples | The
following examples illustrate different uses for the PGM(
) function.
|
|||||||