[Migrated content. Thread originally posted on 23 October 2011]
I am an experienced COBOL programmer looking to move to a project using OO cobol and doing a little self education.
I have a pretty good grasp of JAVA and C# so was expecting to pick it up reasonably easily. It will be syntax and basic program/class structure I need to get to grips with.
My first attempt at a COBOL JVM project using visual COBOL for eclipse.
I am getting error "COBCH0829S could not find method "storeData" with this signature".
Any guidance on where to look for and how to fix it would be appreciated.
01 classField pic x(1).
01 methodField pic x(10).
procedure division using methodField.
move methodField to classField
01 methodField pic x(10).
procedure division returning methodField.
move classField to methodField
Learning1 IS CLASS "Learning1".
01 myLearning usage object reference.
01 passField pic x(10) value low-values.
INVOKE Learning1 "NEW" returning myLearning
INVOKE myLearning "storeData" using passField
COBCH0829S could not find method "storeData" with this signature
even though I fixed the problem, where do I find the example code for COBOL JVM classes? In particular I am looking for an explanation of syntax for nesting classes ie. equivalent to COBOL occurs array containing multiple (same type) classes.
Appears I have fixed my problem by prefixing the class name with the package name (I had been using the default package previously). Is it necessary to add the prefix or is there an option somewhere to control this?
Thanks for your time,
Note: On older versions of Windows the samples might be installed in a different folder, such as for Windows XP, C:\Documents and Settings\All Users\Documents\Micro Focus\Visual COBOL 2010\Samples.
To access the demonstrations:
Click Start menu > All Programs > Micro Focus Visual COBOL 2010 > Visual COBOL Samples.
This opens the Samples Browser form.
Select a sample in the central pane and click Open sample folder.
Open the sample in Eclipse.
I followed that path. I am getting "Readme Not Found!" in the bottom panel and nothing is clickable.
Thanks for your assistance,
Are you using the Visual COBOL R4 release for Eclipse?
The Readme files are located in the project folders for the various samples for example:
C:\Users\Public\Documents\Micro Focus\Visual COBOL 2010\Samples\Eclipse\jvm_cobol\Arrays\readme.xml
The following are the instructions for importing the various samples into an Eclipse Workspace so they can be used.
Importing the Project into Eclipse
First you have to import the Demonstration project into your Eclipse workspace.
Select File -> Import. The Import | Select dialog box opens.
Select General -> Existing Projects into Workspace, then Next. The Import | Import Projects dialog box opens.
Select the Select root directory radio button, then Browse. The Browse for Folder dialog box opens.
Navigate to the samples folder.
Select the demonstration project(s) in the Projects list in Import | Projects.
Select Copy projects into workspace
Now the Demonstration project(s) should be displayed in the Navigator window.
Sorry for the delayed reply, I have just got back to learning again.