Menu

Sign Trailing

Help
2016-06-15
2016-06-16
  • Brian Reynolds

    Brian Reynolds - 2016-06-15

    Hi Bruce,

    I think I've come across an issue with the "sign trailing" clause, but wanted to run it by you first.

    This is my copybook

           01 HEADER.
              05 SOME-VALUE  PIC S9(13)V99 SIGN TRAILING SEPARATE CHARACTER. 
    

    and this is the contents of my dat file

    000000000000123+
    

    This is the code I'm using to execute

    ICobol2Xml obj = Cobol2GroupXml.newCobol2Xml(copybookIs, "copybookname")
                    .setFileOrganization(Constants.IO_DEFAULT)
                    .setDialect(ICopybookDialects.FMT_INTEL)
                    .setSplitCopybook(CopybookLoader.SPLIT_NONE);
    
            obj.cobol2xml(dataIs, os);
    

    What I'm expecting to see is the value "1.23" but instead I'm getting:

    <CobolData>
        <HEADER>
             <SOME-VALUE>12.3</SOME-VALUE>
         </HEADER>
    </CobolData>
    

    I've verified that if I take out the sign trailing... clause I get the expected value:

    <CobolData>
        <HEADER>
             <SOME-VALUE>1.23</SOME-VALUE>
         </HEADER>
    </CobolData>
    

    Is this a bug or something I've done wrong?

    Thanks,
    Brian

     
  • Bruce Martin

    Bruce Martin - 2016-06-15

    Looks like it; I will investigate

     
  • Bruce Martin

    Bruce Martin - 2016-06-16

    If have fixed JRecord for this issue, The dowload:

    has
    New JRecord and cobol2xml jars
    Update source for cobol2xml

    I will update Subversion for the changes JRecord.

    Note: The download is based on a forth comming release and the documentation refers to things that are yet to happen (e.g. changes to the Record|Editor).

     
  • Brian Reynolds

    Brian Reynolds - 2016-06-16

    Works great - many thanks for the quick fix.

     

Log in to post a comment.