| United States-English |
|
|
|
![]() |
LU 6.2 API Application Programmer's Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 5 Intrinsic DescriptionsMCGetAllocate |
|
Establishes a conversation initiated by a remote TP.
On MPE V, LocalTPName is an output parameter, received in EBCDIC from the remote TP. It contains the name of the job file sent by the remote TP. The job file name must be 8 characters long; if it is shorter than 8 characters long, it must be padded with blanks. The job file must be located in the APPC.SYS group and account. When the HP 3000 receives the job file name, it streams the job, which runs the local TP. Because LU 6.2 API performs no translation on the LocalTPName array, the local TP must convert it from EBCDIC to ASCII. The MPE CTRANSLATE intrinsic, or the intrinsic on MPE XL, may be used. On MPE XL, LocalTPName is an input ASCII parameter. It must match the value in the LocalTPName parameter of the TPStarted intrinsic. The LocalTPName parameter contains the TP name sent by the remote TP. This TP name must be configured in the APPC configuration branch of NMMGR. The configuration file associates each TP name with a job file, which may be located in any group and account. When LU 6.2 API receives the TP name from the remote TP, it does one of two things:
A remotely initiated TP on MPE XL is configured to conduct either single or multiple conversations with the remote TP. A TP that conducts a single conversation must call MCGetAllocate only once; another instance of the TP will be started each time a remote TP requests a conversation. A TP that conducts multiple conversations can call MCGetAllocate many times; only one instance of it may be running at once. See the APPC Subsystem on MPE XL Node Manager's Guide for more information on TP configuration.
MCGetAllocate is called to receive a conversation allocation request from the remote TP and initialize all the resources the local TP needs to conduct a conversation. When the remote TP issues the equivalent of the MCAllocate intrinsic, it sends a TP name to the HP 3000, indicating the local TP with which it wants a conversation. The HP 3000 then runs the local TP, which calls MCGetAllocate to allocate the local side of the conversation. Once the MCGetAllocate intrinsic has executed successfully, the local TP is in Receive state and the remote TP is in Send state. When the MCGetAllocate intrinsic executes successfully, a ResourceID is assigned to the allocated conversation. Just as the TPID uniquely identifies one among many possible instances of the same TP, the ResourceID uniquely identifies one among many possible conversations conducted by one instance of a TP. Every conversation requires one session on the APPC subsystem. On MPE V, only 8 sessions may be active on the APPC subsystem at once. On MPE XL, the APPC subsystem can support a maximum of 256 active sessions. The available active sessions must be shared among all the TPs running on the APPC subsystem. For more information on session limits, see the APPC Subsystem on MPE V Node Manager's Guide or the APPC Subsystem on MPE XL Node Manager's Guide. MCGetAllocate allows you to receive initialization information from the remote TP in the Program Initialization Parameters (PIPs). These parameters can be used, for example, to indicate whether a TP is processing daily information or an end-of-month report. They can also be used to inform the local TP of the type of data it will receive, the size of the records, etc. PIPs can be used to transmit any special information the local TP must receive from the remote TP before it executes. On MPE V, MCGetAllocate can be called only once during the execution of a TP. That is, each execution instance of a TP can have only one conversation initiated by the remote TP. On MPE V, when a conversation is initiated by the remote TP, the MCGetAllocate intrinsic must be the first LU 6.2 API intrinsic called after the TPStarted intrinsic, unless the TPEnded intrinsic is called and the program terminated. On MPE V, the TP name sent by the remote TP is the name of a job file located in the APPC.SYS group and account. This TP name must match the name of the job file exactly. The job file contains the MPE RUN command that starts up the local TP. The executable TP file can reside in any group and account. When LU 6.2 API receives the TP name from the remote TP, it streams the job, which in turn runs the local TP. The value returned in the LocalTPName parameter is the TP name sent by the remote TP. On MPE XL, the TP name sent by the remote TP is configured in the APPC subsystem branch of NMMGR. The TP name is associated with a job file through configuration. When the HP 3000 receives the TP name from the remote TP, it does one of two things:
A remotely initiated TP on MPE XL is configured to conduct either single or multiple conversations with the remote TP. A TP that conducts a single conversation must call MCGetAllocate only once; another instance of the TP will be started each time a remote TP requests a conversation. A TP that conducts multiple conversations can call MCGetAllocate many times; only one instance of it may be running at once. See the APPC Subsystem on MPE XL Node Manager's Guide for more information on TP configuration. On MPE XL, a timer for the MCGetAllocate intrinsic may be configured. The timer prevents the local TP from being suspended indefinitely if no allocate request arrives from the remote TP. The timer is a value from 0 (no timer) to 480 minutes (8 hours), configured through NMMGR/XL. If your program calls MCGetAllocate, and no allocate request arrives from the remote TP before the timer expires, control is returned to your program. See the APPC Subsystem on MPE XL Node Manager's Guide for more information. The LocalTPName passed in the MCGetAllocate intrinsic must be configured in the APPC subsystem branch of NMMGR. It must match the TP name sent by the remote TP, and it must match the LocalTPName passed in the TPStarted intrinsic.
Figure 5-3 “Remotely Initiated TP on the HP 3000” shows how a local TP is started when a conversation allocation request is received from a remote TP. Figure 5-4 “Queued Allocate Requests from Remote TPs” shows how, on MPE XL, allocate requests from the remote TP can be queued to wait until the local TP calls the MCGetAllocate intrinsic. The TP in Figure 5-4 “Queued Allocate Requests from Remote TPs” loops through the same conversation, beginning with MCGetAllocate and ending with MCDeallocate, until it receives the last allocate request. The TP could be written to handle a predetermined number of allocate requests, or it could loop through the conversation until the last MCGetAllocate call timed out because the queue was empty. When MCGetAllocate times out, +29 is returned in the Status parameter. (The MCGetAllocate time-out value must be configured through NMMGR/XL. See the APPC Subsystem on MPE XL Node Manager's Guide.)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||