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: 1544
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: 7314

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 To get Non matching row after compari... vinu78 DB2 7 Fri Jan 05, 2018 5:43 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am

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