Date: Thu, 13 Sep 2001 11:00:18 -0400
Reply-To: Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Subject: Re: Unix or SAS help, please
On Thu, 13 Sep 2001 07:29:21 -0700, Sharon Ryan <sharon@MATLOCK.WUSTL.EDU>
>I want to create backups for SAS files in a unix directory. The most
>current file will always be "filename.ssd01" (yes, version6). I want
>the backup file to be "filename.YYYYMMDD.ssd01" since that is the
>existing naming convention. I can do them individually, but want to do
>it over a series of files in a more effective way.
>The following Unix script works except that it gives me files of the
>form "filename.ssd01.YYYYMMDD". Can anyone suggest a way to create
>the series with the form I'm seeking? Since I'm new to Unix, I don't
>know where to look.
>Thanks in advance.
># make backups of data set files
>foreach i (*.ssd01)
>cp $i $i.20010913
>P.S. If anyone can suggest a SAS solution, that would be great, too.
Yes, a SAS solution for that would be possible, but why do you not create a
subdirectory with the date and copy all the files into that? I think the
handling is much more easy! You only have to change the libname in SAS and
you can access all the backuped data very easy! That could be also managed
in SAS very easy! You just create the subdir with a call system("mkdir
call system("mkdir ¯o_var");
then allocate it with
libname backup "¯o_var";
and add a
proc copy in=... out=backup;