I need to save an object from one AS/400 and send it to another AS/400, without having to save it on a tape. How can I save an AS/400 object and for instance send it via E-mail to another AS/400.
This program saves the Library "MESSAGEF" to a file called "MESSAGEF" in the folder APF3812.
From here you can retrieve it and sent it, attached to a e-mail.
The restore at the receivers end, is done the following way;
Place the file in the folder APF3812.
Run the following command on the AS/400;
This creates the library "MESSAGEF" on the AS/400.
Copy the messagefiles to the desired library for use.
If you are using a 98.01.M31 or older version do the following ;
Any object can be saved and sent by E-mail. In theory, it would be
possible to send the entire InterForm400 to another AS/400 by E-mail.
The following example only sends the messagefile APFMSGGB to another
AS/400, but the same procedure could be used for any object.
The procedure requires that Client Access or simular is installed on the PC, and the PC has access
to the shared folders on the AS/400.
NB: Remember to define a target release in the SAVOBJ command If you are
restoring on a machine with an older OS version.
Now send the file to your own userprofile. Check your user ID and address
with command WRKDIRE. The following sends the file to user ID PETER on
address INTER01:
Re: Send any AS/400 object via E-mail
Depending of your version of InterForm400, there are two method's of moving the objects.
InterForm400 must be installed on both AS/400's.
If you are using a 99.01.M01 or newer you can do the following ;
Create a library for e.g. messagefiles you want to sent.
CRTLIB LIB(MESSAGEF) TYPE(*TEST) TEXT('Temporary library for Messagefiles.')
Copy the messagefiles to the library.
When you have copied the messagefiles to the library do the following.
APF3812/SAVLIB2FLR LIB(MESSAGEF) TOFLR(APF3812) TODOC(MESSAGEF)
This program saves the Library "MESSAGEF" to a file called "MESSAGEF" in the folder APF3812.
From here you can retrieve it and sent it, attached to a e-mail.
The restore at the receivers end, is done the following way;
Place the file in the folder APF3812.
Run the following command on the AS/400;
APF3812/RSTLIBFLR SAVLIB(MESSAGEF) FROMFLR(APF3812) FROMDOC(MESSAGEF)
This creates the library "MESSAGEF" on the AS/400.
Copy the messagefiles to the desired library for use.
If you are using a 98.01.M31 or older version do the following ;
Any object can be saved and sent by E-mail. In theory, it would be
possible to send the entire InterForm400 to another AS/400 by E-mail.
The following example only sends the messagefile APFMSGGB to another
AS/400, but the same procedure could be used for any object.
The procedure requires that Client Access or simular is installed on the PC, and the PC has access
to the shared folders on the AS/400.
CRTSAVF FILE(QTEMP/QAZ)
SAVOBJ OBJ(APFMSGGB) LIB(APF3812) DEV(*SAVF) SAVF(QTEMP/QAZ)
NB: Remember to define a target release in the SAVOBJ command If you are
restoring on a machine with an older OS version.
Now send the file to your own userprofile. Check your user ID and address
with command WRKDIRE. The following sends the file to user ID PETER on
address INTER01:
SNDNETF FILE(QTEMP/QAZ) TOUSRID((PETER INTER01))
DLTF FILE(QTEMP/QAZ)
CRTPF FILE(QTEMP/QAZ) RCDLEN(528) MAXMBRS(*NOMAX) SIZE(*NOMAX)
RCVNETF FROMFILE(QAZ) TOFILE(QTEMP/QAZ)
CPYTOPCD FROMFILE(QTEMP/QAZ) TOFLR(APF3812) FROMMBR(SAVF) TODOC(UKMSGF)
REPLACE(*YES) TRNTBL(*NONE) TRNFMT(*NOTEXT)
Now attach the file UKMSGF 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/QAZ) RCDLEN(528) MAXMBRS(*NOMAX) SIZE(*NOMAX)
CPYFRMPCD FROMFLR(APF3812) TOFILE(QTEMP/QAZ) FROMDOC(UKMSGF) TRNTBL
(*NONE) TRNFMT(*NOTEXT)
Now send the file to the user working on the target machine.
SNDNETF FILE(QTEMP/QAZ) TOUSRID((JACK INTER02))
DLTF FILE(QTEMP/QAZ)
CRTSAVF FILE(QTEMP/QAZ)
RCVNETF FROMFILE(QAZ) TOFILE(QTEMP/QAZ)
RSTOBJ OBJ(*ALL) SAVLIB(APF3812) DEV(*SAVF) SAVF(QTEMP/QAZ)