Page 1 of 1

Sending o/p file's content to spool withot adding extra step

PostPosted: Tue Jan 12, 2021 6:51 pm
by Misha786
Hi -
We currently have a processing and error report that is sent to a file:

//XSOCF DD DSN=JIUP.U00P.JIUA910A,
// DISP=(,CATLG,DELETE),
// DCB=(DSORG=PS,BLKSIZE=0,LRECL=133,RECFM=FB),
// SPACE=(TRK,(200,100),RLSE)
I don’t want to keep the report file if the job abends and that is how it is coded above. But I would like to see it in Spool. I know I can add change the DISP and add extra steps, but I would like to keep it all in the same step. We have many jobs that handle the file the same way, so I’m looking for an easy way to do this without adding extra steps. The reason is, when the failed job is cleaned up from spool and placed in a separate tool for future reference, we would be able to see what the o/p files contained in it. Any suggestion would help please.

Re: Sending o/p file's content to spool withot adding extra

PostPosted: Tue Jan 12, 2021 8:20 pm
by sergeyken
The dataset cannot be just re-routed to the spool without any change to the existing jobs.

In that case, adding extra JCL step would be the easiest way to reach this goal.

Other solutions are possible, but would require much more (10-100 times more) efforts.

Re: Sending o/p file's content to spool withot adding extra

PostPosted: Tue Jan 12, 2021 8:51 pm
by Misha786
Hi Sergeyken -
Thanks for for your thoughts. Would you please provide an idea what would be the approach (even if it is 10 times more effort ) to achieve this goal without adding an extra step. Thanks !!

Re: Sending o/p file's content to spool withot adding extra

PostPosted: Tue Jan 12, 2021 9:48 pm
by NicC
Simply IEBGENER, or other utility of your choice, the dataset (not a file) to spool.
If you do not want to do that then you would have to change the program to write to another DD name and have that pointed to the spool. If that is outside the capabilities then run a separate job after to copy the dataset.

Re: Sending o/p file's content to spool withot adding extra

PostPosted: Tue Jan 12, 2021 11:28 pm
by sergeyken
Misha786 wrote:Hi Sergeyken -
Thanks for for your thoughts. Would you please provide an idea what would be the approach (even if it is 10 times more effort ) to achieve this goal without adding an extra step. Thanks !!

Any other approach would require a sort of “interception” of data being stored into this “regular” dataset, which needs to be done “outside” of the job itself. There is nothing else except real headache, and unneeded interaction with zOS internals, or other gimmicky tricks.
If you need to hammer a nail, use a hammer, but do not invent a GPS-controlled flying copter with artificial intelligence.