Date: Thu, 10 May 2001 11:15:33 -0500
Reply-To: Anthony.Kilili@BMGDIRECT.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Anthony Kilili <Anthony.Kilili@BMGDIRECT.COM>
Subject: Re: does the file exist?
Content-Type: text/plain; charset="iso-8859-1"
Yes, I'm looking for data sets and yes, generation control of data sets is
available in V8 using the gennum= option. Since I have lots of data sets to
look for at various parts of the program, I will modify Pete Lund's solution
by 'macrotizing' the generation number, something like:
%let gen=010;
%if %sysfunc(exist(lib.myfile#&gen)) %then %do;
*other stuff here.....
%end;
Thanks for all the replies..
Anthony
Ps: my spell check claims 'macrotizing' is not an English word and suggests
I use 'mercerizing'!!
-----Original Message-----
From: DavidJohnson@halifax.co.uk
[mailto:DavidJohnson@halifax.co.uk]
Sent: Thursday, May 10, 2001 10:44 AM
To: SAS-L@LISTSERV.UGA.EDU; Anthony.Kilili@BMGDIRECT.COM
Subject: RE: does the file exist?
Anthony's original post is below:
SAS-L Digest - 10 May 2001 - Special issue (#2001-581)
The Exist() SCL function is for data sets, not files. The
file function is
either FExist() for a file reference, or FileExist() for a
Physical file
name. (It is an SCL function you have embedded within the
SysFunc() call.)
In any case, 'gennum' is unfamiliar syntax. Is generation
control of data
sets available in Version 8? My only experience of
generations is on OS390
where LIB.MYFILE(10) would refer to the tenth
generation of a
Generation Data Group modelled in LIB.MYFILE, and
catalogued to DMS as
LIB.MYFILE.G0010V00.
Using FileExist on LIB.MYFILE(10) would fail, because
the physical
file name as known to DMS (LIB.MYFILE.G0010V00) would be
required as the
correct SCL parameter.
Does this assist?
Kind regards
** ##*
David Johnson
sasuser@dkvj-cons.com
http://www.dkvj-cons.com
This message is attributable to the sender and does not
necessarily reflect
the view of Halifax Group plc or its subsidiaries.
Date: Thu, 10 May 2001 10:14:10 -0500
From: Anthony Kilili <Anthony.Kilili@BMGDIRECT.COM>
Subject: does the file exist?
I'm trying to verify the existence of a file of a certain
generation using:
%let check=%sysfunc(exist(lib.myfile(gennum=10)));
%put check=✓
this is returning 0 even though the file does exist. seems
that the gennum
thing does not work...any alternatives?
Anthony
------------------------------
----------------------------------------------------------------------------
--
Part of the Halifax Group, Halifax plc, Registered in
England No. 2367076. Registered Office: Trinity Road, Halifax, West
Yorkshire HX1 2RG. Represents only the Halifax Financial Services Marketing
Group for the purposes of advising on and selling life assurance, pensions
and unit trust business. The Marketing Group is regulated by the Personal
Investment Authority. Switchboard 01422 333333.
===========================================================================
==