Parameter File

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
das_nirmalya
Participant
Posts: 59
Joined: Thu Mar 20, 2008 12:11 am

Parameter File

Post by das_nirmalya »

I have created a routine that basically read a config file and find the value of a parameter . Value of parameter is a Srcfile path


Routine Structure

FUNCTION ReadParameter(ParameterName, DefaultValue,ConfigFile)
(
--
--
Return(paramval)
)

In the job that parameter value basically treated as a source file.
My job structure is


SrcFile-------> Transformer ----------> TgtFile


Where i should call the routine and what will be the code.
nsd
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: Parameter File

Post by sachin1 »

sorry for my previous post
Last edited by sachin1 on Thu May 15, 2008 4:28 am, edited 1 time in total.
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

Post by bkumar103 »

From my understanding you can try with the sequence job..
1. define a parameter for source file path
2. use the execute routine stage to call your routine.
3. in the job activity stage, link your job and assign the source file path parameter value to the return value from the execute routine stage.


Thanks,
Birendra
Birendra
sunnyk
Participant
Posts: 2
Joined: Wed Mar 07, 2007 1:02 am
Location: INDIA

how to set Parameter file at Project Level when O.S is windw

Post by sunnyk »

bkumar103 wrote:From my understanding you can try with the sequence job..
1. define a parameter for source file path
2. use the execute routine stage to call your routine.
3. in the job activity stage, link your job and assign the source file path parameter value to the return value from the execute routine stage.


Thanks,Hi
Birendra
Please let me know how to set Parameter file at Project Level when O.S is windows.?
das_nirmalya
Participant
Posts: 59
Joined: Thu Mar 20, 2008 12:11 am

Re: how to set Parameter file at Project Level when O.S is w

Post by das_nirmalya »

sunnyk wrote:
bkumar103 wrote:From my understanding you can try with the sequence job..
1. define a parameter for source file path
2. use the execute routine stage to call your routine.
3. in the job activity stage, link your job and assign the source file path parameter value to the return value from the execute routine stage.


Thanks,Hi
Birendra
Please let me know how to set Parameter file at Project Level when O.S is windows.?
Thank You,
Now i am able to design the seq.
My job taking the value of the parameter from a paramter file.
Say my parameter file contain only the path ex "spath=d:\sourcepath"

so if i use #spath# then it does not locate the actual file
anyhow i have to concate the file with #spath#.

Please tell me the process.
nsd
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As Nike would say - Just do it. Use #spath#/filename or #spath#/#sfilename# if the filename is parameterised as well.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply