Menu

#19 Continuation lines not supported

v1.0_(example)
pending
None
1
2017-12-12
2017-04-09
Erwan KOFFI
No

Hello,

I found out that continuation lines (hyphen column 7) are not supported in copybooks.
I encountered this bug with a level 88 with multiple values.

Discussion

  • Bruce Martin

    Bruce Martin - 2017-04-10

    can you provide an example ???

     
  • Erwan KOFFI

    Erwan KOFFI - 2017-04-11

    Here is an example:

           01  ROOT.                                                    
               05 SUBLEVEL             PIC X.
                    88 FIRST-VALUE     VALUE 'S'.
                    88 SECOND-VALUE  
                                       VALUE 'S' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z
    
          -             '' 'B' 'C' 'D' 'E' 'F' 'G'.
    
     
  • Bruce Martin

    Bruce Martin - 2017-04-16

    I am currently travelling around Europe (for the next 2 months) + I have other Requests so I can not give you a date for the fix.

    In the short term fixes include

    • (If there is ony a couple of exaples) do manual change to the coybook
    • Write your own preprocessor

    CB2XML Background

    JRecord uses Cb2xml to process Cobol. Cb2xml has a simple pre-processor to strip out columns
    1-6 and 72-80. The pre-Processor is ** preProcess(Reader r, int columnStart, ...** method in
    https://sourceforge.net/p/cb2xml/SVN/HEAD/tree/source/cb2xml/src/net/sf/cb2xml/CobolPreprocessor.java

    You could create an updated version to handle string extensions for 88 values.
    (There is code to handle normal extensions for value clauses (non 88 levels).

    If you are using IOBuilders use the set the Copyboo-Format to FREE_FORMAT option

    JRecordInterface1.COBOL
               .newIOBuilder(new StringReader(updatedCopybook)
                  .setCopybookFileFormat(Cb2xmlConstants.FREE_FORMAT)
    
     

    Last edit: Bruce Martin 2017-04-16
  • Bruce Martin

    Bruce Martin - 2017-12-02

    A fix for this issue will be in JRecord version 0.90

     
  • Bruce Martin

    Bruce Martin - 2017-12-12
    • status: open --> pending
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB