× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Le 02/01/2022 à 18:59, Patrik Schindler a écrit :
Hello & happy new year,
Enjoy 2022 :-)

I have defined some custom subsystems with ASJs starting some socket listeners. These will end with error as long as TCP/IP isn't started.

Aside from creating a loop in my applications to simply try again to allocate a socket and sleep some seconds after failure, instead of just exiting — which other options can you recommend?

I'm especially interested in ways to postpone start of my own SBS' until TCP/IP has successfully started (instead of blindly starting them in QSTRUP).

Before starting your subsystems, you may want to try to ping localhost with a long wait time and the maximum of tries, something like that

PING RMTSYS(LOCALHOST) MSGMODE(*VERBOSE *ESCAPE) NBRPKT(999) WAITTIME(5 or more)

While TCP/IP is not started and within the 999 tries, your program will remain trying. As soon as TCP/IP and localhost interface are started, the command will try the remaining times until 999, which will be short. You have to tune WAITTIME so that most of the times the startup program runs, TCP/IP will be started before the end of 999 tries.

Include the ping in a short loop to retry it if it fails (your program will receive a TCP32xx escape message if TCP/IP is not started or if localhost interface is not yet started) with maybe a counter to avoid infinite looping. As you prefer.

Dissecting how TCP/IP is started, it's an ASJ doing nothing else but STRTCP, I probably could add entries to QATOCSTART, but this would mean to change a system file. Something I want to do only as a last resort.

Thanks!

:wq! PoC (V4R5, model 150, just reminding;-) )
Yep, not sure if all the parameters I have put in the ping command are available in V4R5. I have a doubt with MSGMODE parameter.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.