Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 1535
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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us