Browse job output with ISFBROWSE

From the ST panel, for each job with the name RJONES, use the ISFBROWSE command to display the output. Use the isflinelim variable to limit the number of REXX variables returned by SDSF. Set the isfstartlinetoken variable to the returned value isfnextlinetoken, to allow the browse to continue with the next line in the display.

/* REXX */                                                                      
rc=isfcalls("on")                                                               
     /*************************/                                                
     /* Access the ST display */                                                
     /*************************/                                                
Address SDSF "ISFEXEC ST"                                                       
lrc=rc                                                                          
call msgrtn                                                                     
if lrc<>0 then                                                                  
  exit 20                                                                       
     /****************************/                                             
     /* Loop for all RJONES jobs */                                             
     /****************************/                                             
do ix=1 to JNAME.0                                                              
  if JNAME.ix = "RJONES" then                                                   
    do                                                                          
      isflinelim = 500                                                          
      do until isfnextlinetoken=''                                              
        Address SDSF "ISFBROWSE ST TOKEN('"token.ix"')"                         
        if rc>4 then                                                            
          do                                                                    
            call msgrtn                                                         
            exit 20                                                             
          end                                                                   
            /****************************/                                      
            /* Loop through the lines   */                                      
            /****************************/                                      
        do jx=1 to isfline.0                                                    
         say isfline.jx                                                         
        end                                                                     
            /*****************************/                                     
            /* Set start for next browse */                                     
            /*****************************/                                     
        isfstartlinetoken = isfnextlinetoken                                    
      end                                                                       
    end                                                                         
end                                                                             
rc=isfcalls("off")                                                              
exit                                                                            
     /*************************************/                                    
     /* Subroutine to list error messages */                                    
     /*************************************/                                    
msgrtn: procedure expose isfmsg isfmsg2.                                        
     /************************************************/                         
     /* The isfmsg variable contains a short message */                         
     /************************************************/                         
if isfmsg<>"" then                                                              
  Say "isfmsg is:" isfmsg                                                       
     /****************************************************/                     
     /* The isfmsg2 stem contains additional messages    */                     
     /****************************************************/                     
do ix=1 to isfmsg2.0                                                            
  Say "isfmsg2."ix "is:" isfmsg2.ix                                             
end                                                                             
return