Highlighted
Absent Member.
Absent Member.
386 views

COBCH1713 'type BookWrapper.Book' has no visible static method 'Add' with 1 parameter(s)

I am new to Windows forms.  Using the WinFormBook sample code provided by MicroFocus everything works fine.  I am attempting to determine how to pass back a code to the legacy program to indicate a write the data.  I have added a second button to add.  I have copied the button1 read section and changed to add:

set my-book to type BookWrapper.Book::Add(input-string)

When I build the file, I get the error in the subject line.  How do I resolve this issue? 

0 Likes
1 Reply
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

RE: COBCH1713 'type BookWrapper.Book' has no visible static method 'Add' with 1 parameter(s)

To resolve the compiler error you need to call the Add method with all the parameters specified in the signature in BookWrapper.cbl.
There is an example of this call in the next method down :

set my-book to type BookWrapper.Book::Add(
textBoxStockNo::Text
textBoxTitle::Text
textBoxAuthor::Text
textBoxType::Text
my-Price
my-NumberOnHand
my-NumberSold)

This method requires multiple parameters because it calls a section of COBOL code which adds a record to an indexed file, so it requires the stock number, book name, price, etc.
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.