DFHIRP (interregion communication (SVC) program)
The interregion communication program (DFHIRP) is used to pass data from one region to another in the same processing unit. The programs running in the regions usually are CICS programs, but DFHIRP does not assume that to be the case.
Each user of this program must first issue a LOGON request specifying an 8-character name. This user identifier is added to a table maintained in key 0 storage. If cross-memory is being used, acquire and initialize the cross-memory resources (authorization index (AX), linkage index (LX), and entry table (ET)), unless this has already been done by a previous logon in this address space.
After the user has logged on, CONNECT requests can be issued to establish data paths to other users who have also logged on. The users must cooperate in this process by specifying, when they log on, to whom and from whom they are to be connected and by how many data paths. If cross-memory is being used, update the authority tables (ATs) of both address spaces to allow each one to establish addressability to the other, unless this was done when a previous connection was established between them.
After a connection has been established, either end of the connection can issue a SWITCH request to send data to the other end of the connection. The receiver of the data must provide a buffer into which the data is to be written. If the buffer is too small, the receiver is notified of the actual data length and, possibly having obtained a larger buffer, can issue a PULL request to retrieve as much data as is required. After the first data has been sent, the link must be used by each end alternately.
A connection can be broken by either end by issuing a DISCONNECT request. If cross-memory is being used and if the last cross-memory connection between a pair of address spaces is being removed, update the caller's AT so that the other system is no longer permitted to access the caller's address space.
When all links have been disconnected, a user can log off using a LOGOFF request. If cross-memory is being used, free the cross-memory resources acquired by logon if they are no longer required by the caller's address space.
When MVS™ cross-memory services are requested (ACCESSMETHOD(XM) in the RDO CONNECTION definition), communication is performed by DFHIRP running as an SVC. In this case, it is invoked by an SVC call to a startup program (DFHCSVC), which calls the required DFHIRP routine.