Flat FILE SCHEMA HELP NEEDED urgently

RMG or EXPERTS,
Is it Possible in webmethods to create a FlatFile schema for a fixed lenght flatfile where Header and Trailer has record-identifiers at the beging of the their corrosponding records…and the each record in the body has record-identifier at end of the record.IF this is possible,please help.

For Example:

##HEADER01 233 4456 67
789560000K 455551
867860998789999999 002
uru 9999 84746 000474992
##TRAILER999003300000003

In the above fixed lenght flat file example
##HEADER,1,2,##TRAILER. are record-identifiers…please help

Thanks,
Saritha:sad:

Is the Header/Trailer datacontent coming in the same line for eg.??
##HEADER01 233 4456 67789560000K 455551867860998789999999 002
##TRAILER999003300000003

Is the record delimiter is newline or Carriagereturn??

If both the above conditions met then create the schema accordingly…

choose the delimited option and set record parser as newline and choose StartPosition 0

And RecordDefinition (maxrepeat=single)
(##HEADER)
----create Field Definitions (specify Start/End positions)
---->(##TRAILER)(maxrepeat=single)
-------->create Field Definitions (specify Start/End positions)

I assume you are getting detail lines in between Header/Trailer records??

HTH,
RMG

RMG,
Header , trailer and each record in the body are coming in separate lines…But the record identifier for each record in the body is at the end of the each record(162 position) where as for the header and trailer,record-identifier is at the beginning…Plz help

Example
##HEADER01 233 5555
789560000K 455551
867860998789999999 002
uru 9999 84746 000474 992
##TRAILER999003300000005
In the above fixed lenght flat file example
header and trailers have record identifiers ##HEADER and ##TRAILER

Body has delimiters ‘1’ and ‘2’.

plz help
saritha

I am still confused about your ffdata here…But anyways try this and follow the → hiearchy…

And RecordDefinition (maxrepeat=single)
(##HEADER)
----?create header Field Definitions (specify Start/End positions)
---->RecordWithNoID (maxrepeat=unlimited) detail records
------>create detail Field Definitions (specify Start/End positions)
------->(##TRAILER)(maxrepeat=single)
--------->create trailerField Definitions (specify Start/End positions)

HTH,
RMG

RMG,
The problem is there are many different lineitems where the RECORD-IDENTIFIER starts at 162 position.I have attached a sample text where the record identifiers are '1" and “3”(at the end of each record).For Header and Trailer RECORD Identifiers start at 0 position.Please help:(
ex1.txt (423 Bytes)

This file layout sounds both delimited and fixed length…also since the detail record identifiers start at 163 position like that there is no way to tell schema detail RecordDefinitions (1,3) consider at 163th position…

I dont think this type of layout will work quite confusing esp detail record identifiers start/end positions…So can you talk to source team who ever provided this file and manage your way with the expected layout/schema??

Sorry for not able to put much time on this…

HTH,
RMG

RMG,
i was able to parse header and trailer seperately.My question is I have different record structures with same record identifier,could you please help me how to create schema.fixed lenght ff

SAMPLE:
fieldd1 field2 fileld3$
fileld1 field2 field1 field2 .
all the 3 records have same lenght and same record-identifier="$".but the structures are different(field lenghts).could you plz help me create flat file schema.Thanks

With the information provided thus far, I don’t think what you’re asking can be done. Not only not with IS, but not with any sort of software.

There has to be some way to uniquely identify the record type. If the same identifier is used for different record layouts, then you won’t be able to use a FF schema. Indeed, you won’t reliably be able to use any sort of automation if there isn’t an unambiguous way to identify specific record types.

If you were going to parse this file with custom code, how would you do that? That may lead you to how you might do this with a FF schema.

Thank You RMG and Reamon for your time, i was finally able to solve the problem myself…

Excellent. How did you resolve the record identification issue?

Glad to hear…Can you share the resolution to this forum…??

Raemon,
All i did was, created two schemas, one for header and trailer,another for body.Used Convert to Values service twice.First parsed the header and trailer and then passed the undefined data as input to second convert to values service to parse body…Hope this helps others facing similar problem.

saritha:smile:

It’s kind of alternate solution…but putting 2 times convertToValues is not normal way of doing…well you tried the best to resolve…

HTH,
RMG