Periodic Process or Calculation returns an “Error in assignment – incompatible types” error message (16005,27106).
Root Cause
The type of result resolved for a Custom Statement Alias does not align with the type configured in the PA_CUSTOM2.OPERAND3_PIC field.
OPERAND3_PIC field is updated by PeopleCode when changes are saved on the various Custom Statement configuration pages. The value in this field should start with DEC, CHAR, or DATE and match the type of value the custom statement is returning.
Reasons why this field may be out of sync with the Alias configuration:
- Identified PeopleCode Issue – Custom Statement Assignment from Character or Date Temporary Variable Fails.
- Unidentified PeopleCode Bug – Change to configuration does not set PA_CUSTOM2.OPERAND2_PIC correctly.
This error is thrown when the COBOL Periodic Process or Calculation executes, but it’s caused by discrepancies in the Alias configuration data. These discrepancies are likely caused by problems with the Custom Statement configuration pages and the PeopleCode behind them that should populate OPERAND2_PIC with the correct type.
Solutions
The Custom Statement name is identified in the message text (%5). A review of the Custom Statement configuration may help determine the type of value to be resolved. The application trace output may help identify any unexpected inputs leading up to the error.
Check that PA_CUSTOM2.OPERAND3_PIC for the identified Custom Statment is set correctly. It should start with DEC, CHAR, or DATE and match the type of value the Custom Statement is returning.
This field can be manually updated to correct the problem, but it is possible that if the configuration for the Alias is changed, the manual update could be wiped out.
A better suggestion is to identify why the OPERAND3_PIC value was set incorrectly when the Custom Statement was configured online. After correcting any PeopleCode problems, freshly edit and save the Alias, and then confirm the OPERAND3_PIC field has been set correctly.
This problem has been observed when Character or Date values are assigned to a temporary variable within a Custom Statement, and then subsequently assigned as the Custom Statement result. When the Custom Statement is saved, the correct type is not resolved and DEC is saved to both the OPERAND3_PIC and PA_ALIAS_USE.ALIAS_FLD_PIC. This error message is then returned by the process. When only the Custom Statement record (OPERAND3_PIC) is updated using SQL to correct the problem, a different “Alias value field type does not match alias type” error message is returned.
Hints
researching…
Details
Message Set/Number: 16005,27106
Warning Message: Error in assignment – incompatible types %5. %1 %2 %3 %4.
Programs: PAPUCSTM, referenced but not used in PAPC415L
Message Pointer: S-MSG-ALS-ASGNMT-ERR
Conditions
Attempt to assign the resolved Character or Date temporary variable into the Custom Statement result fails because of a type mismatch error.
Leave a Reply
You must be logged in to post a comment.