COBOL FILESTATUS 98

发布于 2025-01-26 13:20:12 字数 713 浏览 5 评论 0原文

我正在动态创建COBOL程序上的PS文件(基于输入文件的时间戳),并将其用作输出文件来编写事务详细信息,但是如果接收到两次输入文件,则使用重复数据集将失败。因此,如果文件已分配,我想重写文件。为此,我尝试了所有这些选项IO/Extend/Outper以打开输出文件,但是FileStatus 98是否有

任何想法如何做到这一点?

DISPLAY '5000-B-->'
PERFORM 5000-ALLOCATE-ACK-FILE [ Allocate File Dynamically]
DISPLAY '5000-A-->'
DISPLAY 'I-O--B-->'
OPEN OUTPUT OUT-ACK-FILE
DISPLAY 'WS-OUTACK-STATUS-->' WS-OUTACK-STATUS
DISPLAY 'I-O--A-->'


Error:

ALLOCATE OK 00
5000-A-->
I-O--B-->
IGZ0255W Dynamic allocation failed for ddname OUTACK while processing file OUT-A
         return code from the dynamic allocation was X'4', error code X'FFFFFFFF
         information code X'0'.
WS-OUTACK-STATUS-->98
I-O--A-->

I am dynamically creating a PS file (based on timestamp from input file) on the Cobol program and using it as output file to write transaction details, but if the input file s received twice, job is failing with duplicate dataset. So I thought of rewrite the file if the file is already allocated. To do this i have tried all these options I-O/Extend/Output to open the output file but it is failing with Filestatus 98

Any idea how can to do this?

DISPLAY '5000-B-->'
PERFORM 5000-ALLOCATE-ACK-FILE [ Allocate File Dynamically]
DISPLAY '5000-A-->'
DISPLAY 'I-O--B-->'
OPEN OUTPUT OUT-ACK-FILE
DISPLAY 'WS-OUTACK-STATUS-->' WS-OUTACK-STATUS
DISPLAY 'I-O--A-->'


Error:

ALLOCATE OK 00
5000-A-->
I-O--B-->
IGZ0255W Dynamic allocation failed for ddname OUTACK while processing file OUT-A
         return code from the dynamic allocation was X'4', error code X'FFFFFFFF
         information code X'0'.
WS-OUTACK-STATUS-->98
I-O--A-->

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

傾城如夢未必闌珊 2025-02-02 13:20:12

您没有显示分配方式的详细信息,或者您如何检查数据集的存在。

无论如何,在z/os上,disp PS数据集的分配的参数确定书面数据是否替换了当前内容(如果有),或者是否将其附加到当前内容(如果有的话) )。

disp = newdisp = old替换

disp = mod附加。

开放参数不会有所不同。

You don't show details of how the allocation is done, or how you check for existence of the data set.

Anyway, on z/OS the DISP parameter of the allocation of a PS data set determines whether the data written replaces the current content (if any), or whether it is appended to the current content (if any).

DISP=NEW and DISP=OLD replace

DISP=MOD appends.

The OPEN parameters don't vary.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文