Page 1 of 1

Knowing SMS SCDS Name by REXX

PostPosted: Tue Jan 29, 2019 6:14 pm
by samb01
Hello,

i would know if thee is a command in REXX that allow getting the SMS SCDS Name of a LPART please ?

For example, in SDSF, the commande above :


/D SMS
 


return


IGD002I 13:42:05 DISPLAY SMS 985  
SCDS = SMS.SCDS2.SCDS            
ACDS = SMS.ACDS2.ACDS            
COMMDS = SMS.COMMDS2.COMMDS      

 


i would like to get :

SMS.SCDS2.SCDS

by REXX

Thank's for your help.

Re: Knowing SMS SCDS Name by REXX

PostPosted: Tue Jan 29, 2019 7:40 pm
by willy jensen
No built-in service as far as I know (I'd love to be proven wrong). But you can easily issue the D SMS command and capture the output using the REXX/SDSF API. See the SDSF Users Guide for details, or search this forum for numerous examples.
Some IBM and third party options do exist, I personally like the MXI freeware program and it's chargeable big brother from Rocket. Or look at Naviquest in the DFSMSdfp Storage Administration manual.

Re: Knowing SMS SCDS Name by REXX

PostPosted: Tue Jan 29, 2019 7:45 pm
by enrico-sorichetti
no need to bother SDSF

here is a snippet that works


****** ***************************** Top of Data ******************************
 000001 /*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000002 /*                                                                   */
 000003 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000004 Trace "O"                                                                
 000005 Parse Source _sys _how _cmd .                                            
 000006 args = "d u,tape,online"                                                
 000007 cart     = "OPER0001"                                                    
 000008 _msg = msg("OFF")                                                        
 000009 zrc = $tsoex("CONSOLE DEACTIVATE ")                                      
 000010 zrc = $tsoex("CONSPROF SOLDISP(NO) SOLNUM(9999)" )                      
 000011 zrc = $tsoex("CONSOLE ACTIVATE")                                        
 000012 if zrc = 0 then do                                                      
 000013    zrc = $tsoex("CONSOLE SYSCMD("args") CART("cart") ")                  
 000014    if zrc = 0 then do                                                    
 000015       zrc = getmsg("console.",,cart,,120)                                
 000016    end                                                                  
 000017    zrc = $tsoex("CONSOLE DEACTIVATE ")                                  
 000018 end                                                                      
 000019 do i = 1 to console.0                                                    
 000020    say i console.i                                                      
 000021 end                                                                      
 000022 _msg = msg(_msg)                                                        
 000023 exit                                                                    
 000024                                                                          
 000025 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000026 $tsoex:                                                                  
 000027    tso_0tr = trace("O")                                                  
 000028    Address TSO arg(1)                                                    
 000029    tso_0rc = rc                                                          
 000030    trace value(tso_0tr)                                                  
 000031    return tso_0rc                                                        
 000032                                                                          
 000033 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000034 $ispex:                                                                  
 000035    isp_tr = trace("O")                                                  
 000036    Address ISPEXEC arg(1)                                                
 000037    isp_rc = rc                                                          
 000038    trace value(isp_tr)                                                  
 000039    return isp_rc                                                        
 000040 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000041 $isred:                                                                  
 000042    isr_tr = trace("O")                                                  
 000043    Address ISREDIT arg(1)                                                
 000044    isr_rc = rc                                                          
 000045    trace value(isr_tr)                                                  
 000046    return isr_rc                                                        
 000047                                                                          
 ****** **************************** Bottom of Data ****************************
 



1  IEE457I 11.13.17 UNIT STATUS 670                                          
 2  UNIT TYPE STATUS        VOLSER     VOLSTATE                                
 3  0580 349S O-NRD-R                      /REMOV                              
 4  0581 349S O-NRD-R                      /REMOV                              
 5  0582 349S O-NRD-R                      /REMOV                              
 6  0583 349S O-NRD-R                      /REMOV                              
 


naturally You will need console authorithy

but if You want to use the REXX SDSF interface here is one more snippet


EDIT       ENRICO.ISPF.EXEC(ISFT05) - 01.02                Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR
 ****** ***************************** Top of Data ******************************
 000001 /*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000002 /*                                                                   */
 000003 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
 000004 Trace  "O"                                                            
 000005 Parse Source _sys _how _cmd .                                          
 000006 parse arg args                                                        
 000007                                                                        
 000008 debug = 1                                                              
 000009                                                                        
 000010 IsfRC = isfcalls("ON")                                                
 000011 if IsfRC ¬= 0 then do                                                  
 000012     say "isfcalls RC" IsfRC                                            
 000013     exit                                                              
 000014 end                                                                    
 000015                                                                        
 000016 cmd = "/D U,TAPE,ONLINE"                                              
 000017 Address SDSF "isfexec '" || cmd || "' "                                
 000018 if RC ¬= 0 then do                                                    
 000019     say "isfexec  RC" RC                                              
 000020     say isfmsg                                                        
 000021     do  im = 1 to isfmsg2.0                                            
 000022         say isfmsg2.im                                                
 000023     end                                                                
 000024     exit                                                              
 000025 end                                                                    
 000026                                                                        
 000027 do il = 1 to isfulog.0                                                
 000028     say right(il,1) isfulog.il                                        
 000029 end                                                                    
 000030 call  isfcalls "OFF"                                                  
 000031 exit                                                                  
 ****** **************************** Bottom of Data ****************************
 

Re: Knowing SMS SCDS Name by REXX

PostPosted: Tue Jan 29, 2019 8:33 pm
by samb01
Thank's enrico for your example !