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

comparing dates between two files using sort and icetool


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

New User


Joined: 22 May 2012
Posts: 32
Location: india

PostPosted: Tue Aug 21, 2012 5:44 pm
Reply with quote

HI All,



Whether it is possible to do the following using Sort or ICETOOL?

I am having two files. The copybook for both the files are as follow:-



File1:

Issue State :- X(2)

Resident state :- X(2)

Frequency :- X(4)

Start date(MMDDYYYY) :- X(8)

Next date(MMDDYYYY) :- X(8)



File2:

Last date(MMDDYYYY) :- X(8)

Current date(MMDDYYYY) :- X(8)

Future Run Date(MMDDYYYY) :- X(8)



I have to compare the Next Date of file 1 with Current date of file 2, in such a way that Next date <= Current date.



For eg:-

File1 data looks like

Code:
MIMI00900101201203012012

SISI00900301201206012012



File2 data looks like

Code:
020120120501202108012012



The output I am expecting is (format same as file1)



Code:
MIMI00900101201203012012



All the files are FB and having a record length of 80.



Regards
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


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

PostPosted: Tue Aug 21, 2012 6:46 pm
Reply with quote

Is the below date typo ??

Code:
05012021


For the output you expect

the current date should have been

Code:
05012012


Also you File2 contains only one record ??
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


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

PostPosted: Tue Aug 21, 2012 7:32 pm
Reply with quote

You can search the forum for references to SYMNAMES.

Have a step which takes the date from your File 2 and generates a SYMNAME.

Have a second step, which includes the generated SYMNAMES which will allow you to use the data from File 2 as a "constant" and select the correct records. The format of your dates will have to be rearranged to allow the comparisons you want.
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 How to split large record length file... DFSORT/ICETOOL 7
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top