DDM example 2: Pass-through method

One set of commands is entered on the source server, a pass-through session is started with the target server, and a second set of commands is entered on the source server and run on the target server.

The following commands are issued on the source server in Philadelphia:

CRTSAVF  FILE(TRANSFER)
SAVOBJ   OBJ(ORDERENT)  LIB(PGMLIB)  SAVF(TRANSFER)
   UPDHIST(*NO)  DTACPR(*YES)
SNDNETF  FILE(TRANSFER)  TOUSRID(ANDERSON CHICAGO)

Next, a pass-through session is started between the Philadelphia and Chicago servers with the Begin Pass-Through (BGNPASTHR) command. The session is used at the source server to enter the following commands, which are run on the target server:

CRTSAVF  FILE(RECEIVE)
RCVNETF  FROMFILE(TRANSFER)  TOFILE(RECEIVE)
CRTLIB   LIB(PGMLIB)
RSTOBJ   OBJ(ORDERENT)  SAVLIB(PGMLIB)  SAVF(RECEIVE)
CRTDDMF  FILE(CUSTMAST.PGMLIB)  RMTFILE(*NONSTD 'PGMLIB/CUSTMAST')
   DEVD(PHILLY)

These commands create a save file named RECEIVE, into which the TRANSFER file is copied after it is received as a network file from the source server in Philadelphia. A library is created on the Chicago server and the RECEIVE file is restored as the ORDERENT program in the newly created library named PGMLIB. Lastly, a DDM file is created on the Chicago server which allows the Chicago server to access the CUSTMAST file on the Philadelphia server (remote location named PHILLY).

Related concepts
Remote Work Station Support PDF