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

蓝咒 提交于 2019-12-29 08:12:31

问题


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.


回答1:


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

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.

The Important attributes

  • Split Copybook: use No Split for a Single record type file
  • Font (or Charset / encoding) You need to enter the appropriate encoding for the file. Cp037 (or IBM037) is US-EBCDIC, CP273 (or (IBM273) is German EBCDIC.
  • Cobol Dialect Mainframe for IBM Mainframe cobol
  • File Structure This corresponds RECFM attribute on the Mainframe.
    • use Fixed Length Binary for RECFM=FB
    • use Mainframe VB (rdw based) Binary for RECFM=VB

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

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.

....

  • Select you data file
  • select you copybook in the Record Layout field
  • Click on on Edit (The return key should also work).

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



来源:https://stackoverflow.com/questions/45794642/how-do-you-edit-a-binary-mainframe-file-in-the-recordeditor-using-a-cobol-copybo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!