+-------------------------------IBM Extension--------------------------------+
Determines the value of the specified environment variable.
Class
Subroutine
Result Value
The result is returned in the VALUE argument, not as a function result variable.
If the environment variable specified in the NAME argument does not exist, the VALUE argument contains blanks.
Examples
CHARACTER (LEN=16) ENVDATA
CALL GETENV('HOME', VALUE=ENVDATA)
! Print the value.
PRINT *, ENVDATA
! Show how it is blank-padded on the right.
WRITE(*, '(Z32)') ENVDATA
END
The following is sample output generated by the above program:
/home/mark
2F686F6D652F6D61726B202020202020
Related Information
See the getenv subroutine in the Technical Reference: Base Operating System and Extensions Volume 1 for details about the operating-system-level implementation.
+----------------------------End of IBM Extension----------------------------+