finfo function

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 18
Accepted Solution

finfo function

I have a piece of code that uses the finfo function to return the last modified date of a file. It works fine, as far as it goes, but this is somewhat dependent upon how I run it. I wrote the code using Enterprise Guide (5.1), connecting to a Windows 2008 server, and this way it works fine. The result is text, but in standard SAS datetime format (eg. "05Oct2012:07:45:01"). However, when I run the code in a full SAS session on the server (I'm intending to schedule it as a job on the server), the format is in the form "05 October 2012 07:45:01 o'clo". This is confusing, as it is effectively running on the same machine so it must be the same locale. I couldn't see any relevant differences in the system options so I'm toiling. Any ideas? I bet it's something obvious that I'm missing!

Thanks


Accepted Solutions
Solution
‎10-09-2012 06:17 AM
Super User
Posts: 5,260

Re: finfo function

I don't have bullet proof solution for you, but I think that the Locale setting in the EG client also can affect this behavior.

Including a proc options in your code might also help you to debug.

Data never sleeps

View solution in original post


All Replies
Solution
‎10-09-2012 06:17 AM
Super User
Posts: 5,260

Re: finfo function

I don't have bullet proof solution for you, but I think that the Locale setting in the EG client also can affect this behavior.

Including a proc options in your code might also help you to debug.

Data never sleeps
Occasional Contributor
Posts: 18

Re: finfo function

See, I said it would be something obvious!

In EG:

15 proc options option=locale;

16 run;

SAS (r) Proprietary Software Release 9.3 TS1M1

LOCALE=EN_US Specifies the current locale for the SAS session

NOTE: PROCEDURE OPTIONS used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

In full SAS:

772 proc options option=locale;

773 run;

SAS (r) Proprietary Software Release 9.3 TS1M1

LOCALE=EN_GB Specifies the current locale for the SAS session

NOTE: PROCEDURE OPTIONS used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

Thanks, LinusH.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 516 views
  • 0 likes
  • 2 in conversation