Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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
This topic is locked: you cannot edit posts or make replies. 00D3003B - time outs in DB2 when invo... chavinash2004 DB2 2 Mon Oct 09, 2017 4:39 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us