Unpacking COMP-3 digit using Record Editor/Jrecord

前端 未结 1 727
眼角桃花
眼角桃花 2021-01-28 19:53

I have created layout based on cobol copybook.

Layout snap-shot:

I tried to load data also selecting same layout, it gives me wrong result for some colu

相关标签:
1条回答
  • 2021-01-28 20:24

    First Problem you have done an EBCDIC --> ascii conversion on the file !!!!

    The EBCDIC --> ascii conversion will also try and convert binary fields as well as text.

    For example:

    Comp-3 value   hex     hex after Ascii conversion
    
     400          x'400c'       x'200c'       x'40' is the ebcdic space character
                                              it gets converted to the ascii
                                              space character x'20'
    

    You need to do binary transfer, keeping the file as ebcdic:

    1. Check the file on the Mainframe if it has a RECFM=FB you can do a transfer
    2. If the file is RECFM=VB make sure you transfer the RDW (Record Descriptor word) (or copy the VB file to a FB file on the mainframe).

    Other points:

    You will have to update RecordEditor/JRecord

    • The font will need to be ebcdic (cp037 for US ebcdic; for other lookup)
    • The FileStructure/FileOrganisation needs to change (Fixed length / VB)

    Finally

    • BILS-Count-EDG is either 9 characters long or starts in column 85 (and is 8 bytes long).
    • You should include Xml in as text not copy a picture in.
    • In the RecordEditor if you Right click >>> Edit Record; it will show the fields as Value, Raw Text and Hex. That is useful for seeing what is going on
    • You do not seem to accept many answers; it is not relevant whether the answer solves your problem; it is whether the answer is correct answer for the question.
    0 讨论(0)
提交回复
热议问题