Dynamically naming a file based on the value in column1

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
vamsi_4a6
Participant
Posts: 95
Joined: Wed Jun 04, 2014 12:06 am

Post by vamsi_4a6 »

1)Get the distinct values in column1 using unix or datastage.Write them into some text file.

2)use looping in jobsequence to iterate for each value present in text file.withinlopping pass the value as parameter to jobactivity
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I seem to recall this being added as a feature in one of the later versions of DataStage... can anyone confirm / deny? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Good memory, Craig!

Please see my post on this topic.
Choose a job you love, and you will never have to work a day in your life. - Confucius
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

Post by JPalatianos »

Thank You everyone for your suggestions! When using the "Generate Multiple file" option using a key do you know the default directory where the output files get written too?
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

As with any use of the Sequential File stage, it will place the file(s) in whatever path you specify. We normally prefix every file name with a parameter which holds the value for the path. If you don't specify a path, then the file(s) will be written into the DataStage project path, mixed in with all the system files for your job designs, etc. The default is not usually the best place for your data files. :)
Choose a job you love, and you will never have to work a day in your life. - Confucius
JPalatianos
Premium Member
Premium Member
Posts: 306
Joined: Wed Jun 21, 2006 11:41 am

Post by JPalatianos »

Perfect..This solution works perfectly!

Thank You All!!
Post Reply