Passing value of table to where clause

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
dxk9
Participant
Posts: 105
Joined: Wed Aug 19, 2009 12:46 am
Location: Chennai, Tamil Nadu

Passing value of table to where clause

Post by dxk9 »

Hi,

I have similar requirement as explained in this link.

I did the same procedure for passing one run time value as parameter for 'where' clause the job 2.

Steps followed:
a. Created a routine "GetDate" with Arg1 and with code "Ans = Arg1"
b. Created Job-1 to fetch the Data value from table. Created a stage variable UserStatus and assigned GetDate(FieldName).
c. Created Job-2 with parameter (BeginDate) for date.
d. Created sequence with two job activities.
e. At job_activity2, mapped Job_Activity1.$UserStatus to BeginDate.


Individually, Job 1 & 2 runs fine. The routine also gives the argument as reply.

Issue:
When sequence is ran, BeginDate is getting empty value :( And so, job 2 is aborting.

Please let me know if I made any mistake in the process. This is an urgent requirement.

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

Post by chulett »

UserStatus is not just a variable, it's a storage area inside a job's internal structure. Do an exact search here for DSSetUserStatus and the "interlude" routine you need to create to call it.
-craig

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