Returns the size of the last record that was read, or, if the file is opened for output, returns the current record size.
Category: | External Files |
%let fid=%sysfunc(fopen(myfile)); %let min=0; %let max=0; %if (%sysfunc(fread(&fid)) = 0) %then %do; %let min=%sysfunc(frlen(&fid)); %let max=&min; %do %while(%sysfunc(fread(&fid)) = 0); %let reclen=%sysfunc(frlen(&fid)); %if (&reclen > &max) %then %let max=&reclen; %if (&reclen < &min) %then %let min=&reclen; %end; %end; %let rc=%sysfunc(fclose(&fid)); %put max=&max min=&min;