Commands needed to accomplish the task are entered at the source server. The source server sends commands that are needed on the target iSeries™ server by using the Submit Remote Command (SBMRMTCMD) command between the servers.
The following commands are issued on the source server in Philadelphia to send the ORDERENT program to the target server in Chicago:
CRTSAVF FILE(TRANSFER) SAVOBJ OBJ(ORDERENT) LIB(PGMLIB) SAVF(TRANSFER) UPDHIST(*NO) SNDNETF FILE(TRANSFER) TOUSRID(ANDERSON CHICAGO) CRTDDMF FILE(CHICAGO) RMTFILE(xxxxx) RMTLOCNAME(CHIC) SBMRMTCMD CMD('CRTSAVF FILE(RECEIVE)') DDMFILE(CHICAGO) SBMRMTCMD CMD('RCVNETF FROMFILE(TRANSFER) TOFILE(RECEIVE)') DDMFILE(CHICAGO) SBMRMTCMD CMD('CRTLIB LIB(PGMLIB)') DDMFILE(CHICAGO) SBMRMTCMD CMD('RSTOBJ OBJ(ORDERENT) SAVLIB(PGMLIB) SAVF(RECEIVE)') DDMFILE(CHICAGO) SBMRMTCMD CMD('CRTDDMF FILE(CUSTMAST.PGMLIB) RMTFILE(*NONSTD ”PGMLIB/CUSTMAST”) DEVD(PHILLY)') DDMFILE(CHICAGO)
These commands create a save file named TRANSFER, which saves the ORDERENT program and then sends it as a network file to the target server in Chicago. There, the commands embedded in the SBMRMTCMD command are used to create a save file (named RECEIVE) on the target server, receive the TRANSFER file, and restore it as ORDERENT into the newly created PGMLIB library. Lastly, a DDM file is created on the Chicago server which allows the Chicago server wants to access the CUSTMAST file on the Philadelphia server. The Create DDM File (CRTDDMF) command is in System/38™ syntax.
After either of these two methods is used to send the ORDERENT program to, and to create the DDM file on, the Chicago server, the ORDERENT program on that server can be used to access the CUSTMAST file on the Philadelphia server.