Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us