IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SDSF multiple spool datasets extracted to a single file.


IBM Mainframe Forums -> CLIST & REXX
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
PJAlarcon

New User


Joined: 30 Jun 2010
Posts: 1
Location: Córdoba, Argentina

PostPosted: Fri Apr 21, 2017 10:50 pm
Reply with quote

Hi,
I'm trying to extract the same spool dataset from several job executions but not getting the desired result, I'm just getting one spool dataset in my output.
The MYJOB job runs 50 times a day, and this job has a spool called OUTPUT, here's my code.
Code:
rc=isfcalls("ON")                                                       
isfcols2="JNAME STEPN DATEE TIMEE"                                     
isfsort="JNAME A DATEE A TIMEE A"                                       
isffilter="DATEE EQ 2017.110"                                           
ISFPRTDDNAME = OUTF                                                     
ADDRESS SDSF "ISFEXEC ST MYJOB (ALTERNATE DELAYED)"                 
IF rc<>0 THEN CALL msgrtn                                               
SAY "No of jobs "||JNAME.0                                             
IF jname.0 > 0 THEN DO                                                 
  DO j=1 TO JNAME.0                                               
    /* get spool list for selected job */                               
    ADDRESS SDSF "ISFACT ST TOKEN('"TOKEN.j"') PARM(NP ?) (PREFIX JDS_)"
    IF rc<>0 THEN CALL msgrtn                                           
    /* OUTPUT spool dataset is number 21 */                                   
    js=21                                                               
    IF j < JNAME.0 THEN                                               
      ADDRESS SDSF "ISFACT ST TOKEN('"JDS_TOKEN.js"') PARM(NP XF)"   
    ELSE                                                             
      ADDRESS SDSF "ISFACT ST TOKEN('"JDS_TOKEN.js"') PARM(NP XFC)"
  END /* MAIN LOOP */                                                 
END                                                                   
rc=isfcalls('OFF')                                                   
EXIT                                                                 

I also tried
Code:
SELECT                                                         
  WHEN j = 1 THEN                                               
    DO                                                         
    SAY j||". XF"                                               
    ADDRESS SDSF "ISFACT ST TOKEN('"JDS_TOKEN.js"') PARM(NP XF)"
    END                                                         
  WHEN j = 3 THEN /*JNAME.0 THEN*/                             
    DO                                                         
    SAY j||". XC"                                               
    ADDRESS SDSF "ISFACT ST TOKEN('"JDS_TOKEN.js"') PARM(NP XC)"
    END                                                         
  OTHERWISE                                                     
    DO                                                         
    SAY j||". XF"                                               
    ADDRESS SDSF "ISFACT ST TOKEN('"JDS_TOKEN.js"') PARM(NP X)"
    END                                                         
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Sat Apr 22, 2017 1:43 am
Reply with quote

Topic locked - already on beginners forum
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top