将文件转换为显示格式的通用过程

A generic process to convert a file to display format

是否有将 z/OS 上的文件转换为显示格式的通用过程? 我在 z/OS 上有几百个文件,我需要先将它们转换为显示格式,然后再将它们转换为 midrange/Linux。这些文件包含压缩字段。我这样做是因为我希望文件以 ASCII 而不是 EBCDIC/binary 的形式落在中档。我还试图避免为每个文件编写 COBOL 转换例程。在此先感谢您的帮助。

IBM 在大型机上有一个实用程序,它可能可以满足您的要求。该实用程序称为 IEBPTCH(IEB Print Punch)。文档是 here

它不是自动的,但可能比编写代码更容易。来自文档

You can use IEBPTPCH to print or punch all, or selected portions, of a sequential or partitioned data set or PDSE. Data can also be "printed" or "punched" to disk or tape.

IEBPTPCH can be used to print or punch:

  • A sequential or partitioned data set or PDSE, in its entirety
  • Selected members from a partitioned data set or PDSE
  • Selected records from a sequential or partitioned data set or PDSE
  • The directory of a partitioned data set or PDSE
  • An edited version of a sequential or partitioned data set or PDSE
  • A data set containing double-byte character set data
  • You can specify the format for the records that you are printing or punching, or you can use IEBPTPCH's default formats.
  • The default formats are:
  • Each logical output record begins on a new printed line or punched card.
  • Each printed line consists of groups of eight characters separated by two blanks.
  • Up to 96 data characters can be included on a printed line.
  • Each punched card contains up to 80 contiguous bytes of information.
  • Characters that cannot be printed appear as blanks.
  • When the input is blocked, each logical output record is delimited by "*" and each block is delimited by "**". Sixty lines per page will be printed.

参见RECORD声明here

大型机 SORT 实用程序通常 excel 用于数据转换。与其他实用程序相比,它们通常在更短的时钟时间内使用更少的 CPU 和 运行,这对于一次性进程来说可能不太重要。

我知道您想避免编写新的 COBOL 程序。但是请看一下 RENDER 关键字。 我将在一行代码中将 COBOL 01 ... 分组转换为有效的 XML 结构。使用 SORT 或 IEBPTCH 只是在用一种奇怪的语言编程。