View previous topic :: View next topic
|
Author |
Message |
patlolla
New User
Joined: 05 Jun 2006 Posts: 10
|
|
|
|
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 |
|
|
girishbs13
New User
Joined: 11 Nov 2011 Posts: 24 Location: India
|
|
|
|
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 |
|
|
xknight
Active User
Joined: 22 Jan 2008 Posts: 117 Location: Liberty city
|
|
|
|
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 |
|
|
patlolla
New User
Joined: 05 Jun 2006 Posts: 10
|
|
|
|
Hi,
I would like to sort on the Key parameter which starts from 91 Postion to 101 postion. |
|
Back to top |
|
|
girishbs13
New User
Joined: 11 Nov 2011 Posts: 24 Location: India
|
|
|
|
Then xKnisht's code will work for you |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
patlolla
New User
Joined: 05 Jun 2006 Posts: 10
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
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 |
|
|
patlolla
New User
Joined: 05 Jun 2006 Posts: 10
|
|
|
|
Thanks a Lot it is working now. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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:
- SORT is s program, you use a program to do something (whatever it is designed to do)
- 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"
- When asked for clarification, provide it. We can only rarely carry-off the mindreading trick with something approaching accuracy
|
|
Back to top |
|
|
rakesha.hg
Active User
Joined: 21 Mar 2008 Posts: 161 Location: bangalore
|
|
|
|
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 |
|
Back to top |
|
|
|