ONFILE

ONFILE returns a character string whose value is the name of the file for which an input or output condition is raised.

If the name is a DBCS name, it is returned as a mixed character string. It is in context in an ON-unit (or any of its dynamic descendants) for an input or output condition, or for the ERROR or FINISH condition raised as the implicit action for an input or output condition.

Read syntax diagramSkip visual syntax diagramONFILE()

If ONFILE is used out of context, a null string is returned.