Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Print and send to file at the same time

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Print and send to file at the same time
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: 3158
Location: Tucson AZ

PostPosted: Wed Aug 01, 2007 4:50 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 01, 2007 5:01 pm    Post subject:
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: 3158
Location: Tucson AZ

PostPosted: Wed Aug 01, 2007 6:18 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Aug 02, 2007 12:05 pm    Post subject: Re: Print and send to file at the same time
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us