Sending Objects Between iSeries Machines

On the sending machine:

 

Create a temporary library & save file for the transfer

CRTLIB TmpLib
CRTSAVF TmpLib

 

Copy object to the temporary library

CRTDUPOBJ OBJ(MyProg) FROMLIB(MyProgLib) OBJTYPE(*PGM) TOLIB(TmpLib)

 

Save the temporary library to save file

SAVLIB LIB(TmpLib) DEV(*SAVF) SAVF(TmpLib)

 

Send the save file to the other machine

SNDNETF FILE(TmpLib) TOUSRID((userName receivingMachine))

 

Remove temporary library & save file

DLTF TmpLib
DLTLIB TmpLib

 

On the receiving machine:

 

Create a temporary save file to receive the transferred save file

CRTSAVF TmpLib

 

Display all transferred files

WRKNETF userName

 

Identify your transferred save file, select and receive it

option 1=Receive network file

 

Create a temporary library from received save file

RSTLIB TmpLib DEV(*SAVF) SAVF(TmpLib)

 

Copy object from the temporary library to desired location

CRTDUPOBJ OBJ(MyProg) FROMLIB(TmpLib) OBJTYPE(*PGM) TOLIB(MyProgLib)

 

Remove temporary library & save file

DLTF TmpLib
DLTLIB TmpLib
Posted in tips.