Dan Ebert mathin at mathin.com
Fri Jan 17 11:32:50 CST 2003

Could you incoporate the date into the raw data filename?  That way you
wouldn't have to worry about creating directory or moving a file.  A
seperate script could then be written to look at the filenames and
delete the old ones.

Dan Ebert      <mathin at mathin.com>
"If you're right 90% of the time, why quibble about the remaining 3%?"

On Fri, 2003-01-17 at 09:02, 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