|Date: ||Fri, 25 Sep 1998 22:34:34 -0400|
|Sender: ||"SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>|
|From: ||Brian Crumb <bcrumb@EROLS.COM>|
|Subject: ||SAS to determine if a file exists|
|Content-Type: ||text/plain; charset=us-ascii|
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
varable called File1 that contains the value of the inputs from that
file. Then I'm doing the following:
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.