# FILNAM

> [HTML Version](filnamsbr.htm)

**xcall FILNAM, ch, filename**

FILNAM returns _filename_ when only the file channel is known. This is frequently useful in conjunction with error trapping, where the trapping routine identifies the file only by channel.

**Parameters**

_ch_  ([Num](num.md))  \[in\]

the channel that the file is open on

_filename_  ([String](string.md))  \[out\]

will return the filename (as specified in the open statement) corresponding to the specified file channel. If no file is open on that channel, _filename_ returns a null string.