View previous topic :: View next topic
|
Author |
Message |
Ramya A
Active User
Joined: 26 Jul 2004 Posts: 104
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
Ramya A
Active User
Joined: 26 Jul 2004 Posts: 104
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
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 |
|
|
pbgunasekar
New User
Joined: 28 May 2005 Posts: 26 Location: Chennai
|
|
|
|
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 |
|
|
Bharanidharan
New User
Joined: 20 Jun 2005 Posts: 86 Location: Chennai, India
|
|
|
|
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 |
|
|
Ramya A
Active User
Joined: 26 Jul 2004 Posts: 104
|
|
|
|
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 |
|
|
r2k1984
New User
Joined: 21 Jun 2005 Posts: 69 Location: chennai
|
|
|
|
like use the concatenation of datasets so that it may work.
out dd dsn= outfile ,
dd dsn=ioutfile2; |
|
Back to top |
|
|
zoobink
New User
Joined: 09 May 2006 Posts: 3
|
|
|
|
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 |
|
|
IQofaGerbil
Active User
Joined: 05 May 2006 Posts: 183 Location: Scotland
|
|
|
|
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 |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
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 |
|
|
morrisjmm
New User
Joined: 15 May 2006 Posts: 3 Location: Pennsylvania, USA
|
|
|
|
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)
|
|
Back to top |
|
|
|