View previous topic :: View next topic
|
Author |
Message |
zanyzap4u
New User
Joined: 13 Dec 2008 Posts: 38 Location: Mexico City
|
|
|
|
Hi All, I need help on this one.
I have made a TCP LISTENER program(with a transaction ID) in CICS, which will receive the socket connections. Also I have defined it as a LISTENER is the CICS region.
But when the CICS region is STOPed and STARTed, this transaction is restarted, but the default TCP LISTENER of the CICS region doesnt start.
Quote: |
The user-written listener should monitor either the LCASTAT field in the LCA or the GWATSTAT field in the GWA for shutdown status. If either field shows an immediate shutdown in progress, the user-written listener should terminate by issuing the EXEC CICS RETURN command and allow the interface to clean up any socket connections. |
--From "IP CICS Sockets Guide"
How do I add extra logic in the program to monitor that the CICS region is restarting and CLOSE all the socket connections before stopping the transaction. My program is not closing the connections properly.
How should I implement the above logic in my program.
My program is in C.
Can anyone point me in the right direction. |
|
Back to top |
|
|
zanyzap4u
New User
Joined: 13 Dec 2008 Posts: 38 Location: Mexico City
|
|
|
|
Do i need to provide any more information ? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
The usual way to do things during CICS start up and shut down is through PLT programs. You probably should talk to your site support group about whether or not PLT entries would work for what you want to do. |
|
Back to top |
|
|
zanyzap4u
New User
Joined: 13 Dec 2008 Posts: 38 Location: Mexico City
|
|
|
|
I dont understand how PLT is related to my requirement.
I am restarting CICS by EZAO START/STOP CICS. and have defined my listener program by EZAC.
So now my user defined listener program will work as a listener for a particular port number.
The problem is when my program is stoped(EZAO STOP CICS), it is not termination properly, i.e. it is not closing all the sockets and termination properly. Probably need to add some extra logic in my program.
I know it is diffilult to suggest the solution of my problem, until someone has actually tried this thing out, if anyone has written a user defined listener program. |
|
Back to top |
|
|
ManojLenkaMainframes
New User
Joined: 22 May 2008 Posts: 14 Location: Chennai,India
|
|
|
|
Hi ,
If I do understand your problem correctly , " the program is not disconnecting properly " .
Can You please include the following command in your C Code .
EXEC CICS SIGNOFF END-EXEC.
Please try the command CESF LOGOFF in CICS promt . it may work.
Thanks
Manoj |
|
Back to top |
|
|
zanyzap4u
New User
Joined: 13 Dec 2008 Posts: 38 Location: Mexico City
|
|
|
|
By saying 'the program is not disconnecting properly', i mean that while stoping the listener program(by EZAO STOP CICS), it should close all the socket connections and then terminate. Which is not happening properly.
And why SIGNOFF and CESF LOGOFF.
My listener program is a long running program, which will accept new socket connection on a particular port. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
Back to top |
|
|
tomehta
New User
Joined: 18 Aug 2008 Posts: 98 Location: India
|
|
|
|
I guess CSKL is the IBM supplied cics listener,
One of the workaround can be, during cics startup, cskl is purged.
I faced the similar issue long back, and we purged the ibm listener and then brought up our listener, |
|
Back to top |
|
|
zanyzap4u
New User
Joined: 13 Dec 2008 Posts: 38 Location: Mexico City
|
|
|
|
Will purging of the default listener have any effect on the environment ??
(If my listener program is working properly). |
|
Back to top |
|
|
tomehta
New User
Joined: 18 Aug 2008 Posts: 98 Location: India
|
|
|
|
is any other user application using that listener ? if not purging is fine. |
|
Back to top |
|
|
|