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
 

 

Sort & Extract from variable length file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Sort & Extract from variable length file
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: 3158
Location: Tucson AZ

PostPosted: Tue Feb 20, 2007 1:43 am    Post subject:
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    Post subject: Re: Sort & Extract from variable length file
Reply with quote

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

http://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    Post subject: Re: Sort & Extract from variable length file
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    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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm


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