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



Martin:

On Fri, 15 March 2002, "Saunders, Martin P" wrote:

> In a batch program I need to determine the status of a device on a remote
> AS/400.

Without knowing a bit more, it's hard to say.

For example, if your two systems are as4001 and as4002, and the device you're 
interested in is a tape device named TAP01, does the following work on as4001:

 ===>  mkdir '/qfilesvr.400/as4002'
 ===>  wrklnk '/qfilesvr.400/as4002/qsys.lib/tap01.*'

to bring up a list that includes TAP01.DEVD from as4002?

If so, then you have reasonable network connectivity and some useful servers 
are started so that maybe you can do the following:

 ===>  sbmrmtcmd or runrmtcmd 'call qsys/quscrtus parm(...'
 ===>  sbm/runrmtcmd 'call qsys/qdclcfgd parm(...'

The first calls the Create User Space API to create a user space, named say 
QGPL/CFGSTS, and the second will call the List Configuration Descriptions API 
with parms that select the device you're interested in to get the status into 
the space.

 ===>  cpy '/qfilesvr.400/as4001/qsys.lib/qgpl.lib/cfgsts.usrspc' +
        toobj('/mydir/cfgsts.spc')

and you should now have the contents of the user space from as4002 sitting in a 
streamfile on as4001. Either read direct from the streamfile, or perhaps CRTPF 
QTEMP/USRSPC RCDLEN(1024) and use CPYFRMSTMF so you can read the record or...?

Or have you seen what results from a RUNRMTCMD cmd('wrkcfgsts ... 
output(*print)')? Maybe you can extract what you need from the returned 
spoolfile.

Or if you are running RTFCFGSTS in order to know if the device is online, maybe 
simply RUNRMTCMD cmd('vrycfg tap01 *dev status(*on) range(*obj)') and again 
check the returned spoolfile.

Tom Liotta



--
Tom Liotta
The PowerTech Group, Inc.
19426 68th Avenue South
Kent, WA 98032
Phone  253-872-7788
Fax  253-872-7904
http://www.400Security.com


___________________________________________________
The ALL NEW CS2000 from CompuServe
 Better!  Faster! More Powerful!
 250 FREE hours! Sign-on Now!
 http://www.compuserve.com/trycsrv/cs2000/webmail/






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.