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

Can we route the same output to 2 different destinations


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Wed May 03, 2006 4:15 am
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
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 Developer


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

PostPosted: Wed May 03, 2006 5:36 am
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: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Wed May 03, 2006 5:50 am
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
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
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
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
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
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
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: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Sat May 13, 2006 3:00 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts Reroute print output via REXX/SDSF TSO/ISPF 6
No new posts Concatenate 2 input datasets and give... JCL & VSAM 2
No new posts How to turn off 'ACTION' SDSF output ... TSO/ISPF 2
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
Search our Forums:

Back to Top