Menu

#81 Pictures problems

open
nobody
None
5
2010-05-31
2010-05-31
danieleacme
No

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

Discussion

  • danieleacme

    danieleacme - 2010-05-31

    The right path of SymbolUtil is

    com.res.java.translation.symbol

     
  • VenkatK

    VenkatK - 2010-05-31

    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

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.