column value as file name in sequential file stage

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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not sure what you mean. Can you provide an example?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It can't be done. The File property is established when the stage opens.

There is a hard-coded solution for a small, finite and "known a priori" number of values.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Write the column value to a file and use move command in after job subroutine to rename the file
mv CLM.dat `cat column_value_file`"_CLM.dat"
You are the creator of your destiny - Swami Vivekananda
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's not a case of "the" file, as I understand the problem. It's any number of files, named xxxx_CLM.dat, with xxxx coming from the data.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Server job. Folder stage. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
dsedi
Participant
Posts: 220
Joined: Wed Jun 02, 2004 12:38 am

Post by dsedi »

ray.wurlod wrote:It can't be done. The File property is established when the stage opens.

There is a hard-coded solution for a small, finite and "known a priori" number of values. ...
Thank you.
yes. We are having the hard-coded solution and want to confirm the other possibilities.
Accept that some days you're the pigeon and some days you're the statue.
dsedi
Participant
Posts: 220
Joined: Wed Jun 02, 2004 12:38 am

Post by dsedi »

chulett wrote:Server job. Folder stage. :wink:
Thanks Craig.
Useful info. Will explore that.
Accept that some days you're the pigeon and some days you're the statue.
Post Reply