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

How can output of SYSOUT moved to some other dataset?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
santhoshm

New User


Joined: 13 Jun 2007
Posts: 32
Location: chennai

PostPosted: Wed Jun 13, 2007 11:43 am
Reply with quote

How can output of SYSOUT moved to some other dataset?

I am writing the sample code here.

//G.PRINTER DD SYSOUT=*
this output should move to my next step.
//G.PRINTER DD DSN=dsnname,
DISP=(,CATLG,DELETE),UNIT=SYSDA,
SPACE=(133,(100,10),RLSE),AVGREC=K,
RECFM=FB, LRECL=133,
DSORG=PS
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Wed Jun 13, 2007 11:46 am
Reply with quote

And what happened when you tried using the JCL there ?

Looks OK to me, except, RECFM should be either FBA or FBM rather than FB. You will need to determine the carriage control being used to know which to code, but the majority of them are FBA.
Back to top
View user's profile Send private message
santhoshm

New User


Joined: 13 Jun 2007
Posts: 32
Location: chennai

PostPosted: Wed Jun 13, 2007 12:01 pm
Reply with quote

The problem here is the output is not going to dataset. But Output is going to SYSOUT.
What I need is whether I can move the SYSOUT to some other dataset.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Wed Jun 13, 2007 12:07 pm
Reply with quote

Your code
Code:
//G.PRINTER DD SYSOUT=*
this output should move to my next step.
//G.PRINTER DD DSN=dsnname,
DISP=(,CATLG,DELETE),UNIT=SYSDA,
SPACE=(133,(100,10),RLSE),AVGREC=K,
RECFM=FB, LRECL=133,
DSORG=PS


what it should be
Code:
//G.PRINTER DD DSN=dsnname,
// DISP=(,CATLG,DELETE),UNIT=SYSDA,
// SPACE=(133,(100,10),RLSE),AVGREC=K,
// RECFM=FB, LRECL=133,
// DSORG=PS


in plain words... get rid of the first dd statement
Back to top
View user's profile Send private message
santhoshm

New User


Joined: 13 Jun 2007
Posts: 32
Location: chennai

PostPosted: Wed Jun 13, 2007 12:11 pm
Reply with quote

I wrote the code as you have mentioned,there is no syntactical errors, but it is not sending the output to that particular dataset.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Wed Jun 13, 2007 12:15 pm
Reply with quote

post the jes2 log

are You sure that the ddname is PRINTER ??
Back to top
View user's profile Send private message
santhoshm

New User


Joined: 13 Jun 2007
Posts: 32
Location: chennai

PostPosted: Wed Jun 13, 2007 12:19 pm
Reply with quote

yes
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Wed Jun 13, 2007 2:41 pm
Reply with quote

Santosh,

What enrico-sorichetti suggested should work, please show your JCL & SYSOUT messages, after the suggested change/s. We can come up with some better suggestions.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1050
Location: Richmond, Virginia

PostPosted: Wed Jun 13, 2007 5:41 pm
Reply with quote

Incidentally, your LRECL is ignored as the space in front moves it into the comment field.
Back to top
View user's profile Send private message
santhoshm

New User


Joined: 13 Jun 2007
Posts: 32
Location: chennai

PostPosted: Wed Jun 13, 2007 7:10 pm
Reply with quote

Here I wrote a part of JCL where there is a problem.


//G.SORTIN DD DSN=&&STEP2,DISP=(OLD,DELETE)
//G.STAA DD DSN=SANT.HR318.STAA.TABLE(0),DISP=SHR
//G.NANN DD DSN=SANT.HS005.NANN.EXTRT(0),DISP=SHR

//G.CNTL2 DD DSN=DATASETS(DATE1850), DISP=SHR
//G.TOTALS DD DUMMY
//* DD SYSOUT=*
//G.PRINTER DD DSN=WORKT.NEWJOB.STEP3.PRINTER,
// DISP=(,CATLG,DELETE),UNIT=SYSDA,
// RECFM=FB,LRECL=133,
// SPACE=(133,(0,500),RLSE),AVGREC=K,
// DSORG=PS



1)I am getting abend as S314 on this step.
here are different scenarios,
2)When I am changing primary space to 100 dataset is empty with out any abend.
3)When I am using SYSOUT on DDname PRINTER I am getting the output in SYSOUT.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Thu Jun 14, 2007 12:39 am
Reply with quote

Hello,

If your //G.xxxx statements are overrides to any existing DD statements in step G, make sure they are in the proper sequence.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Thu Jun 14, 2007 1:05 am
Reply with quote

And if G is a step in a nested PROC then forget any chance of providing an override.
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 batch SFTP job using AOPBATCH unable ... All Other Mainframe Topics 7
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 Reading Empty Dataset DFSORT/ICETOOL 5
Search our Forums:

Back to Top