如何学习RPG/400 [英] how to learn RPG/400

查看:207
本文介绍了如何学习RPG/400的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从我的讲师那里听说过RPG编程.我想尝试一下.问题在于,我该如何编程?我不知道OS和IDE是否适合需要.有帮助吗?

I heard about RPG programming from my lecturer. 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. Any help?

推荐答案

查看 http://pub400.com/(以前位于 http://www.holgerscherer.de/ -它于2017年进行了更改)-实际上,您可以在AS/400(又称系统i)上获得一个免费帐户,并在那里以RPG开始一些编程.但是在那里,您会被版本V5R4所吸引(它们有更新的版本,但不是免费的...),以及一些使您能够以有趣的方式对RPG进行编程的功能(在V6R1中引入).另一方面:如果您不得不与已经为RPG编程了一段时间的人一起工作,那么您可能永远也不会看到任何使用过的功能,因此V6R1给您留下了错误的印象...

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. 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. 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之前的版本编写有用的(甚至是结构化的)程序.但是,那里有一些RPG程序员拒绝使用诸如程序之类的无用的现代功能,他们更喜欢使用数百个带有大量副作用的全局变量,其中每个变量都有两个或三个不同的名称.不要走那条路.仅给您两个提示,因为阅读他人的代码可能会导致您朝错误的方向前进:

Don't get me wrong, it is possible to write useful (and maybe even structured) programs in RPG, even pre-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. 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. 程序的概念早在几年前就已整合到RPG中.我现在看不到使用子例程的任何理由,但是您会看到它们.仍然不需要在代码中使用它们.
  2. 数据结构可以声明为qualified.总是那样做!切勿使用不合格的日期结构.您甚至可以将它们作为参数传递给过程.
  1. The concept of procedures has been integrated into RPG years ago. 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. Always do that! Never use unqualified datestructures. You can even pass them to procedures as parameters.

如果您遇到了一个非常讨厌的问题,请在Google上搜索,直到找到Scott Klement的答案为止.通常情况下,他总是会为您的问题提供解决方案……

If you ever have a really nasty problem, just google until you find an answer by Scott Klement. Normally there always is a solution to your problem allready posted by him...

这篇关于如何学习RPG/400的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆