IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

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: 19251
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

Moderator


Joined: 07 Sep 2006
Posts: 1566
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: 7312
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 All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts COBOL VS SORT Utility for file format... COBOL Programming 6
No new posts Copying data from prev record using SORT SYNCSORT 19
No new posts Combining more 4 files with sorted or... DFSORT/ICETOOL 3
No new posts AFRREBLK - Dynamic DSN IBM Tools 9
No new posts BUILD with IFTRAIL + TRLUPD DFSORT/ICETOOL 7

Back to Top