When I searched throughout my code I could not find any explicit TPEXIT
coded.Is their any spl assembler API call for this.

Mary, here's a clip from an Apr 2000 post of mine, may help, not sure.

<snips>
>What sort of problems might result from using "Z NET,QUICK" on a regular
>basis rather than  a plain ol' "Z NET" at system shutdown time?
> We have operator procedures to ALWAYS do an Z NET,QUICK . The problem
> at least the ones I have seen are a hung LU or PU (3725?). Quick
> seems to ignore the hung LU or PU.

OK, I'll have a go, but just remember, this is from a former life...

Each VTAM app "registers" itself with VTAM by issuing OPEN against an
ACB.  One of the parameters hanging out of this ACB is the address of
the apps' "TPEND" exit routine:

        GENCB AM=VTAM,BLK=EXLST,WAREA=(S,MAVWXLST),LENGTH=L'MAVWXLST, X
              MF=(G,(1)),                                             X
              SYNAD=SYNX,                                             X
              LERAD=LERX,                                             X
              DFASY=ASYX,                                             X
              RESP=RESX,                                              X
              TPEND=TPNX,                                             X
              LOSTERM=LOSX

When you do "Z NET[,QUICK/CANCEL]" VTAM schedules the TPEND exits of all
the currently running VTAM apps, thus notifying them that VTAM
termination is pending.  The VTAM app programmer is responsible for
finishing up processing in an orderly, timely, manner.  After issuing
CLSDST to terminate each session (like a socket session in TCPIP) the
app issues CLOSE against the ACB and thus vanishes from VTAM's radar
scope.  When all the ACBs are closed VTAM can complete normal
termination.  Of course there can be badly behaved apps, apps that are
themselves delayed in their attempt to close a session, for example, by
another app or perhaps a hardware condition, time to do other i/o.  And
perhaps the VTAM app programmer hasn't got some little detail correct
:-).  Of course in a system with thousands of sessions, it takes time to
shut everything down in an orderly fashion.  The TPEND exit does get
passed a reason code which indicates which "Z NET" option was used:

code   reason
00 => 'VTAM HALT COMMAND ISSUED'
04 => 'VTAM HALT NET,QUICK COMMAND ISSUED'
08 => 'VTAM HALT NET,CANCEL COMMAND OR ACF/VTAM ABENDING'

..and the app is supposed to take correspondingly normal, urgent or
desperate actions accordingly.  I suspect that for "QUICK", VTAM will
wait a limited time while for "CANCEL" there's no waiting and the app is
effectively abandoned by VTAM.

Of course by the time a "Z NET" command is being issued, most, if not
all, VTAM apps will have been terminated normally anyway, in response to
STOP or MODIFY commands or whatever, so the sessions you're left with at
that time may either not matter -or- may for some reason not be going to
terminate by themselves, so perhaps it's moot whether you use "Z NET",
"ZNET,QUICK" or (shudder "Z NET,CANCEL".

YMMV. Graeme.

At 05:59 PM 8/11/2005, you wrote:
I have a S0A9 abend with reason code 7007,indicating that a TPEXIT
was entered when VTAM was holding a lock.I understand that
TPEXIT is used to kill threads.
When I searched throughout my code I could not find any explicit TPEXIT
coded.Is their any spl assembler API call for this.
I am completely new to VTAM,so any help would be very really gr8.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to