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

can we build dynamic sort card?


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

Active User


Joined: 05 Oct 2006
Posts: 151

PostPosted: Fri Jan 03, 2014 6:52 pm
Reply with quote

hi,

i have 2 input files.file1 has start date and end date.
file two has set of records.

say for example:

file1=LRECL=20

Code:
2013-01-012013-12-12


FILE 2=(LRECL=15)

Code:
2013-01-01ABCD
2013-02-01ABCD
2013-03-01ABCD
2013-04-01ABCD
2013-05-01ABCD
2013-06-01ABCD
2013-07-01ABCD
2013-08-01ABCD
2013-09-01ABCD
2013-10-01ABCD
2013-11-01ABCD
2013-12-01ABCD
2014-01-01ABCD


AND I want to extract only those records which falls between the range of file1 dates.

i,e greater than 2013-01-01 and less than 2013-12-12

so my output should be

Code:
2013-02-01ABCD
2013-03-01ABCD
2013-04-01ABCD
2013-05-01ABCD
2013-06-01ABCD
2013-07-01ABCD
2013-08-01ABCD
2013-09-01ABCD
2013-10-01ABCD
2013-11-01ABCD
2013-12-01ABCD

i know this can be achieved using join keys. but is there any way we can build dynamic sort card and extract records from file2??

regds,
prahlad shetty
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19245
Location: Inside the Matrix

PostPosted: Fri Jan 03, 2014 7:16 pm
Reply with quote

Hello,

Another way to do thi would be to read file 1 and assign symnames to the 2 dates.

Then copy/sort the file including or excluding the wanted or unwanted records.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1590
Location: Andromeda Galaxy

PostPosted: Fri Jan 03, 2014 9:11 pm
Reply with quote

As Dick suggests if your version of DFSORT supprts SYMNAMES you can create SYMNAMES data dynamically and then sort

Lots of examples available on SYMNAMES
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7310
Location: Inside the Matrix

PostPosted: Fri Jan 03, 2014 10:08 pm
Reply with quote

I don't think symbols/SYMNAMES are very new. I doubt that anyone still has a DFSORT which does not have symbols/SYMNAMES. If they do, it is well, well, well, out of Support.
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 SYNCSORT/ICETOOL JOINKEYS SORT Statem... DFSORT/ICETOOL 13
No new posts Installing sort utilities on hercules... DFSORT/ICETOOL 4
No new posts Build two or more rows given some con... DFSORT/ICETOOL 9
This topic is locked: you cannot edit posts or make replies. Sort card help to prepare status report DFSORT/ICETOOL 13
No new posts Building a sort key DFSORT/ICETOOL 3
Search our Forums:

Back to Top