GTPPN

Return information about the current process

 

 

USupported on UNIX
VSupported on OpenVMS
xcall GTPPN(project, programmer, privilege)

Arguments

project

The number of the project. (n)

programmer

The number of the programmer. (n)

privilege

Returned with one of the following values: (n)

1 = The current process has system privileges.

0 = The current process does not have system privileges.

Discussion

The GTPPN subroutine checks whether the current process has system privileges and returns the project and programmer number of the current process.

On UNIX, project is the group ID and programmer is the user ID. Privilege is set to 1 if you have root privileges.

On OpenVMS, project is the group ID and programmer is the member ID from the current user’s UIC. Privilege is set to 1 if the current process has the SYSPRV privilege.

On Windows, GTPPN returns 0.

Examples

The following program displays the user identification code and either a 1 if the current process has system privileges or a 0 if the current process does not have system privileges.

.define TTCHN           ,1
record output
                        ,a*, "UIC = ["
    project             ,d5
                        ,a*, ","
    programmer          ,d5
                        ,a*, "], priv = "
    privilege           ,d3

proc
    xcall flags(7004020, 1)
    open(TTCHN, o, "tt:")
    xcall gtppn(project, programmer, privilege)
    writes(TTCHN, output)
    close TTCHN
    stop
end