How can i create FFSchema for Variable length Rec without delimeters

Hi:

Can anybody give me the idea to create FF schema for Variable length records without the Delimeters. It will have record ID.

Thanks in advance
Ram

If the fields in a record are variable length, how can each field be reliably parsed without delimiters?

Hi Reamon:

Thanks a lot for your response.

I have a FFdata like this:

01sam1000SAP
02customercall2000
02customercall3000
03sample100

in this we dont have field delimeter, recordtype 01,02 and 03 are with different lengths.

without the field delimeters , is it not possible to create FFschema for variable length recs?

Thanks
Ram

A record type can either be fixed width or variable.

A file can hold multiple record types. Each record type within the file is defined independently.

In the case you described, you have multiple types of fixed-width records. Each is identified by its record identifier.

Thus, your FF schema definition will be defined as a file with record types 01, 02 and 03. Each record type is fixed-width. Based on your description, you do not have any variable length records–you have multiple fixed-width record types.

Ram,

In the example you mentioned above it is definetly a fixed position flatfile as Rob mentioned.So try creating the schema this way.Before doing this you should have the field positions defined for each field ie (Start,End positions) of the data.

FFSchemaDefinition (choose Delimiter based)
Record delimiter select newline

Start creating RecordIdentifiers/Fields
RecordDefinition(01)
------Create field definitions here(select Fixed-Width option when you create)
–>RecordDefinition(02) --in the Properties select maxRepeat:Unlimited
-------Create field definitions here(select Fixed-Width option when you create)
–>RecordDefinition(03)
-------Create field definitions here(select Fixed-Width option when you create)

Note:Put RecordDefinitions 02,03 underneath the hierarchy of 01 record.

RecordDefinition:
01 (maxRepeat:single)
–>02 (maxRepeat:unlimited)
–>03(maxRepeat:single)

That way the parsing will be successful and finally test your Schema by loading the sample file and check the parsing extraction.

HTH,
RMG

Reamon thanks a lot for your time.

I got idea with what you are saying now. So i have to create Multiple fixed length Schemas for this different types of records.
am i right ?

Thanks
Ram

Ram,

Just you need to create only one fixed-width FFSchema having with multiple record definitions (a.k.a record identifiers) in it.Pls see my post above and try creating Schema definition as per your requirement.

HTH,
RMG

You can create one schema with multiple record definitions in it. Or you can create a dictionary with the record definitions and then create a schema that uses those definitions.

Refer to the “Flat File Schema Developer’s Guide” for details and instructions.

Reamon and RMG Thanks a lot for your help, i finally made it to work by following your instructions.

Ram