Hello List,
 
As I learned in this list, I'm trying to use PIPE in some cases instead REXX.
 
Now, We need see from time to time, if some machines are running in disconnect 
mode.
 
Then write this sample PIPE, that put in a file, all machines that is run in 
disconnect mode, and then try locate that We need.
 
trace r                                                                   
"PIPE CP QUERY NAMES | SPLIT , | STRIP | LOCATE /- DSC/ | > mach disc a"  
"pipe < mach disc a | sort 1-8 | > mach disc a"                           
"pipe < mach disc a | locate /xxxxx/ | console"                           
say rc                                                                    
exit                                                                      
 
The problem, is that the RC (Return Code) always return 0, if the string exist 
or not.
 
For example :
 
My file :
 
 MACH     DISC
 ===>         
CONNECT  - DSC
CPUVM    - DSC
DEFCICS  - DSC
DISKACNT - DSC
FTPSERVE - DSC
GCS      - DSC
LPSERVE  - DSC
OPERATOR - DSC
OPERSYMP - DSC
OP1      - DSC
OP2      - DSC
PERFSVM  - DSC
 
Running the EXEC :
 
With NOT FOUND :
 
     3 *-* "PIPE CP QUERY NAMES | SPLIT , | STRIP | LOCATE /- DSC/ | > mach disc
 a"                                                                             
       >>>   "PIPE CP QUERY NAMES | SPLIT , | STRIP | LOCATE /- DSC/ | > mach di
sc a"                                                                           
     4 *-* "pipe < mach disc a | sort 1-8 | > mach disc a"                      
       >>>   "pipe < mach disc a | sort 1-8 | > mach disc a"                    
     5 *-* "pipe < mach disc a | locate /xxxxx/ | console"                      
       >>>   "pipe < mach disc a | locate /xxxxx/ | console"                    
     6 *-* say rc                                                               
       >>>   "0"                                                                
0                                                                               
     7 *-* exit                                                                 
 
 
With FOUND :
 
     3 *-* "PIPE CP QUERY NAMES | SPLIT , | STRIP | LOCATE /- DSC/ | > mach dis
 a"                                                                            
       >>>   "PIPE CP QUERY NAMES | SPLIT , | STRIP | LOCATE /- DSC/ | > mach d
sc a"                                                                          
     4 *-* "pipe < mach disc a | sort 1-8 | > mach disc a"                     
       >>>   "pipe < mach disc a | sort 1-8 | > mach disc a"                   
     5 *-* "pipe < mach disc a | locate /CPUVM/ | console"                     
       >>>   "pipe < mach disc a | locate /CPUVM/ | console"                   
CPUVM    - DSC                                                                 
     6 *-* say rc                                                              
       >>>   "0"                                                               
0                                                                              
     7 *-* exit                                                                
 
Looking in the Manual CMS PIPELINES REFERENCE, Can't see how get the Return 
Code.
 
Please, someone can help us with this question?
 
Thanks very much
 
Sergio Lima Costa
Sao Paulo - Brazil                                        

Reply via email to