View previous topic :: View next topic
|
Author |
Message |
srj1957
New User
Joined: 15 Dec 2005 Posts: 72 Location: RALEIGH NC, USA
|
|
|
|
Hi ya'll...
I have two questions...Firstly...
Here is my challenge . I'm sorting variable length records...I'm allowing for the 4 byte RDW the field I'm sorting on is in 516 so I put 520
I'm using this as the sort parameter
//SYSIN DD *
SORT FIELDS=(520,4,CH,A)
however some records are shorter that 520 bytes so I get this error
ICE218A 0 101 BYTE VARIABLE RECORD IS SHORTER THAN 523 BYTE MINIMUM FOR FIELDS
ICE751I 1 D8-Q83041 D4-Q84357 E8-Q95214
ICE052I 0 END OF DFSORT
I looked up the error and it stated this...
Quote: |
If a variable-length record was too short to contain all INCLUDE or OMIT fields, use the VLSCMP or VLSHRT option to prevent DFSORT from terminating. |
Can anyone give me an example syntax on how to use VLSCMP or VLSHRT so I can avoid the problem.
Secondly...
Then I have to SUM on that 4 byte character field...
is this possible to sum on a non numeric field
Thanx in advance |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
If you look up the ICE218A message, you'll see this in the Programmer Response:
If the variable-length record was too short to contain all SORT, MERGE or SUM fields, use the VLSHRT option to prevent DFSORT from terminating.
Here's a link to the message doc:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CM20/2.2.207?SHELF=&DT=20060721170811&CASE=
That's telling you that for short SORT fields, you can use DFSORT's VLSHRT option, e.g.
(VLSCMP is only for short INCLUDE/OMIT fields.)
Quote: |
is this possible to sum on a non numeric field |
It depends on what the "non-numeric field" values look like. If they're actually numbers, e.g. '1234', you can use ZD to SUM on them. If they're something else, you need to show what they look like and explain what you want for the result of "summing" them. |
|
Back to top |
|
|
srj1957
New User
Joined: 15 Dec 2005 Posts: 72 Location: RALEIGH NC, USA
|
|
|
|
Thanks again Frank...
I tried the
//SYSIN DD *
SORT FIELDS=(520,4,CH,A)
OPTION VLSHRT
and it worked without any INCLUDE/OMIT !??!
My SUM challenge is with letters not numbers
ATTZ
ATTZ
CCSW
COUZ
COUZ
COUZ
CCSW
ABCZ
COUZ
ABCZ
COUZ
I want my output to be
ABCZ
ATTZ
CCSW
COUZ
Thanks in advance..
Steve |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
VLSHRT can be used with SORT, MERGE, INCLUDE, OMIT and/or SUM.
Quote: |
My SUM challenge is with letters not numbers |
Oh, then you really don't want to SUM anything - you just want to eliminate duplicates. That would be:
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Use [URL] BBCode for External Links |
|
Back to top |
|
|
srj1957
New User
Joined: 15 Dec 2005 Posts: 72 Location: RALEIGH NC, USA
|
|
|
|
of course ...I totally forgot about that option....
thanks anyway Frank... |
|
Back to top |
|
|
|