Remote data queues

Remote data queues are data queues that reside on a remote server.

You can access remote data queues with Distributed Data Management (DDM) files. DDM files make it possible for a program residing on one server to access a data queue on a remote server to perform any of the following functions:

An application program that currently uses a standard data queue can also access a remote DDM data queue without changing or compiling the application again. To ensure the correct data queue is accessed, you may need to do one of the following:

You can create a DDM data queue with the following command:

    CRTDTAQ DTAQ(LOCALLIB/DDMDTAQ) TYPE(*DDM)
       RMTDTAQ(REMOTELIB/REMOTEDTAQ) RMTLOCNAME(SYSTEMB)
       TEXT('DDM data queue to access data queue on SYSTEMB')

You can also use an expansion of the previous example ("Master Job/Server Job") to create a DDM data queue to use with remote data queues. The master job resides on SystemA; the data queues and server jobs are moved to SystemB. After creating two DDM data queues (INPUT and STATUS), the master job continues to communicate asynchronously with the server jobs that reside on SystemB. The following example shows how to create a DDM data queue with remote data queues:

    CRTDTAQ DTAQ(LOCALLIB/INPUT) TYPE(*DDM)
       RMTDTAQ(REMOTELIB/INPUT) RMTLOCNAME(SystemB)
       TEXT('DDM data queue to access INPUT on SYSTEMB')
 
    CRTDTAQ DTAQ(LOCALLIB/STATUS) TYPE(*DDM)
       RMTDTAQ(REMOTELIB/STATUS) RMTLOCNAME(SystemB)
       TEXT('DDM data queue to access STATUS on SYSTEMB')

The master job calls QSNDDTAQ, then passes the data queue name of LOCALLIB/INPUT and sends the data to the remote data queue (REMOTELIB/INPUT) on SystemB. To receive data from the remote data queue, (REMOTELIB/STATUS), the master job passes the data queue name of LOCALLIB/STATUS for the call to QRCVDTAQ.

Figure 1. Example of Accessing a Remote Data Queue
Example of Accessing a Remote Data Queue
Related information
CRTDTAQ (Create Data Queue) command in DDM
Distributed data management