> I run ADSM/VM. Unfortunately, as we have added users we have not always
> filled in all the contact info or kept it up to date. Now I have >200
> clients.
>
> I would like to do a "query node" and get the list of all nodes, and then
> do a "q node nodename f=d" and pick up the contact info for each node.
Here's what I use:
:READ ADSMCONT EXEC A2
/* Obtain the ADSM node contact information
Format of command: ADSMCONT <number> node
if a number is given, then ADSMCONT waits for "number" seconds for
DSMSERV to respond. The default is 2 seconds.
Requires" WAIT4MSG REXX.
wts AT maine.maine DOT edu - 11/94 - support MSG OFF
*/
parse arg node
wait = 2
if datatype(word(node,1))=='NUM' then parse var node wait node
if node='' then exit 24
parse value diag(8,'QUERY SET') with 'MSG ' msg rest
if msg=='OFF' then 'CP SET MSG ON'
address COMMAND 'PIPE rexx wait4msg' wait,
'CP SMSG DSMSERV QUERY NODE' node 'F=D|',
'between / Contact: /',
' / Compression: /|',
'drop last 1|',
'join *|spec 33-* 1|split|change // /|join *|strip|cons'
ret = rc
if msg=='OFF' then 'CP SET MSG OFF'
exit ret
:READ WAIT4MSG REXX A2
/* Send a command to CMS and trap any slow results via msg etc
Pipe driver format: REXX WAIT4MSG wait_in_seconds CMS_command
Example: Pipe wait4msg 2 who mimi|cons
*/
trace
signal on novalue
parse arg wait cms_command
if cms_command='' then exit 2
parse value translate(diag(8,'QUERY SET'),',','15'x) with ,
'CPCONIO' Cpconio ','
call diag 8, 'SET CPCONIO IUCV'
'CALLPIPE (end c name CMSCMD)',
'starmsg' cms_command'|',
'vmconio: find 00000003'userid()'|',
'spec 17-* 1|',
'all: faninany|*:',
'cvmconio: |all:',
'cliteral +'wait'| delay| spec ,PIPMOD STOP, 1| command'
call diag 8, 'SET CPCONIO' cpconio
exit rc
:READ ENDOF SAMPLES A2
Hope this helps,
Wayne T. Smith
Systems Group -- CAPS internet: wts AT maine.maine DOT edu
University of Maine System BITNET/CREN: WTS@MAINE
|