Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
What's are the best (read 'easy') alternatives to FTP for moving an IFS file from one machine/partition to another?
Define both IFS locations as shared drives on your PC, and drag/drop the file from one shared drive to the other.
No pc in the middle. i to i.
If you've got ObjectConnect installed (free but optional feature of OS), you can use SAVRST command. This requires an SNA connection, but you can use HPR IP or AnyNet.
You could also look into using NetServer and /QNTC. NetServer makes the share visible (SAMBA server). The /QNTC file system works as the client. Once the share is available, you MKDIR '/QNTC/servername/sharename'. Once you have that going, just CP or MV the files; you can also open, read, write, etc. from a program. You don't authenticate explicitly when you MKDIR; user name must exist on both servers with the same password. The other thing is directories under /QNTC do not survive IPL; if you want them available all the time, you need to do the MKDIR in your IPL startup program.
Shoo-be-doo-ah!
Well unless you are using a real honest 5250 dumb terminal, then there is a PC in the middle...
The one that you are running the 5250 emulation on. Frequently in the past I have set up IFS locations as a shared drive on my PC, so that I can generate files (typically html, xml or comma delimited files) on my PC and just drop them onto the IFS. I then switch to my 5250 emulator and run an upload program to pull the data from the IFS to the main application data base files. And where I have more than 1 AS400 running, I will have many shared drives, one for each system. It's then very painless to transfer files between IFS's, as far as windoze is concerned they are just another microsoft compatible non-local hard drive.
A real easy way assuming each are on a network is to use DDM and use cpyf. Bascially you will create a file (CRTDDMF) (on local machine) and you will give the remote file name/ip address and give it some name on the local machine and be done with it. I do it all the time. The only requirement is that machine A has some sort of "network" connection to machine B. That could be both are on same local lan or across a vpn, etc.
I must be missing something that one would want to mess with the IFS to do something that is simple.
Let me expand a bit, say the file on machine b is called masterfile and it is in mylibrary. Lets also say that the ip address of machine b is 192.168.1.101.
So on machine a, type:
CRTDDMF FILE(MYLIB/OTHERFILE) RMTFILE(MYLIBRARY/MASTERFILE) RMTLOCNAME('192.168.1.101 *IP)
The above creates a ddm file on machine A with a "dummy name" of "otherfile" and puts it in mylib.
Now lets say the file that you want to copy is called master2 and located in funlib.
CPYF FROMFILE(FUNLIB/MASTER2) TOFILE(MYLIB/OTHERFILE) MBROPT(*REPLACE) CRTFILE(*NO)
Of course it could be called masterfile and be located in mylibrary on machine a and so you could say:
CPYF FROMFILE(MYLIBRARY/MASTERFILE) TOFILE(MYLIB/OTHERFILE) MBROPT(*REPLACE) CRTFILE(*NO)
OOPS I didn't read very closely, I see it is an IFS file that you want to move... sorry...
"Well unless you are using a real honest 5250 dumb terminal, then there is a PC in the middle..."
Not a safe assumption. He could have been asking about a batch file transfer. (renojim, perhaps you could clarify the question?)
While I'm thinking of it, even if there is a PC "in the middle", using it may not be practical. I'm working from home at the moment via VPN, with servers on the corporate intranet. Unless I'm moving a very small file, ...
Short from writing your own utility, FTP may be the easiest way unless you are willing to use mapped drives.
You would think that since you can see OS/400 libraries in the /QSYS.LIB directory that there would be a way to see other remote system's /QSYS.LIB also. And from there be able to access the IFS on those remote systems. Something like using mapped drives from within the IFS.
I believe you could also use the QFileSvr.400 directory to establish a link to the remote system, then just copy the file from the remote system to the local system or vice versa.
From what I read, QFileSvr.400 is sort of like DDM for the IFS.