Read thru Multiple and different records in one file ?

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
jazzer1
Participant
Posts: 37
Joined: Mon Mar 20, 2006 10:26 am

Read thru Multiple and different records in one file ?

Post by jazzer1 »

I have a file that could have (0:s) records, and each record can occur (0:s). For example:
1mmmmmmmmmmmmmmm<CR><LF>
2nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn<CR><LF>
2nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn<CR><LF>
2nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn<CR><LF>
Xnnnnnnnnnnnnn<CR><LF>
3xxxxxxxxx2nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn<CR><LF>
2nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn<CR><LF>
T44444nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn<CR><LF>
2nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn<CR><LF>
9aaaaaaaaaaa<CR><LF>
I've defined the records in the type tree, and if I process one of each
type, it works, but if I have a file like the above sample, the validation fails. I'm running a 'validation only' process. No defined output, just
running an input 'validation map'. Help ? Thanks.
clarcombe
Premium Member
Premium Member
Posts: 515
Joined: Wed Jun 08, 2005 9:54 am
Location: Europe

Post by clarcombe »

Where have you defined your CR LF. Is it at the end of the file or line ?
Colin Larcombe
-------------------

Certified IBM Infosphere Datastage Developer
jazzer1
Participant
Posts: 37
Joined: Mon Mar 20, 2006 10:26 am

Post by jazzer1 »

The <CR><LF> is at the end of each record. Just the way you see it in the example.
Thanks. Standing by....
jazzer1
Participant
Posts: 37
Joined: Mon Mar 20, 2006 10:26 am

Post by jazzer1 »

Let me clarify... the <CR><LF> is defined as a terminator for each group...the '1' rec is an implicit group with terminator <CR><LF>.
The '2' rec is an implicit group with terminator <CR><LF> etc.
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

Specify your file containing each record type ofccurring 0:s and specify the identifier for each record type.
Specify the Group Subtype for File as unordered.
File
Record1 (0:s)
Record2 (0:s)
Record3 (0:s)
jazzer1
Participant
Posts: 37
Joined: Mon Mar 20, 2006 10:26 am

Post by jazzer1 »

Janhess's solution worked ! Thanks very much Janhess.
Post Reply