LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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> wrote:

>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 >#! /bin/csh >foreach i (*.ssd01) >cp $i $i.20010913 >end > > >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 subdir-name") or call system("mkdir &macro_var"); then allocate it with

libname backup "&macro_var";

and add a

proc copy in=... out=backup; run;


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