× 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.



That's a good idea.  Thanks Simon.

Art Tostaine, Jr.
CCA, Inc.
Jackson, NJ 08527


Ping just tells you TCP is up. Maybe that's enough. PING lets you 
control how its messages are returned. You could set MSGMODE(*QUIET 
*ESCAPE) and monitor for the failure messages.

> Any better ideas appreciated.

I don't know about better but since you want to know if the remote file 
is available why not just attempt to open it?

pgm (&method)
dcl &method *char 4
if (&method *eq '*SNA') do
   opndbf ddmf_sna option(*inp) opnid(thefile)
enddo
else if (&method *eq '*TCP') do
   opndbf ddmf_tcp option(*input) opnid(thefile)
enddo
else do
   sndpgmmsg msgid(cpf9898) msgf(qcpfmsg) msgdta('Method must be *SNA or

*TCP) +
      msgtype(*escape)
enddo
clof thefile
endpgm

This will verify communications, network, and file availability. 
Although my example distinguishes between SNA and TCP there is no need 
to do that. T=You can see the OPNDBF doesn't care about the transport 
mechanism.


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.