I need to use the SQL CONNECT statement within a SQLRPGLE program to connect from one AS400 system to another. I need to get data from one file to another. Does anyone know how to do this? Can it be done within a program. I have no trouble when I do it on an SQL command line... I use CONNECT to sys02name user usern using mypassword. Then I use the select statement to get the records I need. If I can do this in an rpg or clp program, that would be helpful. I can't use FTP for this.