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

Sort & Extract from variable length file


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

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Tue Feb 20, 2007 1:24 am
Reply with quote

I have a variable length file - length = 6229.
I need to
(a) SORT the 7 bytes from 9th position(for VB added 4 hence 13,7)
(b) Include condition is also correct (all positions have 4 added to them)

Problem: Since the file has many records with length < 400, hence my INCLUDE statement gives error. I am able to do this is 2 steps by breaking the include conditions into two parts.
Can it be done in a single step?

SORT FIELDS=(13,7,CH,A)
SUM FIELDS=NONE
INCLUDE COND=((176,10,CH,EQ,C'ABCDEFGHIJ'),AND,
(476,1,CH,EQ,C'W'),AND,
(230,1,CH,NE,C' '))
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Feb 20, 2007 1:43 am
Reply with quote

What would the condition be for records that are shorter than the 479 cond? Will the record get shorter than the 230 cond? The 176 cond?
Back to top
View user's profile Send private message
kalukakkad

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Tue Feb 20, 2007 1:45 am
Reply with quote

no only the 476 condition is failing
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: Tue Feb 20, 2007 2:12 am
Reply with quote

You need to use DFSORT's VLSCMP option to handle the "short records" INCLUDE fields:

Code:

  OPTION VLSCMP


For more information, see the "How can I use INCLUDE/OMIT with "short" fields?" Ask Professor Sort item at:

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

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Tue Feb 20, 2007 2:54 am
Reply with quote

Thanks Frank...it is working now.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top