LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (June 2003, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 20 Jun 2003 14:38:25 -0400
Reply-To:     Mike Rhoads <RHOADSM1@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mike Rhoads <RHOADSM1@WESTAT.COM>
Subject:      Re: FileExists for PDS style filename in Windows ?
Comments: To: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Content-Type: text/plain

Richard,

I would probably try using the PATHNAME function to get the physical name of the directory represented by the fileref, then concatenate the "member name" part (info.txt) to the end of that (with an appropriate delimiter in between if necessary) as the argument to FILEEXIST.

Mike Rhoads Westat RhoadsM1@Westat.com

-----Original Message----- From: Richard A. DeVenezia [mailto:radevenz@IX.NETCOM.COM] Sent: Friday, June 20, 2003 10:20 AM To: SAS-L@LISTSERV.UGA.EDU Subject: FileExists for PDS style filename in Windows ?

In windows suppose I have a file

c:\temp\myData\info.txt

containing some data such as

1 2 3

pds-style filenaming is [ <fileref> ( <filename> ) ], where filename should exist in the folder fileref points to I can use pds-style naming to read from info.txt

filename myData 'c:\temp\myData\'; data abc; infile myData(info.txt); input a b c; run;

But the FileExist() and FileRef() functions do not like the pds-style naming

%put Exists: %sysfunc (FileExist (myData(info.txt))); %put Exists: %sysfunc (FileRef (myData(info.txt))); Exists: 0 Exists: 20004

Any suggestions on how to check existence of file when given pds-style filename ?

-- Richard A. DeVenezia, http://www.devenezia.com


Back to: Top of message | Previous page | Main SAS-L page