Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Copying SYSOUT to a dataset.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
psharma25

New User


Joined: 31 Mar 2009
Posts: 5
Location: Noida

PostPosted: Thu Feb 03, 2011 10:34 am    Post subject: Copying SYSOUT to a dataset.
Reply with quote

Copying the SYSOUT to a Dataset

Hi,

In a JCL I have 2 steps. The case is second step runs an program and produces SYSOUT in the SDSF spool.

Can anyone please tell if it is possible to copy this SYSOUT to a dataset. Such that the contents of SYSOUT is available in both the Spool as well in my dataset.
Back to top
View user's profile Send private message

dick scherrer

Site Director


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

PostPosted: Thu Feb 03, 2011 10:41 am    Post subject:
Reply with quote

Hello,

Write this data to a file and then copy it to SYSOUT. Then you will have both.
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Thu Feb 03, 2011 11:10 am    Post subject:
Reply with quote

If this is only ad hoc copying, you can also use the PRINT ODSN 'dsname' command from SDSF.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Thu Feb 03, 2011 11:17 am    Post subject:
Reply with quote

Hello,

To clarify:
Quote:
In a JCL I have 2 steps.
The copy would be a 3rd step.
Back to top
View user's profile Send private message
psharma25

New User


Joined: 31 Mar 2009
Posts: 5
Location: Noida

PostPosted: Thu Feb 03, 2011 11:20 am    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

Write this data to a file and then copy it to SYSOUT. Then you will have both.


Hi, can you please share the code the copythe dataset to SYSOUT. Thanks
Back to top
View user's profile Send private message
AneeshMani

New User


Joined: 25 Jan 2008
Posts: 24
Location: india

PostPosted: Thu Feb 03, 2011 12:52 pm    Post subject: Reply to: Copying SYSOUT to a dataset.
Reply with quote

Hi,

Good Morning..

Hope you are having at least one o/p file.

Delare a similar file and after your DISPLAY statements do a WRITE to the second output file ( SYSOUT Equivalent file ).


I guess that should do it.

Sharma,

Sorry for the interuptions on the " share the code part ". Please try this.. it should work. If not, we do can help you out.. I apologize if u feel i am being rude.




Thanks,
A
-----------
All in the Name of the GURU
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Feb 03, 2011 2:02 pm    Post subject:
Reply with quote

change the dd statements in the second step from
Code:
//sysout dd sysout=* (or whatever)
to
//sysout dd dsn=name.of.file


then in third step iebgener/or DFSORT COPY
Code:
//input  dd dsn=name.of.file
//output dd sysout=*



by the way, it is not SDSF spool.

SDSF is a spool display utility/facility.
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Thu Feb 03, 2011 8:13 pm    Post subject:
Reply with quote

You can also use the SDSF command XDC on the sysout you want to save to your dataset.
Back to top
View user's profile Send private message
psharma25

New User


Joined: 31 Mar 2009
Posts: 5
Location: Noida

PostPosted: Fri Feb 04, 2011 9:25 am    Post subject:
Reply with quote

Mickeydusaor wrote:
You can also use the SDSF command XDC on the sysout you want to save to your dataset.


Actually i was using the XDC command but i need to have management of the dataset created as KEEP. Any clue how to do that
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri Feb 04, 2011 10:18 am    Post subject:
Reply with quote

Hello,

Do as suggested and add a copy step to your jcl and it will be automatic. . .

Quote:
but i need to have management of the dataset created as KEEP.
Most organizations do not permit using KEEP when creating a new dataset - CATLG is used. Possibly your system causes the dataset to be cataloged when KEEP is specified. . .
Back to top
View user's profile Send private message
ridgewalker58

New User


Joined: 26 Sep 2008
Posts: 51
Location: New York

PostPosted: Tue Feb 08, 2011 11:49 pm    Post subject: Reply to: Copying SYSOUT to a dataset.
Reply with quote

Code:
//STEP001 EXEC PGM=YOURPGM
//SYSOUT   DD  DSN=YOUR.SYSOUT.ON.FILE,
//         DISP=(NEW,CATLG,DELETE),
//         UNIT=TEST,SPACE=(TRK,(2,1),RLSE),
//         DCB=(LRECL=080,BLKSIZE=0,RECFM=FB)
//*
//STEP002 EXEC PGM=IDCAMS
//SYSPRINT DD  SYSOUT=*
//SYSFILE  DD  DSN=YOUR.SYSOUT.ON.FILE,DISP=OLD
//SYSOUT   DD  SYSOUT=*,DCB=(LRECL=080,BLKSIZE=0,RECFM=FB)
//SYSIN    DD  *
    REPRO INFILE(SYSFILE) OUTFILE(SYSOUT)
//*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts FTOPEN TEMP is failing due to dataset... mbenaud TSO/ISPF 7 Thu Jul 28, 2016 4:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us