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
 

 

How to redirect the contents of a spool

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
naveenmsc

New User


Joined: 28 Dec 2003
Posts: 4
Location: visakhapatnam

PostPosted: Sat Jan 03, 2004 8:34 pm    Post subject: How to redirect the contents of a spool
Reply with quote

Hey can any one tell how to redirect the contents of a spool (when an error occurs) to a PS or PDS Member
Back to top
View user's profile Send private message

sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 151
Location: Tokyo, Japan

PostPosted: Mon Jan 05, 2004 11:45 am    Post subject:
Reply with quote

Hello naveenmsc,

Put xdc just before spool and then one screen will appear to give you the dataset name and attributes.

I am not very sure how can we redirect spool into a dataset ONLY WHEN AN ABEND OCCURS otherwise keep it in spool ? I am interested about that procedure. I am also interested about the redirect procedure through Batch Process only.

regards,
Sandip.
Back to top
View user's profile Send private message
bluebird

Active User


Joined: 03 Feb 2004
Posts: 127

PostPosted: Tue Feb 03, 2004 5:56 pm    Post subject:
Reply with quote

maybe you should redirect all output (sysout,sysprint and so on) to
a sequential dataset FROM your JCL
Back to top
View user's profile Send private message
bluebird

Active User


Joined: 03 Feb 2004
Posts: 127

PostPosted: Thu Feb 05, 2004 10:16 pm    Post subject:
Reply with quote

also, if you would like to do bit of REXX coding and modify your jcl:

add this two steps at the end of the job:
//SYM EXEC PGM=EZACFSM1
//* SYMBOL SUBSTITUTION
//SYSIN DD *
DA OJOB
PRINT FILE MSGFILE
FIND '&jobname'
++XC
//SYSOUT DD UNIT=SYSDA,SPACE=(CYL,(1,1)),RECFM=FB,LRECL=80,
// BLKSIZE=0,DSN=&&ISFIN,DISP=(,PASS)
//SDSF EXEC PGM=SDSF,DYNAMNBR=32,REGION=1024K,TIME=5
//* CAPTURE THE JES2 MESSAGES
//MSGFILE DD DISP=SHR,DSN=&SYSUID..LOGJ
//ISFOUT DD DUMMY
//ISFIN DD DISP=(OLD,DELETE),DSN=&&ISFIN

and make sure EZACFSM1 is available is available at your shop.
first step prepares the SDSF ISFIN (commands) with the current job name second step is SDSF pgm to trap current output.


hope it helps
Back to top
View user's profile Send private message
bluebird

Active User


Joined: 03 Feb 2004
Posts: 127

PostPosted: Fri Feb 06, 2004 4:02 pm    Post subject:
Reply with quote

and with condition executing :
if (abend) then
Posted: Thu Feb 05, 2004 10:16 pm Post subject:

--------------------------------------------------------------------------------

also, if you would like to do bit of REXX coding and modify your jcl:

add this two steps at the end of the job:
// if (abend) then
//SYM EXEC PGM=EZACFSM1
//* SYMBOL SUBSTITUTION
//SYSIN DD *
DA OJOB
PRINT FILE MSGFILE
FIND '&jobname'
++XC
//SYSOUT DD UNIT=SYSDA,SPACE=(CYL,(1,1)),RECFM=FB,LRECL=80,
// BLKSIZE=0,DSN=&&ISFIN,DISP=(,PASS)
// endif

reads if previous step abend execute steps between if and endif.
Back to top
View user's profile Send private message
gowtham_srgp

New User


Joined: 09 Jun 2005
Posts: 38

PostPosted: Thu Aug 18, 2005 11:41 am    Post subject: Re: JCL spool
Reply with quote

naveenmsc wrote:
Hey can any one tell how to redirect the contents of a spool (when an error occurs) to a PS or PDS Member




hai naveenmsc. i hope this delayed mail helps you. you can redirect the result of your job to a dataset by coding the dataset name in which you want the output to be stored. i.e; you should specify the

DD DSN=' THE DS NAME', DISP=(STS,ACTION,ACTION) instead for the * that you specify in the SYSPRINT,SYSOUT statements.......

corrections welcomed......
gowtham
Back to top
View user's profile Send private message
elonics

New User


Joined: 05 Jul 2005
Posts: 49
Location: India

PostPosted: Fri Aug 19, 2005 4:39 pm    Post subject:
Reply with quote

Hi Gowtham,
Can u explain in detail about that disposition parameter.
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Fri Aug 19, 2005 6:40 pm    Post subject: Re: JCL spool
Reply with quote

Hi Elonics,

The format of Disp parameter is as follows

DISP=(status,normal-termination,abnormal-termination)

Status :- File is newly created or already exist like NEW, OLD,
Normal-termination :- After JOb ran fine what will be the file status
abnormal-termination:-After JOb terminate abnormally what will be the file status



Quote:
If you omit the status subparameter, the default is NEW.

If you omit the normal termination disposition subparameter, the default is DELETE for a NEW data set or KEEP for an existing data set.

If you omit the abnormal termination disposition subparameter, the default is the disposition specified or implied by the second subparameter. However, if the second subparameter specified PASS, the default abnormal termination disposition is DELETE for a NEW data set or KEEP for an existing data set.

If you omit the DISP parameter, the default is a NEW data set with a disposition of DELETE for both normal and abnormal termination disposition. Thus, you can omit the DISP parameter for a data set that is created and deleted during a step.




Please find the Manual for this
[url]http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B650/12.19?DT=20040712170508 [/url]



Regards
Rupesh
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Consolidating and summing file contents Kevin Lindsley SYNCSORT 14 Thu Jun 09, 2016 5:24 am
No new posts Report output in Spool amitc23 JCL & VSAM 4 Tue Apr 26, 2016 4:32 pm
No new posts Read contents of PS file scorp_rahul23 JCL & VSAM 3 Mon Mar 28, 2016 10:28 pm


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