in the above code 23rd position in file 1 is date and 20th position is file2 is date that needs to compared..... the above code provide only matching records... but i need 23rd position data in file 1 is greater than 20th position in file 2...
Joined: 02 Jul 2007 Posts: 109 Location: Chennai - India
Thanks Skolusu... it worked out for me...
i have one issue here... the problem is with the date.... in both te files the is in YYDDD (julian format).... i.e if its jan 5th 2010 means... the date field will have 10005 in PD format.... here i have problem with Y2K.... our system is from 1985.... if the record is file 2 is created on jan 5th 1990 then this date field will have 90005... actually speaking 10005 is greater than 90005 as per my records.... but due to numeric comparison it is consdering 90005 is greater and i am not getting correct results.. we use date routines in cobol program to convers the date to CCYYMMDD format for comparison.. but in SORT we never did it...
pls tell me whether this is possible in SORT, if not possible i will jump to COBOL program.... since i almost done with my requirement, only porblem is with DATE....
Since my system started in 1985, i set Y2PAST a 1985. and started comparing the fields.... i cannt test this until monday... but i would like to know comments on this.... because if it dont work again i have to come and post on tuesday which will delay of my work.... pls correct me if its wrong...
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
sasikumar wrote:
but i would like to know comments on this.... because if it dont work again i have to come and post on tuesday which will delay of my work.... pls correct me if its wrong...
Sasikumar,
It would have saved you a lot of time if you had initially posted the date format you had. The syntax you have shown is wrong. The format you have is Y2U.(a 3 byte packed decimal P'yyxxx' (X'yyxxxs') format