Flat file without record identifier and have hierarchy

I’m using WM 6.1 and my input flat file is like

921577234332|11261385142|20070703|11|20070423
001|US|MOD,RF UPCNVRTR,BOT|9030908840|000000000
002| |MOD-RF UPCNVRTR,TOP|9030908840|00000000020 000000010.51||0.000000|000000010.51
AGILENT TECHNOLOGIES INC|LIBERTY LAKE WA
AGILENT TECHNOLOGIES INC

Header
|_ Items,Totals,Exporter,Importer

The flat file is without the record identifier,I know I can use recorWithNoID or default recrod but that is true when you have only one record with the default structure but here the structure is different for every line.

Thanks for any suggestions

When you define the RecordDefinition “recordWithNoID” in the properties area (set maxRepeat = unlimited instead of single) this will take care incase of single or multiple records both conditions.

HTH,
RMG

thanks RMG
but the record structure is different for every line
in the default record I can just provide the record structure for one line

I am still not clear what your record structure look like.If you dont have record identifier use recordWithNoID and as you said some records has the name then under the recordWithNoID hierarchy create another record definition with record names etc…

for example your record structure can be like this:
recordWithNoID (Header) max repeat = single or unlimited
—>lines (Lineitems) - max repeat = unlimited
—>Summary (Trailer) max repeate = single

HTH,
RMG

Hi RMG
Actually none of the records are having record identifier,this is the structure of one set of record,it wiil repeat in the similar fashion

921577234332|11261385142|20070703|11|20070423
001|US|MOD,RF UPCNVRTR,BOT|9030908840|000000000
002| |MOD-RF UPCNVRTR,TOP|9030908840|00000000020 000000010.51||0.000000|000000010.51
AGILENT TECHNOLOGIES INC|LIBERTY LAKE WA
AGILENT TECHNOLOGIES INC

so if i put the first record structure under recordWithNoID
how do I arrange the other following as they are also not having Record identifier.

Thanks for your valuable inputs

OK as i told above set recordWithNoID (max Repeat = unlimited) and create FFSchema/DocumentType then based on your file format above while parsing the each line will be under the recordWithNoID record set (DocumentList) and then you map it accordingly.This is the only way you have.

HTH,
RMg

Hello,
I am creating NACHA file by receiving input in an XML format.
If I create FlatFile schema with record ids then I have to name the record fields as 1, 5, 6, 7,8,9 see below
1 (FileHeader) max repeat = single
—>5 (BatchHeader) - max repeat = unlimited
—>—>6 (Entry) max repeate = unlimited
—>—>—>7 (Addenda) max repeate = unlimited
—>8 (BatchTrailer) - max repeat = unlimited
9 (FileTrailer) max repeat = single

But when I try to create XML which confirms to document type associated with abouve schema. system does not allow because the xml nodes can not be numeric values like 1, 5,6 etc.

So I wanted to create schema contaning recordWithNoID records.
recordWithNoID (1 FileHeader) max repeat = single
—>recordWithNoID (5 BatchHeader) - max repeat = unlimited
—>—>recordWithNoID (6 Entry) max repeate = unlimited
—>—>—>recordWithNoID (7 Addenda) max repeate = unlimited
—>recordWithNoID (8 BatchTrailer) - max repeat = unlimited
recordWithNoID (9 FileTrailer) max repeat = single

when I use the above recordWithNoID schema and convertToString then Records 8 (BatchTrailer) and 9 (FileTrailer) does not get created. Is there a way to achieve this?

I was trying to find what is the reason for not generating Records 8 (BatchTrailer) and 9 (FileTrailer)
recWithNoIDLike46 = false (default) Determines how the pub.flatFile:convertToValues service handles recordWithNoID records.
false (the default): Each recordWithNoID record appears as a child of the record above it, in an array.

So in case of recordWithNoID NACHA schema 8 is not child of preceding node 7 and 9 is not child of preceding node 8. Is my conclusion right?

May be its something to do with the Hierarchy of 8,9 you have in place…

So can you try with this layout levels:

recordWithNoID (1 FileHeader) max repeat = single
—>recordWithNoID (5 BatchHeader) - max repeat = unlimited
---->—>recordWithNoID (6 Entry) max repeat = unlimited
—>—>—>recordWithNoID (7 Addenda) max repeat = unlimited
----------- >recordWithNoID (8 BatchTrailer) - max repeat = unlimited
—>recordWithNoID (9 FileTrailer) max repeat = single

If the above doesn’t work then shift/move record 8 under the record 7 level more deeper…

You got to play with the hierarchy until it mathces with your flatfile data sample.

HTH
RMG