View previous topic :: View next topic
|
Author |
Message |
naveenmsc
New User
Joined: 28 Dec 2003 Posts: 4 Location: visakhapatnam
|
|
|
|
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 |
|
|
sandip_datta
Active User
Joined: 02 Dec 2003 Posts: 150 Location: Tokyo, Japan
|
|
|
|
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 |
|
|
bluebird
Active User
Joined: 03 Feb 2004 Posts: 127
|
|
|
|
maybe you should redirect all output (sysout,sysprint and so on) to
a sequential dataset FROM your JCL |
|
Back to top |
|
|
bluebird
Active User
Joined: 03 Feb 2004 Posts: 127
|
|
|
|
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 |
|
|
bluebird
Active User
Joined: 03 Feb 2004 Posts: 127
|
|
|
|
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 |
|
|
gowtham_srgp
New User
Joined: 09 Jun 2005 Posts: 38
|
|
|
|
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 |
|
|
elonics
New User
Joined: 05 Jul 2005 Posts: 49 Location: India
|
|
|
|
Hi Gowtham,
Can u explain in detail about that disposition parameter. |
|
Back to top |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
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 |
|
|
|