| Date: | Fri, 25 Sep 1998 22:34:34 -0400 |
| Reply-To: | bcrumb@erols.com |
| Sender: | "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU> |
| From: | Brian Crumb <bcrumb@EROLS.COM> |
| Organization: | WNC |
| Subject: | SAS to determine if a file exists |
| Content-Type: | text/plain; charset=us-ascii |
Hi all,
I am trying to use sas to determine if a GDG (or any file really) exists
after reading in a
file that contains a list of required files for another job to run. I'm
creating a
varable called File1 that contains the value of the inputs from that
file. Then I'm doing the following:
Call symput('File2','File1');
Filename XFILE '&File2';
If &sys99err = '1708' then exists = 'N';
else exists = 'Y';
What I can't figure out is why this doesn't work. If I replace '&File2'
with something like FILENAME XFILE 'Test.File.Exists(0)' and the file
doesn't exist, I
get the expected error. But if I try to use a variable instead of
hardcoding it with the
Filename command, nothing happens.
Any suggestions or better ways to use SAS to determine if a GDG exists
or not? Thanks.
Brian (bcrumb@erols.com)
|