More About the SAVRSTxxx Commands
March 16, 2005 Hey, Colleagues!
It turns out quite a few of you are interested in The Save-Restore Commands. I got a lot of comments in response to that article. Here are some of them. I hope they’ll be of benefit to you. If I can find a way to test some things, I will have more information for you later. Thanks to all who wrote.
–Ted
The SAVRSTxxx commands are very nice commands indeed. We have been using them for some years now. But you should have mentioned that these commands are only available if you have installed OS/400 Option 22 (ObjectConnect).
–André
Regarding your recent article, The Save-Restore Commands, I’d like to suggest another tool for Andrew’s requirement “to set up a scheduled job to refresh certain files on the test system from the production system at night.” It’s Operations Navigator–Distribution and Packaging function, which has been available since around V4R3 (or V4R4, I’m not sure). This GUI-based function is very convenient to use. Chapter 1 of the Redbook SG24-6564-00 (“Managing OS/400 with Operations Navigator V5R1 Volume 4: Packages and Products”) tells all about this.
–Satid, IBM Thailand
Under some circumstances, if SAVRST* commands will work, there can be another alternative that’s still as slick as its always been. Good ol’ File Transfer Support– FTS. One advantage that I’ve made use of is that there is a much reduced need for synchronizing TGTRLS() between systems. I ran a transfer of a file created on V5R1 down to V4R4 today without a single hitch. I was also able to send the file to V5R3. I don’t know how long it will remain supported.
I use the following command definition to make it easier to use FTS:
/* QY2FTML */ /* CRTCMD CMD( mylib/FTS ) + */ /* PGM( QSYS/QY2FTML ) + */ /* SRCFILE( mylib/QCMDSRC ) + */ /* SRCMBR( FTS ) + */ /* TEXT( 'QY2FTML File Transfer Services' ) + */ /* MSGF( mylib/USRMSGF ) */ FTS: CMD PROMPT('File Transfer to/from AS/400') PARM KWD(OPTION) TYPE(*CHAR) LEN(1) RSTD(*YES) + SPCVAL((*SEND S) (*RECEIVE R)) MIN(1) + PROMPT('Send (S) / Receive(R)') PARM KWD(FROMLIB) TYPE(*NAME) MIN(1) PROMPT('From + library') PARM KWD(FROMFILE) TYPE(*NAME) MIN(1) + PROMPT('From file') PARM KWD(FROMMBR) TYPE(*NAME) MIN(1) PROMPT('From + member') PARM KWD(TYPE) TYPE(*CHAR) LEN(6) CONSTANT(' ') PARM KWD(TOLIB) TYPE(*NAME) DFT(*FROMLIB) + SPCVAL((*FROMLIB ' ')) PROMPT('To library') PARM KWD(TOFILE) TYPE(*NAME) DFT(*FROMFILE) + SPCVAL((*FROMFILE ' ')) PROMPT('To file') PARM KWD(TOMBR) TYPE(*NAME) DFT(*FROMMBR) + SPCVAL((*FROMMBR ' ')) PROMPT('To member') PARM KWD(TODATE) TYPE(*CHAR) LEN(6) CONSTANT(' ') PARM KWD(REPLACE) TYPE(*CHAR) LEN(1) RSTD(*YES) + SPCVAL((*YES Y) (*NO N)) MIN(0) + PROMPT('Replace member') PARM KWD(RMTLOCNAME) TYPE(*NAME) LEN(8) + PROMPT('Remote system') DEP CTL(*ALWAYS) PARM((&RMTLOCNAME *NE ' ')) + MSGID(USR5201) PARM KWD(PWD) TYPE(*NAME) DSPINPUT(*NO) + PROMPT('Password on remote system') DEP CTL(*ALWAYS) PARM((&PWD *NE ' ')) + MSGID(USR5202) PARM KWD(RTNCODE) TYPE(*CHAR) LEN(1) CONSTANT(' ') PARM KWD(MSGNUM) TYPE(*CHAR) LEN(8) CONSTANT(' ')
Here are two message descriptions can be dropped, but they help as reminders. As long as they’re in the message file named on CRTCMD, the message file name doesn’t matter:
ADDMSGD MSGID( USR5201 ) MSGF( mylib/USRMSGF ) + MSG( 'Remote location must be specified.' ) ADDMSGD MSGID( USR5202 ) MSGF( mylib/USRMSGF ) + MSG( 'Password must be specified.' )
When I’m transferring source members, I always use FTS. FTP is great between AS/400s and other platforms, but I much prefer native methods between AS/400s, and FTS can be one of the best.
–Tom
I recently consulted for a large company running a total of 8 partitions on two different iSeries. Bug Busters Software has a great tool to transfer files from one partition to another. It’s called Remote Software Facility. It uses FTP to transfer and restore any type of object. It’s very easy to install and use, and it’s inexpensive. I consider it a “must have” for any LPAR environment.
–Rosemary
If I need to move source members between iSeries partitions, I use WDSC to simply drag and drop. However, if I attempt to do this with any other object type, I get an “Invalid Drag and Drop” message box. Is (will) this allowed in WDSC and if not, does IBM plan to add this function? Also, thanks for the SAVRSTOBJ tip in the last set of Guru tips. I’ve added it to my command list in WDSC.
–Eddie
Is there any good reason not to consider DDM over IP run across the VLAN between the partitions? You don’t need an 10/100 Mbit Ethernet card to use it (nor do you need to set up AnyNet, the other option). I know you can compile from a DDM source file, for example, and a data refresh would be no harder than running some CPYF, surely?
–Richard
When I read your article on the Save-Restore commands, I was very excited. What I found is there is a little configuration on the systems that must done before you can use them with TCP/IP. Here is a document that explains what must be configured. I am glad to share it. I can’t begin to tell you how many of your articles have helped me!
–Tim