105 pts.
 Error received on CPYFRMIMPF command – SQL0842
Does anyone know what command should be run prior to the CPYFRMIMPF command to close what needs closed. Running this in a CL program.

Software/Hardware used:
ASKED: August 7, 2008  11:27 PM
UPDATED: August 8, 2008  3:35 PM

Answer Wiki:
Hi, Have you tried RCLRSC? Regards, Martin Gilbert. ************************* I looked up that message ID and read its message text. <b> Message . . . . : Connection to relational database &1 already exists. Cause . . . . . : An attempt was made to do one of the following: -- CONNECT to a relational database when the connection is active. -- CONNECT to a relational database that has the same communication information as a connection to a relational database that is active. The active relational database is &1. Recovery . . . : If CONNECT was specified, either use the SET CONNECTION statement to make relational database &1 the current connection or change the RDB directory entry (CHGRDBDIRE) for the relational database you are connecting to so that at least part of the communication information is different from what is specified in the entry for &1. For APPC connections, the communication information is the remote location, device description, local location, remote network identifier, mode, and transaction program. For TCP/IP connections, the communication information is the remote location and port identification. </b> This suggests that there's another active SQL connection to the database. Because CPYFRMIMPF uses SQL behind the scenes, I can see why it would need an SQL connection, but in my experience, the operating system manages this automatically. Are you connecting to the system from an outside source, such as running the CL from a client application via a RMTCMD or something? CWC
Last Wiki Answer Submitted:  August 8, 2008  3:35 pm  by  Gilly400   23,625 pts.
All Answer Wiki Contributors:  Gilly400   23,625 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _