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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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