Identifies the last record that was read, and returns a value that the FPOINT function can use.
Category: | External Files |
%let
fref=MYFILE;
%let rc=%sysfunc(filename(fref,
physical-filename));
%let fid=%sysfunc(fopen(&fref,u));
%if &fid > 0 %then
%do;
%let rc=%sysfunc(fread(&fid));
/* Read second record. */
%let rc=%sysfunc(fread(&fid));
/* Read third record. */
%let rc=%sysfunc(fread(&fid));
/* Note position of third record. */
%let note3=%sysfunc(fnote(&fid));
/* Read fourth record. */
%let rc=%sysfunc(fread(&fid));
/* Read fifth record. */
%let rc=%sysfunc(fread(&fid));
/* Point to third record. */
%let rc=%sysfunc(fpoint(&fid,¬e3));
/* Read third record. */
%let rc=%sysfunc(fread(&fid));
/* Copy new text to FDB. */
%let rc=%sysfunc(fput(&fid,New text));
/* Update third record */
/* with data in FDB. */
%let rc=%sysfunc(fwrite(&fid));
/* Close file. */
%let rc=%sysfunc(fclose(&fid));
%end;
%let rc=%sysfunc(filename(fref));