Matthew.Bustad mbustad at Myrio.com
Fri Jan 17 11:36:34 CST 2003

One way to keep the backup files without "rotation" is to save the file
with the day-of-the-month mod 2 (for ~15 backups) or the day-of-the-week
(for 7 backup files).  Then let the files be written over when it day
comes arount:

 backup-1, backup-2, backup-3,....

Then you do not have to move/rename files.


On Fri, 17 Jan 2003, September Nyang oro wrote:

> SPUG-ers,
> I got a job in DataStage that runs once per day. It basically gets raw 
> data from DB2, transforms it ( we do some calculations and other stuff 
> here), and then dumps the data into an Oracle. So that part works 
> perfectly.
> We need to be able to archive this raw data from the DB2 source for 14 
> days just incase something happens to our jobs, so we could go back and 
> get that raw data from the archive and run it again. We're trying to 
> archive this data in a flat file in Windows NT. Right now when we run 
> the process we could only archive the raw data for 1 day. DataStage 
> could only 'overwrite' or 'append' to an existing file. But we want 
> separate files everyday.
> The challenge: I need to write a script in Basic / DOS that would put a 
> timestamp in my jobs. Before it 'overwrites' yesterday's job in the 
> system when it writes today's job, it should move 'yesterday's job into 
> another directory/folder. And then keep that old job in the new folder 
> for 14 days. After 14 days that job should be deleted. So a script that 
> can perform those functions is something that would be useful to me.
> So ideally, I'll need to have a script that runs first on the system, 
> moves the old file into the new directory, checks whether that new 
> directory has files older than 14 days, if so then delete the older-
> than-14-days file(s). If no older than 14 days files are available, 
> then just finish.
> Ideas are welcome.
> Thanks.
> ../seppy
> ______________________________________________________________
> Seattle Perl Users Group Mailing List  
> POST TO: spug-list at mail.pm.org
> ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list
> MEETINGS:  3rd Tuesdays, U-District, Seattle WA
> WEB PAGE: www.seattleperl.org

More information about the spug-list mailing list