SYSOUT sent to 2 destination



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

SYSOUT sent to 2 destination

Postby arshadhrashid » Wed Feb 01, 2012 4:05 am

Hi
Can a Jobs's output sysout be sent to 2 different destinations?
For example In a JCL, in Job card if MSGCLASS=J (Sends it to JHS system)
and
//SYSPRINT DD SYSOUT=*
Directs the output to MSGCLSS.

I would like to know if I can send my job's output to my message class and also to a DATASET.

Thansk
arshadhrashid
 
Posts: 70
Joined: Tue Jul 28, 2009 5:03 am
Has thanked: 0 time
Been thanked: 0 time

Re: SYSOUT sent to 2 destination

Postby BillyBoyo » Wed Feb 01, 2012 5:31 am

No, because you can't specify DSN= and SYSOUT= on the same DD statement.

You could print your dataset to SYSOUT= in a later step, or pick up the spool file from the SYSOUT and copy it to a dataset in a later step.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: SYSOUT sent to 2 destination

Postby arshadhrashid » Wed Feb 01, 2012 5:45 am

Thanks for your reply.
But I would appraqcite if you give me an example on how to print sysout or pick up spool file in alter step?
arshadhrashid
 
Posts: 70
Joined: Tue Jul 28, 2009 5:03 am
Has thanked: 0 time
Been thanked: 0 time

Re: SYSOUT sent to 2 destination

Postby BillyBoyo » Wed Feb 01, 2012 6:41 am

If you have written to a dataset, read the dataset and print the data.

If you want to copy the print output from the spool, what are you using to look at spool datasets? Look at documentation/use google to see how to do that.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: SYSOUT sent to 2 destination

Postby steve-myers » Wed Feb 01, 2012 7:22 am

BillyBoyo wrote:... or pick up the spool file from the SYSOUT and copy it to a dataset in a later step.

Unfortunately Billyboyo is oversimplifying this concept. There is no standard JCL to perform this task.

Nor is it generally possible to route a single output stream to both a dataset and SYSOUT. The usual way to do this is to create a disk dataset, and then "print" the dataset using a copy tool such as IEBGENER or your installation's sort product.

You can use the // OUTPUT JCL statement and the OUTPUT parameter on DD statements that specify SYSOUT=class. This include MSGCLASS output. This is discussed in detail in the JCL reference manual for your release, and I won't attempt to summarized a complex setup, especially since we do not know your site's standards. You can use // OUTPUT and the OUTPUT parameter to route output for a single DD statements to several destinations, with several forms and output classes. Again, I refer you to the JCL reference manual for details.

We can attempt to clarify particular issues, but we cannot provide intelligent tutorials for setups that can be both complex and very site dependent.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: SYSOUT sent to 2 destination

Postby arshadhrashid » Thu Feb 02, 2012 2:47 am

Thanks Steve and Billy,
As per your suggestion I checked the JCL manuial and I could write the following JCL.
The JCL works and my output goes to the given dataset and also to the SystemWare's JHS (Job history System, MSGCLASS=J)
But in JHS I dont have the output of the command that was the result of my SYSIN card.
Any idea? - Thanks

//ARSDBCHK JOB (H00000210,22),'DBA',CLASS=A,MSGCLASS=J
//STEP01 EXEC PGM=IKJEFT01
//STEPLIB DD DSN=HLQ.DB2.V9R1M0.SDSNLOAD,DISP=SHR
// DD DSN=HLQ.DB2.V9R1M0.RUNLIB.LOAD,DISP=SHR
//SYSTSPRT DD DSN=HLQ.KA.DISPDB.OUTPUT,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=1024,BLKSIZE=0),
// SPACE=(CYL,(5,5),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSIN DD *
//OUT1 OUTPUT CLASS=J
//OUT2 OUTPUT CLASS=X
//DD1 DD SYSOUT=*,OUTPUT=(*.OUT1,*.OUT2)
DSN SYSTEM(XDX)
-DISPLAY DATABASE (DB001) LIMIT(*)
arshadhrashid
 
Posts: 70
Joined: Tue Jul 28, 2009 5:03 am
Has thanked: 0 time
Been thanked: 0 time

Re: SYSOUT sent to 2 destination

Postby NicC » Thu Feb 02, 2012 3:39 am

Did you look at other 'print' DDnames e.g. SYSPRINT to see if the output is there?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: SYSOUT sent to 2 destination

Postby arshadhrashid » Thu Feb 02, 2012 9:42 pm

The job has created only the following 3 DDs
JESMSGLG,
JESJCL ,
JESYSMSG,

They dont contain the output,
arshadhrashid
 
Posts: 70
Joined: Tue Jul 28, 2009 5:03 am
Has thanked: 0 time
Been thanked: 0 time

Re: SYSOUT sent to 2 destination

Postby Peter_Mann » Thu Feb 02, 2012 10:31 pm

I don't believe IKJEFT01 will write output to SYSPRINT, all output returned from SYSTSIN will be returned to SYSTSPRT whick is where you've written to a dataset, that's why Steve and others have given some suggetions to write the output to a dataset then use IEBGENER to copy to the SYSOUT
Peter
Peter_Mann
 
Posts: 145
Joined: Fri Jun 24, 2011 7:37 pm
Location: Lowell,AR
Has thanked: 15 times
Been thanked: 3 times

Re: SYSOUT sent to 2 destination

Postby steve-myers » Fri Feb 03, 2012 1:00 am

arshadhrashid wrote:The job has created only the following 3 DDs
JESMSGLG,
JESJCL ,
JESYSMSG,

They dont contain the output,
Those datasets are not created by DD statements; they are system datasets created by JESx. The JESMSGLG dataset is usually call the JES2 job log dataset; it contains the messages sent to the operator console for your job. The JESJCL dataset shows your JCL with some error messages. The JESYSMSG dataset shows more error messages as well as the job scheduler status messages from when your job was run.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post