Copying an RPG or CL program source from a remote iSeries into the iSeries you are currently on can be achieved...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
using several ways. One way is by using Client Access data transfer. Another way is by using the iSeries SNDNETF command. But both take time.
The fastest way which I thought of and tried lately is by using two iSeries commands: CRTDDMF and CPYF.
The CRTDDMF command sets up a DDM file (a reference file) on the local system which can be used to access a file located on a remote system. A DDM file must contain the name of the remote file, the information identifying the remote system, and the method used to access the record(s) in the remote file. Below are examples of setting up DDM files:
CRTDDMF Example 1:
• CRTDDMF FILE(myLib/myDDMF) RMTFILE(rmtLib/rmtRPGSRC) RMTLOCNAME(rmtAS/400)
The above example shows setting up a DDM file by way of specifying the remote location name and uses the default remote address type of *SNA. It assumes that the DDM server at the remote location supports SNA connectivity.
Another way of setting up a DDM file is by specifying the remote IP address (nnn.nnn.nnn.nnn) for the remote location parameter. This form requires an address type of *IP and assumes that the DDM server at the remote location supports the use of TCP/IP.
CRTDDMF Example 2:
• CRTDDMF FILE(myLib/myDDMF) RMTFILE(rmtLib/rmtRPGSRC) RMTLOCNAME('123.456.789.123' *IP)
When the DDM file has been created, use the CPYF command to copy any or all members from a remote source physical file referenced by the DDM file.
• CPYF FROMFILE(myLib/myDDMF) TOFILE(myLib/myRPGSRC) FROMMBR(rmtMember) TOMBR(myMember) MBROPT(*ADD) FMTOPT(*NOCHK)
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your programming questions--or help out your peers by answering them--in our live discussion forums.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.