sysout to a file

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
sash
Member
Posts: 8
Joined: Fri Dec 26, 2008 9:24 am

sysout to a file

Post by sash » Fri Dec 26, 2008 9:30 am

actually data is being displayed in the sysout....i want dis data to be moved into a sequential file how do i do it?? pls help me with a sample code?..

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Fri Dec 26, 2008 10:07 am

Hi Sash,

Welcome to mainframegurukul.com

Answer to your question.
Change the SYSOUT statement in JCL.

Your existing code may look like as follows

Code: Select all

//SYSOUT    DD SYSOUT=*  
Change this to code similar to below.

Code: Select all

//SYSOUT DD DSN=DEV.FILENAME3, 
//           DISP=(,CATLG,DELETE),                     
//           SPACE=(CYL,(10,10,0),RLSE),               
//           DCB=(RECFM=FB)                            
All data will be written to DEV.FILENAME3 file.
Natarajan
Chennai

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Fri Dec 26, 2008 10:19 am

If you want transfer sysout data to another file, after job execution, manually.

use XDC line command, in the spool. it will transfer all spool details including
SYSOUT to specified sequential file.
Natarajan
Chennai

sash
Member
Posts: 8
Joined: Fri Dec 26, 2008 9:24 am

sysout to a file

Post by sash » Fri Dec 26, 2008 10:36 am

i do not want to transfer de entire data but only a part of de sysout..den wat should i do??

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Fri Dec 26, 2008 11:26 am

Hi Sash,

i think of only above two solutions.

1. change your jcl... so that data will be directly written to sequential file
2. transfer full spool data to sequential file manually - look like this option. not suitable for your requirement.

i would suggest you to change jcl as i have explained in my first post of this topic.

gothru following JCL link... if you need any help coding JCL.
http://www.geocities.com/srcsinc/drona/ ... l/jcl.html
Natarajan
Chennai

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Mon Dec 29, 2008 2:52 pm

Hi sash,

What Spool Display Tool do you use ? Usually You get differnet DD name in spool irrespective of the tool being used, issue XDC in front of the DD name you want to "capture" in some DSN, then it wont fetch other spool details.
Regards,
Anuj

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Mon Dec 29, 2008 2:55 pm

Hi sash,

What Spool Display Tool do you use ? Usually You get differnet DD name in spool irrespective of the tool being used, issue XDC in front of the DD name you want to "capture" in some DSN, then it wont fetch other spool details.
Regards,
Anuj

sash
Member
Posts: 8
Joined: Fri Dec 26, 2008 9:24 am

Post by sash » Mon Dec 29, 2008 4:57 pm

hello anuj,
lemme explainit clearly again...in the sysout der is numerous data displayed for a particular program..in that i want to take a part of the data alone moved to a sequential file...pls help

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Mon Dec 29, 2008 5:25 pm

Hi,

This is SDSF spool which I use at my shop, when I put "?" in front of the JOB name XXXXA1 & hit enter, I got the below screen.

Code: Select all

Display  Filter  View  Print  Options  Help                                  
-------------------------------------------------------------------------------
SDSF JOB DATA SET DISPLAY - JOB XXXXA1 (JOB64300)    LINE 1-4 (4)            
COMMAND INPUT ===> __________________________________________ SCROLL ===> CSR  
PREFIX=XXXXA1  DEST=(ALL)  OWNER=*  SYSNAME=                                 
NP   DDNAME   STEPNAME PROCSTEP DSID C FORM   FCB   TOT REC RMT WTRNAME        
     JESMSGLG JES2                 2 R STD   ****        32                    
     JESJCL   JES2     IEFPROC     3 R STD   ****        12                    
     JESYSMSG JES2     IEFPROC     4 R STD   ****        46                    
XDC  OUTDD    SEARCH             102 A STD   ****        57
Now if I want OUTDD to be in seprate DSN, I write "XDC" in front of it & hit enter then I'm prompted to enter the DSN name where I want the Data.
Regards,
Anuj

sash
Member
Posts: 8
Joined: Fri Dec 26, 2008 9:24 am

Post by sash » Mon Dec 29, 2008 5:33 pm

thanks anuj...i understood!!

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Tue Dec 30, 2008 9:37 am

Great, glad to hear - hopefully it worked the way you needed. If you have any further queris, post us back - someone will be around.

Have a agood one,

-Ad

academyindia4

Topic deleted by Admin

Post by academyindia4 » Wed Jan 27, 2016 8:19 pm

<< Content deleted By Admin >>

academyindia4

Topic deleted by Admin

Post by academyindia4 » Mon Feb 01, 2016 10:21 pm

<< Content deleted By Admin >>

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others