免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: yoyoage
打印 上一主题 下一主题

请教except用法 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2003-12-05 09:01 |只看该作者

请教except用法

我知道子过程调用的时候用EXSR ,过程调用的时候用CALLP

但是我没用过PROCEDURE

论坛徽章:
0
12 [报告]
发表于 2003-12-05 09:12 |只看该作者

请教except用法

原帖由 "aeiou" 发表:


其实procedure和普通的PGM差不多的,有它自己的D表、C表,可以传递参数。
不同的是procedure不参与RPG的Cycle,而且调用时参数可以只传值而不是传地址。


似乎想明白一点点,subroutine 没有自己的d表。至于传递参数,我想,subroutine 功能是一样的。
传递参数什么时候是传地址?什么时候是传参数?

论坛徽章:
0
13 [报告]
发表于 2003-12-05 09:22 |只看该作者

请教except用法

好像都是传地址,不过可以指定不可更改的,具体什么我也忘了,我一般都不更改参数的,:)

论坛徽章:
0
14 [报告]
发表于 2003-12-05 09:52 |只看该作者

请教except用法

据说except可以捕捉整个程序的异常,可以么?钥匙可以就好了:)因为我需要在chain(e)的时候用一下

论坛徽章:
0
15 [报告]
发表于 2003-12-05 13:49 |只看该作者

请教except用法

java 有很多exception的类。不知道rpgle也可以哦

论坛徽章:
0
16 [报告]
发表于 2003-12-05 14:02 |只看该作者

请教except用法

我在RPGLE 电子书里面找到的描述:
The EXCEPT operation allows one or more records to be written during either
detail calculations or total calculations.
When specifying the EXCEPT operation remember:
v The exception records that are to be written during calculation time are
indicated by an E in position 17 of the output specifications. An EXCEPT name,
which is the same name as specified by the except-name operand of an EXCEPT
operation, can be specified in positions 30 through 39 of the output
specifications of the exception records.
v Only exception records, not heading, detail, or total records, can contain an
EXCEPT name.
v When the EXCEPT operation with a name specified in the except-name operand
is processed, only those exception records with the same EXCEPT name are
checked and written if the conditioning indicators are satisfied.
v When no except-name is specified, only those exception records with no name in
positions 30 through 39 of the output specifications are checked and written if
the conditioning indicators are satisfied.
v If an exception record is conditioned by an overflow indicator on the output
specification, the record is written only during the overflow portion of the RPG
IV cycle or during fetch overflow. The record is not written at the time the
EXCEPT operation is processed.
v If an exception output is specified to a format that contains no fields, the
following occurs:
– If an output file is specified, a record is written with default values.
– If a record is locked, the system treats the operation as a request to unlock the
record. This is the alternative form of requesting an unlock. The preferred
method is with the UNLOCK operation.

论坛徽章:
0
17 [报告]
发表于 2003-12-06 12:28 |只看该作者

请教except用法

以 value 传参数就是只传值,否则就是传地址。

procedure 是参与RPG Cycle 的,subprocedure 不参与。
呵呵~~俺都是用subprocedure的。

subroutine 只能在同一个程序内使用exsr调用,且没有自己的内部变量,
procedure 可以做成共用的功能模块由其它程序使用callp的方式调用,并且可以定义自己的内部变量。

论坛徽章:
0
18 [报告]
发表于 2003-12-07 18:44 |只看该作者

请教except用法

是啊,有时候为了别人调用模块的方便,而且只需要返回一个值就行的情况,可以用这个很便利

论坛徽章:
0
19 [报告]
发表于 2003-12-07 19:54 |只看该作者

请教except用法

as400博大精深。

论坛徽章:
0
20 [报告]
发表于 2012-12-17 09:35 |只看该作者
RPG Cycle用的不多,有点复杂。可以先不用学,不过如果有时间的话,可以研究一下的,有些老程序用的很经典。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP