recordbinaryfilescobolmainframecopybook

How do you edit a Binary Mainframe file in the RecordEditor using a Cobol Copybook (pt1)


How do you edit a Single-Record-type Binary Mainframe file in the RecordEditor using Cobol Copybook on a Windows or Linux PC.

Note: This is an attempt to split a very broad question into a series of simpler Question and Answers.


Solution

  • To Edit a File in the RecordEditor with a Cobol Copybook you must first load the copybook and then edit the file

    Loading the Cobol Copybook into the RecordEditor

    Select Record Layouts >>> Load Cobol Copybook menu options

    enter image description here

    enter image description here

    On the Cobol Load Screen enter the Cobol Copybook and your Mainframe Data file. The RecordEditor will read the file and try and work out what the file attributes are.

    enter image description here

    The Important attributes

    The RecordEditor will try display the file using the current attributes on the Righthand side of the screen. You can play around with attribute.

    enter image description here

    If you can not get the file display correctly, you could have the wrong Cobol Copybook. You must use a Cobol Copybook that matches the data exactly, near enough is never good enough.


    Viewing (Editting your file)

    Once you have loaded you copybook, go to the Open files screen.

    ....


    Generating Java Code to Read the file.

    To generate Java~JRecord Code to read the file select Generate >>> Generate Java~JRecord code for Cobol.

    The first screen is basically the same as the Import Cobol Copybook screen. This answer has details on generating Java code