Accessing input link columns in Command Stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
metabill
Premium Member
Premium Member
Posts: 26
Joined: Wed Aug 27, 2003 9:55 am

Accessing input link columns in Command Stage

Post by metabill »

I've seen a couple of folks asking how to do this, but no one really seemed to know, so I thought I'd ask again. I have a Command Stage (this is a windows server) in which I want to execute an OS command for each record that comes in on the input link. I need to use the column value from the input record in constructing the command to execute. Do you know how to reference the input link column value in the definition of the command that is to be executed?

I've searched this forum and the DataStage help & docs without success. If there is a way to do this, I think it offers a simple and even elegant design. If it helps to understand some more details, the input link is passing along filenames; each file needs to be moved to another directory. I know there are other ways to do this without using the Command Stage, but I'd very much like to make this work if possible. Thanks in advance...
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You have to do it in a routine. The routine needs to be executed from a transformer.
Mamu Kim
Post Reply