pxfgetlogin
- Date:
10-20-2011
NAME
PXFGETLOGIN - Gets user name
SYNOPSIS
SUBROUTINE PXFGETLOGIN(s, ilen, ierror)
CHARACTER*n s
INTEGER ilen, ierror
STANDARDS
IEEE standard interface for FORTRAN 77
DESCRIPTION
The PXFGETLOGIN routine uses the cuserid(3c) function to fill s with the user login name associated with the calling process.
When using the Cray Fortran compiler on UNICOS or UNICOS/mk systems, all arguments must be of default kind unless documented otherwise. The default kind is KIND=8 for integer, real, complex, and logical arguments.
The following is a list of valid arguments for this routine:
- s
An output character variable or array element for the user’s login name.
- ilen
An output integer variable containing the length of s.
- ierror
An output integer variable that contains zero if the user’s login name was successfully acquired or nonzero if PXFGETLOGIN was unsuccessful.
The PXFGETLOGIN routine may return the ETRUNC error value if the length of s is smaller than the length of the user’s login name.
EXAMPLES
In this example, PXFGETLOGIN is called and the returned user login name is printed.
program pxftest
character*16 s
integer ilen, ierror
c find the user name associated with this process
CALL PXFGETLOGIN(s, ilen, ierror)
print *,'user name = ',s,' length = ',ilen,' error = ',ierror
end
SEE ALSO
cuserid(3c)