Hallo Spoldo,

ich könnte mir da folgende Variante vorstellen.
ein kleines rpg
PHP-Code:
h dftactgrp(*nobnddir('QC2LE')                                          
fx_status  if   f  132        disk    usropn                              
                                                                          
d system          pr            10i 0 extproc
('system')                   
d                                 *   value options(*string)              
d                                                                         
d Befehl          s            100                                        
d                                                                         
d True            c                   
*On                                 
d False           c                   
*Off                                
                                                                          
ix_status  rm                                                             
i                                 23   26  typ                            
i                                 32   46  aktiv                          
i                                  4   10  controler                      
                                                                          
c                   
If        %Openx_status )                           
c                   Close     x_status                                    
c                   
EndIf                                                 
c                                                                          
c                   Call      
'CL_STATUS'                                  
c                   Open (e)  x_status                                     
c                   
If        not %Error                                   
c                   Read      x_status                                     
c                   DoW       not 
%EoFx_status )                         
c                                                                          
c                   
If        typ '*LIN' and                             
c                             aktiv 'RCYPND'                             
c                   Eval      Befehl 'VRYCFG cfgobj(MyLtg) ' +           
c                                      'CFGTYPE(*LIN)        ' +           
c                                      'STATUS(*OFF)         ' +           
c                                      'FRCVRYOFF(*yes)'                   
c                   CallP     SystemBefehl )                             
c                   Eval      Befehl 'VRYCFG cfgobj(MyLtg) ' +           
c                                      'CFGTYPE(*LIN)        ' +           
c                                      'STATUS(*ON )         '             
c                   CallP     SystemBefehl )                             
c                   EndIF                                                  
c                                                                          
c                   read      x_status                                     
c                   enddo                                                  
c                   close     x_status                                     
c                   
endif                                                  
c                                                                          
c                   
Eval      *InLr  =  True 
und das cl was aufgerufen wird
PHP-Code:
pgm                                             
                                                
  monmsg cpf0000                                
                                                
    dltf qtemp
/x_status                         
                                                
    wrkcfgsts 
*lin MyLtg *print                   
                                                
    
crtpf qtemp/x_status rcdlen(132)            
                                                
    
cpysplf qsysprt qtemp/x_status splnbr(*last)
                                                
    
dltsplf qsysprt splnbr(*last)               
                                                
endpgm 
habe das jetzt in der form nicht getestet. in abgewandelter form läuft es aber bei mir. ich prüfe eine leitung ab die aktive ist

Ich hoffe ich konnte dir etwas helfen

tschau ronald