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 records based on length exceeds of a field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
maxsubrat

New User


Joined: 27 Feb 2008
Posts: 87
Location: india

PostPosted: Wed Oct 04, 2017 4:48 pm    Post subject: sort records based on length exceeds of a field
Reply with quote

Hi,
I have a input file whose rec length is 200.
There are 4 fields and the 4th field has rec length of 100 .
I want to sort the file based on the 4th field and for those records for that 4th field whose length exceeds 40.


Thanks in advance
Max
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1827
Location: NY,USA

PostPosted: Wed Oct 04, 2017 5:57 pm    Post subject:
Reply with quote

You need to try first yourself.
Second , without the sample input and expected output you are less likely get the right answers
Back to top
View user's profile Send private message
maxsubrat

New User


Joined: 27 Feb 2008
Posts: 87
Location: india

PostPosted: Wed Oct 04, 2017 6:14 pm    Post subject: Reply to: sort records based on length exceeds of a field
Reply with quote

I have used this sort card.. getting the output but looks like there are few records which also coming with no values may be low values or hex..

SORT FIELDS=COPY
INCLUDE COND=(141,60,CH,EQ,C' ')
Back to top
View user's profile Send private message
maxsubrat

New User


Joined: 27 Feb 2008
Posts: 87
Location: india

PostPosted: Wed Oct 04, 2017 6:16 pm    Post subject: Reply to: sort records based on length exceeds of a field
Reply with quote

Little correction on my sort card:

SORT FIELDS=COPY
OMIT COND=(141,60,CH,EQ,C' ')
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1827
Location: NY,USA

PostPosted: Wed Oct 04, 2017 7:47 pm    Post subject:
Reply with quote

Quote:
getting the output but looks like there are few records which also coming with no values may be low values or hex..
You need to find those records and find out what values you get and ALTSEQ would help You further to turn them into spaces <if required>.
Please also make a use of "code" tags when representing a code.
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 233
Location: Maryland

PostPosted: Thu Oct 05, 2017 7:44 pm    Post subject: Re: sort records based on length exceeds of a field
Reply with quote

maxsubrat wrote:
I have a input file whose rec length is 200.
There are 4 fields and the 4th field has rec length of 100 .
I want to sort the file based on the 4th field and for those records for that 4th field whose length exceeds 40.

How the "length" of the "4th field" is defined/determined?
1) until first space/comma/quote/zero/whatever else?
2) using the physical end of RECFM=VB?
3) another sophisticated method?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1532
Location: Chennai

PostPosted: Thu Oct 05, 2017 7:54 pm    Post subject:
Reply with quote

Show us sample input data and the sample output data required. Someone would be able to help.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1932
Location: UK

PostPosted: Fri Oct 06, 2017 4:16 am    Post subject:
Reply with quote

According to you, your LRECL is 200. Your record layout description infers that the first 3 fields have a total length of 100 bytes and the fourth field is 100 bytes in length. Where does this length of 40 come in? ALL records will have a length of 100 for the 4th field.
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 Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 6 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm

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