1

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                                                       
  • Can you post your actual code into the question, rather then a screen shot? It would make it much easier for us to copy your code and to test it. – Steve Ives Jun 10 '16 at 08:57
  • What is the point of this exec? Is it to write all output for the specified prefix and owner to a flat file? – Steve Ives Jun 10 '16 at 09:23
  • I update my que with a code. I write all output to stem and then write stem to file, with this params: Management class . . : UMMB5U64 Allocated cylinders : 100 Storage class . . . : NNMN Allocated extents . : 1 Volume serial . . . : HADAZ6 Device type . . . . : 3390 Data class . . . . . : DEFAULT Organization . . . : PS Record format . . . : FB Record length . . . : 133 Block size . . . . : 27930 1st extent cylinders: 100 Secondary cylinders : 10 – Andrei Kaliachka Jun 10 '16 at 09:55
  • Andrei - thanks for the update. OK - I can't test this as I think it needs z/OS V2. However, if your code works, and one of the lines returned is the SDSF ST header record, then your could parse this for the fields you are interested in and work out which column this equates to. Then parse the actual job output, taking one columns. – Steve Ives Jun 10 '16 at 10:05

1 Answers1

2

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.

Steve Ives
  • 7,894
  • 3
  • 24
  • 55