|
I have an RPG program with embedded SQL that accesses the data via a DDM file. From the research I did, I found that you should specify *RDB on the DDM RMTLOCNAME parameter.
Then put the RDB value from the RDB directory entry in the RDB parameter. The RDB directory entry references the IP of the remote box.
My understanding is that the SQL should qualify the file with *LIBL by default. Yet I get an error in the job log stating that it cannot find the file.
The name of my DDM library is different from the name of the library on the remote box.
My boss tells me that they have never got SQL to work with DDMS. They had to put stored procedures on the remote box.
Embedded SQL: dt is an external data structure that points to a file in qtemp with the same fields as XXXPY70P.
begsr GetData ;
RowsFetched = 0 ;
clear dt ;
cs=case;
exec sql DECLARE C0 CURSOR FOR
SELECT * FROM XXXPY70P
WHERE DECCY=:CY AND DECYR=:YR AND DECNO=:CS
ORDER BY DESNO,DESSNO
OFFSET :Offset ROWS;
exec sql OPEN C0 ;
exec sql FETCH C0 FOR :NbrOfRows ROWS INTO :Dt ;
exec sql GET DIAGNOSTICS :RowsFetched = ROW_COUNT ;
exec sql CLOSE C0 ;
endsr ;
Harriscomputer
Tom Deskevich
Programmer/Analyst
P: 814-472-6066 x201134
F: 814-472-5019
E: TDeskevich@xxxxxxxxxxxxxxxxxx
[cid:HLG_logo_14bd0fcf-3182-4b52-9120-a2e250d74b09.jpg]
172 Gateway Road PO Box 568
Ebensburg, Pennsylvania
15931
www.harrislocalgov.com<http://www.harrislocalgov.com>
This message has been sent on behalf of a company that is part of the Harris Operating Group of Constellation Software Inc.
If you prefer not to be contacted by Harris Operating Group please notify us<http://subscribe.harriscomputer.com/>.
This message is intended exclusively for the individual or entity to which it is addressed. This communication may contain information that is proprietary, privileged or confidential or otherwise legally exempt from disclosure. If you are not the named addressee, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this message in error, please notify the sender immediately by e-mail and delete all copies of the message.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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 [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.