Page 1 of 2

How to print spool data to a dataset using a JCL

PostPosted: Mon Sep 24, 2012 5:15 pm
by ankushgattani
I want to print the spool (SDSF) data to a dataset using JCL.
I know it can be done using XDC, wanted to know if there is any UTILITY for this, which can be used in a JCL.

Re: How to print spool data to a dataset using a JCL

PostPosted: Mon Sep 24, 2012 5:19 pm
by enrico-sorichetti
when You run <the> program which creates the <report> instead of using
//<ddname>  DD SYSOUT=<sysoutclass>

use
//<ddname>  DD DSN=<datasetname>,
//             DISP=(<disposition>),
//             all the other appropriate dataset parameters   

Re: How to print spool data to a dataset using a JCL

PostPosted: Mon Sep 24, 2012 8:51 pm
by steve-myers
ankushgattani wrote:I want to print the spool (SDSF) data to a dataset using JCL.
I know it can be done using XDC, wanted to know if there is any UTILITY for this, which can be used in a JCL.
The problem here is it is not clear whether the intent is to reprint data already in the JESx SPOOL, or to route data to both a dataset and the JESx SPOOL.
  • It is possible to run SDSF in batch and execute SDSF commands to "print" SPOOL data to a dataset. I've never done this, but others have.
  • There is no simple JCL to send a dataset to both a dataset and to the JESx SPOOL. When this is a requirement, you can use JCL like this
    //        EXEC PGM=yourprogram,...
    //ddname   DD  DISP=(,CATLG),...,DSN=yourdataset
               ....
    //        EXEC PGM=IEBGENER or your favorite copy program
    //SYSPRINT DD  SYSOUT=*
    //SYSUT1   DD  DISP=OLD,DSN=yourdataset
    //SYSUT2   DD  SYSOUT=*
    //SYSIN    DD  DUMMY 
If neither of these solutions appeal to you you can fall back to your XDC solution.

Re: How to print spool data to a dataset using a JCL

PostPosted: Tue Sep 25, 2012 12:20 pm
by ankushgattani
Sorry, I was not clear in my first post.
I want to Re-print data already in JESx SPOOL for any job, which has already executed and present in SPOOL in PRINT QUEUE.
Input of this will be JOBID/JOBNAME.
Output will be a dataset containing all the SPOOL data for the given JOBID/JOBNAME ( my actual requirement is to print the SPOOL data only for some specific step of the job, but even the complete SPOOL data will do).
Thanks

Re: How to print spool data to a dataset using a JCL

PostPosted: Tue Sep 25, 2012 3:43 pm
by NicC
You can run SDSF in batch via a Rexx interface. Don't ask me how - search. Many people have posted with problems they have had so you should get an idea of how to go about it just from the forums. And that is before starting in on the manuals.

Re: How to print spool data to a dataset using a JCL

PostPosted: Tue Sep 25, 2012 5:10 pm
by ankushgattani
Thanks. Got it :)

Re: How to print spool data to a dataset using a JCL

PostPosted: Tue Sep 25, 2012 9:48 pm
by enrico-sorichetti
for working snippets of the REXX/SDSF interface see here
http://ibmmainframes.com/about54926.html

Re: How to print spool data to a dataset using a JCL

PostPosted: Sat Mar 08, 2014 9:31 pm
by ramu65
deleted - attempt to hijack the thread as per Blackthorn's post immediately below

Re: How to print spool data to a dataset using a JCL

PostPosted: Mon Mar 10, 2014 8:50 pm
by Blackthorn
Isn't this the same question that you have posted in the "Other IBM Tools" forum ?

Re: How to print spool data to a dataset using a JCL

PostPosted: Mon Mar 10, 2014 9:35 pm
by NicC
ramu65 - DO NOT hijack other people's topics. It does not matter if it is identical to yours - either follow the topic or start your own. I am deleting your post in this topic.