Posted: Thu Sep 27, 2007 9:02 pm Post subject: BIP5505E: Data conversion failed: data invalid.
Partisan
Joined: 07 Aug 2001 Posts: 386
I am runing WMB V6 CSD5 on Windows
I am reparsing a message using the resetcontentdescriptor node.
I got an error
ParserException BIP5171E: Custom Wire Format parsing error
An error occurred while parsing a Custom Wire Format message.
Current message : ''msg_PRODUCTMSG1''
Current element : ''1542^PRODSRV1_OCCURRENCE_NO''
:
Offset from start of message : 778
See following errors for more details.
2007-09-28 00:28:42.457435 4428 ConversionException BIP5505E: Data conversion failed: data invalid.
Type of data being read : ''decimal'' Data : '' ''
A data conversion during reading or writing of a message failed because the input data was invalid for the output data type.
The message in this area is all blanks (ASCII 20s)
the copy book that I used to create the message definition looks like
05 PRODSRV1-OLD-INVENT-NO.
10 PRODSRV1-POLICY-OR-PRU-NO PIC X(0.
10 PRODSRV1-ADDL-INVENT-KEY.
15 PRODSRV1-ENTRY-ID PIC X(02).
15 PRODSRV1-QUALIFIER PIC X(01).
15 PRODSRV1-CHECK-DIGIT PIC X(01).
10 PRODSRV1-OCCURRENCE-NO PIC 9(02).
So I changed the
10 PRODSRV1-OCCURRENCE-NO PIC 9(02). to
10 PRODSRV1-OCCURRENCE-NO PIC X(02).
and recreate the message definition. The field now shows xsd:string instead of xsd:shot
But I am still getting the same error in the trace.
I think what the trace tells me is that the borker expect the data to be decimal. but the data read is ' '
Can some one help me to understand why changing PIC 9 to PIC X does not fix the problem ?
Can some one help me to understand why changing PIC 9 to PIC X does not fix the problem ?
The COBOL importer will not treat PIC X as xs:decimal. PIC X will be mapped to xs:string. You should be able to check this by opening your message definition file and looking at the logical properties of PRODSRV1-OCCURRENCE-NO
The CWF parser will not attempt to perform decimal data conversions on xs:string.
I think the options are:
- You have not re-imported your COBOL copybook
- You have not refreshed your BAR file after re-importing
- You have not re-deployed your BAR file after refreshing it
Also make sure that the number of occurrences of a group is defined before the group gets ever parsed...
See cobol occurs depending on clause...
And you can only initialize with spaces a group that contains fields of the same type PIC x(y).
You should probably clear the group so that the fields get set to an initial value.
If you have a blank group your iteration number should not be space as it is defined as pic 9(2).
Otherwise you need to redefine the null value for the field as being spaces in/after your cobol copy book import.
Remember that cobol allows you to assign weird values to some fields (filler, redefines, etc ...)...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum