COBOL:SYSIN JCL,用于从 PDS 编译源代码

发布于 2024-08-20 05:42:29 字数 251 浏览 8 评论 0原文

我刚刚启动 COBOL,并使用 JCL 遇到了这个问题...我如何从我的 PDS 编译基本的 cobol 程序,我通过 instream 知道它只是

//SYSIN DD * 代码 代码 代码 /*

我尝试了类似

//SYSIN DD DSN=the.pds.location(file),DISP=SHR 的操作,

但所有返回的内容都是垃圾,我认为返回代码为 12。

如果有人可以提供帮助,我将不胜感激。

I'm just starting COBOL, and ran into this with JCL... How do I compile a basic cobol program from my PDS, I know through instream it would just be

//SYSIN DD *
code code code
/*

I tried something like

//SYSIN DD DSN=the.pds.location(file),DISP=SHR

but all that shot back was garbage and a return code of 12 I think.

If anyone could help, I would be grateful.

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

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

发布评论

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

评论(1

呆萌少年 2024-08-27 05:42:29

根据您发布的信息,您的 JCL
应该有效。也许你还缺少其他东西。
以下 JCL 提供了要执行的完整作业步骤
COBOL 编译:

    ... your job card goes here...
    //COB     EXEC PGM=IGYCRCTL
    //STEPLIB  DD DISP=SHR,DSN=SYSP.IGY.V3R4M1.SIGYCOMP
    //SYSUT1   DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //SYSUT2   DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //SYSUT3   DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //SYSUT4   DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //SYSUT5   DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //SYSUT6   DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //SYSUT7   DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //SYSLIN   DD DSN=objectmodule,UNIT=SYSDA,
    //            DISP=(MOD,PASS),SPACE=(TRK,(3,3))
    //SYSIN    DD DSN=the.pds.location(file),DISP=SHR
//SYSPRINT DD SYSOUT=* ... your link step using object from SYSLIN above...

Note: You might have to change the STEPLIB to match the
version of COBOL running at your site.

如果您的 JCL 看起来非常接近上面的内容,那么下一步就是
检查一下是您的 COBOL 程序。进入 ISPF 编辑器(我猜
您有权访问它)并在命令行上输入 PROFILE。你
应该看到类似:

   =PROF> ....GEN (FIXED - 80)....RECOVERY OFF WARN....NUMBER OFF.................
   =PROF> ....CAPS ON....HEX OFF....NULLS ON STD....TABS OFF......................
   =PROF> ....AUTOSAVE ON....AUTONUM OFF....AUTOLIST OFF....STATS ON..............
   =PROF> ....PROFILE UNLOCK....IMACRO NONE....PACK OFF....NOTE ON................
   =PROF> ....HILITE OFF CURSOR FIND..............................................
   =BNDS> <
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--

现在看看PACK ON(注意上面显示的是PACK OFF)。如果你发现
打包这是你的问题。您需要发出PACK OFF命令
并保存您的数据集。再次尝试编译。

顺便说一句...您可以通过在命令上键入 RESET 来取消配置文件显示
线。

如果这些都不能解决您的问题,您需要提供更多信息
问题的确切性质是什么。

Based on the information you have posted, your JCL
should work. Maybe you are missing something else.
The following JCL provides the full job step to do
a COBOL compile:

    ... your job card goes here...
    //COB     EXEC PGM=IGYCRCTL
    //STEPLIB  DD DISP=SHR,DSN=SYSP.IGY.V3R4M1.SIGYCOMP
    //SYSUT1   DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //SYSUT2   DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //SYSUT3   DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //SYSUT4   DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //SYSUT5   DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //SYSUT6   DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //SYSUT7   DD UNIT=SYSDA,SPACE=(CYL,(1,1))
    //SYSLIN   DD DSN=objectmodule,UNIT=SYSDA,
    //            DISP=(MOD,PASS),SPACE=(TRK,(3,3))
    //SYSIN    DD DSN=the.pds.location(file),DISP=SHR
//SYSPRINT DD SYSOUT=* ... your link step using object from SYSLIN above...


Note: You might have to change the STEPLIB to match the
version of COBOL running at your site.

If your JCL looks pretty close to the above, the next thing to
check out is your COBOL program. Go into the ISPF editor (I presume
you have access to it) and type PROFILE on the command line. You
should see something like:

   =PROF> ....GEN (FIXED - 80)....RECOVERY OFF WARN....NUMBER OFF.................
   =PROF> ....CAPS ON....HEX OFF....NULLS ON STD....TABS OFF......................
   =PROF> ....AUTOSAVE ON....AUTONUM OFF....AUTOLIST OFF....STATS ON..............
   =PROF> ....PROFILE UNLOCK....IMACRO NONE....PACK OFF....NOTE ON................
   =PROF> ....HILITE OFF CURSOR FIND..............................................
   =BNDS> <
=COLS> ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--

Now have a look for PACK ON (note the above shows PACK OFF). If you find
PACK ON this is your problem. You need to issue the PACK OFF command
and save your dataset. Try the compile again.

BTW... you get rid of the profile display by typing RESET on the command
line.

If neither one of these fix your problem you need to provide a more information
as to what the exact nature of the problem is.

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