Distributed data management printing

Distributed data management (DDM) enables users or application programs on the IBM® i platform to access data files that reside on remote systems, and allows these remote systems to access data on the local system. This remote file access is transparent to the application program command or utility. Remote file requests are routed through a DDM file, which contains the name of the file on the remote system as well as the name of this system as it is known on the network.

There are, however, certain limitations to the DDM support, particularly where printing applications are concerned. For example:

  • The IBM Query for i licensed program does not support DDM files.
  • It is not possible to print on a remote IBM i platform using, for example, an Override with Printer File (OVRPRTF) command of the printer file QSYSPRT to the source DDM file. Because the print request is rejected by DDM, as shown by the following job log extract:
    3 > OVRPRTF FILE(QSYSPRT) TOFILE(ITSCID03/DDMQSYSPRT)
    DDM file DDMSRC in MYLIB uses remote file QSYS/QSYSPRT.
    File DDMSRC in MYLIB not a database file.
    Cannot open DDM file DDMSRC in MYLIB.
    Function check. CPF4207 unmonitored by QWSGET at statement *N,
    instruction X'0F9D'.
    A function check was received while opening the print file.
    The print operation used the default printer device file.

One way in which data is printed on a remote IBM i platform using DDM is as follows:

  1. Create a DDM file on the source system using the Create DDM File (CRTDDMF) command.
    CRTDDMF FILE(MYLIB/DDMSRC) RMTFILE(QSYS/QSYSPRT)
    RMTLOCNAME(B20) TEXT('DDM file for remote printing on B20').
  2. Create a physical file of the appropriate record length to receive the spooled data (80 bytes for print screen output, 132 bytes for normal spooled output), using the Create Physical File (CRTPF) command.
    CRTPF FILE(MYLIB/PFILE) RCDLEN(80) TEXT('CPYSPLF data file').
  3. Create a similar file on the remote IBM i platform using the Submit Remote Command (SBMRMTCMD) command.
    SBMRMTCMD CMD('crtpf file (rlib/rfile) rcdlen(80)') DDMFILE(DDMSRC).
  4. Copy the spool entry to the physical file using the Copy Spooled File (CPYSPLF) command, using the defaults (no control character).
    CPYSPLF FILE(QSYSPRT) TOFILE(MYLIB/PFILE)
    JOB(003049/USER/DSP06).
  5. Use the Copy File (CPYF) command to copy the data from this physical file to the remote physical file created in step 3.
    CPYF FROMFILE(MYLIB/PFILE) TOFILE(MYLIB/DDMSRC)
    MBROPT(*ADD).
  6. Use the SBMRMTCMD command once again to copy the data from the remote physical file to QSYS/QSYSPRT in order to create a spooled file on the remote IBM i platform's default output queue.
    SBMRMTCMD CMD('cpyf fromfile(rlib/rfile) tofile(qsysprt) mbropt(*add)')
    DDMFILE(DDMSRC).

This procedure can be adapted to direct IBM i printing to remote System/36 systems and System/38 systems with DDM installed. See the Distributed data management topic collection for details of the differences in DDM implementation on these other systems.