OPM vs ILE

时间:2016-04-28 ┊ 阅读:3,877 次 ┊ 标签: 编程 , 经验 , 系统

opm_vs_ile.htm_cmp_midware110_bnr.gif
OPM: Original Program Model
ILE: Integrated Language Environment

Versions of RPG prior to RPG IV ILE use what IBM has dubbed the Original Program Model (OPM). OPM's counterpart is ILE (Integrated Language Environment). OPM is characterized by the structure of one source member being compiled into one executable program (figure 1).
opm_vs1.gif

ILE on the other hand requires a two-step process to create programs. Source members are first compiled into module objects (type *MOD). For RPG, the command CRTRPGMOD (create RPG module) or PDM option 15 is used. Modules can be thought of as sub-programs. They are validated and compiled machine code, but are not executable. One or more modules must then be bound into an executable program using the CRTPGM (create program) command (figure 2).
opm_vs2.gif

Note that modules created using different programming languages may be bound into the same program object. We'll cover the specific procedures for doing this and the advantages that the ILE environment provides in later sections. For now, it is only important to know that this is the structure of ILE programs.

This structure applies, even if the one-step CRTBNDRPG (create bound RPG) command is used to compile the program. In fact, you can think of the CRTBNDRPG command as a "wrapper" around both the CRTRPGMOD and CRTPGM commands. The module is created in library QTEMP and the two-step process is transparent to the user (figure 3)
opm_vs3.gif

It is important to keep in mind this hierarchy of ILE programs. Lets say for example that we want to use the WRKPGM command (work with programs) to determine the change date of the source member was used to create a program. If the program is OPM, we can simply display the program's attributes.

On the other hand, if the program is ILE, source members are not directly associated to a program. Instead a source member is used to create a module, and one or more modules are used to create a program. Displaying a program's attributes shows - among other things - the module(s) used to create the program. By displaying the module's attributes (this can all be done through the WRKPGM command) we can determine the source information. Keep in mind that we need to go through this extra step because one ILE program may actually be created from multiple source members.

Also note that the CRTBNDRPG command creates the module in library QTEMP. This seems to imply that once the program is created, the module is no longer needed. This is indeed true. The program object contains a complete copy of the module. The exception to this is when service programs are used. Service programs are a slightly more advanced concept that allows program to be created with references to modules instead of actually making a separate copy of them.

All this information is covered in much more detail in the ILE section. Now that you have a decent understanding of the differences between OPM. The next step is to familiarize yourself with the language differences between RPG III and RPG IV.

文章评论

添加新评论

温馨提醒:如果您是第一次在本站留言,需要审核后才能显示哦!

相关文章

Mac电脑一直显示有未读信息怎么解决?

Mac电脑一直显示有未读信息怎么解决?

上次还是macOS14,一直没有解决。索性放着不管了,反正把所有没用的信息都清理了,已经确认没有未读信息了。 最近升级了macOS15最新版本,但还是提示有6条未读信息,百思不得其姐! 查了一下网上不少人遇到此问题,有说有bug,有说点掉过滤未知联系人信息啥,都不好用。 最后查到了Apple社...
阅读全文>>
Whatsapp只能查看最近三天的聊天记录了怎么办?

Whatsapp只能查看最近三天的聊天记录了怎么办?

今天突然发现电脑上的WhatsApp只能查看最近3天的聊天记录了,显示要查看3天前的记录请到手机上查看。很是吃惊,以前一直是所有记录都自动同步到电脑版的啊,不论换电脑了还是换手机了,聊天记录从来没丢过。 查询一翻也没有找出来原因,怎么也同步不过去。 电脑版app重新安装了,也不行。 有个方法说...
阅读全文>>
ValueError: Error getting directory

ValueError: Error getting directory

ssl证书过期了 明明自动renew的 然后看log已经好久没更新成功了 查半天是当前server不信任远程连接 只能自己改代码 报错: 21-12-17 13:01:11 Generate CSR...amkevin.csr amkevin.csr generated. /home/www...
阅读全文>>
网页路径中的'.'和'..'还有'./'和'../'区别

网页路径中的'.'和'..'还有'./'和'../'区别

. 表示当前目录 .. 表示当前目录的上一级目录。 ./表示当前目录下的某个文件或文件夹,视后面跟着的名字而定 ../表示当前目录上一级目录的文件或文件夹,视后面跟着的名字而定。 例如: 文件夹 a 下面有 文件夹b c 和文件 d。 文件夹b下面有e.php 和文件f。 则e中的 . 表示...
阅读全文>>
Introduction to ILE RPG Activation Groups

Introduction to ILE RPG Activation Groups

Learn how activation groups can help your ILE RPG programs run more efficiently, how to specify the type of group to use, and closing and reclaimin...
阅读全文>>