From - Tue Mar 2 18:09:20 1999 Path: reader1.news.rcn.net!feed1.news.rcn.net!rcn!cpk-news-hub1.bbnplanet.com!su-news-feed4.bbnplanet.com!news.gtei.net!news1.digital.com!pa.dec.com!usenet From: hoffman@xdelta.enet.dec.nospam (Hoff Hoffman) Newsgroups: comp.os.vms Subject: Re: Leaky Pipe command Date: 2 Mar 1999 20:43:42 GMT Organization: Compaq Computer Corporation Lines: 83 Distribution: world Message-ID: <7bhihu$cm6@usenet.pa.dec.com> References: <7bhftb$ces$1@nnrp1.dejanews.com> Reply-To: hoffman@xdelta.zko.dec.nospam NNTP-Posting-Host: xdelta.zko.dec.com X-Newsreader: mxrn 6.18-32 Xref: reader1.news.rcn.net comp.os.vms:223221 In article <7bhftb$ces$1@nnrp1.dejanews.com>, steves6215@my-dejanews.com writes: :I have a DCL command file that uses the PIPE command. The file contains the :following: After unpacking that pile of wrapped text, here is what I used to test the procedure: $ LOOP: $ GOSUB SET_PID_VALUE $ GOTO LOOP $ $! $ SET_PID_VALUE: $! $! See if the process is running by searching the SHOW SYSTEM command $! $ I = 1 $ SAVE_NODE1 = "ALPHA5" $ SAVE_NODE2 = "ALPHA6" $ MAX_NODES = 2 $ PROCESS = "PCSD7DBS_TC" $! $! Search for a process to see if it exists. Loop through each of the nodes $! stored in the symbol array (SAVE_NODE1, SAVE_NODE2...) until the we either $! find the process on one of the nodes or the process is not running. $! $ PROCESS_SEARCH_LOOP: $ THE_NODE = SAVE_NODE'I' $ pipe show system/node='THE_NODE' | searc sys$pipe "''PROCESS'" | (READ SYS$INPUT X ; DEFINE/JOB X &X) $! $! The information is located in a JOB logical called X. Assign $! the value of the logical to a symbol $! $ theSymbol = "%SEARCH-I" $ DEASSIGN/JOB X $! $! If the search failed to find the process, move to the next node in the $! the array and try the search again. If we reached the end of the array $! and still have not found the process then the symbol "theSymbol" will $! have a value indicating that search found nothing. If this is the case $! set the symbol to a NULL string value. $! $ if f$locate( "%SEARCH-I", theSymbol ) .nes. f$length(theSymbol) $ THEN $ I=I+1 $ IF (I .LE. 'MAX_NODES') THEN GOTO PROCESS_SEARCH_LOOP $! $! indicate that we did not find the process $! $ theSymbol = "" $ ENDIF $! $! Parse the process information $! $ IF (theSymbol .NES. "") $ THEN $ DISPLAY_NODENAME = "''THE_NODE'" $ MONITOR_PID = F$EXTRACT (0,8,theSymbol) $ MONITOR_STATE = F$EXTRACT (25,3,theSymbol) $ PROCNAME = F$EXTRACT(9,15,theSymbol) $ ELSE $ MONITOR_PID = "" $ ENDIF $! $ RETURN $! I made one or two slight changes to the procedure. I ran it for a while, and saw no errors. (It merrily loops when you don't have the specified process and the specified nodes...) You might want to recode that procedure to search for a process or two that we all have, so that we can test it. You will also want to confirm the job logical name table quota, and the number of symbols you have around. (Log out, and back in, to clean out any symbols and logicals you might have built up.) -------------------------- pure personal opinion --------------------------- Hoff (Stephen) Hoffman OpenVMS Engineering hoffman#xdelta.zko.dec.com