> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of Thomas Berg
> Sent: Monday, February 27, 2012 5:19 AM
> To: IBM-MAIN@bama.ua.edu
> Subject: Duplicating SYSOUT output to another DD/DSN in 
> realtime ? (JCL)
> 
> Is there any possibility to duplicate the output to SYSOUT to 
> another Ddname/DSname in realtime ?
> I want to follow the execution by inspecting the output but 
> at the same time save it for processing in a following step.
> Preferably by JCL means.
> 
> 
> 
> Regards,
> Thomas Berg

Of course, change your program to write the record once to each DD. Oh, you 
want a "system" level function to do it for you? You didn't say that! <grin>

To the best of my knowledge, z/OS does not come with this functionality. You 
basically want the equivalent of the UNIX "tee" command.

However, there is a possible "work around", if you are open to new 
functionality and are writing TEXT data (no binary "garbage"). Instead of 
writing to a sequential output dataset, allocate a UNIX file to your output DD.

//ddname DD PATH='/some/path/file',
// FILEDATA=TEXT,PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
//         PATHDISP=(KEEP,KEEP),
//         PATHMODE=(SIRWXU,SIRGRP,SIROTH),
// RECFM=??,LRECL=??,BLKSIZE=??

Now, the OWRONLY says "output". "OCREAT" says create it if it doesn't exist, 
but reuse it if it already exists. "OTRUNC" says to truncate the existing 
records (like VSAM REUSE) if the file already exists. In the reading step, 
replace those three with a single ORDONLY to indicate "read". You can use 
IEBGENER to copy the data to a sequential dataset, if you need to.

The plus is that z/OS does not do enqueues on UNIX file names like it does on 
sequential datasets. So you can "browse" the file using ISPF if you want to. If 
you are a UNIX shell user, you can use the "tail" command with the "-f" option. 
This makes the tail command "follow" the file and print new records to your 
UNIX shell every two seconds.


I havent' tried this, but if might be possible to create the dataset in a 
separate job, and then write to it in this job with a DISP=SHR. You could then 
browse the dataset as the job runs.


Don't know when or if this will hit the list. We're having Internet 
connectivity problems right now.

--
John McKown 
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * 
john.mck...@healthmarkets.com * www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM

 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

Reply via email to