View previous topic :: View next topic
|
Author |
Message |
psharma25
New User
Joined: 31 Mar 2009 Posts: 5 Location: Noida
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Write this data to a file and then copy it to SYSOUT. Then you will have both. |
|
Back to top |
|
|
Kjeld
Active User
Joined: 15 Dec 2009 Posts: 365 Location: Denmark
|
|
|
|
If this is only ad hoc copying, you can also use the PRINT ODSN 'dsname' command from SDSF. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
To clarify:
Quote: |
In a JCL I have 2 steps. |
The copy would be a 3rd step. |
|
Back to top |
|
|
psharma25
New User
Joined: 31 Mar 2009 Posts: 5 Location: Noida
|
|
|
|
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 |
|
|
AneeshMani
New User
Joined: 25 Jan 2008 Posts: 24 Location: india
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
You can also use the SDSF command XDC on the sysout you want to save to your dataset. |
|
Back to top |
|
|
psharma25
New User
Joined: 31 Mar 2009 Posts: 5 Location: Noida
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
ridgewalker58
New User
Joined: 26 Sep 2008 Posts: 51 Location: New York
|
|
|
|
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 |
|
|
mvcm
New User
Joined: 24 Oct 2020 Posts: 1 Location: Portugal
|
|
|
|
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 |
|
|
|