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 records based on numeric field.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
Alks

New User


Joined: 14 Jan 2016
Posts: 9
Location: INDIA

PostPosted: Wed Oct 19, 2016 10:14 pm    Post subject: Sort records based on numeric field.
Reply with quote

Hi,
I have a requirement where I have to sort the records based on the date difference.

Code:
ABC 20161019  20160210  +0000252
DEF 20161019  20160216  +0000246
GHI 20161019  20160213  +0000249


Date difference in HEX form is as below:
Code:
+0000252
4FFFFFFF
E0000252


I need to filter only those records, for which date differenece is say greater than or equal to +0000248

This is what I tried including some other modifications such as using ZD.
Code:
SORT FIELDS=COPY                   
INCLUDE COND=(25,8,PD,GE,+0000248)


But it's just including all the records.

Any help would be really appreciated.

Code'd
Back to top
View user's profile Send private message

RahulG31

Active User


Joined: 20 Dec 2014
Posts: 331
Location: USA

PostPosted: Wed Oct 19, 2016 10:53 pm    Post subject: Reply to: Sort records based on numeric field.
Reply with quote

Your data is NOT PACKED.

Since, you didn't use code tags, the spaces between fields were not preserved.

You can use ZD and compare like:
Code:
 OPTION COPY
 INCLUDE COND=(26,7,ZD,GE,248)

Or you can use FS like:
Code:
 OPTION COPY
 INCLUDE COND=(25,8,FS,GE,+0000248)   

Or you could also use SFF like:
Code:
 OPTION COPY
 INCLUDE COND=(23,8,SFF,GE,+0000248) 

.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


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

PostPosted: Wed Oct 19, 2016 11:07 pm    Post subject:
Reply with quote

Please learn to use appropriate BBCodes during your next post,If you are a Beginner to DFSORT then , please join IBM MAINFRAME & MVS FORUM
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 17 Tue Dec 06, 2016 8:04 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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


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