cancel
Showing results for 
Search instead for 
Did you mean: 

File Sender, Content Conversion - how to define variable length last field?

Former Member
0 Kudos

XI 3.0 SP17

With a File Sender communication channel, that uses Content Conversion - how do I define a 'variable length' last field?

The scenario - the input file has four fields, of which the first three are a known fixed length, and the last (fourth, trailing) field is variable in length.

Using a Message Protocol of 'File Content Conversion', how do I define that last variable length field (field name 'WOData' below) in the Content Conversion Parameters section?

My current parameters are:

Recordset Structure - Row,*

ignoreRecordsetName - true

Row.fieldFixedLengths - 1,12,5,99999

Row.fieldNames - WOType,WONum,WOLine,WOData

I've tried the following for 'Row.fieldFixedLengths' to no avail -

'1,12,5,*'

'1,12,5,0'

'1,12,5,'

'1,12,5'

The last two were grasping at straws )

The only thing I've got to work is specifying a 'large' value for the final field (99999 above).

In addition, does anyone know if specifying a large value (e.g. 99999) for the final trailing field will give rise to performance issues when the file is being processed?

In the help for "Converting File Content in a Sender Adapter", it states -

<Begin Quote>

NameA.fieldFixedLengths

If you make a specification here, the system expects a character string that contains the lengths of the structure columns as arguments separated by commas.

If you also specify a separator for the columns, you must not add its length to the length of the columns.

This entry is mandatory if you have not made an entry for NameA.fieldSeparator.

<End Quote>

http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I have not needed to look into this issue. However, would I be correct in thinking that this last field must have a maximum length. If so, then you would probably be best setting this value as the length.

Former Member
0 Kudos

<< However, would I be correct in thinking that this last field must have a maximum length. If so, then you would probably be best setting this value as the length. >>

Hi Martin,

Yes, true, there would be a maximum length, but that is really an issue between the sending and receiving systems. I don't need to manipulate the last field, hence my question on how to define that last field of varying length, and why I've used an artificially high limit.

Answers (4)

Answers (4)

JaySchwendemann
Active Contributor
0 Kudos

I know this i a long time since but did you (or any other) find a solution to this? I'm facing a similar problem.

Cheers

Jens

Former Member
0 Kudos

Hi Geoff,

If u are fields are u going to be separated by comma for sure then u can use

Row.fieldSeparator ,

instead of fieldFixedLength..

Regards,

Sudharshan

Former Member
0 Kudos

<< If u are fields are u going to be separated by comma for sure then u can use Row.fieldSeparator , instead of fieldFixedLength.. >>

Hi Sudharshan,

The file does not contain delimited records - I must use a fixed length/positioning record structure. See example above.

Shabarish_Nair
Active Contributor
0 Kudos

note that fieldFixedLengths will not take any wildcard entries like *. So in these case it is ideal to provide a maximum char length.

But note that while the file is being created that many spaces will be created in your file !!!

Former Member
0 Kudos

<< note that fieldFixedLengths will not take any wildcard entries like *. So in these case it is ideal to provide a maximum char length. But note that while the file is being created that many spaces will be created in your file !!! >>

Hi Shabarish,

Yes, no wildcard is the conclusion I came to, hence my maximum )

The message size did not increase by any 'blank padding'. When I look in [Message Display Tool (Detail Display)] 'Audit Log for Message: X' -

2006-10-17 18:22:42 Success Channel X: Entire file content converted to XML format

2006-10-17 18:22:42 Success Send binary file "X" from FTP server "X", size 103290 bytes with QoS EO

2006-10-17 18:22:42 Success Application attempting to send an XI message asynchronously using connection AFW.

2006-10-17 18:22:42 Success Trying to put the message into the send queue.

2006-10-17 18:22:42 Success Message successfully put into the queue.

2006-10-17 18:22:42 Success The application sent the message asynchronously using connection AFW. Returning to application.

The input flat file in non-XML format was 92,132 bytes and the message payload into XI was 103,290 bytes.

My understanding is that trailing spaces are stripped from XML nodes.

agasthuri_doss
Active Contributor
0 Kudos

Hi,

Can you check Whethere you input value has some SPACES.

Regards

Agasthuri Doss

Former Member
0 Kudos

<< Can you check Whethere you input value has some SPACES. >>

Hi Agasthuri,

I don't see how the contents of the last field come into play here - only its length.

The file record can be represented as -

ABBBBBBBBBBBBCCCCCDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...

I don't think it matters whether field 'WOData' (DDD... above) contains blanks or not.