Skip to main content

[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!

[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!

DB2 RESULT SET LOCATOR syntax is not currently supported by IBM in DB2 LUW.

If you run the program through the IBM precompiler using DB2 PREP you will get the same error message as you are getting when using the Micro Focus External Compiler Module (ECM) for DB2.

This means that it is an IBM issue and that they would have to add this support to their precompiler before it would work with any Micro Focus product.

[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!

Many thanks Chris!

[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!

I have the same problem.

Does someone have the solution?

I would appreciate it so much.

[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!

I have the same problem.

Does someone have the solution?

I would appreciate it so much.