Discussion:
Informix ESQL COBOL : how to connect to another database
(too old to reply)
Cristiano Bregola
2014-05-20 16:06:47 UTC
Permalink
The configuration that we are trying is the following:
- RedHat Enterprise Linux 5.1
- Microfocus Server Express 5.1
- Informix Dynamic Server 11:50

The server has a database instance with the database "DbA";
We have another server on the network with another instance with a database "DbB";

from a cobol program, we need to work on the default local database DbA and perform a query (or other sql activity) on a database DbB on the remote server;

the sql statement that we use and that works from dbaccess is as follows:

select * from ***@DbB1_tcp:table_arch

the same sql statement, executed within a COBOL program through the clauses ......... EXEC SQL ............END-EXEC. reports a generic sql error -22283 or -908

We're doing something wrong?

Thanks
John Carlson
2014-06-13 02:22:27 UTC
Permalink
The configuration that we are trying is the following: - RedHat
Enterprise Linux 5.1 - Microfocus Server Express 5.1 - Informix
Dynamic Server 11:50
The server has a database instance with the database "DbA"; We have
another server on the network with another instance with a database
"DbB";
from a cobol program, we need to work on the default local database
DbA and perform a query (or other sql activity) on a database DbB on
the remote server;
the same sql statement, executed within a COBOL program through the
clauses ......... EXEC SQL ............END-EXEC. reports a generic
sql error -22283 or -908
We're doing something wrong?
Thanks
Are you able to test the connection using dbaccess or some other tool on
the source server?

JWC
Mike Walker
2014-06-13 02:43:42 UTC
Permalink
Are you running the COBOL program as the same user as when you tested with
dbaccess?

Are there any messages in the Informix log on the remote server (DbB),
perhaps complaining that a connection is not trusted?



-----Original Message-----
From: informix-list-***@iiug.org [mailto:informix-list-***@iiug.org]
On Behalf Of John Carlson
Sent: Thursday, June 12, 2014 8:22 PM
To: informix-***@iiug.org
Subject: Re: Informix ESQL COBOL : how to connect to another database
The configuration that we are trying is the following: - RedHat
Enterprise Linux 5.1 - Microfocus Server Express 5.1 - Informix
Dynamic Server 11:50
The server has a database instance with the database "DbA"; We have
another server on the network with another instance with a database
"DbB";
from a cobol program, we need to work on the default local database
DbA and perform a query (or other sql activity) on a database DbB on
the remote server;
the same sql statement, executed within a COBOL program through the
clauses ......... EXEC SQL ............END-EXEC. reports a generic sql
error -22283 or -908
We're doing something wrong?
Thanks
Are you able to test the connection using dbaccess or some other tool on the
source server?

JWC

Loading...