The variable used for the POS=
specifier is defined only for a file connected with stream access, rather than the chosen direct access. 0
is a possible result in this case.
With direct access the position perhaps doesn't really have much general value: the point of such a connection is random access.
From the draft standard, section 9.10.2.22 (my emphasis):
The scalar-int-variable in the POS= specifier is assigned the number of the file storage unit immediately following the current position of a file connected for stream access. [..] If [..] the file is not connected for stream access [..] the variable becomes undefined