IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

TCP LISTENER program not restarting properly


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
zanyzap4u

New User


Joined: 13 Dec 2008
Posts: 38
Location: Mexico City

PostPosted: Thu Oct 08, 2009 5:49 pm
Reply with quote

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
View user's profile Send private message
zanyzap4u

New User


Joined: 13 Dec 2008
Posts: 38
Location: Mexico City

PostPosted: Mon Oct 12, 2009 11:54 am
Reply with quote

Do i need to provide any more information ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Oct 12, 2009 4:39 pm
Reply with quote

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
View user's profile Send private message
zanyzap4u

New User


Joined: 13 Dec 2008
Posts: 38
Location: Mexico City

PostPosted: Mon Oct 12, 2009 6:02 pm
Reply with quote

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
View user's profile Send private message
ManojLenkaMainframes

New User


Joined: 22 May 2008
Posts: 14
Location: Chennai,India

PostPosted: Mon Oct 12, 2009 6:23 pm
Reply with quote

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
View user's profile Send private message
zanyzap4u

New User


Joined: 13 Dec 2008
Posts: 38
Location: Mexico City

PostPosted: Mon Oct 12, 2009 8:31 pm
Reply with quote

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. icon_confused.gif

My listener program is a long running program, which will accept new socket connection on a particular port.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Mon Oct 12, 2009 10:27 pm
Reply with quote

IBM-supplied program EZACIC20 (when added to the PLIPI and PLISD) is used to start and stop the listener, respectively.

The PLT definitions are defined to their respective manuals.

The following LINK (for z/OS 1.4) should get you started -

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/F1A1BK33

You need to review the "z/OS V1R4.0 CS: IP CICS Sockets Guide", "SC31-8807-01"

If you're on a newer release of z/OS, then review ===> publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/library

Bill
Back to top
View user's profile Send private message
tomehta

New User


Joined: 18 Aug 2008
Posts: 98
Location: India

PostPosted: Thu Oct 15, 2009 9:34 pm
Reply with quote

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
View user's profile Send private message
zanyzap4u

New User


Joined: 13 Dec 2008
Posts: 38
Location: Mexico City

PostPosted: Fri Oct 23, 2009 4:35 pm
Reply with quote

Will purging of the default listener have any effect on the environment ??
(If my listener program is working properly).
Back to top
View user's profile Send private message
tomehta

New User


Joined: 18 Aug 2008
Posts: 98
Location: India

PostPosted: Wed Oct 28, 2009 1:19 am
Reply with quote

is any other user application using that listener ? if not purging is fine.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top