IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Extract Record using range of Data


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 96
Location: Delhi

PostPosted: Wed Nov 15, 2017 11:54 pm
Reply with quote

My Input File is FB=80 Bytes, record layout is like below.

Code:


2017-10-152017-15-11-116103333345...
2017-10-152017-15-11-116103333346...
2017-10-152017-15-11-116103333349...
2017-10-152017-15-11-116103333348...
2017-10-152017-15-11-116103333350...
2017-10-152017-15-11-116103333355...


I want to write sort card to sort above file using the position starting from 24 bytes and 10 bytes length [For Eg in First Record this field will be 6103333345]

I want output file to have record which fall under range
[6103333348 to 6103333390]

So using this range my output file should be

Code:


2017-10-152017-15-11-116103333348...
2017-10-152017-15-11-116103333350...
2017-10-152017-15-11-116103333355...


I am trying in REXX but I am looking for suggestion if this is feasible to do in SORT

Thanks a lot for your assistance
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2010
Location: USA

PostPosted: Thu Nov 16, 2017 12:36 am
Reply with quote

Code:
 INCLUDE COND=(24,10,CH,GE,C'6103333348',
           AND,24,10,CH,LE,C'6103333390')
 SORT FIELDS=(24,10,CH,A)
 END


P.S.
Advised first to search the Beginners Forum, and RTFM
Back to top
View user's profile Send private message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 96
Location: Delhi

PostPosted: Thu Nov 16, 2017 1:32 am
Reply with quote

Thanks a lot for your suggestion, this is awesome
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Nov 16, 2017 3:14 pm
Reply with quote

This is basic DFSort and has been around for decades.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top