Page 1 of 1

Spool to a dataset

PostPosted: Thu Apr 03, 2008 7:43 pm
by sankar.guna
hi all,

I have a job , which gets some data from some files and display it in the spool in the first step(using a cobol program).

i want the data displayed in the spool to get stored in a dataset.Can i do this in the second step, without changing the program in the first step.
Thanks a lot
_________________
Sankaranarayanan.G

Re: Spool to a dataset

PostPosted: Thu Apr 03, 2008 7:46 pm
by arunprasad.k
without changing the program in the first step


May I know why you dont want to change the exisiting program??

Re: Spool to a dataset

PostPosted: Thu Apr 03, 2008 9:16 pm
by CICS Guy
Take a look at Lionel B. Dyck's SDSFEXT - A generalized SDSF batch (or TSO) tool to extract a report into a dataset, it should do exactly what you want.....
Or change the first step to a dataset and add a second step to display it in the sysout......

Re: Spool to a dataset

PostPosted: Fri Apr 04, 2008 2:05 am
by dick scherrer
Hello,

You could also change the display sysout to a file and then copy that file into the spool if there really is a reason for it to be in the spool. There would be no need to change the program at all - just a minor jcl change.

Re: Spool to a dataset

PostPosted: Sun Mar 09, 2014 8:07 pm
by ramu65
I want to copy specific information from spool to dataset.

1.When a program ends in error,I want only the error code and the step where error occured to be copied from spool to dataset...

2.When a program is successful,I want only the successful execution message to be copied from spool to dataset

please provide some hints to achieve the same

Re: Spool to a dataset

PostPosted: Sun Mar 09, 2014 9:36 pm
by steve-myers
dick scherrer wrote:Hello,

You could also change the display sysout to a file and then copy that file into the spool if there really is a reason for it to be in the spool. There would be no need to change the program at all - just a minor jcl change.
Dick - Most of the time this will work fine, but not always.

There will be a problem in two situations.
  • A program that, in one step, opens a data set, closes the data set, and repeats this foolishness several times. If the JCL specifies DISP=OLD or DISP=NEW, data management will overwrite the data set each time the data set is opened. On the other hand, if the data set is routed to SYSOUT, JES will extend the data set each time it is opened, as though the JCL specified DISP=MOD. I believe this has been reported several times in this forum.
  • There may be performance issues if the data set cannot be blocked. This is not an issue if the data set is a SYSOUT data set, since JES automatically blocks the data.