file as a stage variable

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
kaps
Participant
Posts: 452
Joined: Tue May 10, 2005 12:36 pm

file as a stage variable

Post by kaps »

How can I pass a valule to a DataStage job and use it in transformer for other purpose. Say I need to do a pre processing to get a date and pass that date to a job to compare with a field coming out of my input file.

I read somewhere in this forum that we can use a file as a stage variable when it has a value like this. so I stored that value in a file and substitute "cat /path/filename" as initial value of a stage variable I am just getting the whole string as a value. I am not getting the content of the file.

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can only initialize the stage variable successfully by creating a routine that reads the file, and invoking that routine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Just mimic the before subroutine called ExecSH or ExecDOS using a Function. Now, that function takes your argument and executes it, returning the screen output as the answer.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply