I find the SDSF interface a little *clunky* and awkward.  I prefer the CMD
REXX from CBT (Greg Shirey maybe) ...

/* rexx */                                                       
Address TSO                                                      
Arg con_command                                                  
  cart   = sysvar('SYSUID')                                      
  uidlen = length(cart)                                          
  name   = right(cart,uidlen)                                    
  x = MSG('OFF')                                                 
 'CONSOLE DEACTIVATE'                                            
 'CONSPROF SOLDISP(NO) SOLNUM(400) UNSOLNUM(400) UNSOLDISP(NO)'  
 'CONSPROF'                                                      
  x = MSG('ON')                                                  
 'CONSOLE ACTIVATE CART('cart') NAME('name')'                    
 'CONSOLE SYSCMD('con_command')  CART('cart')'                   
  getcode = GETMSG('cons_msg.','SOL',cart,,30)                   
  Say con_command                                                
  If cons_msg.0 > 0 then do                                      
     Do i = 1 to cons_msg.0                                      
       Say cons_msg.i                                            
     End                                                         
  End                                                            
 'CONSOLE DEACTIVATE'                                            
 'CONSPROF SOLDISP(YES) UNSOLDISP(YES)'                          
  Return                                                         

Then it's just "CMD D T" in SYSTSIN or even as PARM=.
The benefit of using CONSOLE/SDSF is security.  MGCR(e) code does not unless
you issue the SAF call yourself.

DanD

"Itschak Mugzach"..
> OK. my version is based on TSO CONSOLE command. It reads command and
> verification value from sysin (see rexx test below), execure the command
> and verifies that the command response equal to the one read from sysin.
it
> can be easily modified to read multiple commands and verification strings.
> The idea behind the verification is to ensure that the command executed as
> expected (file was closed, job was started, etc.). igone the copywrite
> statement of course...
> 
> Best,
> ITschak
> 
> /* MugiRexx V1.3 */
<Snip> 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to