Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.
Moderators: chulett , rschirm , roy
Luciana
Participant
Posts: 60 Joined: Fri Jun 10, 2005 7:22 am
Location: Brasil
Post
by Luciana » Sun Oct 19, 2008 8:39 am
Hi,
I have a simple BuildOp Stage that multiply two columns. This job execute fine but the output is not correct. In Sequential File there are three columns, the Amount is correct, but the another columns receive "0". These columns must pass without changes. I don't understand where is the error. Somebody can help me?
Row Generator ---> BuildOp Stage ---> Sequential File
Input
========
Qty
Price
Tax_Rate
Output
==========
Amount
Qty
Tax_Rate
Configurations:
BuildOp - Properties
=================
Exchange
BuildOp - Build
=================
Input: InRec - Auto Read: True - Table name: Saved\tmp\input - RCP: False
Output: OutRec - Auto Write: True - Table name: Saved\tmp\output - RCP: False
BuildOp - Logic in Per-Record
======================
Amount = InRec.Qty * InRec.Tax_Rate;
Amount = Amount * Exchange;
Thank you in advance
Luciana
Last edited by
Luciana on Sun Oct 19, 2008 8:03 pm, edited 1 time in total.
Nagaraj
Premium Member
Posts: 383 Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore
Post
by Nagaraj » Sun Oct 19, 2008 10:26 am
Cant you do this in a transformer?
Luciana
Participant
Posts: 60 Joined: Fri Jun 10, 2005 7:22 am
Location: Brasil
Post
by Luciana » Sun Oct 19, 2008 10:59 am
Yes, I can, but I have a DataStage Job that the transformer is very slow then I want replace the transformer stage for a buildOp stage, but neither all columns have transformation, then I make this simple BuildOp Stage for test.
Thank you,
Luciana
marcelo_almeida
Premium Member
Posts: 46 Joined: Wed Jun 28, 2006 9:54 am
Location: BrasÃlia - Brazil
Post
by marcelo_almeida » Sun Oct 19, 2008 2:14 pm
Include in your code (Per-Record) the columns that don't have transformation.
ex.: OutRec.Qty = InRec.Qty;
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Sun Oct 19, 2008 3:20 pm
Why do you think that a Build stage that performs exactly the same task as a Transformer stage would run at any different speed?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Luciana
Participant
Posts: 60 Joined: Fri Jun 10, 2005 7:22 am
Location: Brasil
Post
by Luciana » Sun Oct 19, 2008 8:01 pm
I don't know if it will be faster, but it was a recommendation of a consultant IBM.
I include the other columns in the code and the job it executed with success.
Thanks a lot.
Luciana
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Sun Oct 19, 2008 8:14 pm
Please compare your BuildOp code with the code generated by compiling the Transformer stage. Did you do anything differently?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Mon Oct 20, 2008 3:02 pm
Code for the Transformer stage is in the RT_SCnnn directory on the server, where nnn is the job number.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.