如何在 QSAM put-locate 的 JCL/汇编器中正确声明 DCB

发布于 2024-11-24 14:19:29 字数 1007 浏览 3 评论 0原文

我正在尝试编写一个程序,使用 370/汇编器和 QSAM 将一些数据写入临时数据集。执行 put 时得到 soc01。

我在汇编代码中的 DCB 声明如下所示:

TEMPFILE DCB   DDNAME=TEMP,                                            X
               DEVD=DA,                                                X
               DSORG=PS,                                               X
               MACRF=PL,GL,                                            X
               RECFM=FBA,                                              X
               LRECL=25,                                               X
               BLKSIZE=3000,                                           X
               EODAD=EOF3

在 JCL 中,声明如下所示:

//TEMP     DD DSN=&&TEMP,UNIT=PUB,DISP=(MOD,KEEP,DELETE),
//            DCB=(LRECL=25,BLKSIZE=3000)

put 命令如下所示:

         PUT    TEMPFILE                                                
         MVC    0(25,1),HIGHSALE

我怀疑问题出在我的 JCL 声明中,但我没有找到任何东西。

I'm trying to write a program that will write some data to a temporary dataset using the 370/assembler and QSAM. I get a soc01 when executing the put.

My DCB declaration in the assembler code looks like this:

TEMPFILE DCB   DDNAME=TEMP,                                            X
               DEVD=DA,                                                X
               DSORG=PS,                                               X
               MACRF=PL,GL,                                            X
               RECFM=FBA,                                              X
               LRECL=25,                                               X
               BLKSIZE=3000,                                           X
               EODAD=EOF3

In the JCL, the declaration looks like this:

//TEMP     DD DSN=&&TEMP,UNIT=PUB,DISP=(MOD,KEEP,DELETE),
//            DCB=(LRECL=25,BLKSIZE=3000)

And the put command looks like this:

         PUT    TEMPFILE                                                
         MVC    0(25,1),HIGHSALE

I suspect that the problem lies within my JCL declaration, but i'm not having any luck finding anything.

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

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

发布评论

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

评论(1

青柠芒果 2024-12-01 14:19:29

您将获得 S0C4,即,您正在尝试访问不属于您的存储。假设您已经确定(通过 PSW 或通过其他方式)异常终止指令位于您的 PUT 宏扩展为,并且您的程序集列表中没有消息指示“没有活动使用for...”,寄存器1指向哪里?由于您使用的是定位模式,因此寄存器 1 必须指向您的数据。

顺便说一句,我通常不会在程序中看到用 DCB 宏编码的块大小。大多数商店都使用系统确定的块大小,因此您永远不会在程序或 JCL 中看到它。如果你更舒服地编码它并没有什么坏处。

You're getting a S0C4, i.e., you're trying to access storage that doesn't belong to you. Presuming that you've already determined (from the PSW or via some other means) that the abending instructing is in some of the code your PUT macro expands out to, and that you have no messages in your assembly listing indicating "no active using for...", where does register 1 point to? Since you're using locate mode, register 1 must point to your data.

Just as a side note, I don't normally see block size coded in a DCB macro in a program. Most shops are using system determined block size and thus you never see it in either the program or the JCL. It doesn't hurt anything if you're more comfortable coding it.

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