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
 

 

Can we route the same output to 2 different destinations

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Wed May 03, 2006 4:02 am    Post subject: Can we route the same output to 2 different destinations
Reply with quote

Hi,

Is there any way in JCL to route a output (Say a report) to 2 different destinations like one to dataset and another to SYSOUT through a single step (Regardless of the program / utility that is executed in that step)? I tried to concatenate the two destinations in one DDName but that didn't work.

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

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed May 03, 2006 4:15 am    Post subject:
Reply with quote

If your "rules" don't disallow it, you could use a DFSORT step like this:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...   input file
//OUT1 DD DSN=...   output file (data set)
//OUT2 DD SYSOUT=*  output file (SYSOUT)
//SYSIN DD *
   OPTION COPY
   OUTFIL FNAMES=(OUT1,OUT2)
/*
Back to top
View user's profile Send private message
Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Wed May 03, 2006 5:09 am    Post subject:
Reply with quote

Thanks Frank,

But my requirement is actually different. I need to route the output to 2 different outputs in the same step where it is been created and this step may not be SORT necessarily (I'm dealing with some 10 to 15 jobs here).

Let me explain directly what I'm looking for:

I have few jobs where the output is directly routed to SYSOUT from the step where it is created and the SYSOUT is stepname and DDNAME dependant. Now, we need to take a copy of the output in a dataset as well as send it to the SYSOUT (But SYSOUT should be only from the same step and DD name).

I figure this is pretty complex, but if I could get some solution, that would be great.

Thanks,
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed May 03, 2006 5:36 am    Post subject:
Reply with quote

Well, that's what I figured you were asking for, but I thought I'd take a shot just in case. I can't help you with that. Maybe somebody else can.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 247
Location: Cincinnati OH USA

PostPosted: Wed May 03, 2006 5:50 am    Post subject:
Reply with quote

that's why most sites use a report processor like CA-Dispatch or TRMS


you can direct a single sysout to be printed to multiple locations/maildrops with appropriate cover pages and bundling with other reports as well as archival
Back to top
View user's profile Send private message
pbgunasekar

New User


Joined: 28 May 2005
Posts: 26
Location: Chennai

PostPosted: Wed May 03, 2006 9:21 am    Post subject: Re: Can we route the same output to 2 different destinations
Reply with quote

hi,
we can use display in COBOL before writting to file to write in SYSOUT.

Let me know if i am wrong.

regards,
guna
Back to top
View user's profile Send private message
Bharanidharan

New User


Joined: 20 Jun 2005
Posts: 86
Location: Chennai, India

PostPosted: Wed May 03, 2006 1:29 pm    Post subject: Re: Can we route the same output to 2 different destinations
Reply with quote

Do you have any report exporting/processing utilities? We use XPTR for this purpose, where we could define the bundles and the locations to which your report must be routed.
Back to top
View user's profile Send private message
Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Wed May 03, 2006 5:48 pm    Post subject: Re: Can we route the same output to 2 different destinations
Reply with quote

Thanks for all your responses.

We are using a reporting system too. But the problem is, we don't have any way to send the report to the reporting system and a dataset. What we are trying to do here is we want to take a back up of the report that is sent to our reporting system.
Back to top
View user's profile Send private message
r2k1984

New User


Joined: 21 Jun 2005
Posts: 69
Location: chennai

PostPosted: Thu May 04, 2006 4:10 pm    Post subject: try this
Reply with quote

like use the concatenation of datasets so that it may work.


out dd dsn= outfile ,
dd dsn=ioutfile2;
Back to top
View user's profile Send private message
zoobink

New User


Joined: 09 May 2006
Posts: 3

PostPosted: Fri May 12, 2006 9:09 am    Post subject: Re: try this
Reply with quote

r2k1984 wrote:
like use the concatenation of datasets so that it may work.


out dd dsn= outfile ,
dd dsn=ioutfile2;


Concatenating Data Sets:
You can logically connect or concatenate sequential or partitioned (PDSs or
PDSEs) input data sets for the duration of a job step. Each of the concatenated data sets can reside on a different volume. For details on concatenating data sets, see OS/390 DFSMS: Using Data Sets. Note that you cannot concatenate output data sets.
Back to top
View user's profile Send private message
IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Fri May 12, 2006 2:36 pm    Post subject: Re: Can we route the same output to 2 different destinations
Reply with quote

Starting from the beginning again.
Can you explain why this backup MUST be done in the same step that the report is created.

How difficult is is to add another step such as Frank showed above?

I have created hundereds of jobs in the past where a backup copy is taken, all I have ever done is add a backup step in the job.

Your alternative would then be to change your report program to write to two output files each time, that would give you the desired effect!
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 247
Location: Cincinnati OH USA

PostPosted: Sat May 13, 2006 3:00 am    Post subject:
Reply with quote

Your reporting system should be the backup in addition to getting the report printed.

Otherwise, direct the original report to a dataset and add a subsequent step that prints the dataset.
Back to top
View user's profile Send private message
morrisjmm

New User


Joined: 15 May 2006
Posts: 3
Location: Pennsylvania, USA

PostPosted: Mon May 15, 2006 1:21 am    Post subject: Re: Can we route the same output to 2 different destinations
Reply with quote

Sure you can, keep in mind that RMT1 and RMT2 has to be defined in your JES destination parameters.

//MYJOB EXEC PGM=MYPGM
//COPY1 OUTPUT DEST=RMT1,CLASS=A
//COPY1 OUTPUT DEST=RMT2.CLASS=A
//REPORT DD SYSOUT=(,),OUTPUT=(*.COPY1,*.COPY2)


icon_razz.gif
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 How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts JES2 doesn't honor the priority of th... Aron Lendvai JCL & VSAM 7 Thu Jun 29, 2017 1:41 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am


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