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



Hi Martin -

>In a batch program I need to determine the status of a device on a remote
>AS/400.  I can use SBMRMTCMD to call the RTVCFGSTS command on the remote box
>or I suppose I could do it with ftp.  What's the best way to do this and get
>the return value from the RTVCFGSTS on the local box?

Here's the way I would probably do it:

1. create a flat file in QTEMP on the local system.
2. write a record to that file for each device whose status I want.
3. run an FTP script that:
    A. quote rcmd CRTPF the same flat file in QTEMP on the remote system.
    B. binary put the file to QTEMP on the remote system.
    C. quote rcmd a program that would read the file and update the records
       with the device status.
    D. binary get the file back to the local system.
    E. quote rcmd DLTF the file from QTEMP on the remote system.
       (not really needed but I like to be tidy.)
    F. quit the FTP session.
4. check the FTP log for errors.
5. process the file on the local system doing whatever it is that you need
to do.

Another option would be to create a sockets server program on the remote
system that listens on a particular port for device status requests and a
socket client program on the local system that opens a connection to that
port, sends the request, receives the reply, and returns it to the caller.

Ken
http://www.ke9nr.org/
Opinions expressed are my own and do not necessarily represent the views of
my employer or anyone in their right mind.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.