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

How to write cobol output in SPOOL and also in output file


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

New User


Joined: 31 Aug 2006
Posts: 57
Location: chennai

PostPosted: Tue Feb 17, 2009 12:37 pm
Reply with quote

Hi
Anybody knows how to write the output of cobol program in both SPOOL and output GDG file.

Thanks & Regards
Sampath
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Feb 17, 2009 12:43 pm
Reply with quote

Yes, I am sure that plenty of people do, but what is your real question here ?
Back to top
View user's profile Send private message
mkssampathkumar
Warnings : 1

New User


Joined: 31 Aug 2006
Posts: 57
Location: chennai

PostPosted: Tue Feb 17, 2009 4:29 pm
Reply with quote

Please provide me the sample JCL to write the output of cobol pgm in SPOOL and output file
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Tue Feb 17, 2009 4:47 pm
Reply with quote

In JCL, there will be a SYSOUT in your JCL

Code:
//SYSOUT   DD SYSOUT=<dsn name>


Point Sysout to a dataset and then in the next step you can copy the dataset to GDG if required.
Back to top
View user's profile Send private message
rajulan

New User


Joined: 11 Jan 2008
Posts: 66
Location: India

PostPosted: Tue Feb 17, 2009 4:50 pm
Reply with quote

To muthuvel,

I understand the sampath kumar's need correctly, he is asking the output to be routed to Sysout as well as output file at the same time.

The code you have given will route the output to file not to Sysout.

Thanks,
Rajulan.
Back to top
View user's profile Send private message
rajulan

New User


Joined: 11 Jan 2008
Posts: 66
Location: India

PostPosted: Tue Feb 17, 2009 4:51 pm
Reply with quote

I mean in the same step.

Thanks,
Rajulan
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Feb 17, 2009 5:01 pm
Reply with quote

Exactly what output are you talking about.

The JES outputs from the programs,
The data output from the programs.

How on earth are we supposed to know what you really want to do if you do not explain it in a clear and concise manner. The hardest part of offering a resolution is to fully understand the requirement which on a forum like this can only be achieved by the poster being clear and concise.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Feb 17, 2009 11:40 pm
Reply with quote

Hello,

Quote:
Anybody knows how to write the output of cobol program in both SPOOL and output GDG file.
Write the output to the gdg and in a following step copy the gdg to the spool. You could use IEBGENER to copy the file from the gdg to the spool.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Wed Feb 18, 2009 12:15 am
Reply with quote

I worked at a site several years ago that had a third party subsys that was great for this but I have not seen it anywhere else.

Another possibility is to make the COBOL program write the output to 2 output files, one having a DSN in the JCL and one having SYSOUT=... in the JCL.
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 TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 2
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
Search our Forums:

Back to Top