View previous topic :: View next topic
|
Author |
Message |
rajendra kalepu
New User
Joined: 29 Jul 2011 Posts: 21 Location: India
|
|
|
|
Hi Team,
Recently we are facing I/O error for a particular job which is using SYNCSORT .
More over the I/O error is not occurring daily. I mean to say with the same job setup some times its going fine and some times its abending
Please find the JCL Logic below for your reference
//STEP00XX EXEC PGM=SORT
//SORTIN DD DSN=FILE1,
// DISP=SHR
// DD DSN=FILE2,
// DISP=OLD
//SORTOUT DD DSN=FILE2,
// UNIT=SYSDA,
// DISP=OLD,
// SPACE=(CYL,(1,1),RLSE),
// DCB=(GDG.MODEL,LRECL=217,RECFM=FB,DSORG=PS)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
Here we are trying to use the same file as input as well as output using DISP=OLD for FILE2
Some how our job is abending with the below error
WER108I SORTIN : RECFM=FB ; LRECL= 217; BLKSIZE= 27993
WER073I SORTIN : DSNAME=FILE1
(FIRST OF 2)
WER110I SORTOUT : RECFM=FB ; LRECL= 217; BLKSIZE= 27993
WER074I SORTOUT : DSNAME=FILE2
WER410B 7,836K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 7,820K BYTES USED
WER061A I/O ERR JOBNAME ,PROC ,5EEC,D,SORTIN ,**- OP,WRNG.LEN.RECORD,00000
WER493I ZIIP PROCESSOR USED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
And interesting thing here is when i restarted the job this step went fine.
Please help me to resolve this issue
Thanks in advance
[/code] |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Please note that SYNCSORT should be posted in the JCL forum
What on earth are you doing using FILE2 as both SORTIN & SORTOUT |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
As Expat indicates, it is entirely absurd to use the same DSN for input and output in a COPY operation.
It probably only even looks like it might work sometimes due to the concatenation.
You should nibble each of your arms up to the shoulder rather than use the same DSN as input and output for a COPY operation.
For me it is not even good practice to do that for a SORT, although it would "work" as long as your SORT does not fail.
If you change that so the output is a different DSN, your IO errors will go away.
What the heck this has actually been doing whilst in Production is going to be down to a very interesting impact analysis. I hope you have retained all those output files, and have copies of the inputs, and can tell one from another.
That is the stupidest thing I've seen in a long time. Sorry, but it is. I hope its not been in Production long. |
|
Back to top |
|
|
rajendra kalepu
New User
Joined: 29 Jul 2011 Posts: 21 Location: India
|
|
|
|
Thank you Bill .
Unfortunately it is being used in production since many days (Sad thing to say). This JCL written long back in 2000s
As it has abended today when i looked into that i found out that input and output both are same. Even i felt the same regarding using the same file as input and output which is not a best practice
I will change the output file name.
Thank you very much. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
OK, so it is CYA time (Cover Your [own] Bottom).
With a COPY operation it is not a question of "best practice". The results will be unpredictable. Maybe the concatenation has been saving you, I don't know. Perhaps that will result with the file opened for input after the file is opened for output. I really don't know.
What you must do is report it to your boss, so that someone can be assigned to look into the consequences. You've found it. You must notify, in writing. It is possible that data has been missing for many years. It is possible that data has never been missing. It is possible that data sometimes goes missing. If data has been missing over so many years, then there may be considerable costs involved. If this is discovered later, and it becomes known that you knew about it, then it will be your Bottom on the line. So, CYA. |
|
Back to top |
|
|
rajendra kalepu
New User
Joined: 29 Jul 2011 Posts: 21 Location: India
|
|
|
|
Thank you Bill,
I will work on the solution of changing the file name.
I will also analyze another jobs which may have similar kind of setup.
Have a nice day |
|
Back to top |
|
|
madprasy
New User
Joined: 08 Apr 2008 Posts: 34 Location: Chennai
|
|
|
|
May be you can use file3 as output and then copy file3 to file2 (after taking backup)
Did you checked in PROD if both files had data before SORT step ? |
|
Back to top |
|
|
|