服务程序RPGLE的变更影响分析

huangapple go评论54阅读模式
英文:

Impact analysis of changed service program RPGLE

问题

我有一个NOMAINMODULE对象,我向其中添加了一个新的过程。

NOMAINMODULE对象用于使用已经导出了一些其他符号(过程名称)的绑定语言源文件来创建服务程序。

所以问题是,如果我添加一个新的过程名称,依赖的程序是否需要重新编译?

以下是绑定语言:

      ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9
     *************** 数据的开头 ********************************************************
     STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('MAISV320111003')                                                    
     /********************************************************************/                                            
     /*   *MODULE      IPLMAI_PR3   IPLPGMD      11/10/03  16:03:18      */                                                
     /********************************************************************/                                            
       EXPORT SYMBOL("GETMAXAMENDDATETIMEFORMBRSHIPAGR")                                                
       EXPORT     SYMBOL("GETALLMBRSHPAGRBYUSGDATEANDTERRITORY")                                                
       EXPORT     SYMBOL("GETMBRSHIPAGREEMENTBYIPCCLSOCRIGHTDATE")  --> 新添加的                                                
     ENDPGMEXP                                                                                                            
     ****************** 数据的结尾 ***********************************************************

依赖对象(使用GETMAXAMENDDATETIMEFORMBRSHIPAGR和GETALLMBRSHPAGRBYUSGDATEANDTERRITORY的对象)是否需要重新编译?

编辑:当我在开发系统上执行DSPSRVPGM SRVPGM(IPLPGMA/IPLMAI_SV3) DETAIL(*SIGNATURE)时,我看到的值与在生产环境中看到的值相同,所以我想不需要重新编译。

英文:

I have a Nomain *MODULE object to which I added a new procedure.

The *MODULE object is used to create a service program using a binder language source file which already exports a couple of other symbols (procedure names).

So question is, if I add a new procedure name, will the dependant programs need to be re-compiled?

Below is the binder language:

  ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9
 *************** Beginning of data ********************************************************
 STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('MAISV320111003')                                    
 /********************************************************************/                    
 /*   *MODULE      IPLMAI_PR3   IPLPGMD      11/10/03  16:03:18      */                    
 /********************************************************************/                    
   EXPORT SYMBOL("GETMAXAMENDDATETIMEFORMBRSHIPAGR")                                       
   EXPORT     SYMBOL("GETALLMBRSHPAGRBYUSGDATEANDTERRITORY")                               
   EXPORT     SYMBOL("GETMBRSHIPAGREEMENTBYIPCCLSOCRIGHTDATE")  --> newly added                           
 ENDPGMEXP                                                                                 
 ****************** End of data ***********************************************************

Would dependant objects (ones using GETMAXAMENDDATETIMEFORMBRSHIPAGR and GETALLMBRSHPAGRBYUSGDATEANDTERRITORY) need re-compilation ?

Edit: When I do a DSPSRVPGM SRVPGM(IPLPGMA/IPLMAI_SV3) DETAIL(*SIGNATURE) on the dev system, the value I see is the same as the value I see in production.. so I guess no re-compilation needed.

答案1

得分: 4

  • 使用 Binder 源码在 CRTSRVPGM 过程中导出特定程序
  • 除非需要强制重新编译,否则使用硬编码的不变签名
  • 在 Binder 源码的末尾添加新的程序

为了不需要强制重新编译所有调用者

  • 不要修改 Binder 源码中程序的顺序
  • 不要在现有程序中添加新的参数,除非使用 option(*NOPASS)
  • 不要更改任何程序参数的大小、类型或顺序。

看起来您已经遵循了上述建议,所以应该没问题。

您可以使用 *PRV 和 *CURRENT 块(通常带有 SIGNATURE(*GEN)),但这是多余的噪音,不提供比上述建议更多的价值。

如果您对 ILE 不熟悉,我强烈建议查看 Scott Klement 的 ILE Concepts (For the Impatient RPG Programmer)

英文:

Current best practices...

  • Use Binder source to export specific procedures during CRTSRVPGM
  • Use a hardcoded unchanging signature unless you want to force recompiles
  • Add new procedures at the end of the binder source

In order to not need to force a recompile of all callers

  • don't modify order of procedures in the binder source
  • don't add new parms to existing procedures without option(*NOPASS)
  • don't change the size, types, order of any procedure parameters.

It seems you've followed the above, so you should be good.

You could use *PRV and *CURRENT blocks (usually with a SIGNATURE(*GEN)), but it's extraneous noise that doesn't provide any additional value over the above.

If you're new to ILE I highly recommend taking a look at Scott Klement's ILE Concepts (For the Impatient RPG Programmer).

huangapple
  • 本文由 发表于 2023年6月19日 17:05:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/76505161.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定