__getuserid() — Retrieve the active MVS user ID
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
z/OS® UNIX | both | OS/390 V2R9 |
Format
#define _OPEN_SYS_EXT
#include <sys/ps.h>
int __getuserid(char *userid, int userlen);
General description
Retrieves the current active user ID for the requester. When successful, the output in user ID will be the active MVS™ userid.
Returned value
If successful, __getuserid() returns 0.
If unsuccessful, __getuserid() returns -1 and sets errno to one
of the following values:
- Error Code
- Description
- EINVAL
- One of the following error conditions exists:
- The length supplied by userlen does not allow enough storage in the string to retrieve the MVS user ID.
- The z/OS UNIX system service returned a failure.