Page 1 of 1

Backup File options

Posted: Mon Nov 09, 2015 8:35 am
by sam334
All, one more question.

We load a text file into DB2 tables everyday and currently Job control has the code to backup the input file in a specific folder once load is done. Now we don't want the backup file everyday instead there is a code column which has code like 'ABCDEF'. When this code is exists then only we want the backup.

I can have a batch script to do that. But it would be a complex one. Do we have any options in datastage to backup the file once the job finds the the code in the file.

Thanks.

Posted: Mon Nov 09, 2015 8:44 am
by chulett
I'm thinking you could have the load job split off another link to a semaphore file and only write to it when the code is found. Doesn't really matter what you write to it as you could just check to see if it is non-empty after the job completes. Not empty = backup the source file and that would be a simple after job process.

Tip: make sure to not include column headers in the output file... much simplier validatation without them.

Posted: Wed Nov 11, 2015 8:08 am
by sam334
Got it Craig. Thanks a lot.