paulywill
paulywill

Reputation: 703

DISPLAY and CANCEL multiple stcs with ASID on specific LPAR

We have two started tasks that run multiple instances of OMVS. Automating the shutdown is proving to be problematic. We have IBM System Automation (SA v4.1) at our disposable and Netview (v6.2.1)

I've come up with a REXX exec to achieve what I was after:

   /* IHSCAN                                                                    
   -------------------------------------------------------------------                                                                                   
    Function:      Shutdown IHSHOD13, multiple running instances              
                   this is b/c this is OMVS/USS primarily.                    

    Called by:     SA SHUTDOWN                                                

    Calls:         n/a                                                        

    Logic:         Using previous REXX template this PIPES the ASID to        
                   a stem variable and then send a cancel command for         
                   each.                                                      

   -------------------------------------------------------------------        
   */                                                                           
   task.0 = 0                                                                  
   'pipe mvs d a,IHSHOD13',                                                    
      '| corr 30',                                                             
      '| tos /CNZ4106I/',                                                      
      '| sep',                                                                 
      '| loc /IHSHOD13/',                                                      
      '| loc /A=/',                                                            
      '| stem task.'                                                           
   say 'IHSCAN: found ' task.0 ' IHSHOD13 tasks'                               
   if task.0 = 0 then exit                                                     
   do t = 1 to task.0                                                          
     parse var task.t 'A=' asid .                                               
     'MVS C IHSHOD13,A='asid                                                    
     say 'CANCELLED IHSHOD13: ' asid'.'                                                   
    end                                                                         
   exit 

I thought this was working flawlessly until I realized that on our sysplex this solution will cancel all the stcs on multiple lpars, rather than my goal which is just to cancel on one lpar.

Is there way I can alter my REXX solution to perform this cancelling of multiple stcs using the ASID on just SYSA and not SYSA and SYSB?

Specifically is the an alternative to MVS D A,IHSHOD13 ?

EDIT: Perhaps there's something in REXX/SDSF that's CANCEL ASID=x IF SYSNAME=y ?

Upvotes: 1

Views: 932

Answers (1)

paulywill
paulywill

Reputation: 703

The REXX Exec above is actually working as intended, canceling all the ASID for the single LPAR.

I had to do some extensive testing to verify.

@piet.t was correct to point out that D A command will only display tasks running on the current lpar.

Upvotes: 1

Related Questions