Hi mediaeval, In SAS 9.2, the FINFO function (in conjunction with the FOPEN and FCLOSE functions) retrieves system information from a file. You provide the file ID (that is assigned when the file is opened with the FOPEN function) and the name of the file information item that you want to retrieve, as shown in the following syntax: FINFO(file-id,info-item) The available information items (or, attributes) depend on the operating environment and the SAS release. If you do not know the available attributes, you can use the FOPTNUM and FOPTNAME functions to identify those attributes for use with the FINFO function. The following example uses all five functions (FOPEN, FOPTNUM, FOPTNAME, FINFO, and FCLOSE) to retrieve available attributes and their values. Of course, you can simplify the program if you already know which attributes (for example, File Size(bytes) or Last Modified) that you want to retrieve. data info; length infoname infoval $60; drop rc fid infonum i close; rc=filename("abc","c:\temp\mon3.dat"); fid=fopen("abc"); infonum=foptnum(fid); do i=1 to infonum; infoname=foptname(fid,i); infoval=finfo(fid,infoname); output; end; close=fclose(fid); run; proc print data=info; title1 "Attributes obtained for a file"; run; In a Windows operating environment, the output appears as follows: infoname infoval Filename c:\temp\mon3.dat RECFM V LRECL 256 File Size (bytes) 332 Last Modified 05May2009:10:44:23 Create Time 04May2009:17:04:22 For SAS 9.1.3 only fewer Attribute available. Replace thisdat file with your csv and try. Regards, Tushar J.
... View more