Yes, you can do this. If you're using SQL to access the local file(s),
you just need to connect to the local machine to read from it and then
connect to the remote machine to write. Something along the lines of
this:
- connect to remote machine
- while not EOF
- set connection local machine
- read record
- set connection remote machine
- write record
- end while
You'll need to keep track of SQLCOD's or SQLSTT's for each file
seperately since those are global variables. If you commit each record
after the write, make sure you use COMMIT HOLD or the cursor for the
local file(s) will close.
Another approach is to not use SQL for the local file(s) and use
regular record level I/O but use SQL for the remote file.
Matt
Post by StoneyIs it possible to access local files whilst connected (using CONNECT) to a
remote database (another AS400)?
I want to update a remote machine with data from the local one - any
suggestions?
thanks
Stony