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.
Maybe I am stupid (o.k. I am stupid) but I guess I am confused when I look at the various save commands (SAV appears to be the one), but I wanted to move certain directories in the IFS from one machine to another (migration). I ended up simply using inav, copy/paste from the one IFS to my desktop and then from my desktop to the new one (didn't like wanting to do it with two machines open for some reason).
All was good and fine, except that the ccsid changed to 1252 and that was NOT a problem on 99% of the stuff in the IFS except for those ifs files that I write over every day with a CL command (*replace). Then of course, it wanted to blow up.
I believe, maybe incorrectly that even if I would have ftp'ed it, I might have had the same issue.
So how do you "easily" move folders, etc. in the IFS (talking "root"), to another machine and exactly how do you do the backup of such with the sav? command??
That is say your folder you want to save is "www/zendserver"...
Like I said I am not very smart.
SAVOBJ and RSTOBJ work on objects in a library.
SAVLIB and RSTLIB work on libraries and objects contained in those libraries.
SAVDLO and RSTDLO work on documents and folders.
SAV and RST work on IFS directories and files. Use OBJ, PATTERN, and SUBTREE to specify which objects; typically I only use OBJ.
The main difficulty, if you want to call it that, is naming the device. Device de!--script--ions for tape (and optical) are type *DEVD in library QSYS, so DEV('/QSYS.LIB/TAP01.DEVD'). A save file would probably be in some other library, so more like DEV('/QSYS.LIB/MYLIB.LIB/MYSAVF.FILE').
When you use SAV and RST, attributes like the CCSID will be preserved. If you use a save file, you can FTP the save file, just remember to do it in BINary.
An alternative to save files, for IFS objects, is to use the jar utility. jar is equivalent to zip and unzip. You need to have QShell installed.