Highlighted
Absent Member.
Absent Member.
515 views

book "Visual cobol a developer's guide" compile error

I am going through the above book in VCPE 3.0 for VS 2017 trying to compile the simpledate.cbl program and it throws error "

COBCH0858 No static method found - cannot be a main program

In checking there are in fact no static methods. How can I fix this? Do I have some settings that are off? Thanks 

0 Likes
1 Reply
Highlighted
Established Member.

Add static to the Class constructor as below:
Class-id MicroFocus.COBOL.Book.Examples.MainClass Static.

I think that this will resolve the error.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.