IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Print and send to file at the same time


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ovreddy

Active User


Joined: 06 Dec 2004
Posts: 211
Location: Keane Inc., Minneapolis USA.

PostPosted: Wed Aug 01, 2007 4:14 pm
Reply with quote

Hi,

I have a program which is printing the report to our output class (SAR). Now I need to write the same report to a file, how I can do this in JCL without changing the program.

The JCL looks like...
//STE010 EXEC PGM=PGM0001
//DD1 DSN=TEST.INPUT,DISP=SHR
//REPORT1 SYSOUT=T --- T is a predefined output class

The program is currently writing to REPORT1. I need to write the same to a file. I have to do this in a single step.

Thanks,
Reddy
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Aug 01, 2007 4:50 pm
Reply with quote

Generally, initially output to your new dataset and then use something like IEBGENER to print it to sysout from the dataset.
Sorry, you will need an additional step.....
Back to top
View user's profile Send private message
ovreddy

Active User


Joined: 06 Dec 2004
Posts: 211
Location: Keane Inc., Minneapolis USA.

PostPosted: Wed Aug 01, 2007 4:53 pm
Reply with quote

Hi William,

The output REPORT1 DD name is already setup in SAR. So I cannot change the step or dd name. This leads to a big change in SAR setup. I need to do it in one step.

Thanks,
Reddy
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 01, 2007 5:01 pm
Reply with quote

Previously discussed, can not be accomplished in the same step.

Either write to dataset and then print in next step - - or - -

Trap output using SDSF and copy to dataset.

Option 1 much easier
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Aug 01, 2007 6:18 pm
Reply with quote

Thanks, I'd forgotten about that option......
Lionel B. Dyck has a great little tool: SDFSEXT, A generalized SDSF batch (or TSO) tool to extract a report into a dataset that could (it does require an extra step) do what you need.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Aug 02, 2007 12:05 pm
Reply with quote

ovreddy wrote:
Now I need to write the same report to a file

& at the same time you want the file in SYSOUT as well ? Is this what you are asking?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top