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

Code:
//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.

Causes of U0016 Abend
Invalid Instruction Execution: The program attempts to execute an invalid, unrecognized, or privileged instruction.
Unauthorized Memory Access: The program tries to access or manipulate storage areas (memory) that it does not have permission to access.
Privileged Operation: The program attempts to perform a privileged operation or execute privileged instructions that require special authorization or system-level access.

Resolving U0016 Abend
To resolve the U0016 abend, you can take the following steps:

Review Program Logic: Review the logic of the program that abended with U0016 to identify any invalid instructions, unauthorized accesses, or privileged operations.
Check Privileges: Ensure that the program has the necessary privileges and authorizations to perform the operations it attempts.
Debugging Tools: Use debugging tools and techniques, such as dump analysis with tools like IPCS (Interactive Problem Control System) or XDC (eXtended Debugging Control), to analyze the abend dump and understand the state of the program at the time of the access violation.
Code Corrections: Make necessary corrections to the program code to eliminate invalid instructions, unauthorized accesses, or privileged operations that led to the abend.
Security Considerations: Collaborate with system administrators and security teams to ensure proper security configurations, access controls, and authorization settings are in place to prevent unauthorized accesses and protect system resources.
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: 1787
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: 1216
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 All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Avoid job abend on dataset held by us... JCL & VSAM 6
No new posts U0016 error in JCL JCL & VSAM 4
No new posts After newcopy the CICS program user f... CICS 7
No new posts User ABEND U0476. Need help. IMS DB/DC 1
No new posts ABEND 0717 during starting IMS IMS DB/DC 0
Search our Forums:


Back to Top