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

sorting variable length files


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
priya_gmain

New User


Joined: 18 Sep 2006
Posts: 7

PostPosted: Thu Oct 12, 2006 11:47 am
Reply with quote

Hi,

While sorting how the system handles a variable record length file . Is there any other option we have to mention in the sort card for variable record length file .

Regards
Priya
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Oct 12, 2006 12:05 pm
Reply with quote

Hi Priya,

A data set with RECFM=VB and LRECL=80 is a variable-length (VB) data set with a maximum record length of 80-bytes. For a VB data set, different records can have different lengths. The first four bytes of each record contain the Record Descriptor Word or RDW, and the first two bytes of the RDW contain the length of that record (in binary). The first data byte of a VB record is in position 5, after the 4-byte RDW.
so u should be careful while specifing it in sort card if u want to sort file on first 4byte of alphatical data then u should mention in the sort card

SORT FIELDS=(5,4,CH,A)

Hope it will helpful
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Oct 12, 2006 9:09 pm
Reply with quote

Aside from accounting for the RDW when specifying the starting position, you may also need to specify the VLSHRT and/or VLSCMP option if you have "short" records.

See the following in "z/OS DFSORT: Getting Started" for more information on handling VB records:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG20/2.1.3?DT=20060615173822

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG20/2.2.7?DT=20060615173822

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG20/2.3.4?DT=20060615173822

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG20/2.4.21?DT=20060615173822
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top