- 论坛徽章:
- 0
|
为了实现当PF中插入一条记录后,系统自动执行某个CL程序。
我先在PF上加了触发器
ADDPFTRG FILE(TESTLIB/TESTPF1) TRGTIME(*AFTER) TRGEVENT(*INSERT) PGM(TESTLIB/TESTCL) TRG(TESTTRG01)
然后STRSQL用insert命令插入一条记录,记录确实写入了但CL程序未执行
系统报下面错误
Trigger program or external routine detected an error.
按F1显示
Additional Message Information
Message ID . . . . . . : SQL0443 Severity . . . . . . . : 30
Message type . . . . . : Diagnostic
Message . . . . : Trigger program or external routine detected an error.
Cause . . . . . : Either a trigger program, external procedure, or external
function detected and returned an error to SQL. If the error occurred in a
trigger program, the trigger was on file TESTPF1 in library TESTLIB. If the error
occurred in an external procedure or function, the external name is TESTPF1 in
library TESTLIB. The associated text is *AFTER *INSERT. If the error
occurred in a trigger program, the associated text is the type of trigger
program. If the error occurred in an external function, the associated text
is the text of the error message returned from the external function.
Recovery . . . : Refer to the joblog for more information regarding the
detected error. Correct the error and try the request again.
谁能告诉我错在哪里?触发器应该怎么设置? |
|