08-05-2003, 05:49 AM
What is the best way to access a DDM file in an embedded RPG ILE SQL module within a service program as if it were looking in a local database location? This RPG ILE SQL module was created using all the defaults of a local Iseries system/database (V5R2). However, now the application in which this module runs is on a reomte Iseries (V5R2). SQL error SQL7001 is received stating that the file being accessed is not a database file. (ie. a DDM file). Is there an easy way to change the DDM file or SQL ILE module or the Service program to point to the correct target file on the remote system without upsetting the application program logic? I have looked into the Distributed Database Programming guide. It seems to me that I need to recomile the module in the production environment and update the service program to take advantage of the "Implicit connection management for nondefault activation groups" feature of DRDA (I'm using a named activation group IBTSYS). Is it simply a matter of specifying the remote database(system) in the RDB parm of the CRTSQLRPGI command? And, will this perform all the SQL CONNECT logic without changing the source code to include these SQL statements?