WordSearchAPI cannot be applied to (java.lang.String)
Receiving an err and can not figure it out:
WordSearchAPI cannot be applied to (java.lang.String)
[javac] if (api.executeKey1(word)) {
[javac] ^
WordSearch.java
Code:
public void doNext() {
int x = 0;
ICD9WordSearchAPI api = new ICD9WordSearchAPI();
ICD9SearchAPI number_api = new ICD9SearchAPI();
if (api.executeKey1(word)) {
while (api.next() && x < 10) {
ICD9Word ic = new ICD9Word(api.getRecord());
records.add(number_api.getRecordFromIndex(ic.getIcd9Code()));
//records.add(api.getRecord());
x++;
}
}
api.close();
}
WordSearchAPI.java
Code:
public boolean executeKey1(String word, String sequence) {
PicX pword = new PicX(25, word);
PicX psequence = new PicX(18, sequence);
PicX passin = new PicX(43, pword.toStringWithSpaces() + psequence.toStringWithSpaces());
Boolean returnstatus = new Boolean(false);
boolean returnVal = false;
Object[] objs = {
returnstatus, passin};
try {
returnVal = runtime.cobcall_boolean("JAPISL211SEARCHKEY1", objs);
}
catch (COBOLException ex) {
System.out.println(ex.toString());
}
catch (Exception ex) {
System.out.println(ex.toString());
}
return returnVal;
}
Any help would be greatly appreciated.