|
Eric, Thanks for responding. I'm really only connecting to one external database. I think the problem is that RPG saw the DDM files and was trying to do what it had to do with those, when I wasn't referring to the DDM files, I was referring to the actual files on the other system (which I had qualified in my sql statement with a library that wasn't even on the current system). In the end, I moved my CRTSQLPKG qcmdexc call from my RPG service program module into a CL module and it works great. Kurt Anderson Application Developer Highsmith Inc -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of DeLong, Eric Sent: Friday, November 17, 2006 5:07 PM To: RPG programming on the AS400 / iSeries Subject: RE: Program fails CRTSQLPKG when program has DDM files Kurt, You cannot connect to databases from more than one system at a time, so I don't think that's going to help, unless you connect, copy the data to a temp file (QTEMP), then connect back to you local DB and run against your copy of data in QTEMP..... I can't see any other way to go at this. Since you already have the DDM files on your local box, perhaps you could use CPYF in a CL to copy this file data to your local system (QTEMP again), eliminating the need for the CONNECT TO workaround. hth, Eric -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Kurt Anderson Sent: Friday, November 17, 2006 1:24 PM To: RPG programming on the AS400 / iSeries Subject: RE: Program fails CRTSQLPKG when program has DDM files To update my question:
From a lot of testing, this is what I've found:
The SQL Statements are using file names that on the local system are DDM files. But, since SQL can't use DDM files, I'm connecting to the database of those files' origin. When I create the SQL package myself, or via CL, it works fine. When I create it via an rpg program (bound or not), it fails. Kurt Anderson Application Developer Highsmith Inc -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Kurt Anderson Sent: Friday, November 17, 2006 10:57 AM To: RPG programming on the AS400 / iSeries Subject: Program fails CRTSQLPKG when program has DDM files Hey all, I have an SQLRPGLE program that is calling a service program to create an SQL Package, but when it issues the CRTSQLPKG command, I get some allocation and DDM errors (see below). When I copy the command it is issuing and issue it myself, the package creates successfully. From within debug I also issued the command, I was thinking that I'd be in the same state as the program, but for some reason it was successful. So, here's what I got: v5r2 SQLRPGLE compiled with *SQL and RDB(system) - note, I tried using *SYS as well and had the same problem. Program uses a DDM file. Service program compiled with *SYS and RDB(*LOCAL) - note, I've used this service program for other programs that use no DDM files. CPD83EA - Allocation error received for location XXXXX device XXXXX. CPF4734 - Evoke function for file QCNDDMF in library QSYS for device DDMDEVICE rejected. CPF9162 - Cannot establish DDM connection with remote system. SQ30080 - Communication error occurred during distributed database processing I did a search but only found one hit from Rob Berendt (2002) that essentially asked the same question and didn't seem to get any response. Any thoughts? Kurt Anderson Application Developer Highsmith Inc. W5527 State Road 106, P.O. Box 800 Fort Atkinson, WI 53538-0800 TEL (920) 563-9571 FAX (920) 563-7395 EMAIL kjanderson@xxxxxxxxxxxxx -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.