Difference between RPG/400 and RPGLE?
时间:2015-10-08 ┊ 阅读:4,221 次 ┊ 标签: 开发 , 编程 , 经验 , 分享
This has been covered many times in these fora. In a nutshell RPGLE is synonymous with RPG IV. Nearly all RPG/400 programs may be converted to RPG IV by using the CVTRPGSRC command, so all your RPG/400 knowledge is still germaine. The colums are different. For one thing they are wider to accomodate longer field names. There are more opcodes (many with the same functionality as previous opcodes), and there are free form IF WHEN DO and EVAL opcodes. The ability to use date data types and date math is one major difference. RPG IV code may be compiled into modules which is an intermediate stage before all the modules are bound into a program. RPG IV code may also be compiled into a program using the CRTBNDRPG command. I suggest you check out the IBM manuals for ILE concepts and RPG IV reference and user guides before going any further.
There are a lot of differences between the 2 versions of RPG, here are a few examples :
RPGILE runs in the ILE (Integrated Language Environment) instead of the OPM (Original Program Model) environment.
RPGILE supports longer file/field names, also prefixes for field names.
RPGILE supports BIFs (Built In Functions).
RPGILE allows use of service programs and modules.
RPGILE allows free format RPG code.
RPGILE has enhanced support for use of other languages such as ILE/C.
The list goes on and on, maybe someone has some nice links to an overview of the differences.
RPG400 is based on RPG III and RPGLE relies on RPG IV wich offers those features metioned above.
RPG IV and ILE is not exactly the same. You can be programming in RPG IV by using all those features like Built-in Functions, free format, longer names, prefix for field names, qualified data structures, and still the environment is OPM not ILE.
ILE Means static call, the programs get all information about the called program at compile time. It’s the binding process. Then, at run time the call is more efficient than the old method of dynamic call used by OPM. OPM runs in the Default Activation Group and ILE programs in a different one that could be *New, QILE (generic Activation Group for ILE), or whatever the name you want.
Activation Groups are sub-environment within a job.
As usual we don’t know enough about why the question was asked.
RPG/400 is a mature product.
All RPG/400 programs will run on a current 400, they can be edited an maintained as RPG/400, edited, and compiled. The language works and will continue to work.
RPG/400 code can be converted to RPG IV code with a single command.
Today, RPG IV code can be written in two formats, fixed column based format which is like RPG/400 and a free format layout. Since it’s inception RPG IV has had the addition of a lot of new features. Some RPG/400 code cannot be translated into Free format but free and fixed format code can exist in a single file.
As described above, RPG IV provides ILE capabilities which allow it to use prototyped calls, objects built from multiple modules and service programs.
上一篇:C#设计模式总结
下一篇:程序员要知道的一些网站