Search found 107 matches

by pdntsap
Mon Aug 15, 2011 1:14 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: IN condtion in Filter stage
Replies: 4
Views: 2792

Thanks guys.

Using an index function in the transformer seems to work. I was reading the forums and looking at ways to use a lookup stage before the filter stage among other things but looks like it will not be needed.
by pdntsap
Mon Aug 15, 2011 8:21 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: IN condtion in Filter stage
Replies: 4
Views: 2792

If I am right, the Index function can be used if all possible values of the list are known before run time. Is my assumption right? If so, what if the list it being populated dynamically and I then need to implement the filter stage based on the generated list?

Thanks.
by pdntsap
Mon Aug 15, 2011 8:09 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Selecting distinct values and creating a list/array
Replies: 16
Views: 6835

Right now, I set the UserStatus in a Server job (the routine is a transform function and is being called for every record) and then make use of User Variables to read the value stored in UserStatus.
I will implement Ray's suggestions and update the post.
by pdntsap
Mon Aug 15, 2011 8:06 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: IN condtion in Filter stage
Replies: 4
Views: 2792

IN condtion in Filter stage

I have a job parameter that is used to as an array/list to store a random number of variables. As an example it can be a three digit code for a list of all countries. I need to use the job parameter in a filter stage to filter the records. I am looking for a function similar to the 'IN' condition th...
by pdntsap
Fri Aug 12, 2011 2:13 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Selecting distinct values and creating a list/array
Replies: 16
Views: 6835

StageVarn was supposed to represent Stage variables, for example, StageVar1, StageVar2. Sorry that I was not more clear. So, like you said,if I need the stage variables to be stored and passed onto subsequent jobs/stages I need to go back to a Transform function and assign the transform function to ...
by pdntsap
Fri Aug 12, 2011 11:52 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Selecting distinct values and creating a list/array
Replies: 16
Views: 6835

I created the routine below as before/after subroutine SUBROUTINE UserStatus(InputArg,ErrorCode) Call DSSetUserStatus((InputArg)) ErrorCode = 0 Return Now UserStatus shows in the before/after stage routine of the transform stage. I seLECT UserStatus in the After-stage routine and pass input values a...
by pdntsap
Fri Aug 12, 2011 8:19 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Selecting distinct values and creating a list/array
Replies: 16
Views: 6835

But from the thread below:
viewtopic.php?t=107023
I thought that the routine must be created of type 'transform function'.

I changed it to type 'before/after routine' but it does not return any value.

Thanks.
by pdntsap
Fri Aug 12, 2011 7:46 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Selecting distinct values and creating a list/array
Replies: 16
Views: 6835

Hello, I have the following routine FUNCTION UserStatus(Arg) Call DSSetUserStatus((Arg)) Ans=Arg RETURN(Ans) I would like to set the UserStatus to the final value of a Stage Variable used in the transformer. I believe I can use the After-stage subroutine in the Transformer stage. My question is how ...
by pdntsap
Thu Aug 11, 2011 3:03 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Selecting distinct values and creating a list/array
Replies: 16
Views: 6835

Yes Arun. You are right. I created the following routine FUNCTION UserStatus(Arg) Call DSSetUserStatus((Arg)) Ans=Arg RETURN(Ans) and assigned UserStatus(StageVar n ) to StageVar m . Now the problem is the routine gets called for every input row but I need it to be called only once at the very end. ...
by pdntsap
Thu Aug 11, 2011 11:56 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Selecting distinct values and creating a list/array
Replies: 16
Views: 6835

Can user status be set for a parallel job? I understand that user status can be set only for server jobs.

Thanks.
by pdntsap
Thu Aug 11, 2011 9:51 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Selecting distinct values and creating a list/array
Replies: 16
Views: 6835

I have a sequential file input, then a Transformer Stage that uses stage variables to implement the pivot logic. Stage variables will be processed and output for each input row. As an example: Input Stage column Variable 1 1 1 1 2 1,2 2 1,2 3 1,2,3 4 1,2,3,4 Howcan I just store the final Stage varia...
by pdntsap
Wed Aug 10, 2011 3:22 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Selecting distinct values and creating a list/array
Replies: 16
Views: 6835

Selecting distinct values and creating a list/array

Hello, The input is a flat file that has 'n' columns. I need to create an array/list to store the distinct values of one of the columns. I then need to execute a sequence of steps for each distinct value in the array/list. My questions are: 1. How can I create an array/list based on the distinct val...
by pdntsap
Fri Aug 05, 2011 11:43 am
Forum: General
Topic: Passing current date to to Job Parameter
Replies: 13
Views: 5817

Sure Craig. Will do that.
by pdntsap
Fri Aug 05, 2011 7:30 am
Forum: General
Topic: Passing current date to to Job Parameter
Replies: 13
Views: 5817

It works perfect and thanks. On a related note, I found the Built-in Transforms and Routines chapter in Server Job Development guide. This chapter talks about the Fmt function among other things. There was no mention about the Fmt function in the Parallel Job Development guide. So can I assume that ...
by pdntsap
Thu Aug 04, 2011 2:47 pm
Forum: General
Topic: Passing current date to to Job Parameter
Replies: 13
Views: 5817

You are right. I initially used @YEAR and @MONTH but if I remember right, @YEAR returned 11 and @MONTH returned 8. But, I needed 2011 and 08 respectively.
OCONV(@DATE,"DY") returns 2011 and I do further processing in OCONV(@DATE,"DM") to get month as 08.

Thanks.