Field Function

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
pkl
Participant
Posts: 50
Joined: Wed Aug 11, 2004 11:45 am

Field Function

Post by pkl »

Hi,

Can I use a job parameter in the Field function as the string?

Thanx,
Preethi
dhiraj
Participant
Posts: 68
Joined: Sat Dec 06, 2003 7:03 am

Post by dhiraj »

If you are using the field function in a transformer, then you can.
Remember you should enclose the parameter name within # symbol.

eg Field(#DSN#,'|',1)
Where DSN is the parameter name.


Dhiraj
pkl
Participant
Posts: 50
Joined: Wed Aug 11, 2004 11:45 am

Post by pkl »

Hi Dhiraj,

I tried that , then it gave me an error saying expecting an exrpession. When I enclosed it , it returned a null string.

Thanx
Preethi
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Derivations are one of the places where Job Parameters should not be wrapped in pound signs. Try just using DSN in the function.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dhiraj
Participant
Posts: 68
Joined: Sat Dec 06, 2003 7:03 am

Post by dhiraj »

oops. Craig is right. don't know how i made that mistake. :oops: We use parameter for batch start date in almost every job !
Post Reply