JBNAM

Provide the image name of the calling program

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
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