recordbinaryfilesmainframecopybook

Edit a Mainframe file in the RecordEditor without a copybook


How do you Edit a (binary EBCDIC) Mainframe file in the RecordEditor with out a Cobol Copybook.

How do you generate Java code to read the file using the RecordEditor.

Note: This is an attempt to split a question that is far to broad to give meaningful answer to into a series of simpler Question and Answer's.


Solution

  • Try and avoid editing a binary file with a Cobol Copybook if at all possible. This should only be attempted as a last resort !!!.

    Try and get that Cobol copybook (or some field layout document) for the file !!!


    Some general advise:

    RecordEditor Layout Wizard

    To start the wizard select option Record Layouts >>> Layout Wizard.

    enter image description here

    File Structure screen

    The file structure screen has 3 purposes:

    The RecordEditor will try and work this out for you

    enter image description here

    Field Selection Screen

    The RecordEditor will try and work out where fields start and end but it is not perfect. You need to carefully check and correct its choices

    enter image description here

    On this screen, the fields are displayed in alternating colors

    Field Definition screen

    On this screen you define the field names and Types. You may need to go back to the **Field Selection Screen* to adjust the fields

    enter image description here

    Editing the file

    Once the Record Layout has been defined, it can be used on the open file screen

    enter image description here

    Generating Java code

    When editing your file, you can generate java~JRecord code to read the file by selecting Generate >>> Java >>> ....

    enter image description here

    You can the enter a package-id + generate options:

    enter image description here

    and finally your sample java code is generated to read / write the file.

    enter image description here