Hi Venkat,
I've found three problems on picture declaration :
1)
variable :
01 wsqlcode pic -(10) .
The conversion phase works well but on execution phase the program loop inside on
com.res.java.lib.FieldFormat
private void getJavaFormat(String pic)
I think because on
if (c == '9' || c == 'Z')
missing the check
if (c == '9' || c == 'Z' || c == '-')
2)
01 a--cmr-oreord pic s9(07)v99 comp-3 .
this variable was converted as
private BigDecimal a_cmrOreord = BigDecimal.ZERO;
public BigDecimal getA_cmrOreord() {
return a_cmrOreord;
}
public void setA_cmrOreord(BigDecimal val) {
a_cmrOreord=super.normalizeDecimal(val,5,2,true);
}
the integer part should be 7 and not 5
I think the problem is in
com.res.java.symbol.SymbolUtil
private String getJavaTypeSetterString(SymbolProperties props) {
case CobolSymbol.BIGDECIMAL:
return "super.normalizeDecimal(%0," + String.valueOf(props.getLength()) + ","
+ String.valueOf(props.getJavaType().maxFractionLength) + "," + String.valueOf(props.getJavaType().isSigned) + ")";
should modified into
case CobolSymbol.BIGDECIMAL:
return "super.normalizeDecimal(%0," + String.valueOf(props.getJavaType().maxIntLength) + ","
+ String.valueOf(props.getJavaType().maxFractionLength) + "," + String.valueOf(props.getJavaType().isSigned) + ")";
3) decimal-point is comma .
Picture like
01 impAcq pic zzz.zzz.zz9,99- .
where point is the thousands separator and comma is decimals separator
don't works (as the metric Italian system)
I've used 05-23-2010 version
I hope this is helpful you
Regards Daniele
The right path of SymbolUtil is
com.res.java.translation.symbol
Hi Daniele,
Thanks again for the detailed analysis that you provide with the bugs report.
I will continue to test and include the solution as before.
I had a note in an earlier report, if you are interested if you are considering seriously contributing to RES, send me an email to: open.cobol.to.java@gmail.com
Continue the support of RES.
-Venkat