× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Tom,

Since you are mentioning *LIBL, I assume you're using system naming convention; if not, that could be your problem.

Or, if the DDM file's library is not in your library list, that might be the issue.

The name of the library on the remote box is not a factor on the local box.  The DDM file should specify the name of the remote library. If you specified *LIBL for the remote file, then yo would have to insure that the QRWTSRVR job on the remote system has the correct library list, which seems unlikely, although possible. You'd have to change QDFTSRVR jobd on the remote system, or somehow change the QRWTSRVR job to use a different jobd.

What error are you getting, and on which statement?

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx <mailto:petercdow@xxxxxxxxx>
pdow@xxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxx> /


On 3/11/2021 6:46 AM, Tom Deskevich wrote:
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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.