In reply to Rok.

Rok, good question! You could allocate a series of macro variables based on the file size, then read chunks of the file into each until the entire file contents are in memory.

How to find the file size? The FINFO function can help.

filename in "path-to-input-file";
%let fid=%sysfunc(fopen(in));
%let Bytes=%sysfunc(finfo(&fid,File Size (bytes)));
%put &Bytes;
%let fidc=%sysfunc(fclose(&fid));
filename in clear;