Backup File options

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Backup File options

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Got it Craig. Thanks a lot.
Post Reply