[Migrated content. Thread originally posted on 06 April 2011]
Hi,
I am a little new to all this and was hoping someone could point me the right direction
I have a MF Cobol program (on AIX) that calls a DB2 (v9.5) SQL Stored Procedure.
I am trying to use a result-set-locator to store the results from the call to a Stored Procedure.
My problem is that I cannot compile the Cobol program.
I get the error:
* Micro Focus SQL External Compiler Module for IBM DB2 UDB
* Version 4.0.05 (C) copyright 1997-2008 Micro Focus (IP) Ltd.
END-EXEC.
* 801-S***** ( 0)**
** External Compiler Module message
** DB0100 SQL4911N The host variable data type is not valid.
cob64: error(s) in compilation: tresloc.cov
The line it fails on is:
EXEC SQL
ASSOCIATE RESULT SET LOCATOR (:LOC) WITH PROCEDURE TRESLOC
END-EXEC.
:LOC is defined in the working-storage as follows:
EXEC SQL BEGIN DECLARE SECTION END-EXEC.
01 LOC USAGE IS SQL TYPE IS RESULT-SET-LOCATOR VARYING.
EXEC SQL END DECLARE SECTION END-EXEC.
Is this just something where the compiler is not configured properly or is it the fact that MF Cobol cannot use result-set-locators
Any help would be much appreciated.
Thanks!

