JBNAM

Provide the image name of the calling program

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall JBNAM(image)

Arguments

image

Returned with the image name. It should be large enough to hold 63 characters. (a)

Discussion

The JBNAM subroutine retrieves the image name of the calling program.

On Windows and Unix, JBNAM returns the module name of the main module.

On OpenVMS, JBNAM performs a $GETJPI(JPI$_IMAGENAME) and returns the result.

Examples

record
    image       ,a63
    chan        ,i4 ,2
proc
    open(chan, o, "TT:")
    xcall jbnam(image)
    writes(chan, %atrim(image))
    close chan
    stop
end