freeRPG - open file in specific library

By kimot, 25 December, 2022

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;