HOSTNM — Get system host name#

HOSTNM(NAME)#

Retrieves the host name of the system on which the program is running.

Parameters
  • C – Shall of type CHARACTER and of default kind.

  • STATUS – (Optional) status flag of type INTEGER. Returns 0 on success, or a system specific error code otherwise.

Returns

In either syntax, NAME is set to the current hostname if it can be obtained, or to a blank string otherwise.

Standard:

GNU extension

Class:

Subroutine, function

Syntax:
CALL HOSTNM(C [, STATUS])
STATUS = HOSTNM(NAME)