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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm


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