This involves two machines, one running v7r3, the other v5r4.
I was trying to determine if I can have an RPGLE program on v7r3 read a
SQL ALIAS table that points to a remote table.
On v5r4 there's a multi-member file of which I only want a particular
member. So on that machine, I created an alias:
CREATE ALIAS mylib/myAlias for mylib/myFile (myMbr)
CREATE ALIAS mylib/myFile FOR rmtv5r4/mylib/myAlias
So far so good. On v7r3, a "SELECT * FROM mylib/myFile" returns the
records from myMbr on the remote v5r4 machine.
I wrote RPGLE program TESTALIAS on v7r3 which reads the first record
from myFile, displays the key fields, then ends. The first issue was it
wouldn't compile because it couldn't get the external field definitions
from myFile. So I copied the file definition from v5r4 to v7r3 as
myDefn and used that in the EXTDESC key field on the file spec. That
got it compiled.
Here's the fun part. When I ran it I got some errors:
[CPI9160] Database connection started over TCP/IP.
[CPI9200] DDM object SYSCDEP1 in UTLIB uses remote object UTLIB/SYSCDEM1.
[CPF9162] Cannot establish DDM connection with remote system.
Cause . . . . . : An error occurred during distributed data
initialization while attempting to establish a connection at the
location OCAL 0000.
Recovery . . . : See previously listed message CPF4364. Correct
and then try the request again. If message CPD3E34 is listed,
message listed before it for meaning of error code.
The "Recovery" is interesting because there is no "previously listed
message CPF4364". However,
the "Cause" hints at the problem with "remote location OCAL 0000."
This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.