Search found 245 matches

by arunkumarmm
Fri Apr 08, 2011 11:02 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Count(*)
Replies: 22
Views: 8105

Before the transformer sort the input rows with your key column. And create stage variables in the transformer like below: svOld - svNew svNew - InputColumn.Key svCheck - If svOld <> svNew then 'Y' Else 'N' sv1 - If svCheck = 'Y' Then If InputLink.Col1 = 'YES' Then 1 Else 0 Else If InputLink.Col1 = ...
by arunkumarmm
Thu Apr 07, 2011 8:31 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Count(*)
Replies: 22
Views: 8105

I'm sorry if I'm still missing something here.. To get the count, you dont need to pass your source key to the target hashed file. Your key, for example can be a hard coded '1' for all rows. For the sample data you gave the hashed file will look like: Key YesCnt NoCnt NACnt 1 4 2 2
by arunkumarmm
Wed Apr 06, 2011 12:57 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Count(*)
Replies: 22
Views: 8105

Yes this logic works for only one set of data, it should be able to handle different group types(i.e the key column keeps changing) I did not understand this. Can you give some example? And if you are talking abouut the Key column in the Hashed file, it should be a dummy key, say 1 for all the rows.
by arunkumarmm
Wed Apr 06, 2011 11:40 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Repeating Headers
Replies: 5
Views: 2107

If your requirement is to just add a header after every 50 records, you can create a dummy column say SeqNum and assign values like, first fifty as 2, 2nd fifty as 4. In a separate file create all the header records you want with SeqNum column with values like 1,3,5. Then merge both the files and so...
by arunkumarmm
Wed Apr 06, 2011 11:18 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Count(*)
Replies: 22
Views: 8105

If my understanding is correct the below approach will work. SeqFile ----> Transformer ----> HashedFile ---->SeqFile In the transformer, create 3 stage variables: sv1 - If InputLink.Col1 = 'YES' Then sv1+1 Else sv1 sv2 - If InputLink.Col1 = 'NO' Then sv2+1 Else sv2 sv3 - If InputLink.Col1 = 'NA' The...
by arunkumarmm
Wed Apr 06, 2011 11:04 am
Forum: General
Topic: Passing Parameters for Multiple instance DS job
Replies: 5
Views: 7474

Can you give more information like, Do you use a scheduler? You want to run the jobs parallely or one after the other?
by arunkumarmm
Thu Feb 10, 2011 4:04 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Need to call a file in Server routine
Replies: 3
Views: 2934

What are you trying to do? Why cant you read the file in the job and pass it on to the routine?
by arunkumarmm
Tue Jan 04, 2011 1:13 pm
Forum: General
Topic: DSSetUserStatus - Does the Ans has to be zero
Replies: 4
Views: 3389

Why dont you cat the file, check for the row count and set the user status in the job? Why do you want to set the user status in the routine?
by arunkumarmm
Thu Nov 04, 2010 1:31 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Convert value from -00005.55 to -5.55
Replies: 17
Views: 9408

Can you try something like this:

If Input.Column < 0 Then '-' : Trim(Field(Input.Column,'-',2),'0','L') Else Trim(Input.Column,'0','L')
by arunkumarmm
Thu Nov 04, 2010 12:49 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: logic required
Replies: 6
Views: 4452

I'm not sure if i'm missing something here. As far as I understood your requirement, you can try the below approach. If your source is database, select all your rows and in a separate stage select the max of date from the same source table. Use a look-up and pass the row to target which matches and ...
by arunkumarmm
Wed Oct 20, 2010 2:50 pm
Forum: General
Topic: Wait for File
Replies: 10
Views: 7175

Thanks Craig and all. This is what I'm doing now.
by arunkumarmm
Wed Oct 20, 2010 1:32 pm
Forum: General
Topic: Wait for File
Replies: 10
Views: 7175

Thanks everyone. I do have a unix script with the sleep. But I was just wondering whether we would be able to do it in datastage.
by arunkumarmm
Wed Oct 20, 2010 1:08 pm
Forum: General
Topic: Wait for File
Replies: 10
Views: 7175

Vivek, I will try to explain this more clearly. This is what we do. Whenever the sequence starts, we do a ls with the file pattern. and if the file is out there, we will get the file name. If the file is not there, we need to wait for 2 Hrs before aborting the job. Here I need to pass the file name ...
by arunkumarmm
Tue Oct 12, 2010 3:00 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: how to check valid date ?
Replies: 7
Views: 5116

You can use this to check a date. This will return null if the incoming date is not valid. And this will work for all other date formats except YYYY-MM-DD.

oconv(iconv(vDate,'d4'),'d-ymd[4,2,2]')

Try this and let us know.
by arunkumarmm
Tue Oct 12, 2010 1:51 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: Filter a Select based on Input
Replies: 6
Views: 3631

If both the table are in different database, I believe the best way would be to do it in a query.

Ask your DBA to create a dblink for you.