简体   繁体   English

IBM for i / RPG:如何在 IBM Rational Developer for i (RDi) 中一次调用编译模块和创建服务程序

[英]IBM for i / RPG: How to compile a module and create a service program with one call in IBM Rational Developer for i (RDi)

How to avoid having to use the Compile menu of RDi 2 times in a row - to create first a SQL RPGLE module and then to create the service program associated?如何避免连续两次使用 RDi 的编译菜单 - 首先创建一个 SQL RPGLE 模块,然后创建相关的服务程序?

For that, you create first a CL Program (let's name it CRTSRVPRG) like this:为此,您首先创建一个 CL 程序(我们将其命名为 CRTSRVPRG),如下所示:

     PGM        PARM(&LIBRARY &SOURCE &NAME)

     DCL        VAR(&LIBRARY) TYPE(*CHAR) LEN(10)
     DCL        VAR(&SOURCE)  TYPE(*CHAR) LEN(10)
     DCL        VAR(&NAME)    TYPE(*CHAR) LEN(10)


     CRTSQLRPGI OBJ(&LIBRARY/&NAME) SRCFILE(&LIBRARY/&SOURCE) SRCMBR(&NAME) REPLACE(*YES) OBJTYPE(*MODULE) DBGVIEW(*SOURCE) OPTION(*EVENTF)
     CRTSRVPGM  SRVPGM(&LIBRARY/&NAME) MODULE(&LIBRARY/&NAME) EXPORT(*ALL) SRCFILE(&LIBRARY/&SOURCE)

     ENDPGM 

Then in the menu Compile / Compile / Work With Compile Command…, you add the following new command:然后在菜单 Compile / Compile / Work With Compile Command... 中,添加以下新命令:

CALL PGM([your library]/CRTSRVPRG) PARM(&L &F &N) /* OPTION(*EVENTF) SRCMBR(&N) */

Once you've run this command once, you use the button "Run compile command without prompting" from the toolbar.一旦你运行了一次这个命令,你就可以使用工具栏中的“Run compile command without prompts”按钮。

The addition in the command of命令中的添加

/* OPTION(*EVENTF) SRCMBR(&N) */

gives you the feedback for the module compilation in the Tab "Error List".在选项卡“错误列表”中为您提供模块编译的反馈。 Unfortunately, there is no feedback for the creation of the Service Program.不幸的是,没有关于创建服务程序的反馈。 For that, you'll have to look into the Tab "Commands Log"...为此,您必须查看选项卡“命令日志”...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM