View previous topic :: View next topic
|
Author |
Message |
Nitin Bhargava
New User
Joined: 22 May 2012 Posts: 32 Location: india
|
|
|
|
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 |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Is the below date typo ??
For the output you expect
the current date should have been
Also you File2 contains only one record ?? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|