cancel
Showing results for 
Search instead for 
Did you mean: 

Simple File Coversion problem

Former Member
0 Kudos

Hi,

My flat fille has 3 fields. Mentined fixed lengths as 10,10,5.

And my flat file has below content.

==========================

Smarty Sweet 85014

Smartya Sweetya 85014

==========================

In my output file i am getting first two fields correct. ZIP code i am getting only 850 instead 85014.

File has content like (10 characters including blanks) space (10 characters including blanks) blankspace (5 characters).

Thanks

Narayana

Accepted Solutions (1)

Accepted Solutions (1)

former_member184619
Active Contributor
0 Kudos

Hi Narayana,

Just check these links... it may help you

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter (Fixed lenght )

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion (Field Separator )

Introduction to simple (File-XI-File) scenario and complete walk through for starters /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1

Introduction to (File-XI-File) scenario and complete walk through for starters /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

Sachin

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Narayna,

Can you please send the flat file you are using to my ID amitanshudeep@gmail.com.

field.FixedLengths should work for this.

Thanks

Amitanshu

Former Member
0 Kudos

Hi,

The parameter fieldFixedLength is madatory if you do not provide the parameter fieldSeparator.

Provide the fieldFixedLength parameter as early and include the parameter fieldContentFormatting with value nothing.

Also, give us the parameters you have used now.

Regards,

Jai Shankar

Former Member
0 Kudos

Hey

try by removing the fieldFixedlength parameter

thanx

ahmad

Former Member
0 Kudos

Hi Ahmad,

I got below problem after deleting fixedLength.

====================================

Sender Adapter v2307 for Party '', Service 'BS_KIRKLAND':

Configured at 2007-04-30 01:53:54 EDT

History:

- 2007-04-30 01:53:54 EDT: Error: Conversion initialization failed: Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found:

Parameter 'Address.fieldFixedLengths' or 'Address.fieldSeparator' is missing

Consistency check: no. of arguments in 'Address.fieldFixedLength' does not match 'Address.fieldNames' (0 <> 3)

============================

Looks like Fixed length attribute is mandatory.

Thanks

Narayana

Former Member
0 Kudos

Hey

yeah u have to specify .endSeparator and .fieldSeparator for the main structure:)

fixedFieldLength is not mandatory if u have specified .fieldSeparator

thanx

Ahmad

Message was edited by:

Ahmad

Former Member
0 Kudos

Hi

Use .endSeparator as Ahmad has suggested

You can write it as .endSeparator = 'nl' that is new line so that it will take entire ZIP code till it encounters new line character.

And it will understand that next record has to be fetched from new line.

Regards.

Former Member
0 Kudos

Hi,

what is the field separator value for Blank?

.fieldSeparator='one blank space '? or just .fieldseparator=oneblankspace

one blank space is i just enter blank space.

Thanks

Narayana

Former Member
0 Kudos

Is there any field separator for Blank? Like for new line we give 'nl'.

My flat file content is like below.

Smarty Sweet 85014

Smartya Sweetya 85014

I have one or more trailing blanks between 2 columns. And each record is in a row.

Thanks

Narayana

Former Member
0 Kudos

Hi-

For Blank the field seperator is '0'

Former Member
0 Kudos

Give one blank space in the value column.