If you need to open file given to program by parameter
//Program interface declaration
dcl-pi *n ;
Library char(10) ; // Library name
end-pi ;
dcl-s Filename char(21) ;
dcl-f TheFile usropn extfile(Filename) usage(*delete) ;
Filename = Library + '/File_name' ;
open TheFile;
read TheFile;
dow not %eof;
read TheFile;
enddo;
close TheFile;