IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

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: 2432
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

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts FILE STATUS - 39 ON VARIABLE LENGTH V... COBOL Programming 1
No new posts COBOL VS SORT Utility for file format... COBOL Programming 6
No new posts How to find which file contains my se... DFSORT/ICETOOL 6
No new posts Need to split single line into two li... DFSORT/ICETOOL 7
No new posts IGZ0035S THERE WAS AN UNSUCCESSFUL OP... COBOL Programming 3

Back to Top