Thu 19 Mar 2009
Transform Question in DataStage
Posted by Jack under DataStage
No Comments
Found this old question in the Data Direct Technologies Forum. I think it makes a good example exercise, since it can be solved multiple ways, but is short enough to address in a single (long) post.
I have a record in this format
H,0002
L,B254,4
L,B221,19
L,B064,4
H,0001
L,B208,1
L,B186,8
H,0004
L,B178,17
L,B132,19
L,B121,17
L,B025,12H,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 number(No H), the quantity of each products ordered, with the part number.
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
The reject file, must have the same format as the input file.
I have formatted the quote to make it clearer what is being sought.

