home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
viscobv6.zip
/
vac22os2
/
ibmcobol
/
samples
/
pli
/
faaexp15.pli
< prev
Wrap
Text File
|
1998-02-23
|
4KB
|
78 lines
*process langlvl(saa2) limits(extname(31));
/*********************************************************************/
/* */
/* MODULE NAME FAAEXP15.PLI */
/* */
/* DESCRIPTIVE NAME User exit - 15. Task Attach / Detach Exit */
/* sample for Remote DL/I running on CICS OS/2. */
/* */
/* Statement: Licensed Materials - Property of IBM */
/* */
/* 33H2061 */
/* (c) Copyright IBM Corp. 1988, 1995. */
/* */
/* See Copyright Instructions. */
/* */
/* All rights reserved. */
/* */
/* U.S. Government Users Restricted Rights - use, */
/* duplication or disclosure restricted by GSA */
/* ADP Schedule Contract with IBM Corp. */
/* */
/* Status: Version 3 Release 0 */
/* */
/* NOTES :- */
/* DEPENDENCIES = None */
/* None */
/* RESTRICTIONS = None */
/* MODULE TYPE = Program */
/* PROCESSOR = PS/2 and PC */
/* */
/*********************************************************************/
/* */
/* FUNCTION: */
/* The Remote DL/I calls in this program ensure that at the */
/* end of a transaction: */
/* - If a PSB is still scheduled, it is terminated. */
/* - If a remote DL/I connection exists, the connection */
/* is ended. */
/* */
/*********************************************************************/
FAAEXP15: proc(pExit15Input)
options(fromalien nodescriptor byvalue linkage(System))
returns(fixed bin(15));
%include faaexi15;
dcl DLIDisconnect entry
returns( byvalue optional unsigned fixed bin(31))
options( nodescriptor linkage(optlink))
external('DLIDisconnect');
dcl DLITermPSB entry
returns( byvalue optional unsigned fixed bin(31))
options( nodescriptor linkage(optlink))
external('DLITermPSB');
dcl DLI_rc unsigned fixed bin(31);
dcl pExit15Input pointer,
Exit15 type S_EXIT_15_IN based(pExit15Input);
if Exit15.ExitNumber = EXIT_15_TASK_ATTACH then;
else
/* We get here for task detach. Only do the remote DL/I calls */
/* for transactions that may use remote DL/I (omit CICS */
/* supplied transactions). */
do;
if substr(Exit15.Exit15Transid,1,1) ^= 'C' then
do;
/* Terminate any outstanding scheduled PSBs */
DLI_rc = DLITermPSB();
/* Disconnect if there is a connection */
if DLI_rc ^= 120 then
DLI_rc = DLIDisconnect();
end;
end;
return(0);
end FAAEXP15;