|
Replies:
1
-
Pages:
1
-
Last Post:
Jan 18, 2006 7:43 PM
by: vmcburney
|
|
|
Posts:
1
Registered:
1/15/06
|
|
|
|
DATASTAGE
Posted:
Jan 15, 2006 7:11 PM
|
|
|
Hi Doesnt anyone have experience with datastage please? Im new to the software. I have a record in this format H,0000 L,B254,4 L,B221,19 L,B064,4 L,B120,8 L,B001,8 L,B178,18 L,B283,19 L,B275,12 L,B188,12 L,B025,14 H,0001 L,B208,1 L,B186,8 L,B342,0 H,0004 L,B178,17 L,B132,19 L,B121,17 L,B025,12 L,B221,10 L,B304,4 L,B388,4 L,B201,10 H,0009 L,B066,13 L,B020,0 H,0016 L,B222,15 L,B304,6 L,B244,15 L,B229,5 L,B381,1 L,B381,18 L,B290,10 L,B254,17 L,B352,19
H,xxxx (xxxx represents the customer unique no) L, yyyy.z (yyyy is the product part no, and z is the quantity. A customer could order more than one product, as a result so many Ls below H. I want to transform this, so that the target file has the customer NO(No H), the quantity of each products ordered, with the part number of the product of course. In short, three out columns. In order to get to the output column, though, the part no, of each product is checked against a part master that contain only part numbers(HASHED FILE maybe - contains on yyyy), if its not found there, it is rejected. The problem Im having is that, the reject file, must have the same format as the input file. Ideas plase
|
|
Posts:
2
Registered:
1/18/06
|
|
|
|
Re: DATASTAGE
Posted:
Jan 18, 2006 7:43 PM
in response to: kayarsenal
|
|
|
Although DataDirect drivers are bundled with DataStage this is not specifically a problem with those drivers, more a DataStage useability question. You may get a lot more information over on the main DataStage forum www.dsxchange.com which has over 100 DataStage posts a day and lots of people to answer your questions. You can also learn about DataStage at my blog.
But to answer your question read your file in as three records. eg. record_type, code, count. You will need to suppress errors or warnings when the H record is read in that doesn't include a count field. In a transformer if you find a H record save the code into a stage variable with a name like svCurrentCustomer. When you get an L record output the code and count field and output the customer id svCurrentCustomer value into a third output column. This transformer merges your customer number into each part record. In a transformer constraint only output a row when the record type is L.
In another transformer lookup the part master file to find the part number. Output it to a reject file if it is not found, you will find this reject file has customer number plus part code to help identify the problem.
regards Vincent DataStage Blogger: http://blogs.ittoolbox.com/bi/websphere
|
|
|
|