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

How to redirect the contents of a spool


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 150
Location: Tokyo, Japan

PostPosted: Mon Jan 05, 2004 11:45 am
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
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
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
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
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
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: 463

PostPosted: Fri Aug 19, 2005 6:40 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Search string in job at regular Spool... CLIST & REXX 0
No new posts Capturing logs from spool dd JCL & VSAM 6
No new posts No sysout coming in spool JCL & VSAM 4
No new posts Conditional step execution based on P... JCL & VSAM 9
No new posts SPOOL commands for INTRDR CICS 8
Search our Forums:

Back to Top