Parameter set replacing values

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

Parameter set replacing values

Post by vamsi.4a6 »

I have one parameter set with different value files

ex-P1 is parameter set and dev1,tst1,prod1 are value files
for P1


select col1,col2 from #P1.tablename#

I have to replace #P1.tablename# with corresponding value from
value file it may by dev1,tst1,prod1.we are calling above sql statment
using NZ connector read from sql file.At run time i will decide the valuefile.


For understanding purpose i gave one parameter but we have so many parameters in sql file.I want to replace all the values from value file it may by dev1,tst1,prod1.


Analysis done so far and clarifications:
1)I will go to Unix path where corresponding value file is present[projectpath/parameterset]

cat valuefilename

but not sure how to replace all the parameterized values in sql file
[#P1.tablename#] based on cat command output.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You'd need to use something like 'sed' or 'awk'.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vibwipro
Participant
Posts: 40
Joined: Thu Jan 24, 2013 7:34 am

Re: Parameter set replacing values

Post by vibwipro »

You Can Use
sed 's/Old-Value/New-value/g' :lol:
Post Reply