cancel
Showing results for 
Search instead for 
Did you mean: 

Fields missing in sender FCC- fixed length

Former Member
0 Kudos

Hi experts.

The system is PI 7.4 dual stack, and the file adapter version is 7.00 or 7.40.

We are converting incoming flat file(fixed length) with FCC in sender channel, and strange issue occurs when last fields missing in the flat file.

Flat file (the second line has last 15 digits missed, and the third line is just blank with no space):

FCC configuration:

There was no missingLastFields (=add) or lastFieldsOptional (=YES ) specified, so the conversion should fail in adapter engine, and in fact, it did fail one time in production, error message is exactly about missing last fields etc..

The solution should be straightforward - just add one of parameters above. However, during the issue replication in development environment, this configuration is working properly without any issue - the last field(QUANTITY) is generated with value empty in the XML..

I tried both adapter version 7.0 and 7.4, even specified lastFieldsOptional = NO explicitly (actually lastFieldsOptional is obsolete, and test shows it doesn't have any impact with YES or NO, never use it anymore... correct me if wrong), the QUANTITY is always get generated with empty value.

So the only reason I am supposing is the default value of "missingLastFields" is ADD having "fieldFixedLength" specified, which overwrites the function lastFieldsOptional (=NO), but I didn't find official document to prove this..

Do you have any input for this strange issue(fail in pro, but work in dev)? and is my assumption correct(default value of "missingLastFields" is ADD)?

PS..I understand it is recommended that always have "missingLastFields" and "additionalLastFields" specified to ensure a well-defined runtime behavior, but now we are having a couple of such interfaces without these parameters in production.. and it is not that easy to make so many changes in pro...

Thanks a lot.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Just to explain the flat file more clearly...

Flat file (used to replicate issue in dev) :
the second line has last 15 digits missed, there is no space in the red box outlined in the snapshot.



former_member183816
Active Participant
0 Kudos

Based on, what I have seen in PI 7.31 (single stack) Receiver file adapter FCC for fixed field length file.

For a blank XML node, it intoduce as many as spaces as the length of the field (default).

And if an XML node is missing altogether, You will get error at adapter. (Thats why, we always map all fields in target structure using mapwithdefault in our mapping.)

Exact vice versa should happen in Sender File adapter case,

That means if total length of a line is not present=error.

                   if  total length of a line is present     = XML nodes gets created with value/no value.

In your production issue, last field would be missing altogether (not even spaces) from file. So it introduced error at adapter.

In your dev replication of issue, you have replaced last field with spaces, that's why it worked.

Former Member
0 Kudos

Hi Ambuj,

thanks for your reply, maybe I didn't explain clearly.. the red box in the flat file doesn't contain any spaces, it is completely blank.

No spaces included within the red box in the test file in development env.

Harish
Active Contributor
0 Kudos

Hi,

Please check Mike's reply in below discussion

PI removes space from my flat file | SCN

Former Member
0 Kudos

Thanks Harish, but there is no space in the flat file outlined with red box..