Control DDM conversations
Normally, the DDM conversations associated with a source server job are kept active until one of the conditions described in this topic is met.
- All the DDM files and remote files used in the conversation are closed and unlocked (deallocated).
- No other DDM-related functions like the use of the Submit Remote Command (SBMRMTCMD) command or the Display File Description (DSPFD) command (to display remote file information) are being performed.
- No DDM-related function has been interrupted (by a break program, for example) while running.
- The ENDCMTCTL command was issued (if commitment control was used with a DDM file).
- No distributed relational database architecture-related functions are being performed.
- The activation group, in which the DDM conversation was started, ends. A DDM conversation is not dropped when the activation group ends under the following conditions:
- The DDM conversation is scoped to the job level.
- The commitment control of the activation group is scoped to the job level, and a unit of work is outstanding. The conversation remains until the next job level commit or rollback, or until the job ends.
- The job or routing step ends.
If 1, 2, and 3 are true and the source job or activation group has not ended, the conversation is considered to be unused, that is, the conversation is kept active but no requests are being processed.
DDM conversations can be active and unused because the default value of the DDMCNV job attribute is *KEEP. This is desirable for the usual situation of a source server program accessing a remote file for multiple I/O operations; these operations are handled one at a time, as shown in Figure 2 and explained in the text following it.
If multiple DDM requests are to be made in a job and the DDM files are being continually opened and closed in the job, *KEEP should be used to keep an unused DDM conversation active. (However, as long as one DDM file remains open or locked, *KEEP has no effect.)
For source jobs that access remote files but do not access data records in them, it might be desirable, depending on the frequency of the file accesses, to automatically drop each DDM conversation at the completion of each file-related source job request. Whether the conversation in the source job is kept active or automatically dropped during the time a conversation is unused is determined by the DDMCNV job attribute value (*KEEP or *DROP).
Regardless of the value of the DDMCNV job attribute, conversations are dropped when one of the following things occurs:
- The job ends.
- The activation group ends. A DDM conversation is not dropped when the activation group ends under the following conditions:
- The DDM conversation is scoped to the job level.
- The commitment control of the activation group is scoped to the job level, and a unit of work is outstanding. The conversation remains until the next job level commit or rollback, or until the job ends.
- The job initiates a Reroute Job (RRTJOB) command.
Unused conversations within an active job can also be dropped by the Reclaim DDM Conversations (RCLDDMCNV) or Reclaim Resources (RCLRSC) command. Errors, such as communications line failures, can also cause conversations to drop.
- Display DDMCNV values (WRKJOB command)
To display the current value (*KEEP or *DROP) of the DDMCNV job attribute for your source job, you can use menu option 2 (Work with definition attributes) on the Work with Job (WRKJOB) Command display. You can also find out the value within a CL program by using the Retrieve Job Attributes (RTVJOBA) command.
- Change DDMCNV values (CHGJOB) command
To control whether the server is to automatically reclaim (or drop) DDM conversations in a source job whenever they become unused, the server default *KEEP can be changed to *DROP by using a Change Job (CHGJOB) command. If the value is left as *KEEP, the Reclaim DDM Conversations (RCLDDMCNV) or Reclaim Resources (RCLRSC) command can be used at any time to drop all DDM conversations (within that job only) that currently do not have any active users.
- Reclaim DDM resources (RCLRSC and RCLDDMCNV commands)
When an iSeries™ user wants to ensure that the resources for all APPC conversations (including DDM conversations) that are no longer active are returned to the server, the Reclaim Resources (RCLRSC) command can be used.
Parent topic:
Other DDM-related functions involving remote files
Related concepts
iSeries server as the source server for DDM
Related reference
RCLDDMCNV (Reclaim DDM Conversations) command
RCLRSC (Reclaim Resources) command
DDMCNV parameter considerations