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
 

 

Facing I/O error in SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
rajendra kalepu

New User


Joined: 29 Jul 2011
Posts: 21
Location: India

PostPosted: Tue Aug 05, 2014 12:50 pm    Post subject: Facing I/O error in SYNCSORT
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 05, 2014 1:47 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Tue Aug 05, 2014 2:15 pm    Post subject: Reply to: Facing I/O error in SYNCSORT
Reply with quote

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
View user's profile Send private message
rajendra kalepu

New User


Joined: 29 Jul 2011
Posts: 21
Location: India

PostPosted: Tue Aug 05, 2014 2:59 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Tue Aug 05, 2014 3:11 pm    Post subject: Reply to: Facing I/O error in SYNCSORT
Reply with quote

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
View user's profile Send private message
rajendra kalepu

New User


Joined: 29 Jul 2011
Posts: 21
Location: India

PostPosted: Tue Aug 05, 2014 4:23 pm    Post subject:
Reply with quote

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
View user's profile Send private message
madprasy

New User


Joined: 08 Apr 2008
Posts: 31
Location: Chennai

PostPosted: Tue Aug 05, 2014 5:55 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm


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