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

Copying SYSOUT to a dataset.


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Thu Feb 03, 2011 10:41 am
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
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

Moderator Emeritus


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

PostPosted: Thu Feb 03, 2011 11:17 am
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
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
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: 6967
Location: porcelain throne

PostPosted: Thu Feb 03, 2011 2:02 pm
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
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
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

Moderator Emeritus


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

PostPosted: Fri Feb 04, 2011 10:18 am
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
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
mvcm

New User


Joined: 24 Oct 2020
Posts: 1
Location: Portugal

PostPosted: Sat Oct 24, 2020 2:55 am
Reply with quote

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


NP JOBNAME JobID Owner Prty Queue C Pos
XDC IMSABC07 PPT03668 IMSDEFG 1 PRINT 804


Simple as that! It was exactly what I needed.

I have sysouts with millions of lines and I need to search for strings.
Doing this by paging F8 is impractical.

So my idea was to turn the sysout into a file and run 3.15 Search-ForE.

Done!
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts ADR324E-VOL/DATASET SPECIFIED BY DDNA... JCL & VSAM 6
No new posts how to list the number of backup data... JCL & VSAM 3
No new posts Copying large number of datasets to m... JCL & VSAM 17
This topic is locked: you cannot edit posts or make replies. ICETool reporting 2 das old dataset DFSORT/ICETOOL 13
No new posts Control M features to check string in... Compuware & Other Tools 1
Search our Forums:

Back to Top