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

Failed with ABEND U0016


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
patlolla

New User


Joined: 05 Jun 2006
Posts: 10

PostPosted: Wed Dec 07, 2011 1:06 pm
Reply with quote

Hi ,

When I am trying to sort the VB file (LREC 5000) from the position 91 to 10 bytes

//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:91,10,ZD)
/*

It has abended with ABEND=S000 U0016 REASON=00000000 404 WER235A OUTREC RDW NOT INCLUDED.

Could you please help me in this regard with solution.
Back to top
View user's profile Send private message
girishbs13

New User


Joined: 11 Nov 2011
Posts: 24
Location: India

PostPosted: Wed Dec 07, 2011 1:21 pm
Reply with quote

Hi,

IF you are trying to sort the file why is your

SORT FIELDS= COPY

Can you give more clarity about this?

Do you want to SORT the file with 91,10 as key?

or
do u want to copy data in position 91,10?
Back to top
View user's profile Send private message
xknight

Active User


Joined: 22 Jan 2008
Posts: 117
Location: Liberty city

PostPosted: Wed Dec 07, 2011 1:31 pm
Reply with quote

Hello,

Your code will not work as you desired, you are formatting the output rather sorting it.

Try this,

Code:
//SYSIN DD *
  SORT FIELDS=(95,10,ZD,A)
/*


Note: A - sort the records in ascending and D - descending the records, change it on your need.

Please use code-tags before posting it and there is a preview function to help you to ensure that.
Back to top
View user's profile Send private message
patlolla

New User


Joined: 05 Jun 2006
Posts: 10

PostPosted: Wed Dec 07, 2011 1:59 pm
Reply with quote

Hi,

I would like to sort on the Key parameter which starts from 91 Postion to 101 postion.
Back to top
View user's profile Send private message
girishbs13

New User


Joined: 11 Nov 2011
Posts: 24
Location: India

PostPosted: Wed Dec 07, 2011 2:01 pm
Reply with quote

Then xKnisht's code will work for you
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Dec 07, 2011 2:45 pm
Reply with quote

For completeness, you got your error message because you were not including the four bytes of the RDW in your OUTFIL, which you must always do with a file containing variable-length records.

(1:4,etc....)
Back to top
View user's profile Send private message
patlolla

New User


Joined: 05 Jun 2006
Posts: 10

PostPosted: Wed Dec 07, 2011 4:10 pm
Reply with quote

Hi,

I have modified and submitted the Job, still it shows the same error message WER235A OUTREC RDW NOT INCLUDED

//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1:4,91,10)
/*

Could you please advise on this
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Dec 07, 2011 4:15 pm
Reply with quote

You have stated that you want to SORT the file. You have no SORT statement.

Have you tried xKnight's solution?

Are you now tracking down the actual erorr message to gain useful information for the future?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Dec 07, 2011 4:22 pm
Reply with quote

And, of course, this is posted in the wrong forum, as the message clearly shows that the TS is using Syncsort, not DFSORT.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Wed Dec 07, 2011 6:39 pm
Reply with quote

If you want to COPY just bytes 91-100, as your control card suggests, then try

Code:
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1,4,95,10)
/*


Garry.
Back to top
View user's profile Send private message
patlolla

New User


Joined: 05 Jun 2006
Posts: 10

PostPosted: Wed Dec 07, 2011 7:12 pm
Reply with quote

Thanks a Lot it is working now.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Dec 07, 2011 7:24 pm
Reply with quote

Well spotted Gary. TS said, twice, he wanted to sort the file, but kept going with his FIELDS=COPY, so you fix his cards up and he's happy.

patlolla, for the future note:


  1. SORT is s program, you use a program to do something (whatever it is designed to do)
  2. When you "sort" your data, that means rearranging it in an order as specified by you, it does not just mean "use the sort program"
  3. When asked for clarification, provide it. We can only rarely carry-off the mindreading trick with something approaching accuracy
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Mon Jan 02, 2012 5:00 pm
Reply with quote

Just to add my few cents here ....

Quote:
When you "sort" your data, that means rearranging it in an order as specified by you, it does not just mean "use the sort program"


Usually when i code my sort cards, if its just copying i always use "OPTION COPY" and when i am sure of sorting data i go for "SORT FIELDS=" .... makes my life easy icon_wink.gif
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 ISAM and abend S03B JCL & VSAM 10
No new posts DFHPI1008 JSON generation failed COBOL Programming 0
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts WER999A - UNSUCCESSFUL SORT 8ED U Ab... SYNCSORT 5
No new posts the system or user abend SF0F R=NULL COBOL Programming 0
Search our Forums:

Back to Top