|
查看: 1687|回复: 16
|
谁懂rpg/400 programming???
[复制链接]
|
|
|
|
我的公司的server使用as/400system....现在我在学它的语言。。。可是遇到了很多问题。。。。请好心人帮帮忙。。 |
|
|
|
|
|
|
|
|
|
|
发表于 16-4-2007 09:16 AM
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 16-4-2007 11:42 PM
|
显示全部楼层
回复 #2 jangancari 的帖子
|
解决了。。。谢谢你的回复。请问你有关于这些得ebook吗?? 可以做个朋友吗?? |
|
|
|
|
|
|
|
|
|
|
发表于 17-4-2007 02:32 AM
|
显示全部楼层
原帖由 jeftlee 于 16-4-2007 11:42 PM 发表
解决了。。。谢谢你的回复。请问你有关于这些得ebook吗?? 可以做个朋友吗??
你我在此交流, 就是朋友。
RPG/400 的ebook ? 我想你可以到IBM redbook series 下载他们的manual 。
我学习RPG/400 都是读Manual 来的, 当然有得到前辈传授的一些基本知识。
你有问题就在这里发问吧, 我尽量抽空回答。 |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 18-4-2007 01:02 AM
|
显示全部楼层
回复 #4 jangancari 的帖子
|
我也是读manual,不过有很多东西看不明白(没有人教)。。。 请问data area 要如何使用??它的功能是什么??谢谢你的回复。 |
|
|
|
|
|
|
|
|
|
|
发表于 18-4-2007 01:40 PM
|
显示全部楼层
原帖由 jeftlee 于 18-4-2007 01:02 AM 发表
我也是读manual,不过有很多东西看不明白(没有人教)。。。 请问data area 要如何使用??它的功能是什么??谢谢你的回复。
首先你要明白的是, 你是在 OS/400 上用RPG/400 开发软件。
在 OS/400 上, 所谓的"FILE" 其实是数据库里的 Table。
而Data Area 其实是 OS/400 上的一个小文件, 主要是来收藏/交换资料。
为什么不用 "FILE" 来交换呢? 原因是这些资料并不是像数据库的Record , 比方说, 学生的资料。
收藏在Data Area 的资料通常是暂时性, 或单一性, 而且少量。
其实你比较需要知道的是, 一个特别的 Data Area, System Data Area , 也就是每一个program 在执行时(或称作job), 系统自己创建的Data Area。
这个Data Area 里面, 收藏着job 的资料, 比方说Job Date, Job User etc。
要如何使用Data Area ?
由于Data Area 的用处不多, 我就不说如何创建了。
明天, 我会继续说如何从Data Area 提取资料, 要睡了。
[ 本帖最后由 jangancari 于 18-4-2007 01:43 PM 编辑 ] |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 18-4-2007 11:45 PM
|
显示全部楼层
回复 #6 jangancari 的帖子
哦,大概明白了,期待你接下来的教导。。 |
|
|
|
|
|
|
|
|
|
|
发表于 24-4-2007 12:01 PM
|
显示全部楼层
RPG/400 如何存取 Data Area
只要在 I spec 里 declare 类似以下 code
< Data Area 名> DS
1 10 <variable 1>
11 25 <variable 2>
如果是 system data area (我之前说的)
则不需要填 <Data Area 名> , 但是 在 DS 前面多个 “S”
所以是类似
SDS
1 10 <variable 1>
11 25 <variable 2>
1 10 的意思是 character 1 到 character 10 。
要记住的是, RPG/400 的源码是特殊位置的格式, 所以任何code , 比如 DS < variable 1> 等等 都要放在对的column 。
还有问题请再问。
p/s: 很久没有写了, 可能有错漏的地方, 请一切以manual 为准。 |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 12-5-2007 02:35 PM
|
显示全部楼层
|
jangancari, 你懂subfile吗?? 如果我们设计好了displayfile, 在rpg里我们要call display file时,我们要call 它的record control format 还是record format?? |
|
|
|
|
|
|
|
|
|
|
发表于 13-5-2007 03:29 PM
|
显示全部楼层
原帖由 jeftlee 于 12-5-2007 02:35 PM 发表
jangancari, 你懂subfile吗?? 如果我们设计好了displayfile, 在rpg里我们要call display file时,我们要call 它的record control format 还是record format??
subfile 是新手其中一个很难理解的东西, 其实是很简单的。
在 os/400 上, 所谓的 table 其实是一个 file。 所以 subfile 内容, 就是 subset of a file (table) , 用来显示在荧幕。
subfile 里有两个 element
1) subfile control
2) subfile record
要写入/读取的是 subfile record , 其他比如显示等都是由 subfile control 负责。
要显示一个 subfile , 应该要有一下步骤。
1. build subfile - 从真正的 file 读取 record , write 去 subfile record
2. 显示subfile - write subfile control
例子:
subfile control 的 record format ABCC1
subfile record 的 record format ABCR1
EXSR LOADSF <- load subfile , LOADSF 是自己写的 subroutine。
EXFMTABCC1 <- 显示subfile, 并等待使用者的input。 |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 14-5-2007 12:13 AM
|
显示全部楼层
原帖由 jangancari 于 13-5-2007 03:29 PM 发表
subfile 是新手其中一个很难理解的东西, 其实是很简单的。
在 os/400 上, 所谓的 table 其实是一个 file。 所以 subfile 内容, 就是 subset of a file (table) , 用来显示在荧幕。
subfile 里有两个 ...
原来如此,谢谢你的指导。我去试试看。 |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 31-5-2007 01:37 PM
|
显示全部楼层
我想要在subfile里display成这样:
Opt Account Opt Account
--- ------- --- -------
xxx xxxxxxxx xxx xxxxxxx
xxx xxxxxxxx xxx xxxxxxx
xxx xxxxxxxx xxx xxxxxxx
请问要如何做? 因为通常我们create subfile,当我们加field时,它就会变成这样而已:
Opt Account
--- -------
xxx xxxxxxx
xxx xxxxxxx
xxx xxxxxxx
xxx xxxxxxx |
|
|
|
|
|
|
|
|
|
|
发表于 5-6-2007 07:43 PM
|
显示全部楼层
回复 #12 jeftlee 的帖子
1. Go to Work with Display Records
2. Select the SFLCTL, Key 8=Select keywords
3. Subfile display layout key in "Y"
4. Sapces between records key in XX |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 5-6-2007 09:42 PM
|
显示全部楼层
原帖由 hcc 于 5-6-2007 07:43 PM 发表
1. Go to Work with Display Records
2. Select the SFLCTL, Key 8=Select keywords
3. Subfile display layout key in "Y"
4. Sapces between records key in XX
我去试试看,谢谢你的帮忙。 |
|
|
|
|
|
|
|
|
|
|
发表于 30-4-2008 12:00 AM
|
显示全部楼层
|
请问IBM的redbook在那里下载。在http://www.redbooks.ibm.com吗?找不到是哪里一个manual. |
|
|
|
|
|
|
|
|
|
|
发表于 10-6-2008 01:54 PM
|
显示全部楼层
|
请问有朋友有兴趣从事RPG programmer吗?我的公司正在寻找这一类的专才。无经验但有心学也欢迎,然而有经验更适合。谢拉。 |
|
|
|
|
|
|
|
|
|
|
发表于 20-6-2008 11:09 AM
|
显示全部楼层
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|