[Migrated content. Thread originally posted on 13 June 2011]
I have tested the ICallBack program from the seminar on Visual Cobol 2010 eclipse as a jvm projecthere is the code:
INTERFACE-ID ICallBack.
METHOD-ID SendMessage.
procedure division using by value msg as string.
end method.
END INTERFACE.
CLASS-ID BizLogic.
METHOD-ID CountMoney.
local-storage section.
01 i BINARY-LONG.
01 formatter pic $$$$9.
procedure division using by value max as BINARY-LONG
callBack as type ICallBack.
perform varying i from 1 by 1 until i > max
move i to formatter
invoke callBack::SendMessage(formatter)
end-perform.
end method.
end Class.
CLASS-ID Callback implements type ICallBack
METHOD-ID SendMessage
PROCEDURE DIVISION using by value msg as string.
display "Cobol Says" msg .
end method.
end class.
program-id. Program1 as "Program1".
data division.
01 callback type Callback.
01 counter type BizLogic.
procedure division.
set callback to new type Callback.
set counter to new type BizLogic.
invoke counter::CountMoney(10, callback ).
end program Program1.
This code gave me 3 errors in de code window but not error window
here are the errors showing at:
CLASS-ID BizLogic.
METHOD-ID CountMoney.
COBCH09125S Internal error Dictionary invalid r/w 00000000 Inform Technical Support
COBCH0223S Unknown USAGE
COBCH0012S Operand ICallBack is not declared
It will run as a cbl program in the Eclipse evironment but when I start the java class Program1.class in the dos window with "java Program1" it gives a trace with errors because of a ClassNotFoundException caused by the com.microfocus.cobol.program.IObjectControl. Can anyone explaine why this is. The class file Program1.class is present.
I also noticed that the intellisense in Visual Studio is much better then in Eclipse.
The code in Visual Studio is better completed than in Eclipse, because there, only words are completed
expl method-id is not followed with end method.
the methods of the interface are not implemented.
When you are making Java progams this is the standard. That is a pity.
I use another version of Eclipse that is better for making J2EE project. Maybe you should provide a plugin for this Eclipse just like Adobe did for there Flex framework for making flex projects.