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
 

 

Variable length records and VLSCMP option

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
srj1957

New User


Joined: 15 Dec 2005
Posts: 72
Location: RALEIGH NC, USA

PostPosted: Fri Oct 06, 2006 12:15 am    Post subject: Variable length records and VLSCMP option
Reply with quote

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

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Oct 06, 2006 12:50 am    Post subject:
Reply with quote

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:

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

Code:

   OPTION VLSHRT


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

New User


Joined: 15 Dec 2005
Posts: 72
Location: RALEIGH NC, USA

PostPosted: Fri Oct 06, 2006 1:21 am    Post subject: Re: Variable length records and VLSCMP option
Reply with quote

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

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Oct 06, 2006 1:42 am    Post subject:
Reply with quote

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:

Code:

   SUM FIELDS=NONE


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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
Back to top
View user's profile Send private message
srj1957

New User


Joined: 15 Dec 2005
Posts: 72
Location: RALEIGH NC, USA

PostPosted: Fri Oct 06, 2006 1:49 am    Post subject: Re: Variable length records and VLSCMP option
Reply with quote

Quote:
SUM FIELDS=NONE


of course icon_redface.gif ...I totally forgot about that option....

thanks anyway Frank...
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm


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