Consultor Eletrônico



Kbase 18438: 4GL/ABL: What Operating System function is called to get the return value of the 4GL USERID function
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/13/2008
Status: Verified

GOAL:

4GL/ABL: What Operating System function is called to get the return value of the 4GL USERID function when there are no records in the _User table?

GOAL:

Where does Progress obtain the user ID information that is displayed within the Progress PROMON utility?

GOAL:

Where does Progress get the return value of the 4GL USERID() function if there are no records in the _User table?

FACT(s) (Environment):

All Supported Operating Systems
Progress 8.x

FIX:

When a Progress client connects to a Progress database, one of the items recorded within the login message of the database log file is the user ID. The database broker saves this information in the user table entry assigned to that client. This information is then used by the PROMON (and PROSHUT) utility, as well as being held within the Virtual System Tables (VSTs) available in versions 8.2 and later.

On UNIX and LINUX platforms, Progress calls the "C" function getpwuid() to obtain the user's login ID. On Win32 operating platforms, Progress call the "C" function GetUserName() to obtain the user ID.

This is only used if the client doesn't use a progress user name. If they login with a valid user contained within the _user table we use that userid instead of one from the OS. If either of these "C" functions fail to return a value, then the PROMON utility will NOT be able to display the user ID.
The Progress 4GL USERID() returns the current database user name. If there are no _User records in the database, then the database user name becomes the current OS user name and the client client will call GetUserName() on Windows or getpwuid() on Unix to get the current user name.