Multi format file

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

Post Reply
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Multi format file

Post by jerome_rajan »

Hi,

We have a Multi format source file that has a header followed by details and finally a summary record. Now this file isn't restricted to just one header but multiple header/detail/summary groups. A typical file would look like

H10 A B C 20140827
D10 1 2 3 4 5 6 Ab CDE FG
D20 A B
D20 X Y
D20 M N
S10 3
H10 X Y Z 20140827
(and so on)
S10 5

Each H10 will have one associated D10 record. And each D10 will have multiple associated D20 records. And each H10 will have a corresponding S10 record. These 4 record types together form one group of data.

Our objective is to read this data (which I'm trying to do using CFF) and load into an Oracle table which has 'nested tables; in them.

What is the best way to read such a file? If CFF, can you please guide or point me to a good example that I can use as reference?

Thank you
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

CFF does not look like a good option for what you describe. It looks more like a repeating tag/sub-tag pattern. CFF will split your incoming data into separate links based on the record type. If someone here has better understanding of CFF, I'd like to learn it too.

I had a similar situation in the old 7.x days. I used the repeating header designation as the "delimiter" for a full record, then parsed the rest in a subsequent transformer.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Post by jerome_rajan »

Thank you Franklin. The first line of your post is a part of my solution for sure. Helps me channelize the next few hours in a better direction. :D
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
Post Reply