Example:
GTM> WRITE $ZPRIVILEGE("NETMBX,TMPMBX") 1 GTM> WRITE $ZPRIVILEGE("BYPASS") 0 GTM>
This uses $ZPRIVILEGE() to show that the process has the NETMBX and TMPMBX privileges, but not the BYPASS privilege.
Example:
IF $ZPRIVILEGE("SYSLCK") DO WORK
This loop uses $ZPRIVILEGE() as the argument to an IF command such that DO WORK only executes if the process has SYSLCK privileges.