Andrei Kaliachka
Andrei Kaliachka

Reputation: 35

Limited sdsf info via rexx

I wrote this code, which write info from SDSF into file (like option S). So, my question, may I write not all information (JESMSGLG, JESJCL, JESYSMSG.._ from SDSF? I need only DVGLOG DDNAME

parse upper arg prefix owner hiqual                        
rc=isfcalls("on")                                          
isfprefix = prefix                                         
isfowner  = owner                                          
ADDRESS SDSF "ISFEXEC ST"                                  

do ix=1 to JNAME.0                                         
    do until isfnextlinetoken=''                           
        ADDRESS SDSF "ISFBROWSE ST TOKEN('"token.ix"')"    
        say token.ix                                       
        isfstartlinetoken = isfnextlinetoken               
    end                                                    

DSN = userid()||'.'||JNAME.IX||'.'||JOBID.IX               

ADDRESS TSO                                                
 "ALLOC DA('"DSN"') F(DATA3)                              
  LIKE('userid.TEMP2') NEW"                                
  "EXECIO * DISKW DATA3 (STEM isfline."                    
  "EXECIO 0 DISKR DATA3 (FINIS"                            
  "FREE FI(DATA3)"                                         
drop isfline.                                              
end                                                        

rc=isfcalls("off")                                         
exit                                                       

Upvotes: 1

Views: 986

Answers (1)

Steve Ives
Steve Ives

Reputation: 8134

Here's some code that might help. It's for z/OS V1 (and I think you're on V2) so it doesn't use ISFBROWSE. It uses the ISFCOL var to restrict the columns returned.

The exec will list all the jobname and owner (SDSF vars JNAME and OWNERID) for all jobs on the JES2 queue.

/* REXX */                                                    
rc=isfcalls('ON')                                             
     /* Access the ST panel */                                
Address SDSF "ISFEXEC ST"                                     
ISFCOLS = 'JNAME OWNERID'                                     
if rc<>0 then                                                 
  Exit rc                                                     
     /* Get fixed field name from first word */               
     /* of isfcols special variable          */               
fixedField = word(isfcols,1)                                  
Say "Number of rows returned:" isfrows                        
       /* Process all rows */                                 
do ix=1 to isfrows                                            
  Say "Now processing job:" value(fixedField"."ix)            
          /* List all columns for row */                      
  do jx=1 to words(isfcols)                                   
    col = word(isfcols,jx)                                    
    Say "  Column" col"."ix "has the value:" value(col"."ix)  
  end                                                         
end                                                           
rc=isfcalls('OFF')                                            
exit   

I didn't modify it to test its retrieval of the DDNAME - for that, I think you'll have to issue the ? command against each piece of output. I wasn't sure what you meant by DVGLOG, but that's not a field that i can find in my version of SDSF.

Upvotes: 2

Related Questions