0

I wanted to print my job spool automatically(using a job scheduler) using a JCL. I was able to do that by executing the SDSF program and passing my SDSF commands in ISFIN. I was able to pass the Jobname and print into a specific file, but how do I pull the jobname specific to a particular LPAR.. Our MVS systems, has 2 LPARs running, so its possible we will be having the same jobname running in LPR1 and LPR2. And everytime I submit this job, it always prints the LPAR1 job spool but not the LPR2 job spool.

STRTASK1 S0103545 DB2TSK     15           4 EXECUTION             LPR1 
STRTASK1 S0087680 DB2TSK     15          88 EXECUTION             LPR2

         //SDSF     EXEC PGM=SDSF                                
         //ISFOUT   DD  SYSOUT=*                                 
         //*FILEOUT  DD  SYSOUT=*                                
         //ISFIN    DD  *                                        
         ST                                                      
         S STRTASK2
         FIND STRTASK2                                            
         ++S                                                     
         PRINT FILE FILEOUT                                      
         PRINT                                                   
         PRINT CLOSE         

I even tried adding SYSNAME LPR1/2 in the above ISFIN commands, but it did not help.. Anyone has any suggestions.. Thanks in advance.

1 Answers1

0

It appears SYSNAME does not work with the SDSF status panel. I suggest you try the FILTER command. Perhaps...

     ST                                                      
     S STRTASK2
     FILTER +SYSN LPR1
     FIND STRTASK2                                            
     ++S                                                     
     RESET
     PRINT FILE FILEOUT                                      
     PRINT                                                   
     PRINT CLOSE
     FILTER +SYSN LPR2
     FIND STRTASK2                                            
     ++S
     RESET
     PRINT FILE FILEOUT                                      
     PRINT                                                   
     PRINT CLOSE

...is what you're looking for. There may be messages in ISFOUT that point to the specific problem.

The documentation for SDSF in batch does mention that Rexx is the preferred method, rather than the above extension of what you tried initially. Maybe you should pursue that route.

cschneid
  • 10,237
  • 1
  • 28
  • 39
  • I tried this but did not help.. Is there something I am missing ? `ST S STRTASK2 FILTER +SYSN LPR1 FIND STRTASK2 ++S PRINT FILE FILEOUT PRINT PRINT CLOSE ` – Jeeva nandham Dec 15 '19 at 05:21
  • 1
    "did not help" does not help - what is the specific problem and error messages (if any)? – NicC Dec 16 '19 at 11:16
  • There are no error messages, the jobs runs with macc 0000. But the expectation is, the FILTER statement should have filtered the STRTASK2 job only under the LPR2 but it always goes to LPR1 .. – Jeeva nandham Dec 16 '19 at 19:18