如何解决Cobol错误代码:243是什么意思?
| 在Micro Focus Cobol Eclipse中运行Cobol程序时出现错误。不知道为什么会这样。请帮助我,因为我必须将此作为我明天大作业的一部分提交。 另一个问题,如果可能的话,请为我提供变量的帮助,我将其放在“本地存储”部分中。例如,在Java中,我想将其设置为全局方法以获取每种方法? 控制文件: Identification Division.
Program-Id. Client.
Environment Division.
Configuration Section.
Repository.
Class Student.
Data Division.
Working-Storage Section.
01 H object reference Student.
Procedure Division.
display \"goodbye goodbye\".
Invoke Student \"new\" returning H.
Invoke H \"sayHello\".
Invoke H \"GetAverage\" .
Invoke H \"Grading\".
Exit Program.
End Program Client.
这是类文件:
class-id. Student data is protected
* inherits from base with data
inherits Base.
object section.
class-control.
Student is class \"student\"
base is class \"base\"
.
working-storage section.
class-object.
object-storage section.
Method-Id. sayHello.
Procedure Division.
display \"Hello World!\".
* display \"I\'m hello\".
End Method sayHello.
*Method1
method-id. \"GetAverage\".
local-storage section.
linkage section.
01 English pic 99 value 9.
01 Math pic 99 value 5.
01 AverMark pic 99 value 3.
procedure division using by reference English,by reference Math.
* returning AverMark.
COmpuTE AverMark = (English+Math)/2
display \"Average mark is \",AverMark.
Accept English.
exit method.
end method \"GetAverage\".
*Method2
method-id. \"Grading\"
local-storage section.
linkage section.
01 AverMark pic 9.
01 Grade pic X.
procedure division using by reference AverMark.
* returning Grade.
IF AverMark < 5
MOVE \"FAIL\" TO Grade
ELSE
MOVE \"PASS\" TO Grade.
exit method.
end method \"Grading\".
end class-object.
end class Student.
结果是:
再见再见
执行错误:文件\'Client \'
错误代码:243,pc = 0,调用= 1,seg = 0
找不到243错误讯息文字
解决方法
根据Micro Focus网站上的文档,错误243解释如下。
\“ COBRT243类无法加载(致命)
加载对象类的尝试失败,因为该类不包含有效的Class-Control节,或者因为该类的定义不正确。\“
检查您是否正确定义了Student。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。