Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
comparing dates between two files using sort and icetool

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: comparing dates between two files using sort and icetool
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

Moderator


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

PostPosted: Tue Aug 21, 2012 6:46 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Aug 21, 2012 7:32 pm    Post subject: Reply to: comparing dates between two files using sort and i
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us