简体   繁体   English

如何学习RPG/400

[英]how to learn RPG/400

I heard about RPG programming from my lecturer.我从我的讲师那里听说了 RPG 编程。 I would like to give it a try.我想试一试。 The problem with it is that, how I do the programming?问题在于,我如何进行编程? I don't know the OS and the IDE to suit the needs.我不知道满足需求的操作系统和 IDE。 Any help?有什么帮助吗?

Thank you for your interest in RPG.感谢您对 RPG 的兴趣。 RPG runs on an IBM i (aka AS/400, iSeries, Systemi) system. RPG 在 IBM i(又名 AS/400、iSeries、Systemi)系统上运行。 This is not a server you can easily buy on your own.这不是您可以轻松购买的服务器。 The starting price is around $15,000 on up to millions.起价约为 15,000 美元,最高可达数百万美元。 However, you can pay for access to a system or can try out the system using a free host.但是,您可以付费访问系统,也可以使用免费主机试用该系统。 Check out http://www.holgerscherer.de/ for a free account.查看http://www.holgerscherer.de/以获得免费帐户。 (Thanks @kratenko) (感谢@kratenko)

Take a look at midrange.com which is a bunch of mailing lists related to the platform.看看midrange.com ,这是一堆与平台相关的邮件列表。 Also look at their wiki which is a decent staring point for at least seeing what the system is about.还可以查看他们的wiki ,这是一个不错的起点,至少可以了解系统的内容。 (Note: I am a moderator for the Midrange.Com's .NET mailing list). (注意:我是 Midrange.Com 的 .NET 邮件列表的主持人)。

Check out http://pub400.com/ (used to be at http://www.holgerscherer.de/ -- it changed in 2017) -- you can actually get a free account on an AS/400 (aka sytem i) and start some programming in RPG there.查看http://pub400.com/ (曾经位于http://www.holgerscherer.de/——它在 2017 年发生了变化)——你实际上可以在 AS/400(又名系统 i)上获得一个免费帐户) 并在那里开始一些 RPG 编程。 But you'll be stuck with Version V5R4 there (they have more recent ones, but not for free...) and some of the features that let you program RPG in a way it starts making fun where introduced in V6R1.但是你会被 V5R4 版本困住(他们有更新的版本,但不是免费的......)以及一些让你编程 RPG 的功能,它开始在 V6R1 中引入。 On the other hand: if you'll ever have to work with people who have been programming RPG for quite some time, it's possible you wont ever see any of that features used anyway, so V6R1 would give you a wrong impression...另一方面:如果您不得不与已经编写 RPG 相当长一段时间的人一起工作,那么您可能永远不会看到任何使用过的功能,因此 V6R1 会给您一个错误的印象......

Don't get me wrong, it is possible to write useful (and maybe even structured) programs in RPG, even pre-V6R1.不要误会我的意思,可以在 RPG 中编写有用的(甚至可能是结构化的)程序,甚至是 V6R1 之前的程序。 But there are RPG-Programmers out there that refuse to use such unuseful modern features as procedures, and they prefer to use hundreds of global variables with tons of side effect, where every variable has two or three different names.但是有些 RPG 程序员拒绝使用像程序这样无用的现代功能,他们更喜欢使用数百个具有大量副作用的全局变量,其中每个变量都有两个或三个不同的名称。 Don't follow that path.不要走那条路。 Just two tips for you, as reading other people's code could possibly lead you in the wrong direction:给您两个提示,因为阅读其他人的代码可能会将您引向错误的方向:

  1. The concept of procedures has been integrated into RPG years ago.程序的概念早在几年前就已经被整合到RPG中了。 I don't see any reason for using subroutines nowadays, but you will see them.我现在看不到使用子程序的任何理由,但您会看到它们。 Still you needn't use them in your code.你仍然不需要在你的代码中使用它们。
  2. Datastructures can be declared as qualified .数据结构可以声明为qualified Always do that!总是这样做! Never use unqualified datestructures.永远不要使用不合格的日期结构。 You can even pass them to procedures as parameters.您甚至可以将它们作为参数传递给过程。

If you ever have a really nasty problem, just google until you find an answer by Scott Klement.如果您遇到非常棘手的问题,只需在谷歌上搜索,直到找到 Scott Klement 的答案。 Normally there always is a solution to your problem allready posted by him...通常,他已经发布了解决您问题的方法...

Ask your teacher about access to the IBM i at your school.向您的老师询问如何访问您学校的 IBM i。 If there isn't one, your options are limited.如果没有,您的选择就很有限。 There are several time sharing services available;有几种分时服务可用; search for "iseries timeshare".搜索“iseries 分时度假”。 You'll need a TN5250 emulator to access the machine.您需要一个 TN5250 仿真器来访问机器。 To the best of my knowledge, there are no RPG compilers / runtime environments that will work on a PC.据我所知,没有可以在 PC 上运行的 RPG 编译器/运行时环境。

As far as the IDE, the machine has a native application (green screen) called PDM which uses an editor called SEU.至于 IDE,该机器有一个名为 PDM 的本机应用程序(绿屏),它使用一个名为 SEU 的编辑器。 I use a graphical IDE based on Eclipse called WDSC.我使用基于 Eclipse 的图形 IDE,称为 WDSC。 This has been superceded by a new, for-fee, product called Rational Developer for Power Systems.这已被称为 Rational Developer for Power Systems 的新收费产品所取代。

I second Mike Wills' answer to check out the forums at midrange.com.我第二次使用 Mike Wills 的回答来查看 midrange.com 上的论坛。

One final thing.最后一件事。 RPG/400 is obsolete. RPG/400 已过时。 There haven't been any changes to RPG/400 is a long, long time - like a decade. RPG/400 已经有很长很长的时间没有任何变化了——比如十年。 The current version of RPG is ILE RPG, often called RPG IV. RPG 的当前版本是 ILE RPG,通常称为 RPG IV。 The reference manuals for the system are at http://publib.boulder.ibm.com/eserver/ibmi.html If you don't know what version, choose V5R4.该系统的参考手册在http://publib.boulder.ibm.com/eserver/ibmi.html如果您不知道什么版本,请选择V5R4。 Click the top link on the left panel, then Programming, then Languages.单击左侧面板上的顶部链接,然后单击编程,然后单击语言。

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

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