The FILENAME statement is a SAS global statement that manipulates filerefs. In IMLPlus, it is normally the case that you must place a SAS global statement in a SUBMIT block or prefix the statement with the @ character. However, as of IML Studio 12.3, IMLPlus provides full support for the FILENAME statement as a native IMLPlus statement.
In addition to the standard syntax of the FILENAME statement, IMLPlus provides an IMLPlus-specific form that accepts an IML expression:
filename fileref (external-file-expression);
The argument external-file-expression must evaluate to a scalar character matrix. IMLPlus processes the FILENAME statement as if it were
filename fileref "evaluated-external-file-expression";
Example:
pathname = "C:\MyData\MyFile.txt"; filename txtfile (pathname);