gpt4 book ai didi

mainframe - 使用 EXECIO 将 rexx 输出逻辑写入数据集?

转载 作者:行者123 更新时间:2023-12-05 08:37:47 27 4
gpt4 key购买 nike

我有这个 Rexx 程序,我想将输出写入特定数据集。但是,我无法将终端上产生的确切输出打印到数据集。

/* REXX */
"FREE FI(outdd)"
"ALLOC FI(outdd) DA('Z01510.OUTPUT(SAMPLCBL)') SHR REUSE"
row = 0
hline = ' *-----------------------'
mline.0 = ' IDENTIFICATION DIVISION.'
mline.1 = ' *'
mline.2 = ' PROGRAM-ID. '
mline.3 = ' *'
mline.4 = ' *'
mline.5 = ' * Description :'
mline.6 = ' *'
mline.7 = ' * Created on : 'date()
mline.8 = ' * Created by : '
mline.9 = ' * : Userid('')'
mline.10 = ' * : Using' '()'
mline.11 = ' *'
mline.12 = ' * Called by :'
mline.13 = ' *'
mline.14 = ' * Calls :'
mline.15 = ' * Change Activity :'
mline.16 = ' * ©Copyright of -----.'
mline.17 = ' ENVIRONMENT DIVISION.'
mline.18 = ' INPUT-OUTPUT SECTION.'
mline.19 = ' DATA DIVISION.'
mline.20 = ' WORKING-STORAGE SECTION.'
mline.21 = ' LINKAGE SECTION.'
mline.22 = ' PROCEDURE DIVISION.'
mline.23 = ' A-MAIN SECTION.'
mline.24 = ' STOP RUN.'

mline.25 = ' * End of '
say hline
say mline.0
say hline
say mline.2
say hline
do i = 4 to 16
say mline.i
end
say hline
do i=17 to 24
say mline.i
say hline
end
say mline.25
"EXECIO * DISKW outdd (STEM mline."
"EXECIO 0 DISKW outdd (FINIS"
"FREE FI(outdd)"
exit

我在 z/OS 终端上运行 Rexx 脚本,得到以下示例输出,我想以完全相同的方式将其复制到数据集。

    *-----------------------
IDENTIFICATION DIVISION.
*-----------------------
PROGRAM-ID.
*-----------------------
*
* Description :
*
* Created on : 14 Oct 2020
* Created by :
* : Userid(')
* : Using ()
*
* Called by :
*
* Calls :
* Change Activity :
* ©Copyright of -----.
*-----------------------
ENVIRONMENT DIVISION.
*-----------------------
INPUT-OUTPUT SECTION.
*-----------------------
DATA DIVISION.
*-----------------------
WORKING-STORAGE SECTION.
*-----------------------
LINKAGE SECTION.
*-----------------------
PROCEDURE DIVISION.
*-----------------------
A-MAIN SECTION.
*-----------------------
STOP RUN.
*-----------------------
* End of

最佳答案

您不应将数据存储在 mline.0 中,而应存储词干尾部的计数(mline.1 mline、2 等)并将其作为要写入的记录数传递给 EXECIO。使用 mline.0 并没有错,但“正常”做法是将其用作计数 - 与 EXECIO 在读入词干时所做的相同。如果要写入 hline,则需要先将其添加到 mline 主干中的适当位置。

关于mainframe - 使用 EXECIO 将 rexx 输出逻辑写入数据集?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64356843/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com