Page 1 of 1

Multiple Record Types in sequential files

Posted: Tue Mar 15, 2005 5:06 pm
by fridge
Hi , I have a file that has two distinct record types of form

RECT1 field1 field2 field3
RECT2 fielda fieldb

Question is what is the easiest way to read this using PX v7.1 (I know there is CFF stage in 7.5)

I believe I can do something with schemas but am new to this and documentation is a bit unclear - though at least it isnt IBM documentation (yet - Doh!)

Any clues greatfully recieved

Posted: Tue Mar 15, 2005 5:19 pm
by bgs
we also had a similar requirement.we read the records as a single column in a sequential file and depending one the record type we extracted the columns in the transformer.

Posted: Wed Mar 16, 2005 4:59 am
by Sainath.Srinivasan
Use a filter stage to seperate and modify stage to change formats.

Posted: Fri Mar 18, 2005 9:31 am
by T42
Import as a single varchar record.

Filter/Transform based on the first set of characters.

Column Export/Transform to split up the columns in a specific format.

Play on.

Posted: Fri Mar 18, 2005 10:27 am
by kduke
I would split them up into multiple files using grep.

grep "^1" file >newfile

The ^ matches the begining of a line the 1 is your record type.

Posted: Sat Mar 19, 2005 9:01 am
by benny.lbs
That is a good way !!!
T42 wrote:Import as a single varchar record.

Filter/Transform based on the first set of characters.

Column Export/Transform to split up the columns in a specific format.

Play on.