BookmarkSubscribeRSS Feed
Aurimas
Calcite | Level 5

Hello,

I am using sassuport code and I am expecting to get information about external file creation date. Unfortunately it returns other information about file.

sassupor code:

data info;

  length infoname infoval $60;

  drop rc fid infonum i close;

  rc=filename("abc","/data6/tmp.csv");

  fid=fopen("abc");

  infonum=foptnum(fid);

   do i=1 to 10;

     infoname=foptname(fid,i);

     infoval=finfo(fid,infoname);

     output;

   end;

  close=fclose(fid);

run;

I know It works fine on SAS 9.2, but I realy need any solution on 9.1.3. There are any other way to get file creation date and time?

4 REPLIES 4
ballardw
Super User

You may want

do i =1 to infonum;

in case the element you want doesn't appear in the first 10 items reported by the OS.

art297
Opal | Level 21

The issue isn't the value of infonum but, rather, the limited amount of information provided by SAS pre 9.2.  The page I pointed to shows how to obtain the desired information using a pipe.

data_null__
Jade | Level 19

According to what I understand Creation time is not stored on UNIX system.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 2813 views
  • 3 likes
  • 4 in conversation