Submitted by Anonymous (not verified) on Mon, 03/19/2001 - 00:00
Forums

Is it possible to save and move a library to another AS/400-system by e-mail?
 

Full name
Administrator

admin

Mon, 03/19/2001 - 00:00

In InterForm’s version 99.01.M18 and later versions there are two commands available for this operation, SAVLIB2FLR (Save Library to Folder) and RSTLIBFLR (Restore Library from Folder) – which respectively save and reload a library through shared folders. Shared folder QDLS opens the possibility to send / receive files by E-mail.

This is also possible with an older version or without InterForm by the following procedure:

Any object can be saved and send by E-mail. In theory, it would be possible to send the entire InterForm to another AS/400 by E-mail.


The following example only sends the library MYLIB to another AS/400, but the same procedure could be used for any object. The procedure requires that Client Access is installed on the PC.

  CRTSAVF FILE(QTEMP/SAVEFILE)
  SAVLIB LIB(MYLIB) DEV(*SAVF) SAVF(QTEMP/SAVEFILE) 

NB: Remember to define a target release in the SAVLIB command If you are restoring on a machine with an older OS/400 version.

Now send the file to your own user profile. Check your user ID and address with command WRKDIRE. The following sends the file to user ID MY address OLDAS400:

   SNDNETF FILE(QTEMP/SAVEFILE) TOUSRID((MY OLDAS400))
 DLTF FILE(QTEMP/SAVEFILE)
 CRTPF FILE(QTEMP/SENDFILE) RCDLEN(528) MAXMBRS(*NOMAX) SIZE(*NOMAX)
 RCVNETF FROMFILE(SAVEFILE) TOFILE(QTEMP/SENDFILE)
 CPYTOPCD FROMFILE(QTEMP/SENDFILE) TOFLR(APF3812) FROMMBR(SAVF) TODOC(PCFILE) REPLACE(*YES) TRNTBL(*NONE) TRNFMT(*NOTEXT) 

Now attach the file PCFILE from the folder APF3812 to an E-mail and ship it off.

On the target machine the following actions should be taken:

  CRTPF FILE(QTEMP/SENDFILE) RCDLEN(528) MAXMBRS(*NOMAX) SIZE(*NOMAX)
 CPYFRMPCD FROMFLR(APF3812) TOFILE(QTEMP/SENDFILE) FROMDOC(PCFILE) TRNTBL(*NONE) TRNFMT(*NOTEXT) 

Now send the file to the user working on the target machine. 

  SNDNETF FILE(QTEMP/SENDFILE) TOUSRID((YOU NEWAS400))
  DLTF FILE(QTEMP/SENDFILE)
 CRTSAVF FILE(QTEMP/SAVEFILE)
  RCVNETF FROMFILE(SENDFILE) TOFILE(QTEMP/SAVEFILE)
 RSTLIB SAVLIB(MYLIB) DEV(*SAVF) SAVF(QTEMP/SAVEFILE)